src/spel/urls.py
author cavaliet
Fri, 07 Mar 2014 13:06:24 +0100
changeset 9 b62e3c1565d0
parent 4 4e53b9ba3453
child 11 e7597b102896
permissions -rwxr-xr-x
search chapters begins to work
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     1
from django.conf import settings
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     2
from django.conf.urls import patterns, include, url
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     3
from django.conf.urls.static import static
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     4
from django.contrib import admin
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     5
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
3
2581135217f2 first templates
cavaliet
parents: 2
diff changeset
     6
from django.views.generic import RedirectView, TemplateView
2
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     7
from ldt.auth.views import login as pf_login
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     8
from ldt.text import VERSION_STR
9
b62e3c1565d0 search chapters begins to work
cavaliet
parents: 4
diff changeset
     9
from .views import ChapterRequest
2
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    10
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    11
#from django.conf import settings
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    12
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    13
# Uncomment the next two lines to enable the admin:
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    14
admin.autodiscover()
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    15
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    16
js_info_dict = {
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    17
    'packages': ('django.contrib.admin',), 
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    18
}
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    19
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    20
urlpatterns = patterns('',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    21
    # Example:
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    22
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    23
    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    24
    # to INSTALLED_APPS to enable admin documentation:
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    25
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    26
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    27
    # Uncomment the next line to enable the admin:
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    28
    (r'^admin/', include(admin.site.urls)),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    29
    (r'^i18n/', include('django.conf.urls.i18n')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    30
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    31
    (r'^ldt/', include('ldt.ldt_utils.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    32
    (r'^user/', include('ldt.user.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    33
    (r'^api/', include('ldt.api.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    34
    (r'^api/' + VERSION_STR + '/text/', include('ldt.text.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    35
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    36
    (r'^auth_accounts/', include('registration.backends.simple.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    37
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    38
    #(r'^accounts/', include('socialauth.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    39
    (r'^accounts/', include('social_auth.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    40
    url(r'^accounts/login/$',pf_login,{'template_name': 'registration/login.html'},name='auth_login'),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    41
    (r'^oauth/', include('oauth_provider.urls')),
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    42
    
3
2581135217f2 first templates
cavaliet
parents: 2
diff changeset
    43
    #(r'^platform/?$', RedirectView.as_view(url='ldt')),
2
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    44
    
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    45
    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
3
2581135217f2 first templates
cavaliet
parents: 2
diff changeset
    46
    url(r'^$', TemplateView.as_view(template_name="spel_home.html"), name='spel_home'),
4
4e53b9ba3453 added spectacle page in views
cavaliet
parents: 3
diff changeset
    47
    url(r'^spectacle$', TemplateView.as_view(template_name="spel_spectacle.html"), name='spel_spectacle'),
9
b62e3c1565d0 search chapters begins to work
cavaliet
parents: 4
diff changeset
    48
    url(r'^chapters$', ChapterRequest.as_view(), name='spel_chapters'),
2
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    49
)
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    50
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    51
urlpatterns += staticfiles_urlpatterns()
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    52
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)