author | ymh <ymh.work@gmail.com> |
Thu, 10 Sep 2015 16:14:35 +0200 | |
changeset 111 | 61e2c48cf694 |
parent 83 | 451521e9f742 |
child 165 | d7e38162478a |
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 |
|
111
61e2c48cf694
correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents:
83
diff
changeset
|
22 |
from django.core.urlresolvers import reverse_lazy |
3 | 23 |
from django.contrib import admin |
24 |
from django.contrib.staticfiles.urls import staticfiles_urlpatterns |
|
25 |
from django.views.generic import RedirectView |
|
83 | 26 |
from django.contrib.auth.decorators import login_required |
3 | 27 |
|
111
61e2c48cf694
correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents:
83
diff
changeset
|
28 |
|
74
daa7aa274e3f
Added options to hide headers in AnnotationsList and LatestAnnotation widgets + streamlined remie urls and templates for consistency
durandn
parents:
23
diff
changeset
|
29 |
from remie.views import RemieSegmentsSingleView, RemieSegmentsGroupView, RemieMarkersView, RemieTeacherView, RemieIframeTesterView |
3 | 30 |
|
31 |
js_info_dict = { |
|
32 |
'packages': ('django.contrib.admin',), |
|
33 |
} |
|
34 |
||
35 |
urlpatterns = [ |
|
36 |
url(r'^admin/', include(admin.site.urls)), |
|
37 |
url(r'^i18n/', include('django.conf.urls.i18n')), |
|
38 |
||
39 |
url(r'^ldt/', include('ldt.ldt_utils.urls')), |
|
40 |
url(r'^user/', include('ldt.user.urls')), |
|
41 |
url(r'^api/', include('ldt.api.urls')), |
|
42 |
url(r'^api/' + VERSION_STR + '/text/', include('ldt.text.urls')), |
|
43 |
||
44 |
url(r'^auth_accounts/', include('registration.backends.simple.urls')), |
|
45 |
||
46 |
url(r'^accounts/', include('social.apps.django_app.urls', namespace='social')), |
|
47 |
url(r'^accounts/login/$',pf_login,{'template_name': 'registration/login.html'},name='auth_login'), |
|
111
61e2c48cf694
correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents:
83
diff
changeset
|
48 |
url(r'^accounts/cas/login/$', 'django_cas_ng.views.login', name='cas_login'), |
61e2c48cf694
correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents:
83
diff
changeset
|
49 |
url(r'^accounts/cas/logout/$', 'django_cas_ng.views.logout', name='cas_logout'), |
3 | 50 |
url(r'^oauth/', include('oauth_provider.urls')), |
23 | 51 |
|
10
7e83c61b1f87
Setting up testing environnement for remie iframe views
durandn
parents:
9
diff
changeset
|
52 |
url(r'^remie/iframetester$', RemieIframeTesterView.as_view(), name="remie_iframe_tester"), |
23 | 53 |
|
111
61e2c48cf694
correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents:
83
diff
changeset
|
54 |
url(r'^remie/workunit/segments_group$', login_required(RemieSegmentsGroupView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_segments_group"), |
61e2c48cf694
correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents:
83
diff
changeset
|
55 |
url(r'^remie/workunit/segments_single$', login_required(RemieSegmentsSingleView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_segments_single"), |
61e2c48cf694
correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents:
83
diff
changeset
|
56 |
url(r'^remie/workunit/markers', login_required(RemieMarkersView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_markers"), |
61e2c48cf694
correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents:
83
diff
changeset
|
57 |
url(r'^remie/workunit/teacher', login_required(RemieTeacherView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_teacher"), |
23 | 58 |
|
10
7e83c61b1f87
Setting up testing environnement for remie iframe views
durandn
parents:
9
diff
changeset
|
59 |
url(r'^/?$', RedirectView.as_view(url='ldt'), name="remie_iframe_container"), |
3 | 60 |
|
61 |
url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), |
|
62 |
||
23 | 63 |
url(r'^short/(?P<base62_id>[A-Za-z0-9]+)$', 'shortener.views.follow', name="shortener_follow") |
64 |
||
3 | 65 |
] |
66 |
||
67 |
urlpatterns += staticfiles_urlpatterns() |
|
68 |
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |