diff options
Diffstat (limited to 'inventar')
-rw-r--r-- | inventar/templates/item.html | 6 | ||||
-rw-r--r-- | inventar/templates/search.html | 2 | ||||
-rw-r--r-- | inventar/urls.py | 16 |
3 files changed, 19 insertions, 5 deletions
diff --git a/inventar/templates/item.html b/inventar/templates/item.html index 28343e0..84a8fad 100644 --- a/inventar/templates/item.html +++ b/inventar/templates/item.html @@ -52,7 +52,7 @@ <td> {% for p in parentpath %} {% if p.one_barcode %} - <ul class="path"><li><a href="{% url "item selectedid=p.one_barcode" %}">{{ p.name }} [{{ p.barcodes }}]</a> + <ul class="path"><li><a href="{% url "item" selectedid=p.one_barcode %}">{{ p.name }} [{{ p.barcodes }}]</a> {% else %} <ul class="path"><li>{{ p.name }} [{{ p.barcodes }}] {% endif %} @@ -69,7 +69,7 @@ <td> {% for p in temporary_parentpath %} {% if p.one_barcode %} - <ul class="path"><li><a href="{% url "item selectedid=p.one_barcode" %}">{{ p.name }} [{{ p.barcodes }}]</a> + <ul class="path"><li><a href="{% url "item" selectedid=p.one_barcode %}">{{ p.name }} [{{ p.barcodes }}]</a> {% else %} <ul class="path"><li>{{ p.name }} [{{ p.barcodes }}] {% endif %} @@ -89,7 +89,7 @@ <ul> {% for child in children %} {% if child.one_barcode %} - <li><a href="{% url item selectedid=child.one_barcode %}">{{ child.name }} [{{ child.barcodes }}]</a></li> + <li><a href="{% url "item" selectedid=child.one_barcode %}">{{ child.name }} [{{ child.barcodes }}]</a></li> {% else %} <li>{{ child.name }} [{{ child.barcodes }}]</li> {% endif %} diff --git a/inventar/templates/search.html b/inventar/templates/search.html index 5a1f1cf..c5355d8 100644 --- a/inventar/templates/search.html +++ b/inventar/templates/search.html @@ -14,7 +14,7 @@ {% cycle 'row1' 'row2' as rowcolor silent %} <tr class="{{ rowcolor }}"> {% if result.one_barcode %} - <td><a href="{% url item selectedid=result.one_barcode %}">{{ result.name }}</a></td> + <td><a href="{% url "item" selectedid=result.one_barcode %}">{{ result.name }}</a></td> {% else %} <td>{{ result.name }}</td> {% endif %} diff --git a/inventar/urls.py b/inventar/urls.py index ffb1757..370b283 100644 --- a/inventar/urls.py +++ b/inventar/urls.py @@ -1,3 +1,17 @@ +# Copyright (c) 2012-2013 Sebastian Reichel <sre@ring0.de> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings @@ -16,7 +30,7 @@ urlpatterns = patterns('', url(r'^$', home, name='home'), #(r'^openid/', include('django_openid_auth.urls')), - url(r'^item/(?P<selectedid>[0-9A-Za-z]{4})/$', item, name='item'), + url(r'^item/(?P<selectedid>[0-9A-Za-z]{4,6})/$', item, name='item'), url(r'^search/(?P<term>[^/]+)/$', search, name='search'), url(r'^graph/$', graph, name='graph'), url(r'^stats/$', stats, name='stats'), |