Exemplo n.º 1
0
from django.conf.urls import patterns, url
from app.users.authentication.views import LoginView, LogoutView
from app.users.authentication.forms import EmailAuthenticationForm

urlpatterns = patterns('',
                        url('^login$', LoginView.as_view(form_class=EmailAuthenticationForm), name='login_view'),
                        url('^logout$', LogoutView.as_view(), name='logout_view'),                        
                    )
Exemplo n.º 2
0
from app.users.posts.views import add_post, delete_post, post_comment, delete_comment
#from users.api import SiteUserResource

#siteuser_resource = SiteUserResource()
"""
(r'^login/$', 
 custom_login, 
 {'template_name': 'users/login.html'}),

(r'^logout/$', 
 'custom_logout', 
 {'template_name': 'users/logged_out.html'}),
 """
urlpatterns = patterns('app.users.authentication',                       
                        url(r'^login$', 
                            LoginView.as_view(form_class=EmailAuthenticationForm), 
                            {'template_name': 'users/login.html'},
                            name='login_view'),
                       
                        url('^logout$', 
                            LogoutView.as_view(), 
                            name='logout_view'),    
)
urlpatterns += patterns('app.users.registration.views',
                        url('^register', 
                            RegistrationView.as_view(form_class=RegistrationForm),
                            {'template_name': 'users/register.html'}, 
                            name='register_view'),
                        
                        url('^register/action', 
                            'perform_action',