summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Zapke-Gründemann <info@keimlink.de>2011-12-30 02:33:51 +0100
committerMarkus Zapke-Gründemann <info@keimlink.de>2011-12-30 02:33:51 +0100
commit5d0777e9ccd067da14aa55a1e147d38c04654414 (patch)
treebf55508ed3eb7bc35648b3e841a24c67572efa09
parent5b2c404d2955599bb50635b05d9191cb4bd6e34d (diff)
Added projects urls and updated navigation.
-rw-r--r--sublab_project/projects/urls.py11
-rw-r--r--sublab_project/templates/base.html5
-rw-r--r--sublab_project/urls.py3
3 files changed, 17 insertions, 2 deletions
diff --git a/sublab_project/projects/urls.py b/sublab_project/projects/urls.py
new file mode 100644
index 0000000..788e18a
--- /dev/null
+++ b/sublab_project/projects/urls.py
@@ -0,0 +1,11 @@
+from django.conf.urls.defaults import patterns, include, url
+from django.views.generic import DetailView, ListView
+
+from projects.models import Project
+
+
+urlpatterns = patterns('',
+ url('^$', ListView.as_view(model=Project), name='projects_list'),
+ url('^(?P<slug>[-\w]+)/$', DetailView.as_view(model=Project),
+ name='projects_detail'),
+)
diff --git a/sublab_project/templates/base.html b/sublab_project/templates/base.html
index 99470e1..f2d27e2 100644
--- a/sublab_project/templates/base.html
+++ b/sublab_project/templates/base.html
@@ -42,7 +42,7 @@
<a href="/">Home</a>
</li>
<li>
- <a href="/neues/">Neues</a>
+ <a href="{% url news_list %}">Neues</a>
</li>
<li>
<a href="/termine/">Termine</a>
@@ -51,6 +51,9 @@
<a href="/raeume/">Räume</a>
</li>
<li>
+ <a href="{% url projects_list %}">Projekte</a>
+ </li>
+ <li>
<a href="/webcam/">Webcams</a>
</li>
<li>
diff --git a/sublab_project/urls.py b/sublab_project/urls.py
index 7d52b8b..b853b29 100644
--- a/sublab_project/urls.py
+++ b/sublab_project/urls.py
@@ -11,5 +11,6 @@ urlpatterns = patterns('',
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
- url(r'^', include('news.urls'))
+ url(r'^projekte/', include('projects.urls')),
+ url(r'^', include('news.urls')),
)