Skip to content

Instantly share code, notes, and snippets.

@botanicus
Created February 5, 2009 13:44
Show Gist options
  • Save botanicus/58716 to your computer and use it in GitHub Desktop.
Save botanicus/58716 to your computer and use it in GitHub Desktop.
# coding=utf-8
from django.conf.urls.defaults import *
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^powertalk/', include('powertalk.foo.urls')),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/(.*)', admin.site.root),
(r'^$', 'powertalk.blog.views.index'),
(r'^rozhovory$', 'powertalk.blog.views.list'),
(r'^rozhovor/(.+)$', 'powertalk.blog.views.show'),
(r'^zpravicky$', 'powertalk.blog.views.news'),
# the magic line
(r'^([\w-]+)$', 'powertalk.blog.views.static'),
)
"""
Use just for rendering static template
Static templates: o-nas, o-powertalku, kontakt
"""
def static(request, template):
return display(template + '.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment