visualculture
clone your own copy | download snapshot

Snapshots | iceberg

Inside this repository

urls.py
text/x-python

Download raw (1.4 KB)

from django.conf.urls.defaults import patterns, include, url
from django.views.generic import TemplateView

from django.views.generic.simple import direct_to_template

urlpatterns = patterns('',
    ('^menu.html$', direct_to_template, {
        'template': 'menu.html',
        'extra_context' : { 'HOST' : 'http://osp.constantvzw.org' },
    }),
    ('^about$', direct_to_template, {
        'template': 'about.html',
        'extra_context' : { 'title' : 'about' },
    }),
    ('^cv$', direct_to_template, {
        'template': 'cv.html',
        'extra_context' : { 'title' : 'cv' },
    }),
    ('^writing-tips$', direct_to_template, {
        'template': 'writing-tips.html',
        'extra_context' : { 'title' : 'OSP Writing Tips' },
    }),
    ('^research/$', direct_to_template, {
        'template': 'research-tracks.html',
        'extra_context' : { 'title' : 'OSP research tracks' },
    }),
    ('^summer-school-2013/$', direct_to_template, {'template': 'summer-school-2013.html', }),
    ('^newsletter/$', direct_to_template, {'template': 'newsletter.html', }),
    ('^newsletter-success/$', direct_to_template, {'template': 'newsletter-success.html', })
)

urlpatterns += patterns('osp.views',
    url(r'^$', 'home'),
    url(r'(?P<category>[\w\.\-_]+)/(?P<name>[\w\.\-_]+)/tree/master/(?P<path>.*)$', 'browse'),
    url(r'(?P<category>[\w\.\-_]+)/(?P<name>[\w\.\-_]+)/$', 'project'),
    url(r'(?P<category>[\w\.\-_]+)/$', 'category'),
)