urls.py 1.38 KB
Newer Older
1
from django.conf.urls import patterns, include, url
2
from django.conf.urls.i18n import i18n_patterns
Christophe Siraut's avatar
Christophe Siraut committed
3 4
from meetingpoll.models import Poll
from django.views.generic import TemplateView, ListView
5

6
# Enable the admin:
chris's avatar
chris committed
7 8
from django.contrib import admin
admin.autodiscover()
9 10

urlpatterns = patterns('',
Christophe Siraut's avatar
Christophe Siraut committed
11
    url(r'^m/', include('meetingpoll.urls')),
Christophe Siraut's avatar
Christophe Siraut committed
12
    url(r'^accounts/', include('registration.backends.default.urls')),
Christophe Siraut's avatar
Christophe Siraut committed
13
    #url(r'^i18n/', include('django.conf.urls.i18n')),
14 15
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
Christophe Siraut's avatar
Christophe Siraut committed
16 17 18 19 20 21 22 23 24 25 26 27
    url(r'^$',
        ListView.as_view(
            queryset=Poll.objects.all(),
            template_name='index.html'),
        name='home'),
    url(r'^nuages/$',
        TemplateView.as_view(template_name='nuages.html'),
        name='documentation'),
    url(r'^languages/$',
        TemplateView.as_view(template_name='languages.html'),
        name='languages'),
    url(r'^accounts/profile/$', 'meetingpoll.views.profile', name='profile'),
28
)
christophe siraut's avatar
christophe siraut committed
29

30
urlpatterns += i18n_patterns('',
Christophe Siraut's avatar
Christophe Siraut committed
31 32 33 34 35 36 37 38
    url(r'^nuages/$',
        TemplateView.as_view(template_name='nuages.html'),
        name='documentation_translated'),
    url(
        r'^$', ListView.as_view(
            queryset=Poll.objects.all(),
            template_name='index.html'),
        name='home_translated'),
39
)
Christophe Siraut's avatar
Christophe Siraut committed
40 41 42 43 44

try:
    from local_urls import *
except ImportError, e:
    pass