Example #1
1
def get_patterns(user_model):
    # Registration urls
    return [
        path(
            settings.LOGIN_URL.lstrip('/'),
            LoginView.as_view(**dict(
                template_name='users/login.html',
                authentication_form=AuthenticationForm,
                extra_context=dict(
                    password_reset_url=reverse_lazy('users-password_reset'),
                    login_url=settings.LOGIN_URL,
                    next=settings.LOGIN_REDIRECT_URL,
                    login_view=True
                )
            )),
            name='users-login'
        ),
        path(
            'users/logout/',
            LogoutView.as_view(**dict(
                template_name='users/logged_out.html',
                next_page=settings.LOGOUT_REDIRECT_URL
            )),
            name='users-logout'
        ),
        # account confirmation url, protected by secret token; displayed when the users clicked the account confirm url
        # in its account confirmation email
        re_path(
            r'^users/account_confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
            account_confirm, dict(
                template_name='users/account_confirm.html',
                set_password_form=AccountActivationPasswordForm,
                post_reset_redirect='/users/account_confirm_complete/',
                user_model=user_model
            ),
            name='users-account_confirm'
        ),
        # indicated that the account was successfully confirmed
        path(
            'users/account_confirm_complete/',
            TemplateView.as_view(
                template_name='users/account_confirm_complete.html',
                extra_context=dict(
                    login_redirect_url=settings.LOGIN_REDIRECT_URL,
                    login_url=settings.LOGIN_URL,
                    user_model=user_model
                )
            ),
            name='users-account_confirm_complete'
        ),

        # displays a form that takes a user's email address; when submitted, an email with a password reset url is sent
        # to that user
        path(
            'users/password_reset/',
            PasswordResetView.as_view(**dict(
                template_name='users/password_reset.html',
                success_url=reverse_lazy('users-password-reset-done'),
                email_template_name='users/email/password_reset.html',
                form_class=get_password_reset_form('users-password_reset_confirm', user_model),
            )),
            name='users-password_reset'
        ),
        # displays that the password change email has been sent.
        path(
            'users/password_reset_done/',
            PasswordResetDoneView.as_view(**dict(
                template_name='users/password_reset_done.html',
                extra_context=dict(login_url=settings.LOGIN_URL),
            )),
            name='users-password-reset-done'
        ),
        # displays the form where the user can choose its new password
        re_path(
            r'^users/password_reset_confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
            PasswordResetConfirmView.as_view(**dict(
                template_name='users/password_reset_confirm.html',
                success_url=reverse_lazy('user-password_reset_complete'),
            )),
            name='users-password_reset_confirm'
        ),
        # indicates that the user's password has been successfully changed.
        path(
            'users/password_reset_complete/',
            PasswordResetCompleteView.as_view(**dict(
                template_name='users/password_reset_complete.html',
                extra_context=dict(login_url=settings.LOGIN_URL)
            )),
            name='user-password_reset_complete'
        )
    ]
Example #2
0
def logout(request):
    """return the django.contrib.auth or the django-allauth logout view"""
    if settings.USE_ALL_AUTH:
        # noinspection PyPackageRequirements
        from allauth.account.views import logout

        return logout(request)
    return LogoutView.as_view()(request)
Example #3
0
 def logout(self, request, extra_context=None):
     if request.method == 'POST':
         messages.info(request, _('Thanks for using Weblate!'))
         request.current_app = self.name
         return LogoutView.as_view(next_page=reverse('admin:login'))(request)
     context = self.each_context(request)
     context['title'] = _('Logout')
     return render(request, 'admin/logout-confirm.html', context)
Example #4
0
def logout(request, next_page=None,
           template_name='registration/logged_out.html',
           redirect_field_name=REDIRECT_FIELD_NAME):
    was_wind_login = SESSION_KEY in request.session
    django_logout(request)
    statsd.incr('djangowind.logout')
    if was_wind_login and hasattr(settings, 'CAS_BASE'):
        return HttpResponseRedirect('%scas/logout' % settings.CAS_BASE)
    else:
        return LogoutView.as_view()(
            request, next_page, template_name, redirect_field_name)
Example #5
0
def logout(request, extra_context=None):
    """
    Log out the user.

    This should *not* assume the user is already logged in.
    """
    extra_context = extra_context or {}
    # Since the user isn't logged out at this point, the value of has_permission must be overridden.
    extra_context['has_permission'] = False
    defaults = view_defaults(
        extra_context=extra_context,
        next_page=reverse(
            'index', current_app=request.resolver_match.app_name))
    return LogoutView.as_view(**defaults)(request)
Example #6
0
    def logout(self, request, extra_context=None):
        """
        Logs out the user for the given HttpRequest.

        This should *not* assume the user is already logged in.
        """
        from django.contrib.auth.views import LogoutView
        defaults = {
            'extra_context': dict(
                self.each_context(request),
                # Since the user isn't logged out at this point, the value of
                # has_permission must be overridden.
                has_permission=False,
                **(extra_context or {})
            ),
        }
        if self.logout_template is not None:
            defaults['template_name'] = self.logout_template
        request.current_app = self.name
        return LogoutView.as_view(**defaults)(request)
Example #7
0
from django.conf.urls            import include, url
from django.http                 import HttpResponse
from django.views.generic        import TemplateView
from django.conf                 import settings
from django.conf.urls.static     import static

from django.contrib.auth.views   import LoginView, LogoutView

urlpatterns = [
	url(r'', include('manager.urls')),
	url(r'^login/$', LoginView.as_view(template_name='login.html'), name='login'),
	url(r'^logout/$', LogoutView.as_view(template_name='logout.html'), name='logout'),
	url(r'^robots.txt', lambda x: HttpResponse('User-Agent: *\nDisallow: /', content_type='text/plain'), name='robots_file'),
]

if settings.LOCAL_DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

handler403 = lambda r: url(r, TemplateView.as_view(template_name='403.html'))
handler404 = lambda r: url(r, TemplateView.as_view(template_name='404.html'))
handler500 = lambda r: url(r, TemplateView.as_view(template_name='500.html'))
Example #8
0
from django.urls import path
from django.contrib.auth.views import LoginView, LogoutView
from . import views

app_name = "main"

urlpatterns = [
    path("", views.home, name="home"),
    path("post/<str:author>/<slug:slug>", views.detail, name="detail"),
    path("login",
         LoginView.as_view(template_name="main/login.html"),
         name="login"),
    path("register", views.register, name="register"),
    path("logout",
         LogoutView.as_view(template_name="main/logout.html"),
         name="logout"),
    path("new", views.add_post, name="new"),
    path("edit", views.edit, name="edit"),
    path("update", views.update, name="update"),
    path("dashboard", views.dashboard, name="dashboard"),
    path("delete", views.delete, name="delete"),
    path("addcomment", views.add_comment, name="addcomment"),
]
Example #9
0
from smartmin.users.views import Login

from django.conf import settings
from django.conf.urls import url
from django.contrib.auth.views import LogoutView

from . import views

logout_url = getattr(settings, "LOGOUT_REDIRECT_URL", None)

urlpatterns = [
    url(r"^login/$", Login.as_view(), dict(template_name="smartmin/users/login.html"), name="users.user_login"),
    url(r"^logout/$", LogoutView.as_view(),
        dict(redirect_field_name="go", next_page=logout_url), name="users.user_logout"),
]

urlpatterns += views.UserCRUDL().as_urlpatterns()
Example #10
0
    StateChangeDelete, StateAddStateChange,

    root, player_game, player_choose, faculty_section_reset,
    allpaths, allquestions, allvariables, faculty_section_manage,
    faculty_end_turn, faculty_section_bygroup, faculty_section_byplayer,
    faculty_group_detail, faculty_player_detail, faculty_feedback_submit,
    faculty_player_detail_byturn,
)

media_root = os.path.join(os.path.dirname(__file__), "media")

urlpatterns = [
    url(r'^media/(?P<path>.*)$', django.views.static.serve,
        {'document_root': media_root}),
    url(r'^$', root),
    url(r'^logout/$', LogoutView.as_view(
        template_name='sim/logged_out.html')),

    # player pages
    url(r'^player/game/(?P<group_id>\d+)/$', player_game),
    url(r'^player/game/(?P<group_id>\d+)/(?P<turn_id>\d+)/$', player_game),

    # player ajax requests
    url(r'^player/choose/$', player_choose),

    # faculty ajax requests
    url(r'^faculty/reset/(?P<section_id>\d+)/$', faculty_section_reset),

    # faculty management pages
    url(r'^allpaths/$', allpaths),
    url(r'^allpaths/questions$', allquestions),
    url(r'^allpaths/variables$', allvariables),
Example #11
0
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView
from django.urls import include, path
from django.views.generic import RedirectView
from ibms.views import SiteHomeView, HealthCheckView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('login/', LoginView.as_view(template_name='login.html'), name='login'),
    path('logout/', LogoutView.as_view(template_name='logged_out.html'), name='logout'),
    path('confluence/', RedirectView.as_view(url=settings.HELP_URL), name='help_page'),
    path('healthcheck/', HealthCheckView.as_view(), name='health_check'),
    path('', include('ibms.urls')),
    path('', include('sfm.urls')),
    path('', SiteHomeView.as_view(), name='site_home'),
]
Example #12
0
from django.urls import path, include
from django.contrib.auth.views import LoginView,LogoutView
from .views import index, admin, habitaciones, login, logout, registro, reservar
from usuario import views
#from django.contrib.auth.decorators import login_required

urlpatterns = [
    path('',views.index, name='index'),
    path('index.html/', views.index , name='index'),
    path('admin.html/', views.admin, name='admin'),
    path('login/',LoginView.as_view(template_name='usuario/index.html/login.html'), name="login"),
    path('logout/',LogoutView.as_view(template_name='usuario/index.html'),name="logout"), 
    path('registro.html/', views.registro, name='registro'),
    path('reservar.html/',views.reservar, name='reservar'),
    path('habitaciones.html/', views.habitaciones, name='habitaciones')
]

from django.conf.urls import url
from django.contrib.auth.views import LoginView, LogoutView

from .views import RegisterView


urlpatterns = [
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^login/$', LoginView.as_view(template_name='account/login.html'), name="login"),
    url(r'^logout/$', LogoutView.as_view(template_name='account/login.html'), name="logout"),
]
Example #14
0
from django.urls import path
from django.contrib.auth.views import LoginView, LogoutView
from . import views
from .views import (TopicDetailView, MessageCreateView, SectionListView,
                    MessageDeleteView, ForumUserDetailView, SearchListView)

urlpatterns = [
    path("", views.forumHome, name="forum-home"),
    path("index/", SectionListView.as_view(), name="forum-index"),
    path("register/", views.userRegistration, name="user-registration"),
    path("login/",
         LoginView.as_view(template_name="forum/user-login.html"),
         name="user-login"),
    path("logout/",
         LogoutView.as_view(template_name="forum/index.html"),
         name="user-logout"),
    path("search/", SearchListView.as_view(), name="forum-search-results"),
    path("user/<int:pk>/", ForumUserDetailView.as_view(), name="user-detail"),
    path("user/edit/<int:userid>/", views.userProfileEditing,
         name="user-edit"),
    path("topic/<int:pk>/", TopicDetailView.as_view(), name="topic-detail"),
    path("message/create/topic/<int:topic>/",
         MessageCreateView.as_view(),
         name="message-create"),
    path("message/delete/<int:pk>/",
         MessageDeleteView.as_view(),
         name="message-delete"),
]
Example #15
0
    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 django.contrib.auth.views import LoginView, LogoutView
from . import views

urlpatterns = [


    url(r'^login/', LoginView.as_view(template_name='login.html'), name="login"),
    url(r'^logout/', LogoutView.as_view(template_name='login.html'), name="logout"),
    url(r'^admin/', admin.site.urls),
    url(r'^productos/', include('productos.urls', namespace='productos')),
    url(r'^cliente/', include('clientes.urls', namespace='clientes')),
    url(r'^agente/', include('agentes.urls', namespace='agentes')),
    url(r'^pagare/', include('pagares.urls', namespace='pagares')),
    url(r'^proveedor/', include('proveedores.urls', namespace='proveedores')),
    url(r'^api/v1/', include("api.urls")),
    url(r'^home', views.home, name='home'),
    url(r'^', views.home, name='home'),
]



Example #16
0
from django.urls import path
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView
from chat.views import index


urlpatterns = [
    path('', index),
    path('accounts/login/', LoginView.as_view()),
    path('accounts/logout/', LogoutView.as_view()),
    path('admin/', admin.site.urls),
]
Example #17
0
from django.contrib.auth import views
from django.urls import path
from .views import *
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth.views import LoginView, LogoutView
urlpatterns = [
    path('', feed, name='feed'),
    path('crear_curso/', crearCurso, name='crear_curso'),
    path('editar_curso/<int:id>', editarcurso, name='editar_curso'),
    path('register/', register, name='register'),
    path('login/',
         LoginView.as_view(template_name='curso/login.html'),
         name='login'),
    path('logout/',
         LogoutView.as_view(template_name='curso/logout.html'),
         name='logout'),
    path('eliminarcurso/<int:id>', eliminarCurso, name='eliminarcurso'),
    path('profile/', profile, name='profile'),
    path('cursosListados/<str:username>/', ListadoCurso,
         name="cursosListados"),
    path('pensum/<str:username>/', Mostrarpensum, name="pensum"),
    path('crear_pensum/', crearPensum, name='crear_pensum'),
    path('informacion/<str:username>/', infoCurso, name="informacion"),
    path('eliminar_actividad/<int:id>',
         eliminarActividad,
         name='eliminar_actividad'),
    path('agenda/<str:username>/', verAgenda, name="agenda"),
    path('crear_actividad/', crearAgenda, name='crear_actividad'),
    path('editar_actividad/<int:id>', editarActividad,
         name='editar_actividad'),
Example #18
0
from django.urls import path
from . import views as v
from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    path('registration/', v.registration, name='user-registration'),
    path('login/',
         LoginView.as_view(template_name='users/login.html'),
         name='user-login'),
    path('logout/',
         LogoutView.as_view(template_name='users/logout.html'),
         name='user-logout'),
    path('profile/', v.profile, name='user-profile')
]
    PasswordResetConfirmView, PasswordResetDoneView, PasswordResetCompleteView,
)
from login import views as user_views
from shop import views as shop_views
from shop.views import ItemsView, ItemDetailView, add_to_cart

# TODO: 404 errors

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', user_views.home, name='home'),
    path('home/', user_views.home_redirect, name='home_redirect'),
    path('register/', user_views.register, name="register"),
    path('profile/', user_views.profile, name='profile'),
    path('profile/edit/', user_views.edit_profile, name='edit_profile'),
    path('profile/password/', user_views.changepassword, name='changepassword'),
    path('login/', LoginView.as_view(template_name='login/login.html', redirect_authenticated_user=True), name="login"),
    path('logout/', LogoutView.as_view(template_name='login/home.html'), {'extra_context':{'message':'True','message_title':'Logout','message_text':'You have logged out successfully'}}, name="logout"),
    path('reset_password/', PasswordResetView.as_view(template_name='login/resetpassword.html', email_template_name='login/reset_password_email.html'), name="password_reset"),
    path('reset_password/done/', PasswordResetDoneView.as_view(template_name='login/text.html'), name="password_reset_done"),
    path('reset_password/complete/', PasswordResetCompleteView.as_view(template_name='login/home.html'), name="password_reset_complete"),
    path('reset_password/<uidb64>/<token>/', PasswordResetConfirmView.as_view(template_name='login/resetpassword.html'), name="password_reset_confirm"),

    # shop
    path('shop/', ItemsView.as_view(), name='item_list'),
    path('shop/product/<slug>/', ItemDetailView.as_view(), name='product'),
    path('shop/checkout/', shop_views.checkout, name='checkout'),
    path('shop/add-to-cart/', shop_views.add_to_cart, name='add-to-cart'),

]
Example #20
0
File: urls.py Project: yergor/web
from django.conf.urls import url
from django.contrib.auth.views import LoginView, LogoutView
from registration.views import signup

app_name = 'registrations'
urlpatterns = [
    url('login', LoginView.as_view(), name='login'),
    url('logout', LogoutView.as_view(), name='logout'),
    url('signup/', signup, name='sigup'),
]
Example #21
0
    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 import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView, PasswordChangeDoneView
from django.contrib.flatpages import views

urlpatterns = [
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^accounts/logout/$', LogoutView.as_view(), name='logout'),
    url(r'^accounts/password/change/$', PasswordChangeView.as_view(), name='password_change'),
    url(r'^accounts/password/change/done/$', PasswordChangeDoneView.as_view(), name='password_change_done'),

    url(r'^timealign/', include('annotations.urls', namespace='annotations')),
    url(r'^preselect/', include('selections.urls', namespace='selections')),
    url(r'^stats/', include('stats.urls', namespace='stats')),
    url(r'^news/', include('news.urls', namespace='news')),

    url(r'^admin/', include(admin.site.urls)),

    url(r'^$', views.flatpage, {'url': '/home/'}, name='home'),
    url(r'^project/$', views.flatpage, {'url': '/project/'}, name='project'),
    url(r'^project/nl-summary/$', views.flatpage, {'url': '/project/nl-summary/'}, name='nl-summary'),
    url(r'^project/collaborations/$', views.flatpage, {'url': '/project/collaborations/'}, name='collaborations'),
    url(r'^project/videos/$', views.flatpage, {'url': '/project/videos/'}, name='videos'),
Example #22
0
 path('doctor-delete-medicaltest/<slug:p>/<slug:a>',
      views.doctor_prescription_delete_medicaltest,
      name='doctor-delete-medicaltest'),
 path('doctor-delete-medicines/<slug:p>/<slug:a>',
      views.doctor_prescription_delete_medicines,
      name='doctor-delete-medicines'),
 path('doctor-add-medicaltest/<slug:p>',
      views.doctor_prescription_add_medicaltest,
      name='doctor-add-medicaltest'),
 path('doctor-add-medicines/<slug:p>',
      views.doctor_prescription_add_medicines,
      name='doctor-add-medicines'),
 # path('doctor-delete-appointment',views.doctor_delete_appointment_view,name='doctor-delete-appointment'),
 # path('delete-appointment/<slug:pk>', views.delete_appointment_view,name='delete-appointment'),
 path('logout',
      LogoutView.as_view(template_name='hospital/index.html'),
      name='logout'),
 path('doctor-patient', views.doctor_patient_view, name='doctor-patient'),
 path('doctor-view-patient',
      views.doctor_view_patient_view,
      name='doctor-view-patient'),
 path('doctor-view-discharge-patient',
      views.doctor_view_discharge_patient_view,
      name='doctor-view-discharge-patient'),
 path('patientclick', views.patientclick_view),
 path('patientsignup', views.patient_signup_view),
 path('patientregister', views.patient_signup_view, name='patientregister'),
 path('patientlogin',
      LoginView.as_view(template_name='hospital/patientlogin.html')),
 path('patient-dashboard',
      views.patient_dashboard_view,
Example #23
0
from django.urls import path, include
from django.contrib.auth.views import LogoutView
from django.conf import settings
from . import api
from . import views

apipattens = [
    path('check_token/', api.CheckToken.as_view(), name='check_token'),
    path('change_email/', api.ChangeEmail.as_view(), name='change_email'),
    path('change_token/', api.ChangeToken.as_view(), name='change_token'),
    path('reset_token_email/', api.ResetTokenEmail.as_view(), name='reset_token_email'),
    path('list_profiles/', api.ListProfiles.as_view(), name='list_profiles'),
    path('list_hacker_profiles/', api.ListHackerProfiles.as_view(), name='list_hacker_profiles'),
    path('sui_list_profiles/', api.SUIListProfiles.as_view(), name='sui_list_profiles'),
]

app_name = 'profile'
urlpatterns = [
    path('api/', include((apipattens, 'api')), name='api'),
    path('logout/', LogoutView.as_view(next_page=settings.LOGIN_URL), name='logout'),
    path('token_login/<str:token>/', views.TokenLoginView.as_view(), name='token_login'),
    path('verify_email/<str:code>/', views.VerifyEmailView.as_view(), name='verify_email'),
]
Example #24
0
from django.conf.urls import url

from . import views
from . import forms

from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    url(r'^index$', views.IndexView.as_view(), name='index'),
    url(r'^login$',
        LoginView.as_view(template_name='dev/login.html',
                          authentication_form=forms.LoginForm),
        name='login'),
    url(r'^logout$', LogoutView.as_view(next_page='login'), name='logout'),
    url(r'^message/all$', views.MessageListView.as_view(),
        name='message list'),
    url(r'^message/new$',
        views.MessageCreateView.as_view(),
        name='message new'),
    url(r'^message/(?P<pk>[0-9]+)/$',
        views.MessageDetailView.as_view(),
        name='message-detail'),
    url(r'^map$', views.MapView.as_view(), name='map'),
    url(r'^locations$', views.LocationAJAXView.as_view(), name='locations'),
    url(r'^waypoints$', views.WaypointAJAXView.as_view(), name='waypoints'),
]
Example #25
0
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.views import LogoutView
from django.urls import path
import django.contrib.auth.views
import notifications.urls

admin.autodiscover()

urlpatterns = [
    url(r'^admin/', admin.site.urls),

    path('logout/',LogoutView.as_view(),name='logout'),
    path('', include('django.contrib.auth.urls')),
    url(r'', include('accounts.urls')),
]

if 'editor_rest_api' in settings.INSTALLED_APPS:
    try:
        from editor_rest_api.urls import urls as rest_urls
        urlpatterns += [
            url('^api/', include(rest_urls)),
        ]
    except ImportError:
        pass

urlpatterns += [
    url(r'', include('editor.urls')),
    url(r'^migrate/', include('migration.urls')),
Example #26
0
from django.urls import path
from django.views.generic import TemplateView
from .views import AllNewsList, NewsDetail, Filters, AdNews, NewsUpdate, NewsDelete, BaseRegisterView, IndexView, Upgrade_me, MyView, ContactView, AppointmentView, IndexViewC
from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    path('login/',
         LoginView.as_view(template_name='flatpages/login.html'),
         name='login'),
    path('logout/',
         LogoutView.as_view(template_name='flatpages/logout.html'),
         name='logout'),
    path('', AllNewsList.as_view()),
    path('<int:pk>', NewsDetail.as_view()),
    path('search/', Filters.as_view(), name="flatpages/search.html"),
    path('adnews/', AdNews.as_view(), name="flatpages/adnews.html"),
    path('update/<int:pk>', NewsUpdate.as_view(), name='news_update'),
    path('delete/<int:pk>', NewsDelete.as_view(), name='news_delete'),
    path('login/',
         LoginView.as_view(template_name='flatpages/login.html'),
         name='login'),
    path('logout/',
         LogoutView.as_view(template_name='flatpages/logout.html'),
         name='logout'),
    path('signup/',
         BaseRegisterView.as_view(template_name='flatpages/signup.html'),
         name='signup'),
    path('index/',
         IndexView.as_view(template_name='flatpages/index.html'),
         name='index'),
    path('upgrade/', Upgrade_me, name='upgrade'),
Example #27
0
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.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView
from django.urls import path, include
from django.views.generic import RedirectView, TemplateView

urlpatterns = [
    path(
        '',
        RedirectView.as_view(pattern_name='about_urlpattern',
                             permanent=False)),
    path('login/',
         LoginView.as_view(template_name='courseinfo/login.html'),
         name='login_urlpattern'),
    path('logout/', LogoutView.as_view(), name='logout_urlpattern'),
    path('about/',
         TemplateView.as_view(template_name='courseinfo/about.html'),
         name='about_urlpattern'),
    path('admin/', admin.site.urls),
    path('', include('courseinfo.urls'))
]
Example #28
0
from django.conf import settings
from django.contrib.auth.views import LogoutView
from django.urls import path
from django.conf.urls.static import static
from . import views

urlpatterns = [
    path('', views.index, name='index'),
    path('login/', views.login_view, name='login'),
    path('logout/',
         LogoutView.as_view(), {'next_page': settings.LOGOUT_REDIRECT_URL},
         name='logout'),
    path('register/', views.register, name='register'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Example #29
0
from django.conf.urls import include, url
from django.contrib.auth.views import LoginView, LogoutView

from django.contrib import admin
admin.autodiscover()

admin.site.site_header = "WLNet DataView Administrator"
admin.site.site_title = "WLNet DataView"

from portal.views import index
from dataview.views import v1_config

urlpatterns = [
    url(r'^$', index, name='index'),
    url(r'^api/1/config$', v1_config, name='v1_config'),
    url(r'^api/', include('api.urls')),

    #url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', admin.site.urls),
    
    url(r'^account/login/$', LoginView.as_view(template_name='registration/login.html')),
    url(r'^account/logout/$', LogoutView.as_view()),

    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),

]
Example #30
0
from django.conf.urls.static import static
from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic import TemplateView
from django.contrib.auth.views import LogoutView
from .views import home_page, about_page, contact_page
from accounts.views import guest_register_view, RegisterView, LoginView  #login_page,register_page,
from addresses.views import checkout_address_create_view, checkout_address_reuse_view

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', home_page, name='home'),
    url(r'^about/$', about_page, name='about'),
    url(r'^contact/$', contact_page, name='contact'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^checkout/address/create/$',
        checkout_address_create_view,
        name='checkout_address_create'),
    url(r'^checkout/address/reuse/$',
        checkout_address_reuse_view,
        name='checkout_address_reuse'),
    url(r'^register/guest/$', guest_register_view, name='guest_register'),
    url(r'^bootstrap/$', TemplateView.as_view(template_name="bootstrap.html")),
    url(r'^products/', include("products.urls", namespace='products')),
    url(r'^cart/', include("carts.urls", namespace='cart')),
    url(r'^search/', include("search.urls", namespace='search'))
]

if settings.DEBUG:
Example #31
0
    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.contrib import admin
from django.urls import path
from .views import AboutPage, UserList, UserDetail, signup, UserCreate, UserUpdateView, UserDeleteView, LogoutPage
from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    path('', UserList.as_view(), name="userslist"),
    path('about/', AboutPage.as_view(), name="aboutpage"),
    path('detail/<str:slug>/', UserDetail.as_view(), name="usersdetail"),
    path('create/', UserCreate.as_view(), name="usercreate"),
    path('update/<str:slug>/', UserUpdateView.as_view(), name="userupdate"),
    path('delete/<str:slug>/', UserDeleteView.as_view(), name="userdelete"),
    path('signup/', signup, name="signuppage"),
    path('lgout/', LogoutPage.as_view(), name="lgpage"),
    path('accounts/login/',
         LoginView.as_view(template_name='registration/login.html/'),
         name="loginpage"),
    path('accounts/logout/',
         LogoutView.as_view(template_name='registration/logout.html/'),
         name='logoutpage',
         kwargs={'next_page': 'home'}),
]
Example #32
0
# -*- encoding: utf-8 -*-
"""
License: Commercial
Copyright (c) 2019 - present AppSeed.us
"""

from django.urls import path
from .views import login_view, register_user
from django.contrib.auth.views import LogoutView

urlpatterns = [
    path('login/', login_view, name="login"),
    path('register/', register_user, name="register"),
    path("logout/", LogoutView.as_view(), name="logout")
]
Example #33
0
from django.shortcuts import render
from django.urls import path
from robots.views import rules_list
from sitegate.toolbox import get_sitegate_urls
from sitemessage.toolbox import get_sitemessage_urls

from apps.realms import bootstrap_realms  # Здесь относительный импорт работать не будет.
from apps.views import page_not_found, permission_denied, server_error, index, search, login, telebot, user_settings

urlpatterns = [
    path('', index, name='index'),
    path('search/site/', render, {'template_name': 'static/search_site.html'}, name='search_site'),
    path('search/', search, name='search'),
    path('login/', login, name='login'),
    path('settings/', user_settings, name='settings'),
    path('logout/', LogoutView.as_view(), {'next_page': '/'}, name='logout'),
    path('promo/', render, {'template_name': 'static/promo.html'}),
    path('about/', render, {'template_name': 'static/about.html'}),
    path('sitemap/', render, {'template_name': 'static/sitemap.html'}),
    path('robots.txt', rules_list, name='robots_rule_list'),
    path('%s/' % settings.TELEGRAM_BOT_URL, telebot),
    path('%s/' % settings.ADMIN_URL, admin.site.urls),
]

urlpatterns += get_sitegate_urls()  # Цепляем URLы от sitegate,
urlpatterns += get_sitemessage_urls()  # Цепляем URLы от sitemessage,

# Используем собственные страницы ошибок.
handler403 = permission_denied
handler404 = page_not_found
handler500 = server_error
Example #34
0
from users.forms import ForgotPasswordForm
from users.views import(
    signup,
    profile
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', PostListView.as_view(), name="blog-home"),
    path('user-profile/', profile, name="user-profile"),  
    path('<str:username>-posts/', UserPostListView.as_view(), name="userposts-list"),
    path('post-<int:pk>/', PostDetailView.as_view(), name="post-detail"),
    path('new-post/', PostCreateView.as_view(), name="post-create"),
    path('post-<int:pk>/update/', PostUpdateView.as_view(), name="post-update"),
    path('post-<int:pk>/delete/', PostDeleteView.as_view(), name="post-delete"),
    path('about/', about, name="blog-about"),
    path('signup/', signup, name="user-signup"),
    path('signin/', LoginView.as_view(template_name="users/signin.html"), name="user-signin"),
    path('signout/', LogoutView.as_view(template_name="users/signout.html"), name="user-signout"),
    path('password-reset/', PasswordResetView.as_view(template_name="users/password_reset.html", form_class=ForgotPasswordForm), name="password_reset"),
    path('password-reset/done/', PasswordResetDoneView.as_view(template_name="users/password_reset_done.html"), name="password_reset_done"),
    path('password-reset/confirm/<uidb64>/<token>/', PasswordResetConfirmView.as_view(template_name="users/password_reset_confirm.html"), name="password_reset_confirm"),
    path('password-reset/complete/', PasswordResetCompleteView.as_view(template_name="users/password_reset_complete.html"), name="password_reset_complete"),
    path('password-change/', PasswordChangeView.as_view(template_name="users/password_change.html"), name="password_change"),
    path('password-change/done/', PasswordChangeDoneView.as_view(template_name="users/password_change_done.html"), name="password_change_done"),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Example #35
0
from django.urls import path

from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static  

from django.contrib.auth.views import (LoginView, LogoutView)

from Projects.views import (home,request_pr,response_pr,leaderboard, profile)
from Users.views import (signin,register)

urlpatterns = [
    path('admin', admin.site.urls),
    path('', home, name='home'),
    path('signin', signin , name='signin'), 
    path('register', register , name='register'), 
    path('logout', LogoutView.as_view(), {'next_page': 'signin'}, name='logout'),

    # path('api/github_webhook/', views.github_webhook, name='github_webhook')
    path('request_pr', request_pr , name='request_pr'),
    path('response_pr', response_pr , name='response_pr'),

    path('leaderboard', leaderboard , name='leaderboard'),     
    path('<username>', profile, name='profile'),
]
# (?P<username>[^/]+)/

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
   
Example #36
0
"""config URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/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.contrib import admin, auth
from django.urls import path, include
from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('login/', LoginView.as_view(template_name='pages/login.html')),
    path('logout/', LogoutView.as_view(next_page='/')),
    path('', include('src.pages.urls'))
]
from django.urls import path
from django.contrib.auth.views import LoginView, LogoutView
from django.views.generic import TemplateView

urlpatterns = [
    path(r"", TemplateView.as_view(template_name="home.html"), name="home"),
    path(r"login/", LoginView.as_view(), name="auth_login"),
    path(r"logout/", LogoutView.as_view(template_name="logout.html"), name="auth_logout"),
]
Example #38
0
    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, re_path
from . import views
from .views import pathtracing
from rest_framework import routers
from django.contrib.auth.views import LogoutView

urlpatterns = [
    path('add/', views.add, name="add"),
    path('dashboard/', views.dashboard, name="dashboard"),
    path('logout/', LogoutView.as_view(), name="logout"),
    path('test/', views.test, name="test"),
    path('table/', views.table, name="table"),
    path('inputLocation', views.inputLocation, name="inputLocation"),
    path('register/', views.register, name="register"),
    path('updateUserDetail/', views.updateUserDetail, name="updateUserDetail"),
    path('admin_add_user_detail/',
         views.admin_add_user_detail,
         name="admin_add_user_detail"),
    path('pathtracing/<int:user_id>/', pathtracing, name="pathTracing"),
    path('search_user/', views.search_user, name="search_user"),
    path('trace/<int:user_id>/',
         views.template_pathtracing,
         name="template_pathtracing"),
    path('add/', views.template_admin_add_user_detail, name="add"),
    path(
Example #39
0
from django.conf.urls import url
from django.contrib.auth.views import \
    PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, \
    PasswordResetCompleteView, LoginView, LogoutView

from comandes import views

urlpatterns = [
    url(r'^$', views.index, name='index'),
    url(r'^fer_comanda', views.fer_comanda, name='fer_comanda'),
    url(r'^esborra_comanda', views.esborra_comanda, name='esborra_comanda'),
    url(r'^comandes', views.veure_comandes, name='comandes'),
    url(r'^informe_proveidors', views.informe_proveidors, name='informe_proveidors'),
    url(r'^informe_caixes', views.informe_caixes, name='informe_caixes'),
    url(r'^test_email', views.test_email, name="test_email"),
    url(r'^recuperar_contrasenya/$', PasswordResetView.as_view(), name="recuperar_contrasenya"),
    url(r'^password_reset/$', PasswordResetView.as_view(), name="password_reset"),
    url(r'^password_reset_done/$', PasswordResetDoneView.as_view(), name="password_reset_done"),
    url(r'^password_reset_confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', PasswordResetConfirmView.as_view(), name="password_reset_confirm"),
    url(r'^password_reset_complete/$', PasswordResetCompleteView.as_view(), name="password_reset_complete"),
    url(r'^afegeix_proveidors/', views.afegeix_proveidors, name="afegeix_proveidors" ),
    url(r'^distribueix_productes/(?P<data_recollida>[0-9-]+)/(?P<producte>\w{0,50})/$', views.distribueix_productes, name="distribueix_productes" ),
    url(r'^accounts/login/$', LoginView.as_view(template_name='login.html'), name='login'),
    url(r'^accounts/logout/$', LogoutView.as_view(next_page='/')),
    #{'next_page': '/'}),
]

#http://stackoverflow.com/questions/21284672/django-password-reset-password-reset-confirm
# change SITE_ID in settings.py
Example #40
0
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.contrib import admin
from django.urls import path, include
from django.contrib.auth.views import LoginView
from django.contrib.auth.views import LogoutView
#from django.contrib.auth import views as auth_views

urlpatterns = [
    path('admin/', admin.site.urls),

    # 127.0.0.1:8000/accounts/login - local
    # mydjangosite.com/accounts/login - online
    path('accounts/login/', LoginView.as_view(), name='login'),
    #path('accounts/login/', auth_views.LoginView.as_view(), name='login'),

    # 127.0.0.1:8000/accounts/logout - local
    # mydjangosite.com/accounts/logout - online
    path('accounts/logout/', LogoutView.as_view(), name='logout'),
    #path('accounts/logout/', auth_views.LogoutView.as_view(), name='logout', kwargs={'next_page': 'post_list'}),
    path('', include('blog.urls'))
]
Example #41
0
    ),
    path(
        "dashboard/requests/employees/<int:request_pk>/reject/",
        views.RejectEmployeeRequest.as_view(),
        name="reject-employee-request",
    ),
    path(
        "dashboard/requests/employees/<int:request_pk>/",
        views.DetailEmployeeRequest.as_view(),
        name="detail-employee-request",
    ),
    path(
        "dashboard/requests/contractors/<int:request_pk>/approve/",
        views.ApproveContractorRequest.as_view(),
        name="approve-contractor-request",
    ),
    path(
        "dashboard/requests/contractors/<int:request_pk>/reject/",
        views.RejectContractorRequest.as_view(),
        name="reject-contractor-request",
    ),
    path(
        "dashboard/requests/contractors/<int:request_pk>/",
        views.DetailContractorRequest.as_view(),
        name="detail-contractor-request",
    ),
    path("admin/", admin.site.urls),
    path("login", LoginView.as_view(), name="login"),
    path("logout", LogoutView.as_view(), name="logout"),
]
Example #42
0
"""projmoc2 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/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.conf.urls import url, include
from django.contrib import admin
from django.urls import path
from django.conf.urls.static import static
from django.conf import settings

from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'', include('gest_patr.urls',namespace='gest_patr')),
    url(r'accounts/login/$', LoginView.as_view(), name='login'),
    url(r'accounts/logout/$', LogoutView.as_view(), name='logout',kwargs={'next_page':'/'}),
]  + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Example #43
0
# -*- coding: utf-8 -*-

from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib.auth.views import LoginView, LogoutView
from django.views.generic import TemplateView

from slavdict.dictionary.admin import ui
admin.autodiscover()

urlpatterns = [
    url( r'^',           include('slavdict.dictionary.urls') ),
    url( r'^admin/',     include(admin.site.urls) ),
    url( r'^admin/doc/', include('django.contrib.admindocs.urls') ),
    url( r'^ui/',        include(ui.urls) ),
    url( r'^login/$',    LoginView.as_view() ),
    url( r'^logout/$',   LogoutView.as_view(next_page='/'), name='logout' ),
    url( r'^test/$',     TemplateView.as_view(template_name='test.html') ),
]

urlpatterns += staticfiles_urlpatterns()
Example #44
0
"""
Definition of urls for ArtOfCakeDecoration.
"""

from datetime import datetime
from django.urls import path
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView
from main import forms, views

urlpatterns = [
    path('', views.home, name='home'),
    path('contact/', views.contact, name='contact'),
    path('about/', views.about, name='about'),
    path('login/',
         LoginView.as_view(
             template_name='main/login.html',
             authentication_form=forms.BootstrapAuthenticationForm,
             extra_context={
                 'title': 'Log in',
                 'year': datetime.now().year,
             }),
         name='login'),
    path('logout/', LogoutView.as_view(next_page='/'), name='logout'),
    path('admin/', admin.site.urls),
]
Example #45
0
from django.conf import settings
from django.conf.urls import url
from django.conf.urls.static import static
from django.contrib.auth.views import LoginView, LogoutView

from website import views

urlpatterns = [
    url(r'^$', views.index, name="index"),
    url(r'^create$', views.create_gallery, name="create"),
    url(r'^upload$', views.upload, name="upload"),
    url(r'^gl/(?P<gid>[-A-Za-z0-9_]+)$', views.gallery, name="gallery"),
    url(r'^rm/gl/(?P<gid>[-A-Za-z0-9_]+)$', views.remove_gallery, name="remove_gl"),
    url(r'^rm/img/(?P<mid>[-A-Za-z0-9_]+)$', views.remove_img, name="remove_img"),
    url(r'^crop/img/(?P<mid>[-A-Za-z0-9_]+)$', views.crop, name="crop"),
    url(r'^cover/(?P<gid>[-A-Za-z0-9_]+)$', views.cover_gallery, name="cover"),
    url(r'^name/(?P<gid>[-A-Za-z0-9_]+)$', views.name_gallery, name="name"),
    url(r'^cover/set/(?P<gid>[-A-Za-z0-9_]+)/(?P<mid>[-A-Za-z0-9_]+)$', views.set_cover_gallery, name="set_cover"),
    url(r'^name/set/(?P<gid>[-A-Za-z0-9_]+)$', views.set_name_gallery, name="set_name"),

    url(r'^register$',  views.register, name="register"),
    url(r'^login$',  LoginView.as_view(), name="login"),
    url(r'^logout$', LogoutView.as_view(), name="logout"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Example #46
0
from django.conf.urls.static import static
from django.contrib.auth.views import LoginView, LogoutView, PasswordResetView, PasswordResetDoneView, \
    PasswordResetConfirmView, PasswordResetCompleteView
from django.urls import path, reverse_lazy

from django.conf import settings
from wordbuilder import views

urlpatterns = [
    path('', views.IndexView.as_view(), name='index'),
    path('signup/', views.SignUpView.as_view(), name='signup'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/',
         LogoutView.as_view(next_page=reverse_lazy('index')),
         name='logout'),
    path('dictionary/', views.DictionaryView.as_view(), name='dictionary'),
    path('words/<str:word>/', views.WordDataView.as_view(), name='word_data'),
    path('user_words/', views.UserWordView.as_view(), name='user_words'),
    path('user_words/<int:word_set_pk>/',
         views.UserWordView.as_view(),
         name='get_user_words'),
    path('reset-password/',
         PasswordResetView.as_view(
             template_name='registration/password-reset-form.html',
             email_template_name='registration/password-reset-email.html'),
         name='password_reset'),
    path('reset-password/done/',
         PasswordResetDoneView.as_view(
             template_name='registration/password-reset-done.html'),
         name='password_reset_done'),
    path('reset-password-confirm/<uidb64>/<token>/',
Example #47
0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import base64
import logging

from django.conf import settings
from django.contrib import auth
from django.contrib.auth.decorators import login_required
try:
    from django.contrib.auth.views import LogoutView
    django_logout = LogoutView.as_view()
except ImportError:
    from django.contrib.auth.views import logout as django_logout
from django.core.exceptions import PermissionDenied, SuspiciousOperation
from django.http import Http404, HttpResponse
from django.http import HttpResponseRedirect  # 30x
from django.http import HttpResponseBadRequest  # 40x
from django.http import HttpResponseServerError  # 50x
from django.views.decorators.http import require_POST
from django.shortcuts import render
from django.template import TemplateDoesNotExist
from django.utils.six import text_type, binary_type, PY3
from django.views.decorators.csrf import csrf_exempt

from saml2 import BINDING_HTTP_REDIRECT, BINDING_HTTP_POST
from saml2.metadata import entity_descriptor
Example #48
0
from django.urls import include, path

from agentex.admin import calibrator_check, allcalibrators_check
from agentex.views import index, AddValuesView, \
    read_manual_check, updatedataset, graphview_simple, \
    classifyupdate, graphview_ave, FinalLightCurve, \
    EventView, EventList, DataEntry, next_datasource
from agentex.users import register, editaccount, profile, briefing, feedback

admin.autodiscover()

urlpatterns = [
    path('',index, name='index'),
    path('admin/', admin.site.urls),
    path('account/login/', LoginView.as_view(template_name= 'agentex/login.html'), name='login'),
    path('account/logout/', LogoutView.as_view(template_name='agentex/logout.html'), name='logout'),

    path('admin/calibrators/<int:planetid>/id/<int:calid>/',calibrator_check, name='agentex_admin_calib'),
    path('admin/calibrators/<int:planetid>/',allcalibrators_check, name='agentex_all_calib'),
    path('account/register/', register, name='register'),
    path('account/', editaccount, name='editaccount'),
    path('profile/',profile, name='profile'),
    path('planets/',EventList.as_view(), name='target'),
    path('fitsanalyse/',AddValuesView.as_view(), name='fitsanalyse'),
    #path('test',tester, name='tester'),
    path('briefing/read/',read_manual_check, name='read_manual_check'),
    path('briefing/',briefing, name='briefing'),
    path('comment/',feedback, name='addcomment'),
    path('source/<int:pk>/view/',DataEntry.as_view(), name='addvalue'),
    path('target/<slug:slug>/next/', next_datasource, name='next_addvalue'),
    path('target/<slug:slug>/graph/update/',updatedataset, name='updatedataset'),
Example #49
0
from django.views.generic.base import TemplateView
from django.conf.urls import url, include
from django_registration.views import RegistrationView
from django.contrib.auth import views as auth_views
from django.contrib.auth.views import LoginView, LogoutView
from django.urls import reverse_lazy
from sweettooth.auth import views, forms

urlpatterns = [
    url(r'^login/', LoginView.as_view(form_class=forms.AuthenticationForm), name='auth-login'),

    url(r'^change_display_name/(?P<pk>\d+)', views.ajax_change_display_name),

    url(r'^logout/', LogoutView.as_view(next_page='/'), name='auth-logout'),

    url(r'^register/$', RegistrationView.as_view(form_class=forms.AutoFocusRegistrationForm),
        name='registration_register'),

    url(r'settings/(?P<user>.+)', TemplateView.as_view(template_name='profile/settings.html'),
        name='auth-settings'),

    url(r'', include('django_registration.backends.activation.urls')),
    url(r'^profile/(?P<user>.+)', views.profile, name='auth-profile'),
    url(r'^profile/', views.profile_redirect, name='auth-profile'),

    url(r'^login/$',
        auth_views.LoginView.as_view(),
        name='auth-login'),
    url(r'^logout/$',
        auth_views.LogoutView.as_view(),
Example #50
0
# -*- coding: utf-8 -*-
from django.conf.urls import url
from django.contrib.auth.views import LoginView, LogoutView, \
    PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView

urlpatterns = (
    # login and logout url
    url(r'^login/$', LoginView.as_view(template_name='login.html'), name='login'),
    # or use logout with template 'logout.html'
    url(r'^logout/$', LogoutView.as_view(), name='logout'),

    # password reset urls
    url(r'^password_reset/$',
        PasswordResetView.as_view(template_name='password_reset.html'),
        name='password_reset'),
    url(r'^password_reset_done/$',
        PasswordResetDoneView.as_view(template_name='password_reset_done.html'),
        name='password_reset_done'),
    url(r'^password_reset_confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
        PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'),
        name='password_reset_confirm'),
    url(r'^password_reset_complete/$',
        PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'),
        name='password_reset_complete'),
)
Example #51
0
from __future__ import unicode_literals, print_function, absolute_import
from django.conf import settings
from django.contrib.auth.views import LoginView, LogoutView
from django.urls import path, reverse
from django.views.generic import RedirectView
from .views import local_admin_login

app_name = "kirppuauth"

_urls = []


if not settings.KIRPPU_USE_SSO:
    _urls.append(path('login/', LoginView.as_view(
        template_name="kirppuauth/login.html",
        extra_context={
            "ask_pass": True,
            "submit": lambda: reverse('kirppuauth:local_login'),
        },
    ), name='local_login'))

_urls.append(path('profile/', RedirectView.as_view(pattern_name="home", permanent=False)))
_urls.append(path('logout/', LogoutView.as_view(next_page="home"), name='local_logout'))

if settings.KIRPPU_SU_AS_USER:
    _urls.append(path('set_user', local_admin_login, name='local_admin_login'))


urlpatterns = _urls
Example #52
0
from django.urls import path
from django.contrib.auth.views import logout_then_login
from django.contrib.auth.decorators import login_required
from django.contrib import admin
from django.conf.urls import url
from django.contrib.auth.views import LoginView, LogoutView
from . import views

urlpatterns = [
    path('login', views.login, name='login'),
    path('register', views.RegistroUsuario.as_view(), name='register'),
    path('profile',
         login_required(views.profile, 'modulo:index', '/users/login'),
         name='profile'),
    path('logout',
         LogoutView.as_view(template_name='modulo/index.html'),
         name='logout'),
    path('courses',
         login_required(views.courses, 'modulo:index', '/users/login'),
         name='courses'),
    path('create-course',
         login_required(views.CreateCourse.as_view(), 'modulo:index',
                        '/users/login'),
         name='create-course'),
    path('update-course/<int:pk>/',
         login_required(views.UpdateCourse.as_view(), 'modulo:index',
                        '/users/login'),
         name='update-course'),
    path('delete-course/<int:pk>/',
         login_required(views.DeleteCourse.as_view(), 'modulo:index',
                        '/users/login'),
Example #53
0
from django.views.static import serve


admin.autodiscover()

urlpatterns = [
    url(r'^', include('website.urls', namespace='website')),
    url(r'sso/', include('pyTUID.urls')),
    url(r'^mitmachen/', include('staff.urls', namespace='staff')),
    url(r'^teilnehmer/', include('students.urls', namespace='students')),
    url(r'^klausur/', include('exam.urls', namespace='exam')),
    url(r'^workshops/', include('workshops.urls', namespace='workshops')),
    url(r'^dashboard/', include('dashboard.urls', namespace='dashboard')),
    url(r'^clothing/', include('clothing.urls', namespace='clothing')),
    url(r'^admin/', admin.site.urls),
    url(r'^accounts/login/$', LoginView.as_view(template_name = 'admin/login.html'), name='login'),
    url(r'^accounts/logout/$', LogoutView.as_view(next_page=reverse_lazy('website:homepage')), name='logout'),
    url(r'^i18n/', include('django.conf.urls.i18n')),
]

if settings.DEBUG:
    urlpatterns += [
        url(r'^media/(?P<path>.*)$', serve, {
            'document_root': settings.MEDIA_ROOT,
        }),
    ]

    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]
Example #54
0
from django.urls import path, include, re_path
from docspace import views
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth.views import LogoutView

urlpatterns = [
    path(r'', views.IndexView.as_view(), name='index'),
    path('logout/',
         LogoutView.as_view(template_name='login.html'),
         name='logout'),
    re_path(r'^login/$', views.OAuthLoginView.as_view(), name='login'),
    re_path(r'^oauth/github/$',
            views.GitHubOAuthView.as_view(),
            name='github_oauth'),
    re_path(r'^(?:create/(?P<model>\w+))/$',
            views.NewModelView.as_view(),
            name='create'),
    re_path(r'^(?:update/(?:(?P<model>\w+)-(?P<pk>\d+)))/$',
            views.EditModelView.as_view(),
            name='update'),
    path(r'<int:pk>.html', views.OldBlog),
    path(r'author/<int:pk>/', views.author, name='author'),
    path(r'archives/', views.archives, name='archives'),
    path(r'archive/<int:pk>/', views.DetailModelView.as_view(), name='detail'),
    path(r'category/<int:pk>/', views.category, name='category'),
    path(r'tag/<int:pk>/', views.tag, name='tag'),
    path(r'feed/', views.LatestEntriesFeed(), name='feed'),
    path(r'simditor/', include('simditor.urls')),
]
Example #55
0
"""jssproject URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/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 register
from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    path('register/', register, name='register'),
    path('login/', LoginView.as_view(),
         name='login'),  #괄호가 빠져서 오류생겼었따, + 똑같은 문장 위에 하나 더 있어서,,,, 눈치좀 채지 그랬어 ㅠ
    path('logout/', LogoutView.as_view(), name='logout'),
]
Example #56
0
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.contrib import admin
from django.urls import path, include
from django.contrib.auth.views import LoginView, LogoutView
from blogging.views import PostViewSet, CategoryViewSet
from rest_framework import routers

router = routers.DefaultRouter()
router.register(r"post", PostViewSet)
router.register(r"category", CategoryViewSet)

urlpatterns = [
    path("", include("blogging.urls")),
    path("polling/", include("polling.urls")),
    path("admin/", admin.site.urls),
    path("login/", LoginView.as_view(template_name="login.html"), name="login"),
    path("logout/", LogoutView.as_view(next_page="/"), name="logout"),
    path("api/", include(router.urls)),
    path("api-auth/", include("rest_framework.urls", namespace="rest_framework")),
]
Example #57
0
from django.conf.urls import include, url
from django.contrib.auth.views import LogoutView

from two_factor.gateways.twilio.urls import urlpatterns as tf_twilio_urls
from two_factor.urls import urlpatterns as tf_urls
from two_factor.views import LoginView

from .views import SecureView

urlpatterns = [
    url(
        regex=r'^account/logout/$',
        view=LogoutView.as_view(),
        name='logout',
    ),
    url(
        regex=r'^account/custom-login/$',
        view=LoginView.as_view(redirect_field_name='next_page'),
        name='custom-login',
    ),

    url(
        regex=r'^secure/$',
        view=SecureView.as_view(),
    ),
    url(
        regex=r'^secure/raises/$',
        view=SecureView.as_view(raise_anonymous=True, raise_unverified=True),
    ),
    url(
        regex=r'^secure/redirect_unverified/$',
Example #58
0
from django.conf.urls import url
from . import views
from django.urls import reverse_lazy
from django.contrib.auth.views import LoginView,LogoutView

app_name = 'theapp'

urlpatterns = [
	# /theapp/
	url(r'^index/$', views.IndexView.as_view(), name='index'),

    url(r'^register/$',views.register,name='register'),


	url(r'^login/$', LoginView.as_view(template_name='theapp/login.html'), name='login'),

    url(r'^logout/$', LogoutView.as_view(next_page=reverse_lazy('theapp:login')), name='logout'),

	# /theapp/<sport_id>/
	url(r'^(?P<pk>[0-9]+)/$', views.EquipmentView.as_view(), name='equipment'),

	url(r'^(?P<pk>[0-9]+)/(?P<pk_alt>[0-9]+)/$', views.DetailView.as_view(), name='detail'),

	url(r'^sport/add/$', views.AddItem.as_view(), name='item-add'),

	url(r'^sport/(?P<pk>[0-9]+)/$', views.SportUpdate.as_view(), name='sport-update'),

	url(r'^sport/(?P<pk>[0-9]+)/delete/$', views.DeleteItem.as_view(), name='item-delete'),

]
Example #59
0
"""ghini URL Configuration

"""
from django.contrib import admin
from django.urls import path, include
from django.views.generic.base import RedirectView
from django.contrib.auth.views import LoginView, LogoutView

favicon_view = RedirectView.as_view(url='/static/favicon.ico', permanent=True)
root_view = RedirectView.as_view(url='/browse/', permanent=True)

urlpatterns = [
    # admin
    path('admin/', admin.site.urls),
    path('accounts/login/', LoginView.as_view(), name='login'),
    path('accounts/logout/', LogoutView.as_view(next_page='/'), name='logout'),
    # include
    path('taxonomy/', include('taxonomy.urls')),
    path('collection/', include('collection.urls')),
    path('garden/', include('garden.urls')),
    path('browse/', include('browse.urls')),
    path('select2/', include('django_select2.urls')),
    # root redirect views
    path("favicon.ico", favicon_view, name='favicon'),
    path('', root_view, name='home'),
]
Example #60
0
from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.contrib.auth.views import LoginView
from django.contrib.auth.views import LogoutView
from django.views.generic.base import TemplateView

urlpatterns = [
    url(r'^home/$',
        TemplateView.as_view(template_name='home.html'),
        name='home'),
    url(r'^$', LoginView.as_view(template_name='login.html'), name='login'),
    url(r'^logout/$',
        LogoutView.as_view(template_name='logged_out.html'),
        name='logout'),
]