django url tag with optional arguments
Project description
Installation
$ [sudo] pip install django-template-url-optional
Examples
{% load url_optional %}
<a href="{% url_optional 'item_list' variable %}">
<a href="{% url_optional 'item_list' %}">
urls.py
urlpatterns = [
path('<str:name>/', views.ItemListView.as_view(),name='item_list'),
path('', views.ItemListView.as_view(),name='item_list'),
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-template-url-optional-2020.3.31.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 867c7718a0a342bacbb2f85c87e6d40526ba7798d0640a8ad3ad2d9988f39121 |
|
MD5 | 1cf54c4b38b0ab6f8cdd90044f4a4b0c |
|
BLAKE2b-256 | fe3007c582b9ae082efd393bd2cc7b17e515cd321dc3f59194d270265018f680 |