server/src/remieplt/urls.py
author durandn
Fri, 09 Sep 2016 11:01:58 +0200
changeset 196 1b539c9480f9
parent 176 ba9f193121c3
permissions -rw-r--r--
Imported mdplayer updates + Permalink on each comment (using AnnotationsList and Mediafragment) + view "iframe_hash" that forwards the hash to the iframe to test that the hash jump works properly
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
"""remieplt URL Configuration
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
The `urlpatterns` list routes URLs to views. For more information please see:
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
    https://docs.djangoproject.com/en/dev/topics/http/urls/
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
Examples:
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
Function views
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
    1. Add an import:  from my_app import views
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
Class-based views
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    1. Add an import:  from other_app.views import Home
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
Including another URLconf
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
    1. Add an import:  from blog import urls as blog_urls
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
"""
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
from ldt.auth.views import login as pf_login
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
from ldt.text import VERSION_STR
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
from django.conf import settings
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
from django.conf.urls import include, url
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    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
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
from django.contrib import admin
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
from django.views.generic import RedirectView
83
451521e9f742 Updated iframes to work with CAS regular webflow
durandn
parents: 74
diff changeset
    26
from django.contrib.auth.decorators import login_required
3
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
111
61e2c48cf694 correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents: 83
diff changeset
    28
196
1b539c9480f9 Imported mdplayer updates + Permalink on each comment (using AnnotationsList and Mediafragment) + view "iframe_hash" that forwards the hash to the iframe to test that the hash jump works properly
durandn
parents: 176
diff changeset
    29
from remie.views import RemieSegmentsSingleView, RemieSegmentsGroupView, RemieMarkersView, \
1b539c9480f9 Imported mdplayer updates + Permalink on each comment (using AnnotationsList and Mediafragment) + view "iframe_hash" that forwards the hash to the iframe to test that the hash jump works properly
durandn
parents: 176
diff changeset
    30
                        RemieTeacherView, RemieSegmentsPreviewView, RemieMarkersPreviewView, \
1b539c9480f9 Imported mdplayer updates + Permalink on each comment (using AnnotationsList and Mediafragment) + view "iframe_hash" that forwards the hash to the iframe to test that the hash jump works properly
durandn
parents: 176
diff changeset
    31
                        RemieMarkersTeacherView, RemieIframeTesterView, RemieIframeHashView
3
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
js_info_dict = {
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
    'packages': ('django.contrib.admin',),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
}
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
urlpatterns = [
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
    url(r'^admin/', include(admin.site.urls)),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
    url(r'^i18n/', include('django.conf.urls.i18n')),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    url(r'^ldt/', include('ldt.ldt_utils.urls')),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    url(r'^user/', include('ldt.user.urls')),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    url(r'^api/', include('ldt.api.urls')),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
    url(r'^api/' + VERSION_STR + '/text/', include('ldt.text.urls')),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
    url(r'^auth_accounts/', include('registration.backends.simple.urls')),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
    url(r'^accounts/', include('social.apps.django_app.urls', namespace='social')),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
    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
    50
    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
    51
    url(r'^accounts/cas/logout/$', 'django_cas_ng.views.logout', name='cas_logout'),
3
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
    url(r'^oauth/', include('oauth_provider.urls')),
23
16303a95fdb8 add a simple url shortener
ymh <ymh.work@gmail.com>
parents: 10
diff changeset
    53
10
7e83c61b1f87 Setting up testing environnement for remie iframe views
durandn
parents: 9
diff changeset
    54
    url(r'^remie/iframetester$', RemieIframeTesterView.as_view(), name="remie_iframe_tester"),
196
1b539c9480f9 Imported mdplayer updates + Permalink on each comment (using AnnotationsList and Mediafragment) + view "iframe_hash" that forwards the hash to the iframe to test that the hash jump works properly
durandn
parents: 176
diff changeset
    55
    url(r'^remie/iframe_hash', RemieIframeHashView.as_view(), name="remie_iframe_hash"),
1b539c9480f9 Imported mdplayer updates + Permalink on each comment (using AnnotationsList and Mediafragment) + view "iframe_hash" that forwards the hash to the iframe to test that the hash jump works properly
durandn
parents: 176
diff changeset
    56
    
111
61e2c48cf694 correct cas login url for cas protected resources
ymh <ymh.work@gmail.com>
parents: 83
diff changeset
    57
    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
    58
    url(r'^remie/workunit/segments_single$', login_required(RemieSegmentsSingleView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_segments_single"),
165
d7e38162478a Added 2 preview scenarii for remie + made remie iframes load jquery.js instead of jquery.min.js in an attemps to fix
durandn
parents: 111
diff changeset
    59
    url(r'^remie/workunit/segments_preview$', login_required(RemieSegmentsPreviewView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_segments_preview"),
176
ba9f193121c3 Adjustements on Markers scenario (now displays a "teacher" markers row) + Added a new "markers_teacher" scenario to edit the teacher markers and browse user markers
durandn
parents: 165
diff changeset
    60
    url(r'^remie/workunit/markers_teacher$', login_required(RemieMarkersTeacherView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_markers_teacher"),
165
d7e38162478a Added 2 preview scenarii for remie + made remie iframes load jquery.js instead of jquery.min.js in an attemps to fix
durandn
parents: 111
diff changeset
    61
    url(r'^remie/workunit/markers$', login_required(RemieMarkersView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_markers"),
d7e38162478a Added 2 preview scenarii for remie + made remie iframes load jquery.js instead of jquery.min.js in an attemps to fix
durandn
parents: 111
diff changeset
    62
    url(r'^remie/workunit/markers_preview$', login_required(RemieMarkersPreviewView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_markers_preview"),
d7e38162478a Added 2 preview scenarii for remie + made remie iframes load jquery.js instead of jquery.min.js in an attemps to fix
durandn
parents: 111
diff changeset
    63
    url(r'^remie/workunit/teacher$', login_required(RemieTeacherView.as_view(), login_url=reverse_lazy('cas_login')), name="remie_teacher"),
23
16303a95fdb8 add a simple url shortener
ymh <ymh.work@gmail.com>
parents: 10
diff changeset
    64
10
7e83c61b1f87 Setting up testing environnement for remie iframe views
durandn
parents: 9
diff changeset
    65
    url(r'^/?$', RedirectView.as_view(url='ldt'), name="remie_iframe_container"),
3
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
    url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
23
16303a95fdb8 add a simple url shortener
ymh <ymh.work@gmail.com>
parents: 10
diff changeset
    69
    url(r'^short/(?P<base62_id>[A-Za-z0-9]+)$', 'shortener.views.follow', name="shortener_follow")
16303a95fdb8 add a simple url shortener
ymh <ymh.work@gmail.com>
parents: 10
diff changeset
    70
3
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
]
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
urlpatterns += staticfiles_urlpatterns()
fc0f3e398166 Creation of Django server project
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)