diff options
author | Sebastian Reichel <sre@ring0.de> | 2015-05-10 01:06:46 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2015-05-10 01:06:46 +0200 |
commit | 1f448ff2a0df12afbac6c3a30a23829440495cd4 (patch) | |
tree | dbf8e14db6ec25af07c3da1a5466531290af7b61 /inventar | |
parent | 1c3bd651e0477d133e5770930eb8c7bb08c4aff5 (diff) | |
parent | 1dc5ee4fdeb29dc6e058bda5a7c259968b763860 (diff) | |
download | ktt-inventory-system-1f448ff2a0df12afbac6c3a30a23829440495cd4.tar.bz2 |
merge conflict
Diffstat (limited to 'inventar')
-rw-r--r-- | inventar/templates/base.html | 1 | ||||
-rw-r--r-- | inventar/templates/upload.html | 17 | ||||
-rw-r--r-- | inventar/urls.py | 3 |
3 files changed, 20 insertions, 1 deletions
diff --git a/inventar/templates/base.html b/inventar/templates/base.html index a97ed7e..8304687 100644 --- a/inventar/templates/base.html +++ b/inventar/templates/base.html @@ -16,6 +16,7 @@ <li><a href="{% url "home" %}"><img src="/static/home.svg" width="24" height="24" /> {% trans "Home" %}</a></li> <li><a href="{% url "admin:index" %}"><img src="/static/admin.svg" width="24" height="24" /> {% trans "Admin Area" %}</a></li> <li><a href="{% url "stats" %}"><img src="/static/stats.svg" width="24" height="24" /> {% trans "Statistics" %}</a></li> + <li><a href="{% url "upload" %}"><img src="/static/stats.svg" width="24" height="24" /> {% trans "Upload" %}</a></li> <li><br></li> <li>{% trans "Search Item" %}: <ul> diff --git a/inventar/templates/upload.html b/inventar/templates/upload.html new file mode 100644 index 0000000..29a2dbe --- /dev/null +++ b/inventar/templates/upload.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} + {% if user.is_authenticated %} + <h2>Upload new Parent Tree:</h2> + + <form enctype="multipart/form-data" method="post" action="/upload/">{% csrf_token %} + {{form}} + <input type="submit" value="Submit" /> + <ul class="path"> + {% for code in data %} + <li>{{ code }}</li> + {% endfor %} + </ul> + {% endif %} +{% endblock %} diff --git a/inventar/urls.py b/inventar/urls.py index 7162524..370b283 100644 --- a/inventar/urls.py +++ b/inventar/urls.py @@ -24,16 +24,17 @@ from inventory.views import item from inventory.views import search from inventory.views import graph from inventory.views import stats +from inventory.views import upload urlpatterns = patterns('', url(r'^$', home, name='home'), - #(r'^openid/', include('django_openid_auth.urls')), 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'), + url(r'^upload/$', upload, name='upload'), url(r'^admin/', include(admin.site.urls)), ) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) |