* Fix an off-by-one error when splitting an email in headers and body.
[matthijs/projects/xerxes.git] / urls.py
1 from django.conf import settings
2 from django.conf.urls.defaults import *
3 from ee.influences.models import Character
4 from ee.influences.models import Influence
5
6 chars_dict = {
7     'queryset': Character.objects.all(),
8 }
9  
10 influences_dict = {
11     'queryset': Influence.objects.all(),
12 }
13  
14 urlpatterns = patterns('',
15     url(r'^admin/', include('django.contrib.admin.urls')),
16     url(r'^events/event/(?P<event_id>\d+)/$', 'ee.events.views.event.detail'),
17     url(r'^events/event/(?P<event_id>\d+)/regs$', 'ee.events.views.event.regs'),
18
19     url(r'^influences/$', 'ee.influences.views.index', name='influences_index'),
20     url(r'^influences/influence/add/(\d+)/$', 'ee.influences.views.add', name='influences_add_influence_for_character'),
21     url(r'^influences/influence/add/$', 'ee.influences.views.add', name='influences_add_influence'),
22     url(r'^influences/influence/(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', influences_dict, name='influences_influence_detail'),
23     
24     url(r'^influences/character/$', 'django.views.generic.list_detail.object_list', chars_dict, name='influences_character_list'),
25     url(r'^influences/character/(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', chars_dict, name='influences_character_detail'),
26     url(r'^influences/character/add/$', 'ee.influences.views.addCharacter', name='influences_add_character'),
27
28     url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'base/login.html'}),
29     url(r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login'),
30 )
31
32 if settings.DEBUG:
33     urlpatterns += patterns('',
34         (r'^static/(?P<path>.*)$', 'django.views.static.serve',
35         {'document_root': '/home/matthijs/docs/src/django/ee/static/'}),
36     )