Metadata-Version: 2.4
Name: django-matchcase
Version: 0.1.0
Summary: match case support for django templates
Author-email: Cristian Barajas <cristian.barajasdev@gmail.com>
License-Expression: MIT
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: django>=5.0
Dynamic: license-file

# Django Match case

the django-matchcase is a implementation for support match/case on django template language


## Quick start

1. Install django-matchcase app in INSTALLED_APPS

```python
INSTALLED_APPS = [
    ...,
    "django_matchcase",
]
```

2. load tags in your django templates

```html
{% load match_case %}
<html>
    ...
</html>
```

3. use the match/case tag

```html
{% load match_case %}
...
<div>
    {% match user.rol %}
        {% case "admin" %}
            Welcom admin!!!
        {% case "superadmin" %}
            Hi, Spiderman
        {% default %}
            Hi, {{ user.username }}
    {% endmatch %}
</div>
```

