author | durandn |
Fri, 28 Aug 2015 17:34:06 +0200 | |
changeset 83 | 451521e9f742 |
parent 74 | daa7aa274e3f |
child 111 | 61e2c48cf694 |
permissions | -rw-r--r-- |
3 | 1 |
"""remieplt URL Configuration |
2 |
||
3 |
The `urlpatterns` list routes URLs to views. For more information please see: |
|
4 |
https://docs.djangoproject.com/en/dev/topics/http/urls/ |
|
5 |
Examples: |
|
6 |
Function views |
|
7 |
1. Add an import: from my_app import views |
|
8 |
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') |
|
9 |
Class-based views |
|
10 |
1. Add an import: from other_app.views import Home |
|
11 |
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') |
|
12 |
Including another URLconf |
|
13 |
1. Add an import: from blog import urls as blog_urls |
|
14 |
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) |
|
15 |
""" |
|
16 |
from ldt.auth.views import login as pf_login |
|
17 |
from ldt.text import VERSION_STR |
|
18 |
||
19 |
from django.conf import settings |
|
20 |
from django.conf.urls import include, url |
|
21 |
from django.conf.urls.static import static |
|
22 |
from django.contrib import admin |
|
23 |
from django.contrib.staticfiles.urls import staticfiles_urlpatterns |
|
24 |
from django.views.generic import RedirectView |
|
83 | 25 |
from django.contrib.auth.decorators import login_required |
3 | 26 |
|
74
daa7aa274e3f
Added options to hide headers in AnnotationsList and LatestAnnotation widgets + streamlined remie urls and templates for consistency
durandn
parents:
23
diff
changeset
|
27 |
from remie.views import RemieSegmentsSingleView, RemieSegmentsGroupView, RemieMarkersView, RemieTeacherView, RemieIframeTesterView |
3 | 28 |
|
29 |
js_info_dict = { |
|
30 |
'packages': ('django.contrib.admin',), |
|
31 |
} |
|
32 |
||
33 |
urlpatterns = [ |
|
34 |
url(r'^admin/', include(admin.site.urls)), |
|
35 |
url(r'^i18n/', include('django.conf.urls.i18n')), |
|
36 |
||
37 |
url(r'^ldt/', include('ldt.ldt_utils.urls')), |
|
38 |
url(r'^user/', include('ldt.user.urls')), |
|
39 |
url(r'^api/', include('ldt.api.urls')), |
|
40 |
url(r'^api/' + VERSION_STR + '/text/', include('ldt.text.urls')), |
|
41 |
||
42 |
url(r'^auth_accounts/', include('registration.backends.simple.urls')), |
|
43 |
||
44 |
url(r'^accounts/', include('social.apps.django_app.urls', namespace='social')), |
|
45 |
url(r'^accounts/login/$',pf_login,{'template_name': 'registration/login.html'},name='auth_login'), |
|
9
3166a35f5f0d
Added CAS Auth middleware and CAS Login urls to remie platform + removed authserver/homestead/.vagrant from repo
durandn
parents:
3
diff
changeset
|
46 |
url(r'^accounts/cas/login/$', 'django_cas_ng.views.login'), |
3166a35f5f0d
Added CAS Auth middleware and CAS Login urls to remie platform + removed authserver/homestead/.vagrant from repo
durandn
parents:
3
diff
changeset
|
47 |
url(r'^accounts/cas/logout/$', 'django_cas_ng.views.logout'), |
3 | 48 |
url(r'^oauth/', include('oauth_provider.urls')), |
23 | 49 |
|
10
7e83c61b1f87
Setting up testing environnement for remie iframe views
durandn
parents:
9
diff
changeset
|
50 |
url(r'^remie/iframetester$', RemieIframeTesterView.as_view(), name="remie_iframe_tester"), |
23 | 51 |
|
83 | 52 |
url(r'^remie/workunit/segments_group$', login_required(RemieSegmentsGroupView.as_view(), login_url="/accounts/cas/login/"), name="remie_segments_group"), |
53 |
url(r'^remie/workunit/segments_single$', login_required(RemieSegmentsSingleView.as_view(), login_url="/accounts/cas/login/"), name="remie_segments_single"), |
|
54 |
url(r'^remie/workunit/markers', login_required(RemieMarkersView.as_view(), login_url="/accounts/cas/login/"), name="remie_markers"), |
|
55 |
url(r'^remie/workunit/teacher', login_required(RemieTeacherView.as_view(), login_url="/accounts/cas/login/"), name="remie_teacher"), |
|
23 | 56 |
|
10
7e83c61b1f87
Setting up testing environnement for remie iframe views
durandn
parents:
9
diff
changeset
|
57 |
url(r'^/?$', RedirectView.as_view(url='ldt'), name="remie_iframe_container"), |
3 | 58 |
|
59 |
url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), |
|
60 |
||
23 | 61 |
url(r'^short/(?P<base62_id>[A-Za-z0-9]+)$', 'shortener.views.follow', name="shortener_follow") |
62 |
||
3 | 63 |
] |
64 |
||
65 |
urlpatterns += staticfiles_urlpatterns() |
|
66 |
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |