summaryrefslogtreecommitdiff
path: root/sublab_project/urls.py
blob: 94c46ff76b460b27c7dfb8345d1a8a710a3dfb2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import ListView

from django.contrib import admin
admin.autodiscover()

from news.models import News

urlpatterns = patterns('',
    # Examples:
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^projekte/', include('projects.urls')),
    url(r'^news/', include('news.urls')),
    url(r'^$', ListView.as_view(
            queryset=News.objects.all()[:5],
            template_name='home.html'), name='home'),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)