Ejemplo n.º 1
0
# coding: utf-8
from django.conf.urls import patterns, url
from django.contrib.auth import views
from django.contrib.auth.decorators import login_required, user_passes_test

from accounts.views import (
    RegistrationView,
    LoginView,
    LogOut,
    ProfileView,
    ProfileSettingsView,
    ProfileAccessView,
    ProfileModelsListView,
)


urlpatterns = patterns(
    u"accounts.views",
    url(r"^register/$", RegistrationView.as_view(), name=u"registration"),
    url(r"^login/$", LoginView.as_view(), name=u"login"),
    url(r"^logout/$", LogOut.as_view(), name=u"logout"),
    url(r"^profile/$", login_required(ProfileView.as_view()), name=u"profile"),
    url(r"^profile/settings/$", login_required(ProfileSettingsView.as_view()), name=u"profile_settings"),
    url(r"^profile/access/$", login_required(ProfileAccessView.as_view()), name=u"profile_access"),
    url(r"^profile/models_list/$", login_required(ProfileModelsListView.as_view()), name=u"profile_models_list"),
)
Ejemplo n.º 2
0
        'accounts.views.get_favorites',
        name='profile-get-favorites'),
    url(r'^accounts/profile/watch-later/$',
        'accounts.views.add_watch_later',
        name='profile-add-watch-later'),
    url(r'^accounts/profile/watch-later/(?P<page_number>\d+)/$',
        'accounts.views.get_watch_later',
        name='profile-get-watch-later'),
    url(r'^accounts/profile/uploaded/(?P<page_number>\d+)/$',
        'accounts.views.get_uploaded',
        name='profile-get-uploaded'),
    url(r'^accounts/profile/$',
        'accounts.views.profile',
        name='dl-profile'),
    url(r'^accounts/profile/settings/$',
        ProfileSettingsView.as_view(),
        name='profile-settings'),
)

# Distance learning mappings
# TODO: Move to a distance_learning/urls file
urlpatterns += patterns('',
    url(r'^$',
        'distance_learning.views.index',
        name='dl-index'),
    url(r'^video/upload/$',
        'distance_learning.views.upload_video',
        name='dl-video-upload'),

    url(r'^video/all/$',
        'distance_learning.views.all_videos',