I still have problems with urls.
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
#new urls
url(r'^$', PostListView.as_view(), name='news-list'),
url(r'^(?P<slug>[-_\w]+)/$', PostDetailView.as_view(), name='blogs-detail'),
#events urls
url(r'^$', EventListView.as_view(), name='events-list'),
url(r'^(?P<slug>[-_\w]+)/$', EventDetailView.as_view(), name='events-detail'),
)
url(r'^$', PostListView.as_view(), name='news-list'),
will list all the news by their headlin in the form of a link.
when i click on the url it output the content of the news , that is giving me the detail url of that news headline.
this url
url(r'^(?P<slug>[-_\w]+)/$', PostDetailView.as_view(), name='blogs-detail'),
will take care of outputting the content
Ok now i have created a second app called events with the following urls
url(r'^$', EventListView.as_view(), name='events-list'),
url(r'^(?P<slug>[-_\w]+)/$', EventDetailView.as_view(), name='events-detail'),