diff options
Diffstat (limited to 'sublab_project')
-rw-r--r-- | sublab_project/projects/urls.py | 11 | ||||
-rw-r--r-- | sublab_project/templates/base.html | 5 | ||||
-rw-r--r-- | sublab_project/urls.py | 3 |
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 07d94d0..7499645 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')), ) |