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)