Exemplo n.º 1
0
    url(r'^register/', TemplateView.as_view(template_name="register.html")),
    url(r'^flatpage/', TemplateView.as_view(template_name="flatpage.html")),
    url(r'^profile/edit/?$', ProfileEditView.as_view(), name="profile_edit"),
    url(r'^profile/edit/social/?$',
        UserSocialAccountCreateView.as_view(),
        name="profile_edit_add_social"),
    url(r'^profile/edit/social/(?P<pk>[1-9][0-9]*)/?$',
        UserSocialAccountDeleteView.as_view(),
        name="profile_edit_delete_social"),
    url(r'^profile/(?P<username>[\w.+-]+)?/?$',
        ProfileView.as_view(),
        name="profile"),

    # The django-allauth
    url(r'^accounts/', include('allauth.urls')),
    url(r'^api/user_search/?$', UserSearchView.as_view(), name='user_search'),
    url(r'^api/student_search/?$',
        StudentSearchView.as_view(),
        name='student_search'),
    url(r'^pages(?P<url>.*)$', FlatpageView.as_view(), name='flatpage'),

    # The django-rosetta
    url(r'^rosetta/', include('rosetta.urls')),
    url(r'^markdown/', include('django_markdown.urls')),
    url(r'^djangular.js',
        TemplateView.as_view(template_name='djangular.js',
                             content_type='text/javascript'),
        name='djangular'),
)

if settings.TWITTER_USER != '':
Exemplo n.º 2
0
from django.conf.urls import *
from django.views.generic import TemplateView

from django.contrib.auth.decorators import login_required
from django.contrib.auth import views as auth_views

from accounts.views import ActivationView,RegistrationView,UserUpdateView,ChangePasswordView,UserProfileView,AllExamsView, AllQuestionsView, UserSearchView
import accounts.views

from numbas import settings



urlpatterns = patterns('',
        url(r'^users/search/$',UserSearchView.as_view(),name='user_search'),

        url(r'^accounts/password/change/done/$',
            auth_views.password_change_done,
            name='auth_password_change_done'),
        url(r'^accounts/password/reset/$',
            auth_views.password_reset,
            name='auth_password_reset'),
        url(r'^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
            auth_views.password_reset_confirm,
            name='auth_password_reset_confirm'),
        url(r'^accounts/password/reset/complete/$',
            auth_views.password_reset_complete,
            name='password_reset_complete'),
        url(r'^accounts/password/reset/done/$',
            auth_views.password_reset_done,
Exemplo n.º 3
0
# Django imports.
from django.urls import path, include
from django.views.generic.base import TemplateView

# App imports.
from accounts.views import (
	UserLoginView, SetPasswordView,
	UserDetailsView, UsersListView,
	UserSearchView
)


urlpatterns = [
    # # Route to register users.
    # path(r'register/', UserRegisterView.as_view(), name='user-register'),
    # Route to login registered users.
    path('', TemplateView.as_view(template_name = 'home.html'), name = 'home'),
    path('login/', include('django.contrib.auth.urls')),
    path('social-auth/', include('social_django.urls', namespace='social')),

    # APIs
    path('normal_login/', UserLoginView.as_view(), name='user-login'),
    path('set_password/', SetPasswordView.as_view(), name='set-password'),
    path('user/all/', UsersListView.as_view(), name='users-list'),
    path(r'user/<int:user_id>/', UserDetailsView.as_view(), name='user-details'),
    path('user/search/', UserSearchView.as_view(), name='user-search')
]
Exemplo n.º 4
0
    # Messages
    url(r'^course/(?P<course_slug>[-a-zA-Z0-9_]+)/messages/$', GenericCourseView.as_view(template_name="messages.html"), name='messages'),
    url(r'^course/(?P<course_slug>[-a-zA-Z0-9_]+)/message/(?P<message_id>[1-9][0-9]*)$', GenericCourseView.as_view(template_name="message.html"), name='message_detail'),

    # Reports
    url(r'^course/(?P<course_slug>[-a-zA-Z0-9_]+)/reports/$', GenericCourseView.as_view(template_name="administration/stats.html"), name='reports'),

    # Authentication
    url(r'^logout/', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='timtec_logout'),

    url(r'^profile/edit/?$', ProfileEditView.as_view(), name="profile_edit"),
    url(r'^profile/(?P<username>[\w.+-]+)?/?$', ProfileView.as_view(), name="profile"),

    # The django-allauth
    url(r'^accounts/', include('allauth.urls')),
    url(r'^api/user_search/?$', UserSearchView.as_view(), name='user_search'),
    url(r'^api/student_search/?$', StudentSearchView.as_view(), name='student_search'),

    url(r'^pages(?P<url>.*)$', FlatpageView.as_view(), name='flatpage'),

    # The django-rosetta
    url(r'^rosetta/', include('rosetta.urls')),

    url(r'^markdown/', include('django_markdown.urls')),

)

if settings.TWITTER_USER != '':
    from core.views import TwitterApi

    urlpatterns += (url(r'^api/twitter/?$', TwitterApi.as_view(), name='twitter'),)
Exemplo n.º 5
0
"""

from django.conf.urls import patterns, url
from django.views.generic import TemplateView

from django.contrib.auth.decorators import login_required
from django.contrib.auth import views as auth_views

from accounts.views import ActivationView, RegistrationView, UserUpdateView, ChangePasswordView, UserProfileView, AllExamsView, AllQuestionsView, UserSearchView
import accounts.views

from numbas import settings

urlpatterns = patterns(
    '',
    url(r'^users/search/$', UserSearchView.as_view(), name='user_search'),
    url(r'^accounts/password/change/done/$',
        auth_views.password_change_done,
        name='auth_password_change_done'),
    url(r'^accounts/password/reset/$',
        auth_views.password_reset,
        name='auth_password_reset'),
    url(r'^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
        auth_views.password_reset_confirm,
        name='auth_password_reset_confirm'),
    url(r'^accounts/password/reset/complete/$',
        auth_views.password_reset_complete,
        name='password_reset_complete'),
    url(r'^accounts/password/reset/done/$',
        auth_views.password_reset_done,
        name='password_reset_done'),
Exemplo n.º 6
0
from django.urls import path
from oauth2_provider.views import AuthorizationView, TokenView

from accounts.views import (
    LabsProtectedViewSet,
    LoginView,
    LogoutView,
    ProductAdminView,
    ProtectedViewSet,
    UserSearchView,
    UUIDIntrospectTokenView,
)

app_name = "accounts"

urlpatterns = [
    path("login/", LoginView.as_view(), name="login"),
    path("logout/", LogoutView.as_view(), name="logout"),
    path("search/", UserSearchView.as_view(), name="search"),
    path("authorize/", AuthorizationView.as_view(), name="authorize"),
    path("token/", TokenView.as_view(), name="token"),
    path("introspect/", UUIDIntrospectTokenView.as_view(), name="introspect"),
    path("productadmin/", ProductAdminView.as_view(), name="productadmin"),
    path("protected/", ProtectedViewSet.as_view(), name="protected"),
    path("labsprotected/",
         LabsProtectedViewSet.as_view(),
         name="labsprotected"),
]