Esempio n. 1
0
from django.conf.urls import patterns, url
from usuarios.views import RegistrarUsuarioView

urlpatterns = [
    url(r'^registrar/$', RegistrarUsuarioView.as_view(), name='registrar'),
    url(r'^login/$',
        'django.contrib.auth.views.login', {'template_name': 'login.html'},
        name='login'),
    url(r'^logout/$',
        'django.contrib.auth.views.logout_then_login',
        {'login_url': '/login/'},
        name='logout')
]
Esempio n. 2
0
from django.conf.urls import patterns, url
from usuarios.views import RegistrarUsuarioView

urlpatterns = patterns(
    '', url(r'^registrar/$', RegistrarUsuarioView.as_view(), name="registrar"),
    url(r'^login/$',
        'django.contrib.auth.views.login', {'template_name': 'login.html'},
        name='login'),
    url(r'^logout/&',
        'django.contrib.auth.views.logout_then_login',
        {'login_url': '/login/'},
        name='logout'))
Esempio n. 3
0
from django.urls import path
from usuarios.views import RegistrarUsuarioView
from django.contrib.auth.views import login, logout_then_login


urlpatterns = [
    path('registrar/', RegistrarUsuarioView.as_view(), name='registrar'),
    path('login/', login, {'template_name':'login.html'}, name='login'),
    path('logout/', logout_then_login, {'login_url':'/login/'}, name='logout'),
]
Esempio n. 4
0
 def teste_create(self):
     found = resolve('/registrar/')
     self.assertEqual(found.func, RegistrarUsuarioView.as_view())
Esempio n. 5
0
from django.conf.urls import patterns, url
    
from usuarios.views import RegistrarUsuarioView

urlpatterns = patterns('',
    url(r'^registrar/$', RegistrarUsuarioView.as_view(), name="registrar"),
    url(r'^login/$', 'django.contrib.auth.views.login', {'template_name':'usuarios/login.html'}, name='login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout_then_login', {'login_url':'/login/'}, name='logout'),
)
Esempio n. 6
0
from django.conf.urls import  include, url
from usuarios.views import RegistrarUsuarioView
from django.contrib.auth import views as auth_views


urlpatterns = [
   
    url(r'^registrar/$', RegistrarUsuarioView.as_view(), name='registrar'), 
    url(r'^login/$', auth_views.login, {'template_name' : 'login.html'}, name="login"),
   	url(r'^logout/$', auth_views.logout_then_login, {'login_url' : '/login/'}, name="logout")

]
Esempio n. 7
0
from django.conf.urls import url
from usuarios.views import RegistrarUsuarioView, AlterarUsuarioView, usuario, login
from django.urls import path, include

urlpatterns = [
    url(r'^usuario-registrar$',
        RegistrarUsuarioView.as_view(),
        name='registrar_usuario'),
    url(r'^usuario-alterar/(?P<usuario_id>.*)$',
        AlterarUsuarioView.as_view(),
        name='alterar_usuario'),
    url(r'^usuario/(?P<usuario_id>\d+)$', usuario, name='usuario'),
    path('usuario/', include('django.contrib.auth.urls'))
]

# http://127.0.0.1:8000/usuario/login/
Esempio n. 8
0
#from django.conf.utls import patterns, url
from django.contrib import admin
from django.urls import include, path, re_path
#from django.conf.urls import url
from usuarios.views import RegistrarUsuarioView
from django.contrib.auth.views import login, logout_then_login
#from django.contrib.auth import views as auth_views

urlpatterns = [
    # url(r'^', views.index)
    #path('', index),
    #path('perfis/', exibir),
    re_path(r'^registrar/$', RegistrarUsuarioView.as_view(), name="registrar"),
    re_path(r'^login/$', login, {'template_name': 'login.html'}, name="login"),
    re_path(r'^logout/$',
            logout_then_login, {'login_url': '/login/'},
            name="logout"),
    #re_path(r'^perfis/(?P<perfil_id>\d+)$', exibir, name="exibir"),
    #re_path(r'^perfis/(?P<perfil_id>\d+)/convidar$', convidar, name='convidar'),
    #re_path(r'^convite/(?P<convite_id>\d+)/aceitar$', aceitar, name='aceitar'),
]
from django.contrib import admin
from django.urls import path, include
from usuarios.views import RegistrarUsuarioView
from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('perfis.urls')),
    path('registrar/',
         RegistrarUsuarioView.as_view(template_name='registrar.html'),
         name='registrar'),
    path('login/', LoginView.as_view(template_name='login.html'),
         name='login'),
    path('logout/', LogoutView.as_view(), name='logout')
]
Esempio n. 10
0
from django.conf.urls import url
from django.urls import path, re_path
from usuarios.views import RegistrarUsuarioView
from django.contrib.auth import views as auth_views
from usuarios.views import RegistrarUsuarioView

urlpatterns = [
    re_path(r'^registrar$', RegistrarUsuarioView.as_view(), name='registrar'),
    re_path(r'^login$',
            auth_views.login, {'template_name': 'login.html'},
            name='login'),
    re_path(r'^logout$', auth_views.logout, {'next_page': '/'}, name='logout')
]