Exemplo n.º 1
0
# users/urls.py

from django.conf.urls import url
from users.views import LoginUser, CreateUser, LoginUser, UserRetrieveUpdateAPIView

urlpatterns = [
    url(r'^create/$', CreateUser.as_view()),
    url(r'^login/$', LoginUser.as_view()),
    url(r'^update/$', UserRetrieveUpdateAPIView.as_view()),
]
Exemplo n.º 2
0
from django.conf import settings
from django.conf.urls import url
from django.conf.urls.static import static
from users import views
from users.views import RegisterUser, LoginUser, LogoutUser

urlpatterns = [
	url(r'^registro/$', RegisterUser.as_view(), name = 'registro'),
	url(r'^login/$', LoginUser.as_view(), name = 'login'),
	url(r'^salir/$', LogoutUser.as_view(), name = 'salir'),
	url(r'^cambiar_password/', 'django.contrib.auth.views.password_change', {'template_name':'users/passw_change.html', 'post_change_redirect':'entradas_list'}, name = "cambiar_passwd"),
	url(r'^usuarios_index/', views.usuarios_index, name = 'usuarios_index'),
	url(r'^borrar_usuario/(?P<usuario_id>\w)', views.usuario_borrar, name='usuario_borrar'),
] + static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root = settings.STATIC_ROOT)
Exemplo n.º 3
0
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView

from users.views import LoginUser, GetStuffView, LoginView
from tastypie.api import Api
from rest.api import ClientResource

admin.autodiscover()

v1_api = Api(api_name="v1")
v1_api.register(ClientResource())

urlpatterns = patterns('',
    url(r'^api/', include(v1_api.urls)),
    url(r'^client/', include('clients.urls')),
    url(r'^contract/', include('contracts.urls')),
    url(r'^projects/', include('projects.urls')),
    url(r'^products/', include('products.urls')),
    url(r'^photoshoots/', include('photoshoots.urls')),
    url(r'^users/', include('users.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^auth_google/', LoginView.as_view(), name="auth_google"),
    url(r'^get_my_stuff/', GetStuffView.as_view(), name='get_my_stuff'),
    url(r'^login/', LoginUser.as_view(), name='user_login'),
    #url(r'^login/', 'users.views.user_login', name='user_login'),
    url(r'^logout/', 'users.views.user_logout', name='user_logout'),
    url(r'', TemplateView.as_view(template_name='clients/list.html')),
)

urlpatterns += staticfiles_urlpatterns()
Exemplo n.º 4
0
from django.conf.urls import include, url
from django.contrib import admin

from passengers.views import ListCreatePassenger, GetUpdatePassenger
from trips.views import TripListCreateView, TripRetrieveDeleteView
from users.views import (RegisterUser, LoginUser, LogoutUser, GetUpdateUser,
                         VerifyUserEmail, ChangePassword, RequestPasswordReset,
                         ResetPassword, VerifyPhone)

urlpatterns = [
    url(
        r'^api/v1/',
        include([
            url(r'^user/register/?$', RegisterUser.as_view(), name='register'),
            url(r'^user/login/?$', LoginUser.as_view(), name='login'),
            url(r'^user/logout/?$', LogoutUser.as_view(), name='logout'),
            url(r'^user/change-password/?$',
                ChangePassword.as_view(),
                name='change_pass'),
            url(r'^user/request-password/?$',
                RequestPasswordReset.as_view(),
                name='request_pass'),
            url(r'^user/reset-password/?$',
                ResetPassword.as_view(),
                name='reset_pass'),
            url(r'^user/verify-email/?$',
                VerifyUserEmail.as_view(),
                name='verify_email'),
            url(r'^user/verify-phone/?$',
                VerifyPhone.as_view(),
                name='verify_phone'),
Exemplo n.º 5
0
from django.urls import path
from users.views import CreateUser, EmailAuth, PasswordResetView, LoginUser, LogoutUser, CommentViewSet
from rest_framework import routers

router = routers.SimpleRouter()

urlpatterns = [
    path('registration/',
         CreateUser.as_view({'post': 'create'}),
         name='registration'),
    path('email_auth/',
         EmailAuth.as_view({
             'post': 'create',
             'get': 'get'
         }),
         name='email_auth'),
    path('reset_password/',
         PasswordResetView.as_view({
             'post': 'create',
             'get': 'get'
         }),
         name='reset_password'),
    path('login/', LoginUser.as_view({'post': 'login_user'}), name='login'),
    path('logout/', LogoutUser.as_view({'post': 'logout_user'}),
         name='logout'),
    path('comment_create/',
         CommentViewSet.as_view({'post': 'create'}, name='comment_create'))
]
Exemplo n.º 6
0
from django.conf.urls import url

from users.views import CreateUser, LoginUser, ChangePassword, ForgotPassword, CheckUsernameExists, UserProfileCompletionMeter, UserProfileEvents, Logout, UserProfile, UserProfileStats

urlpatterns = [
    url(r'^create-user/$', CreateUser.as_view(), name="create_user"),
    url(r'^login/$', LoginUser.as_view(), name="login"),
    url(r'^logout/$', Logout.as_view(), name="logout"),
    url(r'^forgot-password/$', ForgotPassword.as_view(), name="forgot_password"),
    url(r'^change-password/$', ChangePassword.as_view(), name="change_password"),
    url(r'^user-exists/$', CheckUsernameExists.as_view(), name="user_exists"),
    url(r'^user-meter/$', UserProfileCompletionMeter.as_view(), name="user_meter"),
    url(r'^update-info/$', UserProfile.as_view(), name="update_info"),


    # my profile page
    #url(r'^my-profile/$', UserProfile.as_view(), name="my_profile"),
    url(r'^my-profile/overview/$', UserProfileEvents.as_view(), name="my_overview"),  
    url(r'^my-profile/profile/$', UserProfile.as_view(), name="my_profile"),    
    #url(r'^my-profile/notification/$', UserProfile.as_view(), name="my_notify"),    
    url(r'^my-profile/stats/$', UserProfileStats.as_view(), name="my_stat"),
]