from django.conf.urls.defaults import patterns, url
from django.views.generic import TemplateView
from noticias import views
urlpatterns = patterns("",
# Index static page
url(r'^$|^index/$', TemplateView.as_view(template_name='noticias/index.html'), name="index"),
# List view
url(r'^noticias/$', views.Noticias.as_view(), name="noticias"),
# Update view
url(r'^noticia/(?P\d+)/$', views.UpdateNoticia.as_view(), name="update_noticia"),
# Create view
url(r'^noticia/create/$', views.CreateNoticia.as_view(), name="create_noticia"),
# Detail view
url(r'^noticia/(?P\d+)/$', views.Noticia.as_view(), name="noticia"),
# Delete view
url(r'^noticia/delete/(?P\d+)/$', views.DeleteNoticia.as_view(), name="delete_noticia"),
)
URLs