Commit a868c325 authored by fred's avatar fred
Browse files

fix display of news view

parent 2cbd7fcd
......@@ -16,8 +16,8 @@ urlpatterns = patterns('',
url(r'^ckeditor/', include('ckeditor.urls')),
url(r'^get$', 'panikweb.views.get', name='get'),
url(r'^listen$', 'panikweb.views.listen', name='listen'),
url(r'^news/', '', name='news'),
url(r'^news/(?P<slug>[\w,-]+)$', '', name='news-view'),
url(r'^news/$', '', name='news'),
url(r'^news/(?P<slug>[\w,-]+)$', 'panikweb.views.newsitem', name='news-view'),
(r'^api/v2/', include('fiber.rest_api.urls')),
(r'^admin/fiber/', include('fiber.admin_urls')),
......@@ -2,6 +2,7 @@ from datetime import datetime, timedelta
import math, uuid
from django.views.generic.base import TemplateView
from django.views.generic.detail import DetailView
from django.views.decorators.csrf import csrf_exempt
from jsonresponse import to_json
......@@ -221,3 +222,9 @@ def onair(request):
'url': d['emission'].get_absolute_url()
return d
class NewsItemDetailView(DetailView):
model = NewsItem
newsitem = NewsItemDetailView.as_view()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment