diff options
Diffstat (limited to 'app/dispatch')
| -rw-r--r-- | app/dispatch/templates/dispatch/nav.html | 10 | ||||
| -rw-r--r-- | app/dispatch/templatetags/custom_tags.py | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/app/dispatch/templates/dispatch/nav.html b/app/dispatch/templates/dispatch/nav.html new file mode 100644 index 0000000..5ba40d9 --- /dev/null +++ b/app/dispatch/templates/dispatch/nav.html @@ -0,0 +1,10 @@ +{% if user.is_authenticated %} + <li><a href="{% url 'load_list' %}">Loads</a></li> + {% if user.is_superuser %} + <li><a href="{% url 'driver_list' %}">Drivers</a></li> + <li><a href="{% url 'company_list' %}">Companies</a></li> + {% endif %} + <li><a href="{% url 'logout' %}">Logout</a></li> +{% else %} + <li><a href="{% url 'login' %}">Login</a></li> +{% endif %} diff --git a/app/dispatch/templatetags/custom_tags.py b/app/dispatch/templatetags/custom_tags.py new file mode 100644 index 0000000..e242551 --- /dev/null +++ b/app/dispatch/templatetags/custom_tags.py @@ -0,0 +1,7 @@ +from django import template + +register = template.Library() + +@register.simple_tag +def listForCommaString(string): + return string.split(',') |
