Merge branch 'master' of ssh://stefankoegl@repo.or.cz/srv/git/ochimeru
[ochimeru.git] / ochimeru / urls.py
blob7830cbf5a4e502f66c8fdc00e6178eef7b186c6b
1 from django.conf.urls.defaults import *
2 import os
4 # Uncomment the next two lines to enable the admin:
5 from django.contrib import admin
6 admin.autodiscover()
8 urlpatterns = patterns('',
9 # Example:
10 # (r'^ochimeru/', include('ochimeru.foo.urls')),
11 (r'^$', 'ochimeru.cards.views.home'),
12 (r'^login$', 'ochimeru.cards.views.login_user'),
13 (r'^level/(?P<level>\d+)/$', 'ochimeru.cards.views.level'),
14 (r'^level/(?P<level>\d+)/(?P<card_id>\d+)$', 'ochimeru.cards.views.card'),
15 (r'^level/(?P<level>\d+)/(?P<card_id>\d+)/show$', 'ochimeru.cards.views.answer'),
16 (r'^level/(?P<level>\d+)/(?P<card_id>\d+)/check$', 'ochimeru.cards.views.check'),
17 (r'^browse/(?P<page>\d*)', 'ochimeru.cards.views.browse'),
19 # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
20 # to INSTALLED_APPS to enable admin documentation:
21 # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
23 # Uncomment the next line to enable the admin:
24 (r'^admin/', include(admin.site.urls)),
25 (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.abspath('%s/static/' % os.path.dirname(__file__))}),
28 print os.path.abspath('%s/static/' % os.path.dirname(__file__))