Exemplo n.º 1
0
from django.conf.urls import patterns, url
from views import Logout

urlpatterns = patterns('',
    url(r'^$', Logout.as_view(), name='logout'),
)
Exemplo n.º 2
0
from django.conf.urls import include, url

from django.contrib import admin
admin.autodiscover()

from views import ProfileView, UserSettings, SignUp, Logout, Login

urlpatterns = [
    url(r'^(?i)settings/?$', UserSettings.as_view(), name='user-settings'),
    url(r'^(?i)register/?$', SignUp.as_view(), name='register'),
    url(r'^(?i)logout/?$', Logout.as_view(), name='logout'),
    url(r'^(?i)login/?$', Login.as_view(), name="login"),
]
Exemplo n.º 3
0
from django.conf.urls import url
from views import Index, Log, Reg, Main, Logout, AddToCart, Checkout, ShowCart

urlpatterns = [
    url(r'^$', Index.as_view()),
    url(r'^login$', Log.as_view()),
    url(r'^logout$', Logout.as_view()),
    url(r'^register$', Reg.as_view()),
    url(r'^main$', Main.as_view()),
    url(r'^cart$', AddToCart.as_view()),
    url(r'^showcart$', ShowCart.as_view()),
    url(r'^checkout$', Checkout.as_view()),
    ]
Exemplo n.º 4
0
Admin Stuff
"""
from views import add_admin_dashboard
add_admin_dashboard()
"""
Login Manager
"""


@login_manager.user_loader
def get_user(ident):
    return User.query.get(int(ident))


app.add_url_rule('/login', view_func=Login.as_view('login'))
app.add_url_rule('/logout', view_func=Logout.as_view('logout'))

app.add_url_rule('/register', view_func=Register.as_view('register'))
app.add_url_rule('/admin', view_func=Admin.as_view('admin'))
app.add_url_rule('/test', view_func=Test.as_view('test'))

app.add_url_rule('/', view_func=Index.as_view('index'))
app.add_url_rule('/viewtab', view_func=Viewtab.as_view('viewtab'))
app.add_url_rule('/worktab', view_func=Worktab.as_view('worktab'))

app.add_url_rule('/dev/upload',
                 view_func=UploadTemplate.as_view('upload_template'))

app.add_url_rule('/board/all_posts', view_func=MainBoard.as_view('main_board'))
app.add_url_rule('/board/post', view_func=ViewPost.as_view('view_post'))
Exemplo n.º 5
0
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from views import Login, DashBoard, Logout, HelpView, SettingsView,ResetPassword, ForgotPassword,CanteenList,AddCanteen,\
EditCanteen,DeleteCanteen,SearchCanteen

urlpatterns = patterns(
    '',
    url(r'^login/$', Login.as_view(), name="login"),
    url(r'^logout/$', Logout.as_view(), name="logout"),
    url(r'^forgot_password/$',
        ForgotPassword.as_view(),
        name="forgot_password"),
    url(r'^reset_password/$', ResetPassword.as_view(), name="reset_password"),
    url(r'^canteen/$', CanteenList.as_view(), name="canteen"),
    url(r'^add_canteen/$', AddCanteen.as_view(), name="add_canteen"),
    url(r'^search_canteen/$', SearchCanteen.as_view(), name="add_canteen"),
    url(r'^edit_canteen/$', EditCanteen.as_view(), name="edit_canteen"),
    url(r'^delete_canteen/$', DeleteCanteen.as_view(), name="delete_canteen"),
    url(r'^$',
        login_required(DashBoard.as_view(), login_url='/login/'),
        name="dashboard"),
    url(r'^help/$',
        login_required(HelpView.as_view(), login_url='/login/'),
        name="help"),
    url(r'^settings/$',
        login_required(SettingsView.as_view(), login_url='/login/'),
        name="settings"),
)
Exemplo n.º 6
0
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required

from views import (Home, Login, Logout, StaffList, AddStaff, DeleteStaff, CheckStaffUserExists, \
	SearchStaff, SetPermissions, Salesmen, DeleteSalesman, SearchSalesman, ShopeDetails, Incentives, \
    SalesmanSales)

urlpatterns = patterns('',
    url(r'^$', login_required(Home.as_view(), login_url="login"), name="dashboard"),
    url(r'^login/$', Login.as_view(), name="login"),
    url(r'^logout/$', Logout.as_view(), name="logout"),
    url(r'^staffs/$', login_required(StaffList.as_view(), login_url="login"), name="staffs"),
    url(r'^add_staff/$', login_required(AddStaff.as_view(), login_url="login"), name="add_staff"),
    url(r'^delete_staff/$', login_required(DeleteStaff.as_view(), login_url="login"), name="delete_staff"),
    url(r'^check_staff_user_exists/$', login_required(CheckStaffUserExists.as_view()), name='check_staff_user_exists'),
    url(r'^search_staff/$', login_required(SearchStaff.as_view(), login_url="login"), name='search_staff'),
    
    url(r'^salesmen/$', login_required(Salesmen.as_view(), login_url="login"), name="salesmen"),
    url(r'^delete_salesman/$', login_required(DeleteSalesman.as_view(), login_url="login"), name="delete_salesman"),
    url(r'^search_salesmen/$', login_required(SearchSalesman.as_view(), login_url="login"), name='search_salesmen'),
    url(r'^permissions/$', login_required(SetPermissions.as_view(), login_url="login"), name='permissions'),
    url(r'^shope/$', login_required(ShopeDetails.as_view(), login_url="login"), name='shope'),
    url(r'^incentives/$', login_required(Incentives.as_view(), login_url="login"), name='incentives'),
    url(r'^salesman/sales/$', login_required(SalesmanSales.as_view(), login_url="login"), name='salesman_sales'),

)
Exemplo n.º 7
0
from django.utils.decorators import method_decorator
#custom
from views import Home, Test, Landing, Login, Logout, Register, Jars
from myproject import settings
from django.shortcuts import render, redirect

'''UTILTIES: MAybe move this somewhere else'''
def anonymous_required(func):
    def as_view(request, *args, **kwargs):
        redirect_to = kwargs.get('next', settings.ANON_REDIRECT_URL)
        if request.user.is_authenticated():
            return redirect('home')
        response = func(request, *args, **kwargs)
        return response
    return as_view





urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^home/',login_required(Home.as_view()), name='home'),
    url(r'^test/', login_required(Test.as_view()), name='test'),
    url(r'^jars/', login_required(Jars.as_view()), name='jars'),
    url(r'^accounts/logout', login_required(Logout.as_view()), name='logout'),
   	url(r'^accounts/login/', anonymous_required(Login.as_view()), name='login'),
    url(r'^accounts/register/', anonymous_required(Register.as_view()), name='register'),
   	url(r'^$', anonymous_required(Landing.as_view()), name='landing')
]
Exemplo n.º 8
0
from django.urls import path

from views import Login, UserProfile, Logout, UserRegister

app_name = 'core'

urlpatterns = [
    path('login/', Login.as_view(), name='login'),
    path('', UserProfile.as_view(), name='profile'),
    path('logout/', Logout.as_view(), name='logout'),
    path('register/', UserRegister.as_view(), name='register'),
]
Exemplo n.º 9
0
from django.conf.urls import include, url
from views import Login, Register, Logout

urlpatterns = [
    url(r'^login/$', Login.as_view(), name='login_url'),
    url(r'^register/$', Register.as_view(), name='register_url'),
    url(r'^logout/$', Logout.as_view(), name='logout_url'),
]
Exemplo n.º 10
0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf.urls import patterns, url, include

from views import Signup, Logout, Error, Verify, SocialRegister, Profile, DeleteProfileView

urlpatterns = patterns(
    '',
    url(r'^sign-up/$', Signup.as_view(), name='account-signup'),
    url(r'^logout/$', Logout.as_view(), name='account-logout'),
    url(r'^error/$', Error.as_view(), name='account-error'),
    url(r'^profile/$', Profile.as_view(), name='account-profile'),
    url(r'^verify/(?P<verification_code>[-\w]+)/$',
        Verify.as_view(),
        name='account-verify'),
    url(r'^social-register/$',
        SocialRegister.as_view(),
        name='account-social-register'),
    url(r'^delete-user/(?P<pk>[-\w]+)/$',
        DeleteProfileView.as_view(),
        name='account-delete-user'),
)

urlpatterns += patterns('', url(r'', include('social_auth.urls')))
Exemplo n.º 11
0
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

from views import ProfileView, UserSettings, SignUp, Logout, Login

urlpatterns = patterns('',
	url(r'^(?i)settings/?$', UserSettings.as_view(), name='user-settings'),
    url(r'^(?i)register/?$', SignUp.as_view(), name='register'),
    url(r'^(?i)logout/?$', Logout.as_view(), name='logout'),
    url(r'^(?i)login/?$', Login.as_view(), name="login"),
)
Exemplo n.º 12
0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import patterns, url, include
from views import Signup, Logout, Verify, CompleteProfile, Profile, DeleteView

urlpatterns = patterns('',
    url(r'^sign-up/$', Signup.as_view(), name='account-signup'),
    url(r'^logout/$', Logout.as_view(), name='account-logout'),
    url(r'^profile/$', Profile.as_view(), name='account-profile'),
    url(r'^verify/(?P<verification_code>[-\w]+)/$', Verify.as_view(), name='account-verify'),
    url(r'^complete-profile/$', CompleteProfile.as_view(), name='account-complete-profile'),
    url(r'^delete-user/(?P<pk>[-\w]+)/$', DeleteView.as_view(), name='account-delete-user'),
)

urlpatterns += patterns('',
                        url(r'', include('social_auth.urls'))
)
Exemplo n.º 13
0

from views import (Login, Logout, Home, Signup, StarRating, StarRatingReport, \
	VerifyRecaptcha, AddToWatchlist, AddToComparelist, ViewWatchList, public_login_required,\
     ViewCompareList, SearchResult, SearchCompany, DeleteFromCompareList, ChangeCompareList, \
     HelpView, ActivateAccount, TermsOfUse, Disclaimer, PrivacyPolicy, FBLoginRedirect, ForgotPassword,\
     ResetPassword)

LOGIN_URL = '/login/'

urlpatterns = patterns('',

    url(r'^$', Home.as_view(), name="home"),
    url(r'^fb_login_redirect/$', FBLoginRedirect.as_view(), name="fb_login_redirect"),
    url(r'^login/$', Login.as_view(), name="public_login"),
    url(r'^logout/$', Logout.as_view(), name="public_logout"),
    url(r'^signup/$', Signup.as_view(), name="signup"),
    url(r'^star_rating/$', public_login_required(vary_on_headers('X_REQUESTED_WITH')(StarRating.as_view()), login_url="/login/"), name="star_rating"),
    url(r'^star_rating_report/$', public_login_required(vary_on_headers('X_REQUESTED_WITH')(StarRatingReport.as_view()), login_url="/login/"), name="star_rating_report"),
    url(r'^verify_recaptcha/$', VerifyRecaptcha.as_view(), name="verifiy_recaptcha"),
    url(r'^add_to_watch_list/$', public_login_required(AddToWatchlist.as_view(), login_url="/login/"), name="add_to_watch_list"),
    url(r'^add_to_compare_list/$', public_login_required(AddToComparelist.as_view(), login_url="/login/"), name="add_to_compare_list"),
    url(r'^add_to_compare_list/$', public_login_required(AddToComparelist.as_view(), login_url="/login/"), name="add_to_compare_list"),
    url(r'^compare_list/$', public_login_required(vary_on_headers('X_REQUESTED_WITH')(ViewCompareList.as_view()), login_url="/login/"), name="compare_list"),
    url(r'^change_compare_list/$', public_login_required(ChangeCompareList.as_view(), login_url="/login/"), name="change_compare_list"),
    url(r'^watch_list/$', public_login_required(vary_on_headers('X_REQUESTED_WITH')(ViewWatchList.as_view()), login_url="/login/"), name="watch_list"),
    url(r'^search_result/$', vary_on_headers('X_REQUESTED_WITH')(SearchResult.as_view()), name="search_result"),
    url(r'^search_company/$', vary_on_headers('X_REQUESTED_WITH')(SearchCompany.as_view()), name="search_company"),
    url(r'^delete_from_compare_list/$', public_login_required(DeleteFromCompareList.as_view(), login_url="/login/"), name="delete_from_compare_list"),
    url(r'^help/$', public_login_required(HelpView.as_view(), login_url="/login/"), name="help"),
    url(r'^activate/$', ActivateAccount.as_view(), name="activate_account"),