Beispiel #1
0
    serializer_class = UserSerializer


# Routers provide an easy way of automatically determining the URL conf.
router = routers.DefaultRouter()
# router.register(r'users', UserViewSet)

# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
    url(r'^$', main, name='main'),
    url(r'^examples/$', examples, name='examples'),
    url(r'^examples/dataset/$', examples_dataset, name='examples_dataset'),
    url(r'^features/$', feature_list, name='features'),
    url(r'^model/', include(('model.urls', 'model'), namespace='model')),
    url(r'^dataset/', include(
        ('dataset.urls', 'dataset'), namespace='dataset')),
    url(r'^accounts/', include('django.contrib.auth.urls')),
    url(r'^admin/', admin.site.urls),
    url(r'^signup/', UserCreateView.as_view(), name='user_create'),
    url(r'^activate/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        activate,
        name='activate'),
    # url(r'^', include(router.urls)),
    url(
        r'^api-auth/',
        include(('rest_framework.urls', 'rest_framework'),
                namespace='rest_framework')),
    # ]
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #2
0
from django.urls import path
from user.views import UserListView,UserCreateView,UserDeleteView,UserUpdateView,UserDetailView,UserLoginView,UserLogoutView
app_name = 'user'

urlpatterns = [
     path('usuarios',UserListView.as_view(),name = 'listar_usuarios'),
     path('criarusuario',UserCreateView.as_view(),name = 'criar_usuario'),
     path('usuarios/<int:pk>/apagar',UserDeleteView.as_view(),name = 'deletar_usuario'),
     path('usuarios/<int:pk>/editar',UserUpdateView.as_view(),name = 'editar_usuario'),
     path('usuarios/<int:pk>/detalhar',UserDetailView.as_view(),name = 'detalhar_usuario'),
     path('usuarios/login',UserLoginView.as_view(),name='logar_usuario'),
     path('usuarios/logout',UserLogoutView.as_view(),name = 'deslogar_usuario'),
]

Beispiel #3
0
from django.urls import path
from user.views import UserCreateView, CreateTokenView, ModifyUserView

app_name = 'user'

urlpatterns = [
    path('create/', UserCreateView.as_view(), name='create'),
    path('token/', CreateTokenView.as_view(), name='token'),
    path('update/', ModifyUserView.as_view(), name='update')
]
Beispiel #4
0
from user.views import UserView, UserCreateView, SellerCreateView, DeliveryInfoView, ChangePasswordView, \
    session_auth_view
from django.urls import path

urlpatterns = [
    path('user/$', UserView.as_view(), name='user'),
    path('user/create/$', UserCreateView.as_view(), name='user-create'),
    path('seller/create/$', SellerCreateView.as_view(), name='seller-create'),
    path('deliveryinfo/$', DeliveryInfoView.as_view(), name='delivery-info'),
    path('auth/$', session_auth_view, name='auth'),
    path('password/$', ChangePasswordView.as_view(), name='change-password'),
]
Beispiel #5
0
    UserCreateView,
    UserUpdateView,
    UserDetailView
)

app_name = 'user'

urlpatterns = [
    url(
        r'^update/(?P<email>[\w.@+-]+)/$',
        UserUpdateView.as_view(),
        name='update-user'
    ),
    url(
        r'^delete/(?P<email>[\w.@+-]+)/$',
        UserDeleteView.as_view(),
        name='delete-user'
    ),
    url(
        r'^create/$',
        UserCreateView.as_view(),
        name='create-user'
    ),
    url(
        r'^(?P<email>[\w.@+-]+)/$',
        UserDetailView.as_view(),
        name='get-user'
    ),
    url(r'^$', UserListView.as_view(), name='users-list'),
]
Beispiel #6
0
""" urls for the user module (/user/*) """
from django.urls import path
from django.urls.conf import include
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView
from user.views import UserListView, UserCreateView, UserUpdateView, \
    UserDetailView, UserSettingsView, UserLoginView
from config import settings

urlpatterns = [
    path('', UserListView.as_view(), name='user_list'),
    path('new/', UserCreateView.as_view(), name='user_create'),
    path('<int:pk>/', UserDetailView.as_view(), name='user_detail'),
    path('update/', UserUpdateView.as_view(), name='user_update'),
    path('settings/', UserSettingsView.as_view(), name='user_settings'),
    path('pw/',
         PasswordChangeView.as_view(template_name='user/user_form.html'),
         name='user_pw'),
    path('login/', UserLoginView.as_view(), name='user_login'),
    path('logout/', LogoutView.as_view(), name='user_logout'),
]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns = [
        path('__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns
Beispiel #7
0
# coding=utf-8
###############################################################################
# Copyright 2013 Jean-Matthieu BARBIER <*****@*****.**>
###############################################################################
# This file is part of FollowDoc
#
# FollowDoc is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FollowDoc is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with FollowDoc.  If not, see <http://www.gnu.org/licenses/>
###############################################################################

from django.conf.urls import patterns, url
from user.views import UserListView, UserCreateView, UserDetailView, \
    UserLoginView, UserUpdateView
urlpatterns = patterns('',
    url(r'^$', UserListView.as_view(), name='user_list'),
    url(r'^_create/', UserCreateView.as_view(), name='user_create'),
    url(r'^(?P<pk>[\d]+)/$', UserDetailView.as_view(), name='user_detail'),
    url(r'^(?P<pk>[\d]+)/_update/$', UserUpdateView.as_view(), name='user_update'),
    url(r'login/$', UserLoginView.as_view(), name='main_login')
)
Beispiel #8
0
# -*- coding:utf-8 -*-
__author__ = '*****@*****.**'

from django.urls import path, re_path, include
from user.views import (LoginView, LogoutView, UserListView, UserCreateView,
                        UserOpHistoryLog)

urlpatterns = [
    re_path(r'^login/$', LoginView.as_view(), name='login'),
    re_path(r'^logout/$', LogoutView.as_view(), name='logout'),
    re_path(r'^user/$', UserListView.as_view(), name='user_list'),
    re_path(r'^user/create/$', UserCreateView.as_view(), name='user_add'),
    re_path(r'^log/user/$', UserOpHistoryLog.as_view(), name='log-user')
]