示例#1
0
    def loginView(self):
        """
        Initializes a `LoginView` object and sets it up as the main window's
        central widget.
        """
        login = LoginView()

        login.login.connect(self.onLogin)
        self.failedLogIn.connect(login.onFailedLogIn)

        self.setCentralWidget(login)
        self.setFixedSize(login.size())
        self.statusBar().hide()
示例#2
0
 def loginView(self):
     """
     Initializes a `LoginView` object and sets it up as the main window's
     central widget.
     """
     login = LoginView()
     
     login.login.connect(self.onLogin)
     self.failedLogIn.connect(login.onFailedLogIn)
     
     self.setCentralWidget(login)
     self.setFixedSize(login.size())
     self.statusBar().hide()
示例#3
0
文件: main.py 项目: QUNETOL57/passwdn
    def screens(self, screen, scene):
        scenes = [
            Scene([LoginView(screen, self.main_action, self.login_model)],
                  -1,
                  name='Login'),
            Scene([ListView(screen, self.main_action, self.store_model)],
                  -1,
                  name="List"),
            Scene([DetailView(screen, self.main_action, self.store_model)],
                  -1,
                  name="Detail")
        ]

        screen.play(scenes,
                    stop_on_resize=True,
                    start_scene=scene,
                    allow_int=True)
示例#4
0
from django.conf.urls import url, include
from views import LoginView, LogoutView

urlpatterns = [
    url(r'^$', LoginView.as_view(), name='login'),
    url(r'^validate/$', LoginView.as_view(), name='validate_user'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
]
示例#5
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView

from app.auth.views import BaseChangePasswordView
from views import LoginView, LogoutView, RegistrationView

urlpatterns = patterns(
    '',
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', login_required(LogoutView.as_view()), name='logout'),
    url(r'^change-password/$',
        login_required(BaseChangePasswordView.as_view()),
        name='change_password'),
    url(r'^change-password/(?P<result>(saved|error))/$',
        login_required(BaseChangePasswordView.as_view()),
        name='change_password_result'),
    url(r'^registration/$', RegistrationView.as_view(), name='registration'),
    url(r'^registration-complete/$',
        TemplateView.as_view(
            template_name="site/auth/registration_complete.html"),
        name='registration_complete'),
)
示例#6
0
from django.conf.urls import include, url
from django.contrib import admin
 
from views import HomePageView, SignUpView, LoginView
from views import logout_view

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

    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', HomePageView.as_view(), name = 'home'),
    url(r'^accounts/register', SignUpView.as_view(success_url="/"), name = 'signup'),
    url(r'^accounts/signin', LoginView.as_view(),name = 'signin'),
    url(r'^accounts/signout', logout_view, name = 'signout'),
    url(r'^talks/', include('talks.urls', namespace = 'talks')),
]
示例#7
0
 def main() -> None:
     LoginView().render()
示例#8
0
文件: urls.py 项目: cursorzz/kuaijiti
        ErrorView, SettingView
        )

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
     #url(r'^/', 'index.home', name='home'),
     url(r'^$', IndexView.as_view()), 
     url(r'^quest/(?P<uid>\w+)/$', QuestView.as_view(), name="single_quest"),
     url(r'^mark/failed/$', 'mark_failed', name="mark_failed"),
     url(r'^mark/clear/$', 'mark_day_cleared', name="mark_day_cleared"),
     url(r'^signup/$', SignUpView.as_view(), name="signup"),
     url(r'^login/$', LoginView.as_view(), name="login"),
     url(r'^logout/$', 'index.views.user_logout', name="logout"),
     url(r'^errors/$', ErrorView.as_view(), name="errors"),
     url(r'^settings/$', SettingView.as_view(), name="settings"),

     url(r'^record/error$', 'index.views.mark_failed', name="mark_failed"),
     url(r'^logout/$', 'index.views.user_logout', name="logout"),
     url(r'^update/$', 'index.views.update_quests', name="update_quests"),
     url(r'^update/single/$', 'index.views.get_single_quest', name="update_single_quest"),


    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
    def __init__(self, router, payload):
        super().__init__(router, payload)

        self.__view = LoginView(self)
        self.__view.render(payload)
示例#10
0
from django.conf.urls import url

from views import (
    LoginView,
    LogoutView,
    UserDetailsView,
    PasswordChangeView,
    PasswordResetView,
    PasswordResetConfirmView,
)

urlpatterns = [
    # URLs that do not require a session or valid token
    url(r"^password/reset/$", PasswordResetView.as_view(), name="rest_password_reset"),
    url(r"^password/reset/confirm/$", PasswordResetConfirmView.as_view(), name="rest_password_reset_confirm"),
    url(r"^login/$", LoginView.as_view(), name="rest_login"),
    # URLs that require a user to be logged in with a valid session / token.
    url(r"^logout/$", LogoutView.as_view(), name="rest_logout"),
    url(r"^user/$", UserDetailsView.as_view(), name="rest_user_details"),
    url(r"^password/change/$", PasswordChangeView.as_view(), name="rest_password_change"),
]
示例#11
0
__author__ = 'nadiya'
from django.conf.urls import patterns, url,include
from views import LoginView,

urlpatterns = patterns('',
    url(r'^login$',LoginView.as_view(),name='index'),
    )
示例#12
0
 def return_login(self):
     import views.LoginView as loginView
     self.login = loginView.LoginView()
     self.guestSearchScreen.hide()
     self.login.show()
示例#13
0
# -*- coding: utf-8 -*-
from django.conf.urls import url
from views import LoginView, LogoutView, SignupView


urlpatterns = [
    # Users URLs
    url(r'^login$', LoginView.as_view(), name='users_login'),
    url(r'^logout$', LogoutView.as_view(), name='users_logout'),
    url(r'^signup$', SignupView.as_view(), name='users_signup'),
]
示例#14
0
from django.conf.urls import url
from views import LoginView

urlpatterns = [
    url(r'login/$', LoginView.as_view(), name='member_login'),
]
# /category/item_id/update
app.add_url_rule('/<regex("{}"):category>'.format(utils.get_cat_regex()) +
                 '/<int:item_id>/update', view_func=ItemUpdateView.as_view('itemupdate_view'))
app.add_url_rule("/me", view_func=MyAccountView.as_view('myaccount_view'))
app.add_url_rule("/items/add", view_func=ItemAddView.as_view('additem_view'))

app.add_url_rule("/user/<int:uid>", view_func=UserView.as_view('user_view'))

# /img/image.jpg - serves images from the db
app.add_url_rule(
    "/img/<pid>",
    view_func=ShowPictureView.as_view('showpicture_view'))

# delete current user - deletes their items as well
app.add_url_rule("/delete", view_func=DelUser.as_view('deleteuser_view'))
app.add_url_rule("/login", view_func=LoginView.as_view('login_view'))
app.add_url_rule("/logout", view_func=LogoutView.as_view('logout_view'))

app.add_url_rule(
    "/disconnect",
    view_func=DisconnectView.as_view('disconnect_view'))

# auth
app.add_url_rule('/auth/<provider>', view_func=AuthView.as_view("auth_first"))
app.add_url_rule(
    '/auth/<provider>/callback',
    'auth_callback',
    view_func=AuthView.as_view("auth_callback"))


if __name__ == '__main__':
示例#16
0
from PyQt5 import QtWidgets
import views.LoginView as LoginController

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    startApp = LoginController.LoginView()
    startApp.show()
    sys.exit(app.exec_())
示例#17
0
文件: urls.py 项目: 4uuuabhi/pariksha
from django.conf.urls import patterns, include, url
from django.contrib import admin
from views import SignupView, HomePageView, LoginView, LogoutView

urlpatterns = patterns('',
    # Examples:
    url(r'^$', HomePageView.as_view(), name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^accounts/register/', SignupView.as_view(), name='signup'),
    url(r'^accounts/login/', LoginView.as_view(), name='login'),
    url(r'^accounts/logout/', LogoutView.as_view(), name='logout'),
    url(r'^quiz/', include('quiz.urls', namespace='quiz')),
    url(r'^admin/', include(admin.site.urls)),
)
示例#18
0
from django.conf.urls import patterns, include, url
from views import LoginView
from views import LogOutView


urlpatterns = patterns('',
    url(r'^$', LoginView.as_view()),
    url(r'^done/$', LogOutView.as_view()),
)
示例#19
0
from django.conf import settings
from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin

from views import LoggedInView, LoginView


admin.autodiscover()

urlpatterns = patterns(
    "",
    # Uncomment the admin/doc line below to enable admin documentation:
    url(r"^admin/doc/", include("django.contrib.admindocs.urls")),
    # Uncomment the next line to enable the admin:
    url(r"^admin/", include(admin.site.urls)),
    # Examples:
    url(r"^log-out/", "django.contrib.auth.views.logout", {"next_page": settings.LOGOUT_REDIRECT_URL}, name="logout"),
    url(r"^logged-in/", LoggedInView.as_view(), name="logged_in"),
    url(r"^$", LoginView.as_view(), name="login"),
)
示例#20
0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import include, url
from django.contrib.auth.urls import *
from django.views.generic import RedirectView
from django.views.generic.edit import CreateView, FormView
from views import SignUpView, LoginView
from forms import SignUpForm, LoginForm
from . import views

urlpatterns = [
    url(r'^$', views.index, name='index'),
    url(r'^register/$',
        SignUpView.as_view(template_name='register.html',
                           form_class=SignUpForm,
                           success_url='/'),
        name='register'),
    url(r'^login/$',
        LoginView.as_view(template_name='login.html',
                          form_class=LoginForm,
                          success_url='/'),
        name='login'),
    url(r'^edit/$', views.update_profile, name='profile'),
]
from django.conf.urls import url, include
from django.contrib.auth import views as auth_views

from views import UpdateRadioDatabaseView, TrackerMainView, \
    SignUpView, LoginView, LogoutView, ChangeSeenView, DownloadFileView, GetPlayFileUrlView, GetRadioTableHtml

app_name = 'hpradiotracker'
urlpatterns = [
    url(r'^$', TrackerMainView.as_view(), name='tracker-main-view'),

    url(r'^signup/$', SignUpView.as_view(), name='sign-up-view'),
    url(r'^login$', LoginView.as_view(), name='login-view'),
    url(r'^logout$', LogoutView.as_view(), name='logout-view'),

    url(r'^update_radio_database$', UpdateRadioDatabaseView.as_view(), name='update-radio-database-view'),
    url(r'^change_seen$', ChangeSeenView.as_view(), name='change-seen'),
    url(r'^download_file$', DownloadFileView.as_view(), name='download-file-view'),
    url(r'^get_play_file_url$', GetPlayFileUrlView.as_view(), name='get-play-file-url'),
    url(r'^get_radio_table_html$', GetRadioTableHtml.as_view(), name='get-radio-table-html')


]
示例#22
0
                 view_func=ItemDeleteView.as_view('itemdelete_view'))
# /category/item_id/update
app.add_url_rule('/<regex("{}"):category>'.format(utils.get_cat_regex()) +
                 '/<int:item_id>/update',
                 view_func=ItemUpdateView.as_view('itemupdate_view'))
app.add_url_rule("/me", view_func=MyAccountView.as_view('myaccount_view'))
app.add_url_rule("/items/add", view_func=ItemAddView.as_view('additem_view'))

app.add_url_rule("/user/<int:uid>", view_func=UserView.as_view('user_view'))

# /img/image.jpg - serves images from the db
app.add_url_rule("/img/<pid>",
                 view_func=ShowPictureView.as_view('showpicture_view'))

# delete current user - deletes their items as well
app.add_url_rule("/delete", view_func=DelUser.as_view('deleteuser_view'))
app.add_url_rule("/login", view_func=LoginView.as_view('login_view'))
app.add_url_rule("/logout", view_func=LogoutView.as_view('logout_view'))

app.add_url_rule("/disconnect",
                 view_func=DisconnectView.as_view('disconnect_view'))

# auth
app.add_url_rule('/auth/<provider>', view_func=AuthView.as_view("auth_first"))
app.add_url_rule('/auth/<provider>/callback',
                 'auth_callback',
                 view_func=AuthView.as_view("auth_callback"))

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)
class LoginController(BaseController):
    def __init__(self, router, payload):
        super().__init__(router, payload)

        self.__view = LoginView(self)
        self.__view.render(payload)

    '''
		Determines which type of login to do
		based on the account selection.

		@param account {int}
		@param username {str}
		@param password {str}
	'''

    def on_credentials_selection(self, account, username, password):

        if account == 1:
            self.login(Student, STUDENT_ACCOUNT_TYPE, STUDENT_ROUTE, username,
                       password)
        elif account == 2:
            self.login(Instructor, INSTRUCTOR_ACCOUNT_TYPE, INSTRUCTOR_ROUTE,
                       username, password)
        elif account == 3:
            self.login(Registrar, REGISTRAR_ACCOUNT_TYPE, REGISTRAR_ROUTE,
                       username, password)

    '''
		Checks if the user's password in the database
		matches the one provided. If so, they are redirected
		to the provided route and the account's ID is passed
		along.

		@param model {BaseModel} Type of model to query
		@param account_type {str} Type value to send with payload
		@param route {str} Where to take user on successful login
		@param username {str}
		@param password {str}
	'''

    def login(self, model, account_type, route, username, password):
        try:
            db_account = self.get_account(model, username)

            if db_account.password == password:
                self.__view.set_login_status(True)
                self.dispatch(route, {
                    'type': account_type,
                    'id': db_account.id
                })
            else:
                self.__view.print_message('Incorrect password!')

        except ValueError as e:
            self.__view.print_message(e)

    '''
		Returns the id, username, and password
		column values in the row with the username.

		@param model {BaseModel} Type of Model to query
		@param username {str} Username of the account
		@return {BaseModel}
	'''

    def get_account(self, model, username):
        try:
            query = (model.select(
                getattr(model, 'id'), getattr(model, 'username'),
                getattr(model, 'password')).where(
                    getattr(model, 'username') == username).get())

            return query
        except DoesNotExist:
            raise ValueError(('Either the username is incorrect' +
                              ' or the account doesn\'t exist!'))
示例#24
0
from django.conf.urls import include, url
from django.contrib import admin

from views import HomePageView, SignUpView, LoginView
from views import logout_view

urlpatterns = [
    # Examples:
    # url(r'^$', 'project.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', HomePageView.as_view(), name='home'),
    url(r'^accounts/register',
        SignUpView.as_view(success_url="/"),
        name='signup'),
    url(r'^accounts/signin', LoginView.as_view(), name='signin'),
    url(r'^accounts/signout', logout_view, name='signout'),
    url(r'^talks/', include('talks.urls', namespace='talks')),
]
示例#25
0
from django.conf.urls import url

from views import ItemCreationView, ItemEditView, ItemDetailView, UserLogView
from views import VariantCreationView, VariantDetailView, VariantEditView, HomePage
from views import RegistrationView, LoginView, LogoutView

urlpatterns = [
    url(r'^$', HomePage.as_view(), name="homepage"),
    url(r'^user-log/$', UserLogView.as_view(), name="log"),
    url(r'^create-item/', ItemCreationView.as_view(), name="create-item"),
    url(r'^edit-item/(?P<pk>\w{0,50})/',
        ItemEditView.as_view(),
        name="edit-item"),
    url(r'^create-variant/',
        VariantCreationView.as_view(),
        name="create-variant"),
    url(r'^view-variant/(?P<pk>\w{0,50})/',
        VariantDetailView.as_view(),
        name="view-variant"),
    url(r'^view-item/(?P<pk>\w{0,50})/',
        ItemDetailView.as_view(),
        name="view-variant"),
    url(r'^edit-variant/(?P<pk>\w{0,50})/',
        VariantEditView.as_view(),
        name="edit-variant"),
    url(r'^register/', RegistrationView.as_view(), name="register-user"),
    url(r'^login/', LoginView.as_view(), name="login"),
    url(r'^logout/', LogoutView.as_view(), name="logout"),
]
示例#26
0
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. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from views import LoginView, my_logout, test_email, user_add, deal_user_add, messages, new_message_by_ajax
from views import clear_unread_message_by_ajax

urlpatterns = [
    url(r'^login/', LoginView.as_view(), name='users_login'),
    url(r'^logout/', my_logout, name='users_logout'),
    url(r'^test_email/', test_email, name='users_send_email'),
    url(r'^user_add/', user_add, name='users_user_add'),
    url(r'^deal_user_add/', deal_user_add, name='users_deal_user_add'),
    url(r'^messages/', messages, name='users_messages'),
    url(r'^new_message_by_ajax/',
        new_message_by_ajax,
        name='users_new_message_by_ajax'),
    url(r'^clear_unread_message_by_ajax/',
        clear_unread_message_by_ajax,
        name='users_clear_unread_message_by_ajax'),
]
示例#27
0
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

from views import HomePageView, SignUpView, LoginView, LogOutView

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'survivalguide.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^$', HomePageView.as_view(),
        name='home'),  # no parenthesis around the functions for views!!!
    url(r'^accounts/register/$', SignUpView.as_view(), name='signup'),
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^accounts/logout/$', LogOutView.as_view(), name='logout'),
    url(r'^talks/', include('talks.urls', namespace='talks')),
    url(r'^admin/', include(admin.site.urls)),
)
示例#28
0
from django.conf.urls import url, include
from views import LoginView, LogoutView, UsersListView, UserAddView, UserModifyPassword, UserModifyStatusView, UserDeleteView, GroupListView, GroupView, UserGroupView, GroupPermissionListView, GroupPermission

urlpatterns = [
    url('^login', LoginView.as_view(), name='login'),
    url('^logout/$', LogoutView.as_view(), name='logout'),
    url('^list/$', UsersListView.as_view(), name='userslist'),
    url('^add/$', UserAddView.as_view(), name='adduser'),
    url('^modifypasswd/$',
        UserModifyPassword.as_view(),
        name='modifyuserpasswd'),
    url('^modifystatus/$',
        UserModifyStatusView.as_view(),
        name='modifyuserstatus'),
    url('^deleteuser/$', UserDeleteView.as_view(), name='deleteuser'),
    url(
        r'group/',
        include([
            url(r'^user_to_group', GroupView.as_view(), name='group'),
            url(r'^list/$', GroupListView.as_view(), name='grouplist'),
            url(r'^user_group_list/$',
                UserGroupView.as_view(),
                name='usergrouplist'),
            url(r'^permissionlist/$',
                GroupPermissionListView.as_view(),
                name='grouppermissionlist'),
            url(r'^grouppermission/$',
                GroupPermission.as_view(),
                name='grouppermission'),
        ]))
]
示例#29
0
from django.conf.urls import patterns, include, url
from views import HomePageView, LoginView, LogOutView, SignUpView
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
                       # Examples:
                       # url(r'^$', 'surv ivalguide.views.home', name='home'),
                       # url(r'^blog/', include('blog.urls')),
                       url(r'^$', HomePageView.as_view(), name='home'),
                       url(r'^accounts/register/$',
                           SignUpView.as_view(), name='signup'),
                       url(r'^accounts/login/$',
                           LoginView.as_view(), name='login'),
                       url(r'^accounts/logout/$',
                           LogOutView.as_view(), name='logout'),
                       url(r'^talks/',
                           include('talks.urls', namespace='talks')),
                       url(r'^admin/', include(admin.site.urls)),
                       )
示例#30
0
 def logout(self):
     import views.LoginView as LoginView
     self.librarianHome.hide()
     self.ui = LoginView.LoginView()
     self.ui.show()
示例#31
0
from views import SignupView, LoginView, LogoutView, DeleteView ,ConfirmEmailView ,ChangePasswordView, PasswordResetView, PasswordResetTokenView ,SettingsView, ProfileView, UploadNewAvatarView

url_names = {
	"signup":"signup",
	"login":"******",
	"logout":"logout",
	"confirm_email":"confirm_email",
	"password":"******",
	"password_reset":"password_reset",
	"settings":"settings",
	"delete":"delete",
}

urlpatterns = patterns("",
    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/$', ConfirmEmailView.as_view(), name="account_confirm_email"),
	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/$', SettingsView.as_view(), name="account_settings"),
    url(r'^profile/$', ProfileView.as_view(), name="account_profile"),
    url(r'^delete/$', DeleteView.as_view(), name="account_delete"),
    url(r'^image/(?P<content_type>[-\w]+)/(?P<object_id>\d+)/create/$',
        UploadNewAvatarView.as_view(),
        name='upload_new_avatar',
    ),
	url(r'^messages/', include('messages.urls')),
)
示例#32
0
from django.conf.urls import url
from . import views
from views import LoginView

urlpatterns = [
    url(r'^login$', LoginView.as_view()),
    url(r'^logout$', views.logout_view) ,
    url(r'^login$', LoginView.as_view()),
    url(r'^$', views.home),
    url(r"^cambioDia/(?P<dia>\S+)$", views.cambioDia),
    url(r'^nuevoPaciente$', views.nuevoPaciente),
    url(r'^editarPaciente/(?P<pk>[0-9]+)/$', views.editarPaciente),
    url(r'^eliminiar_paciente/(?P<pk>[0-9]+)/$', views.eliminarPaciente),
    url(r'^nuevoMedico$', views.nuevoMedico),
    url(r'^editarMedico/(?P<pk>[0-9]+)/$', views.editarMedico),
    url(r'^eliminiar_medico/(?P<pk>[0-9]+)/$', views.eliminarMedico),
    url(r'^nuevoTratamiento$', views.nuevoTratamiento),
    url(r'^editarTratamiento/(?P<pk>[0-9]+)/$', views.editarTratamiento),
    url(r'^eliminiar_tratamiento/(?P<pk>[0-9]+)/$', views.eliminarTratamiento),
    url(r'^nuevoEspecialidad$', views.nuevoEspecialidad),
    url(r'^editarEspecialidad/(?P<pk>[0-9]+)/$', views.editarEspecialidad),
    url(r'^eliminiar_especialidad/(?P<pk>[0-9]+)/$', views.eliminarEspecialidad),
    url(r'^nuevoObraSocial$', views.nuevoObraSocial),
    url(r'^editarObraSocial/(?P<pk>[0-9]+)/$', views.editarObraSocial),
    url(r'^eliminiar_obraSocial/(?P<pk>[0-9]+)/$', views.eliminarObraSocial),
    url(r'^nuevoTurno$', views.nuevoTurno),
    url(r'^editarTurno/(?P<pk>[0-9]+)/$', views.editarTurno),
    url(r'^eliminarTurno/(?P<pk>[0-9]+)/$', views.eliminarTurno),
]
示例#33
0
from django.conf.urls import url
from views import LoginView, OTPView, ContactView, FeedView, UserView, ProfileRequestView, \
BlockMuteView, NotificationView, InviteView, ShareContactView, InterestView, SocialProfileView

urlpatterns = [
    url(r'login/', LoginView.as_view()),
    url(r'otp/', OTPView.as_view()),
    url(r'social_profile/', SocialProfileView.as_view()),
    url(r'interest/', InterestView.as_view()),
    url(r'user/', UserView.as_view()),
    url(r'profile_request/', ProfileRequestView.as_view()),

    url(r'contact/', ContactView.as_view()),
    url(r'block_mute/', BlockMuteView.as_view()),
    url(r'invite/', InviteView.as_view()),
    url(r'share/', ShareContactView.as_view()),

    url(r'feed/', FeedView.as_view()),
    url(r'notification/', NotificationView.as_view())
]
示例#34
0
 def logout(self):
     import views.LoginView as LoginView
     self.memberHome.hide()
     self.ui = LoginView.LoginView()
     self.ui.show()
示例#35
0
from django.conf.urls import patterns, include, url
from views import LandingView, LoginView, DashboardView, SaveEventView, GetEventsView, GetBuddiesView



urlpatterns = patterns('',
    url('^$', LandingView.as_view(), name='landing_view'),
    url('^login$', LoginView.as_view(), name='login_view'),
    url('^dashboard/(?P<dashboard_id>[a-zA-Z0-9\-]+)$', DashboardView.as_view(), name='dashboard_view'),
    url('^api/saveEvent$', SaveEventView.as_view(), name='save_event_view'),
    url('^api/getEvents$', GetEventsView.as_view(), name='get_events_view'),
    url('^api/getBuddies$', GetBuddiesView.as_view(), name='get_buddies_view'),
)
示例#36
0
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
import sys

sys.path.append('C:\djangoApp\youtube_python\youtube')
from views import HomeView, NewVideo, LoginView

#저장을 해야지 반영됨. 저장->서버에 반영

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', HomeView.as_view()),
    path('login', LoginView.as_view()),
    path('new_video', NewVideo.as_view())
]

from django.conf import settings
from django.conf.urls import include, url  # For django versions before 2.0
from django.urls import include, path  # For django versions from 2.0 and up

if settings.DEBUG:
    import debug_toolbar
    urlpatterns = [
        path('__debug__/', include(debug_toolbar.urls)),

        # For django versions before 2.0:
        # url(r'^__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns
示例#37
0
# -*- coding: utf-8 -*-
__author__ = 'Dmitry Astrikov'

from django.conf.urls import include, patterns, url
from django.contrib.auth.decorators import login_required

from views import LoginView, LogoutView

urlpatterns = patterns('',
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', login_required(LogoutView.as_view()), name='logout'),
)
示例#38
0
__author__ = 'dheerendra'

from django.conf.urls import url, include
from views import LoginView, IndexView, LogoutView, AddNoticeView, UserNoticeViewset, UserEventsViewset, AddEventView, \
    AddNewsView, UserNewsViewset
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register('notice', UserNoticeViewset, base_name='content_notice')
router.register('event', UserEventsViewset, base_name='content_event')
router.register('news', UserNewsViewset, base_name='content_news')

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='content_home'),
    url(r'^login/', LoginView.as_view(), name='login_page'),
    url(r'^logout/', LogoutView.as_view(), name='logout_page'),
    url(r'^add_notice/', AddNoticeView.as_view(), name='add_content_notice'),
    url(r'^add_event/', AddEventView.as_view(), name='add_content_event'),
    url(r'^add_news/', AddNewsView.as_view(), name='add_content_news'),
    url(r'^api/', include(router.urls)),
]