Example #1
0
from django.conf.urls import patterns, url
from django.views.generic import TemplateView

from accounts.views import LogoutView, TeamCreateView, TeamUpdateView, TeamAddUserView, TeamLeaveView, \
    TeamDeleteView, UserDetailsView


urlpatterns = patterns('',
    url(r'^login',
        TemplateView.as_view(template_name='accounts/login.html'),
        name='login'),
    url(r'^logout',
        LogoutView.as_view(),
        name='logout'),
    url(r'^(?P<team>[-a-zA-Z0-9_\.]+)/details',
        UserDetailsView.as_view(),
        name='user_details'),

    url(r'^teams/create',
        TeamCreateView.as_view(),
        name='team_create'),
    url(r'^teams/(?P<team>[-a-zA-Z0-9_\.]+)/modify',
        TeamUpdateView.as_view(),
        name='team_update'),
    url(r'^teams/(?P<team>[-a-zA-Z0-9_\.]+)/add',
        TeamAddUserView.as_view(),
        name='team_add_user'),
    url(r'^teams/(?P<team>[-a-zA-Z0-9_\.]+)/leave',
        TeamLeaveView.as_view(),
        name='team_leave'),
    url(r'^teams/(?P<team>[-a-zA-Z0-9_\.]+)/delete',
from django.conf.urls import url

from accounts.views import UserDetails, AuthenticationView, LogoutView


urlpatterns = [
    url(r'^me$', UserDetails.as_view(), name='api-user-details'),
    url(r'^login$', AuthenticationView.as_view(), name='api-user-login'),
    url(r'^logout$', LogoutView.as_view(), name='api-user-logout'),
]
Example #3
0
File: urls.py Project: flowdow/edge
from django.conf.urls import patterns, include, url
from django.contrib import admin
from accounts.views import SignInAndSignUp, LogoutView

urlpatterns = patterns(
    '',
    url(r'^$', SignInAndSignUp.as_view(template_name='home.html'),
        name='home'),
    url(r'^accounts/logout$', LogoutView.as_view(), name='logout'),
    url(r'^admin/', include(admin.site.urls)),
)
Example #4
0
from django.urls import path
from accounts.views import LoginView, RegisterView, LogoutView
from rest_framework.authtoken.views import obtain_auth_token

urlpatterns = [
    path('login/', obtain_auth_token),
    path('register/', RegisterView.as_view()),
    path('logout/', LogoutView.as_view()),
    
    #path('obtain-auth-token/', obtain_auth_token),
]
Example #5
0
from django.contrib.auth import views as auth_views
from nueoffshore.views import home
from django.conf.urls import handler404, handler500, handler403

from accounts.views import (
    LogoutView,
    login_view,
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('nueoffshore.urls')),
    path('accounts/', include('accounts.urls')),
    path('ckeditor/', include('ckeditor_uploader.urls')),
    path('login/', login_view, name="login"),
    path('logout/', LogoutView.as_view(), name="logout"),

    # # rest framework urls
    # path('api/', include([
    #     path('', include('accounts.api.urls')),
    #     path('', include('nueoffshore.api.urls')),
    # ])),

    # Password reset links (ref: https://github.com/django/django/blob/master/django/contrib/auth/views.py)
    path('password_change/done/',
         auth_views.PasswordChangeDoneView.as_view(
             template_name='registration/password_change_done.html'),
         name='password_change_done'),
    path('password_change/',
         auth_views.PasswordChangeView.as_view(
             template_name='registration/password_change.html'),
Example #6
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from accounts.views import SignInAndSignUp, LogoutView, AboutView

urlpatterns = patterns(
    '',
    url(r'^$', SignInAndSignUp.as_view(template_name='home.html'),
        name='home'),
    url(r'^about/$', AboutView.as_view(),
        name='about'),
    url(r'^accounts/logout$', LogoutView.as_view(),
        name='logout'),

    url(r'^admin/', include(admin.site.urls)),
)
Example #7
0
    url(r'^uploads/(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': settings.MEDIA_ROOT,
    }),


   # url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^home.html$', SignInAndSignUp.as_view(template_name='home.html'),
        name='home.html'),

    url(r'^$', SignInAndSignUp.as_view(template_name='home.html'),
        name='home'),   
    url(r'^product/$', oscarstoreview.main,
        name='product'),
    url(r'^product-old/$', ProductView.as_view(),
        name='product-old'),
    url(r'^services/$', ServiceView.as_view(),
        name='services'),
	url(r'^contact/$', ContactView.as_view(),
        name='contact'),
     url(r'^about/$', AboutView.as_view(),
        name='about'),
    url(r'^accounts/logout$', LogoutView.as_view(),
        name='logout'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^oscar/', include(oscarapplication.urls)),
    url(r'^oscar/checkout/paypal/', include('paypal.express.urls')),
    url(r'^oscar/dashboard/paypal/express/', include(application.urls)),
    url(r'^paypal/redirect/', oscarstoreview.RedirectView.as_view(), name='paypal-redirect'),
)
Example #8
0
from django.urls import path
from . import views
from django.conf.urls import url
from django.conf.urls.static import static
from django.conf import settings
from accounts.views import LogoutView

app_name = 'accounts'
urlpatterns = [
    url(r'^register/$', views.register, name='register'),
    url(r'^user_login/$', views.user_login, name='user_login'),
    url(r'^user_logout/$', LogoutView.as_view(), name='user_logout'),
    path('profile/<int:pk>/', views.my_profile, name='my_profile'),
    path('profile/delete_all_my_photos',
         views.delete_all_my_photos,
         name='delete_all_my_photos'),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Example #9
0
    def test_logout_url_resolves(self):
        """Checks if the logout url resolves"""
        url = reverse("logout")

        self.assertEquals(
            resolve(url).func.__name__, LogoutView.as_view().__name__)
Example #10
0
from django.conf.urls import url

from accounts.views import LoginView, LogoutView

urlpatterns = [
    url(r'^auth/login/$', LoginView.as_view(), name='account-login'),
    url(r'^auth/logout/$', LogoutView.as_view(), name='account-logout'),
]
Example #11
0
"""

from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.conf.urls import url, include
from django.urls import path
from vejasoh.api import api
from vejasoh.startup import setup_streams

from django.contrib.auth.decorators import login_required

from accounts.views import LoginView, LogoutView, RegisterUserView
from feeds.views import IndexView, FeedJsonView

urlpatterns = [
    url(r'^$', login_required(IndexView.as_view()), name='index'),
    url(r'^feeds/stream/(?P<pk>\d+)/feed/$',
        login_required(FeedJsonView.as_view()),
        name='stream-feed'),
    url(r'^accounts/login/$', LoginView.as_view(), name='user-login'),
    url(r'^accounts/logout/$', LogoutView.as_view(), name='user-logout'),
    url(r'^accounts/register/$',
        RegisterUserView.as_view(),
        name='user-register'),
    path('admin/', admin.site.urls),
    url(r'^api/', include(api.urls)),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

setup_streams()
Example #12
0
from django.conf.urls import patterns, url

from accounts.views import (
    LoginView,
    RegisterView,
    WebsiteListView,
    LogoutView,
    AddWebsiteView,
    WebsiteCreatedView,
    AccountSettingsView,
    EditWebsiteView,
)

urlpatterns = patterns(
    "",
    url(r"^login/$", LoginView.as_view(), name="login"),
    url(r"^logout/$", LogoutView.as_view(), name="logout"),
    url(r"^account/$", AccountSettingsView.as_view(), name="settings"),
    url(r"^created/$", WebsiteCreatedView.as_view(), name="website_created"),
    url(r"^register/$", RegisterView.as_view(), name="register"),
    url(r"^websites/$", WebsiteListView.as_view(), name="website_list"),
    url(r"^addwebsite/$", AddWebsiteView.as_view(), name="add_website"),
    url(r"^editwebsite/(?P<website_id>\d)/$", EditWebsiteView.as_view(), name="edit_website"),
    url(r"^signup/$", RegisterView.as_view(), name="signup"),
)
Example #13
0
from django.contrib import admin
from django.urls import path
from accounts.views import MySignupView, MyLoginView, LogoutView
from vacancies import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.MainView.as_view(), name='main'),
    path('vacancies', views.ListVacanciesView.as_view(), name='list_vacancies'),
    path('vacancies/cat/<str:specialty>', views.ListSpecialtyView.as_view(), name='specialty_list'),
    path('companies/<int:company_id>', views.ListCompanyView.as_view(), name='company_list'),
    path('vacancies/<int:pk>', views.VacancyView.as_view(), name='vacancy'),
    path('vacancies/<int:pk>/send', views.SentVacancyView.as_view(), name='sent_application'),

    path('login', MyLoginView.as_view(), name='login_page'),
    path('logout', LogoutView.as_view(), name='logout_page'),
    path('register', MySignupView.as_view(), name='register_page'),

    path('mycompany/letsstart', views.MyCompanyLetStart.as_view(), name='lets_start'),
    path('mycompany/create', views.MyCompanyCreate.as_view(), name='mycompany_create'),
    path('mycompany', views.MyCompanyEdit.as_view(), name='mycompany'),


]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


handler404 = views.custom_handler404
handler500 = views.custom_handler500
Example #14
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from accounts.views import LoginView, LogoutView
from django.core.urlresolvers import reverse_lazy

admin.autodiscover()

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'djangotemplate.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^login/$', LoginView.as_view(), name="login"),
    url(r'^logout/$',
        LogoutView.as_view(), {"next_page": reverse_lazy("index")},
        name="logout"),
)
Example #15
0
    url(r'^posts/$', login_required(ListPostView.as_view()), name='posts'),
    url(r'^posts/(?P<id>[0-9]+)$', post_view, name='post'),
    url(r'^posts/(?P<id>[0-9]+)/edit$', post_edit_view, name='edit_post'),
    url(r'^posts/(?P<id>[0-9]+)/delete$', post_delete_view,
        name='delete_post'),
    # url(r'^posts/delete/all$', post_delete_view, name='delete_all_posts'),
    url(r'^users/(?P<id>[0-9]+)/posts$', user_posts_view, name='user_posts'),
    url(r'^posts/(?P<id>[0-9]+)/comments$', comment_view, name='comment'),
    url(r'^posts/(?P<id>[0-9]+)/comments/delete$',
        comment_delete_view,
        name='delete_comment'),
    url(r'^notifications/markasseen$',
        notification_view,
        name='notification_seen'),
    url(r'^users/message/(?P<id>[0-9]+)$', message_view, name='message'),
    url(r'^messages/markasread$', message_read_view, name='messages_read'),
    url(r'^sendmessage/(?P<id>[0-9]+)$',
        message_send_view,
        name='send_message'),
    url(r'^likecomment/(?P<id>[0-9]+)$',
        like_comment_view,
        name='like_comment'),
    url(r'^unlikecomment/(?P<id>[0-9]+)$',
        unlike_comment_view,
        name='unlike_comment'),
    url(r'^likepost/(?P<id>[0-9]+)$', like_post_view, name='like_post'),
    url(r'^unlikepost/(?P<id>[0-9]+)$', unlike_post_view, name='unlike_post'),
    url(r'^followuser/(?P<id>[0-9]+)$', follow_user_view, name='follow'),
    url(r'^unfollow/(?P<id>[0-9]+)$', unfollow_user_view, name='unfollow'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
)
Example #16
0
from django.conf.urls import url

from accounts.views import UserDetails, AuthenticationView, LogoutView

urlpatterns = [
    url(r'^me$', UserDetails.as_view(), name='api-user-details'),
    url(r'^login$', AuthenticationView.as_view(), name='api-user-login'),
    url(r'^logout$', LogoutView.as_view(), name='api-user-logout'),
]
Example #17
0
from django.conf.urls import patterns, url
from accounts.views import LoginView, LogoutView, RegistrationView

urlpatterns = patterns('',
                       url(r'^users/sign_in$', LoginView.as_view(),
                           name='accounts.views.login'),
                       url(r'^users/sign_out$', LogoutView.as_view(),
                           name='accounts.views.logout'),
                       url(r'^registration/new$', RegistrationView.as_view(),
                           name='accounts.views.registration'),
                       )
Example #18
0
"""cop4710 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path
from accounts.views import SignupView, LoginView, LogoutView, ProfileView, redirect_to_default_user_profile

urlpatterns = [
    path("signup/", SignupView.as_view(), name="accounts_signup"),
    path("login/", LoginView.as_view(), name="accounts_login"),
    path("logout/", LogoutView.as_view(), name="accounts_logout"),
    path("<pk>/", ProfileView.as_view(), name="accounts_view"),
    path("", redirect_to_default_user_profile),
]
Example #19
0
from django.conf.urls import url, include
from django.contrib import admin

from accounts.views import SignUpView, LogoutView, LoginView, ResendView, ChangePasseordView

urlpatterns = [
    url(r'^email_confirmation/',
        include('email_confirm_la.urls', namespace='email_confirm_la')),
    url(r'^email_confirmation/resend/(?P<username>\w+)/',
        ResendView.as_view()),
    url(r'^signup/', SignUpView.as_view()),
    url(r'^login/', LoginView.as_view()),
    url(r'^logout/', LogoutView.as_view()),
    url(r'^changepassword/', ChangePasseordView.as_view()),
]
Example #20
0
    #Home and Post url
    path('home/', HomeView.as_view(), name="home"),
    url(r'^create-comment-post', createComment),
    url(r'^post/check-likes', checkLikesPost),
    url('post/count', checkLikesCountPost),
    path('admin/', admin.site.urls),
    path('cursos/', include("cursos.urls")),
    path('register/', RegisterView.as_view()),
    url(r'^login/$',
        auth_views.login, {'template_name': 'login/login.html'},
        name="login"),
    url(r'^register/$',
        RegisterView.as_view(), {'template_name': 'login/register.html'},
        name="register"),
    url(r'^logout/$',
        LogoutView.as_view(),
        name='logout',
        kwargs={'next_page': '/login'}),
    path('perfil/', Perfil.as_view(), name="perfil_usuario"),
    path('perfil/edit/', EditPerfil.as_view(), name="editar_perfil"),

    ##urls for articulos
    path('articulos/', Articulos.as_view(), name="articulos"),
    url('articulos/(?P<slug>[\w-]+)/$',
        ArticulosDetail.as_view(),
        name='articulos_detail'),
    url(r'^articulos/check-likes', checkLikes),
    url('articulos/count', checkLikesCount),
    url(r'^create-comment/articulo', createCommentArticle),

    ##urls for search bar
Example #21
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin

from accounts.views import LoginView, LogoutView

urlpatterns = [
    #
    # accounts.LoginView also doubles as the home page
    url(r'^$', LoginView.as_view(template_name='home.html'),
        name='home'),
    url(r'^accounts/logout$', LogoutView.as_view(), name='logout'),
    url(r'^accounts/login/$', LoginView.as_view(template_name='home.html')),
    #
    url(r'^admin/', include(admin.site.urls)),
    url(r'^icdcodes/', include("icdcodes.urls")),
    url(r'^historias/', include("historias.urls")),
]
Example #22
0
from django.conf.urls import url, patterns
from accounts.views import RegisterView, ProfileView, LoginView, LogoutView,RegisterSuccessView,EditProfileView,FollowUser

urlpatterns=patterns('',
    url(r'^register/$',RegisterView.as_view(),name="register"),
    url(r'^registersuccess/$',RegisterSuccessView.as_view(),name="register_success"),
    url(r'^login/$',LoginView.as_view(), name="login"),
    url(r'^logout/$', LogoutView.as_view(), name="logout"),
    url(r'^profile/(?P<username>[-\w\d]+)/$',ProfileView.as_view(),name="profile"),
    url(r'^profile/$',ProfileView.as_view(),name="myprofile"),
    url(r'^changepassword/$',ProfileView.as_view(),name="change_password"),
    url(r'^editprofile/$',EditProfileView.as_view(),name="edit_profile"),
    url(r'^follow/$',FollowUser.as_view())
)
Example #23
0
from django.conf.urls import patterns, url

from accounts.views import LoginView, LogoutView, RegisterView, ForgotPasswordView, PasswordResetView, ChangePasswordView

urlpatterns = patterns(
    '',
    url(r'^login/$', LoginView.as_view(), name='accounts_login'),
    url(r'^logout/$', LogoutView.as_view(), name='accounts_logout'),
    url(r'^register/$', RegisterView.as_view(), name='accounts_register'),
    url(r'^forgot_password/$', ForgotPasswordView.as_view(), name='accounts_forgot_password'),
    url(r'^change_password/$', ChangePasswordView.as_view(), name='accounts_change_password'),
    url(r'^password_reset/(?P<user_id>\d+)-(?P<reset_code>\w+)/$',
        PasswordResetView.as_view(), name='accounts_password_reset'),
)
Example #24
0
from django.urls import path
from accounts.views import RegisterView, LoginView, LogoutView

app_name = 'accounts'
urlpatterns = [
    path('register/', RegisterView.as_view(), name='accounts-register'),
    path('login/', LoginView.as_view(), name='accounts-login'),
    path('logout/', LogoutView.as_view(), name='accounts-logout'),
]
Example #25
0
from django.conf.urls import url

from accounts.views import LoginView, LogoutView

urlpatterns = [
    url(r'login/$', LoginView.as_view()),
    url(r'logout/$', LogoutView.as_view()),
]
Example #26
0
from django.urls import path

from accounts.views import user_profile, LogoutView, LoginView, RegisterView, user_profile_edit

urlpatterns = [
    # path('login/', login_user, name='login user'),
    path('login/', LoginView.as_view(), name='login user'),  # CBV
    # path('logout/', logout_user, name='logout user'),
    path('logout/', LogoutView.as_view(), name='logout user'),  # CBV
    # path('register/', register_user, name='register user'),
    path('register/', RegisterView.as_view(), name='register user'),  # CBV
    # path('profile/', user_profile, name='current user profile'),
    path('profile/<int:pk>', user_profile, name='user profile'),
    path('edit/<int:pk>', user_profile_edit, name='user profile edit'),
]
Example #27
0
                base_name='Trạng thái thi công')
# router.register(r'lich-thi-cong', LichThiCongApi.LichThiCongView, base_name="Lịch thi công")
router.register(r'chi-tiet-lich-thi-cong',
                ChiTietLichThiCongApi.ChiTietLichThiCongView,
                base_name="Chi tiết lịch thi công")
router.register(r'nhom-thi-cong', NhomThiCongView, base_name="Nhóm thi công")
router.register(r'chuc-nang', PhanQuyenApi.ChucNangView, base_name="Chức năng")
router.register(r'quyen-nguoi-dung',
                PhanQuyenApi.QuyenNguoiDungView,
                base_name="Quyền người dùng")
router.register(r'chuc-nang-nguoi-dung',
                PhanQuyenApi.ChucNangNguoiDungView,
                base_name="Chức năng người dùng")

urlpatterns = [
    path('admin/', admin.site.urls),
    path('login/', csrf_exempt(LoginView.as_view()), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    # path('user/', RegisterView.as_view(), name="đăng kí người dùng"),
    path('infomations-by-token/',
         ThongTinNguoiDungTheoToken.InformationsByToken.as_view(),
         name='Thông tin người dùng từ token'),
    path('', include(router.urls)),
]

# urlpatterns = format_suffix_patterns(urlpatterns)

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Example #28
0
from django.conf.urls import url
from accounts.views import SignupView, LoginView, LogoutView, DeleteView
from accounts.views import ConfirmEmailView, resendConfirmation
from accounts.views import ChangePasswordView, PasswordResetView, PasswordResetTokenView
from accounts.views import UserSettingsView

urlpatterns = [
    url(r"^resend/$", resendConfirmation, name="resend_confirmation"),
    url(r"^signup/$", SignupView.as_view(), name="account_signup"),
    url(r"^login/$", LoginView.as_view(), name="account_login"),
    url(r"^logout/$", LogoutView.as_view(), name="account_logout"),
    url(r"^confirm_email/(?P<key>\w+)/$",
        ConfirmEmailView.as_view(),
        name="account_confirm_email"),
    url(r"^password/$", ChangePasswordView.as_view(), name="account_password"),
    url(r"^password/reset/$",
        PasswordResetView.as_view(),
        name="account_password_reset"),
    url(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$",
        PasswordResetTokenView.as_view(),
        name="account_password_reset_token"),
    url(r"^settings/$", UserSettingsView.as_view(), name="account_settings"),
    url(r"^delete/$", DeleteView.as_view(), name="account_delete"),
]
Example #29
0
    url(r'^deletefriend/(?P<id>[0-9]+)$', user_deletefriend_view, name='deletefriend'),

    url(r'^accounts/profile/$', TemplateView.as_view(template_name=
        'profile.html'), name='profile'),

    url(r'^home/$', login_required(HomeView.as_view()) , name='home'),
    url(r'^posts/$', login_required(ListPostView.as_view()), name='posts'),
    url(r'^posts/(?P<id>[0-9]+)$', post_view, name='post'),
    url(r'^posts/(?P<id>[0-9]+)/edit$', post_edit_view, name='edit_post'),
    url(r'^posts/(?P<id>[0-9]+)/delete$', post_delete_view, name='delete_post'),
    # url(r'^posts/delete/all$', post_delete_view, name='delete_all_posts'),
    url(r'^users/(?P<id>[0-9]+)/posts$', user_posts_view, name='user_posts'),
    url(r'^posts/(?P<id>[0-9]+)/comments$', comment_view, name='comment'),
    url(r'^posts/(?P<id>[0-9]+)/comments/delete$', comment_delete_view, name='delete_comment'),

    url(r'^notifications/markasseen$', notification_view, name='notification_seen'),

    url(r'^users/message/(?P<id>[0-9]+)$', message_view, name='message'),
    url(r'^messages/markasread$', message_read_view, name='messages_read'),
    url(r'^sendmessage/(?P<id>[0-9]+)$', message_send_view, name='send_message'),

    url(r'^likecomment/(?P<id>[0-9]+)$', like_comment_view, name='like_comment'),
    url(r'^unlikecomment/(?P<id>[0-9]+)$', unlike_comment_view, name='unlike_comment'),
    url(r'^likepost/(?P<id>[0-9]+)$', like_post_view, name='like_post'),
    url(r'^unlikepost/(?P<id>[0-9]+)$', unlike_post_view, name='unlike_post'),

    url(r'^followuser/(?P<id>[0-9]+)$', follow_user_view, name='follow'),
    url(r'^unfollow/(?P<id>[0-9]+)$', unfollow_user_view, name='unfollow'),

    url(r'^logout/$', LogoutView.as_view(), name='logout'),
)
Example #30
0
from django.conf.urls import url
from accounts.views import LoginView, LogoutView, SignupView

app_name = 'accounts'

urlpatterns = [
    url("^signup/$", SignupView.as_view(), name='signup'),
    url("^login/$", LoginView.as_view(), name="login"),
    url("^logout/$", LogoutView.as_view(), name="logout"),
]

Example #31
0
from django.conf.urls import include, url
from rest_framework import routers

from accounts.views import AccountViewSet, LoginView, LogoutView

router = routers.SimpleRouter(trailing_slash=False)
# Accounts Routes
router.register(r'accounts', AccountViewSet, 'accounts')

urlpatterns = [
    url(r'^auth/login$', LoginView.as_view(), name='login'),
    url(r'^auth/logout$', LogoutView.as_view(), name='logout'),
    url(r'^', include(router.urls)),
]
Example #32
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from accounts.views import LoginView, LogoutView
from django.core.urlresolvers import reverse_lazy

admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'djangotemplate.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^login/$', LoginView.as_view(), name="login"),
    url(r'^logout/$', LogoutView.as_view(), { "next_page": reverse_lazy("index") }, name="logout"),
)

Example #33
0
"""Url patterns for the accounts app."""

__all__ = ("urlpatterns", )

from django.urls import path

from rest_framework.routers import SimpleRouter

from accounts.views import UserView
from accounts.views import AccountViewSet
from accounts.views import LogoutView, LoginView
from accounts.views import RegisterEmployerViewSet
from accounts.views import RegisterEmployeesViewSet

router = SimpleRouter()

router.register("account", AccountViewSet, "account")

router.register("register-employers", RegisterEmployerViewSet,
                "register-employers")

router.register("register-employees", RegisterEmployeesViewSet,
                "register-employees")

urlpatterns = router.urls + [
    path("user/", UserView.as_view(), name="user"),
    path("login/", LoginView.as_view(), name="login"),
    path("logout/", LogoutView.as_view(), name="logout"),
]
Example #34
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from accounts.views import LoginView, LogoutView
from django.core.urlresolvers import reverse_lazy

admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'loginform.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^login/$', LoginView.as_view(), name="accounts/login"),
    url(r'^logout/$', LogoutView.as_view(), { "next_page": reverse_lazy("top") }, name="accounts/logout"),
)