Exemple #1
0
urlpatterns = [
    # path("account/", login_required(
    #     TemplateView.as_view(template_name="user/account.html"),
    # ), name="account"),
    path("account/", AccountPage.as_view(), name="account"),
    path("login/", LoginView.as_view(
        template_name="user/login.html"
    ), name="login"),
    path("logout/", LogoutView.as_view(
        template_name="user/logout.html"
    ), name="logout"),
    path("password_change/", PasswordChangeView.as_view(), name="password_change"),
    path("password_reset/", PasswordResetView.as_view(), name="password_reset"),
    path("password_reset/<uidb64>/<token>/", PasswordResetConfirmView.as_view(), name="password_reset_confirm"),
    path("activate/complete/", TemplateView.as_view(
        template_name="django_registration/activation_complete.html"
    ), name="django_registration_activation_complete"),
    # re_path(r"activate/(?P<activation_key>[-:\w]+)/$", ActivationView.as_view(
    #     success_url="auth:django_registration_activation_complete"
    # ), name="django_registration_activate"),
    re_path(r"activate/(?P<activation_key>[-:\w]+)/$", ActivationView.as_view(),
            name="django_registration_activate"),
    path("register/", RegistrationView.as_view(
        form_class=RegistrationForm,
        success_url=reverse_lazy("auth:django_registration_complete")
    ), name="django_registration_register"),
    path("register/complete/", TemplateView.as_view(
        template_name="django_registration/registration_complete.html"
    ), name="django_registration_complete"),
    path("register/closed/", TemplateView.as_view(
        template_name="django_registration/registration_closed.html"
Exemple #2
0
from django.urls import path
from django.contrib.auth.views import TemplateView

from apps.function_user import views

urlpatterns = [
    path("login/", views.user_login, name="login"),
    path("logout/", views.user_logout, name="logout"),
    path("register/", views.user_register, name="register"),
    path("success/",
         TemplateView.as_view(template_name='function_user/success.html'),
         name="success"),
]
Exemple #3
0
from django.contrib.auth.views import LoginView, LogoutView, TemplateView
from django.urls import path

from custom_abstractuser_app import views

urlpatterns = [
    path('register/', views.CustomUserCreateView.as_view(), name='register'),
    path('success/',
         TemplateView.as_view(
             template_name='custom_abstractuser_app/success.html'),
         name='success'),
    path("login/",
         LoginView.as_view(template_name='custom_abstractuser_app/login.html'),
         name="login"),
    path("logout/",
         LogoutView.as_view(
             template_name='custom_abstractuser_app/logout.html'),
         name="logout"),
]
Exemple #4
0
import xadmin
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from django.contrib.auth.views import TemplateView

from rest_framework.routers import DefaultRouter
from finance.apis import FinanceViewSet
from rest_framework.documentation import include_docs_urls

# 创建router代理一整套的restful接口
router = DefaultRouter()
router.register(r'finance', FinanceViewSet, base_name='api-finance')

urlpatterns = [
    path('i18n/', include('django.conf.urls.i18n')),  # 语言切换的接口
    path('api/', include(router.urls)),
    path('api/docs/', include_docs_urls(title='finance_restful_doc')),
    path('admin/', admin.site.urls),
    path('', xadmin.site.urls,
         name='xadmin_site'),  # name:用于当前url方向解析,namespace则代表还有下级url
    path('user/', include('user.urls', namespace='user')),
    path('finance/', include('finance.urls', namespace='finance')),
    path('index',
         TemplateView.as_view(template_name='index.html'),
         name='index'),
    path('netdisk/', include('netdisk.urls', namespace='netdisk')),
    path('captcha/', include('captcha.urls')),  # 图形验证码的路由映射
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemple #5
0
from django.urls import path
# from django.contrib.auth.views import LoginView, PasswordResetView, PasswordResetDoneView,\
#     PasswordResetConfirmView, PasswordResetCompleteView,TemplateView
from django.contrib.auth.views import  PasswordResetView, PasswordResetDoneView,\
    PasswordResetConfirmView, PasswordResetCompleteView,TemplateView,LoginView
from .views import LogoutView, RegisterView, baseView
from django.conf.urls import url
from .views import student_show
urlpatterns = [
    # path('home', HomePageView.as_view(), name='home'),
    path('home/', TemplateView.as_view(template_name='home.html'),
         name='home'),
    path('', baseView.as_view(), name='base'),
    path('base/', LogoutView.as_view(), name='base'),
    path('login/', LoginView.as_view(), name='login'),
    # login throuh gmail reset password
    path('accounts/login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('register/', RegisterView.as_view(), name='register'),
    # path('password_reset/', PasswordResetView.as_view(), name='password_reset'),
    # #
    # # gmail password reset
    # path('password_reset/done/', PasswordResetDoneView.as_view(),
    #      name='password_reset_done'),
    # path('password_reset/confirm/<uidb64>/<token>/',
    #      PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    # path('password_reset/complete/', PasswordResetCompleteView.as_view(),
    #      name='password_reset_complete'),
    # path('profile/<int:pk>/', ProfileView.as_view(), name='profile'),
    # path('profile/picture/', ImageUpdateView.as_view(), name='update_image'),
    # logout_request
Exemple #6
0
from django.urls import path
from django.contrib.auth.views import TemplateView

from apps.classview_user import views

urlpatterns = [
    path('login/', views.CustomLoginView.as_view(template_name='classview_user/login.html'), name='classview_login'),
    path('logout/', views.CustomLogoutView.as_view(), name='classview_logout'),
    path('success/', TemplateView.as_view(template_name='classview_user/success.html'), name='classview_success'),
    path('register/', views.UserCreateView.as_view(), name='classview_register'),
]
Exemple #7
0
    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
from django.urls import path, include
from django.contrib.auth.views import TemplateView, PasswordResetView, LoginView, LogoutView
from certificate_app.views import signup, useractivation

urlpatterns = [
    path('admin/', admin.site.urls),
    # path('accounts/', include('registration.backends.default.urls')),
    path('',
         TemplateView.as_view(template_name='certificate_app/index.html'),
         name='home'),
    path('signup', signup, name='signup'),
    path('activate/<uibd64>/<token>', useractivation, name='activate'),
    path('login',
         LoginView.as_view(template_name='certificate_app/usercreation.html'),
         name='login'),
    path('logout', LogoutView.as_view(), name='logout')
]
Exemple #8
0
from django.urls import path
from django.contrib.auth.views import LoginView, LogoutView, TemplateView
from apps.partial_classview_user import views

urlpatterns = [
    path('login/',
         LoginView.as_view(template_name='partial_classview_user/login.html'),
         name='partial_login'),
    path(
        'logout/',
        LogoutView.as_view(template_name='partial_classview_user/logout.html'),
        name='partial_logout'),
    path("success/",
         TemplateView.as_view(
             template_name='partial_classview_user/success.html'),
         name="partial_success"),
    path("register/",
         views.UserRegisterView.as_view(),
         name="partial_register"),
]
Exemple #9
0
#     url(r'^login/$', LoginView.as_view(), name='login'),
#     url(r'^logout/$', LogoutView.as_view(), name='logout'),
#     url(r'^profile-follow/$', ProfileFollowToggle.as_view(), name='follow'),
#     url(r'^u/', include('profiles.urls', namespace='profiles')),
#     url(r'^items/', include('menus.urls', namespace='menus')),
#     url(r'^restaurants/', include('restaurants.urls', namespace='restaurants')),
#     url(r'^about/$', TemplateView.as_view(template_name='about.html'), name='about'),
#     url(r'^contact/$', TemplateView.as_view(template_name='contact.html'), name='contact'),
# ]

urlpatterns = [
        url(r'^admin/', admin.site.urls),
        url(r'^teammates/$', teammate_list_view),
        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'^teammateslist/(?P<slug>[\w-]+)/$', ProfessionListVIew.as_view()),
        url(r'^teammates/(?P<slug>[\w-]+)/$', ProfessionListVIew.as_view()),
        url(r'^teammates-detail/(?P<slug>[\w-]+)/$', ProfessionDetailView.as_view()),
    # url(r'^create/$', team_create_view),
        url(r'^create/$', ProfessionCreateView.as_view()),
    # url(r'^teammates/python$', PythonProfessionListVIew.as_view()),
        url(r'^about/$', TemplateView.as_view(template_name='about.html'), name='about'),
        url(r'^contact/$', TemplateView.as_view(template_name='contact.html'), name='contact'),
        url(r'^projects/', include('projects.urls' , namespace='projects')),
        url(r'^u/', include('profiles.urls', namespace='profiles')),
       url(r'^profile-follow/$', ProfileFollowToggle.as_view(), name='follow'),

             ]
    
Exemple #10
0
"""bookmarks URL Configuration"""

from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth.views import TemplateView

urlpatterns = [
    url(r'^$', TemplateView.as_view(template_name='account/dashboard.html'), name='index'),
    url(r'^admin/', admin.site.urls),
    url(r'^account/', include('account.urls')),
    url('social-auth/', include('social.apps.django_app.urls', namespace='social')),
    url(r'^images/', include('images.urls', namespace='images')),
]

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

from . import views

app_name = 'blog'
urlpatterns = [
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^post/(?P<pk>\d+)/$', views.post_detail, name='post_detail'),
    url(r'^post/new/$', views.post_new, name='post_new'),
    url(r'^post/(?P<pk>\d+)/edit/$', views.post_edit, name='post_edit'),
    url(r'^about/$',
        TemplateView.as_view(template_name='blog/about.html'),
        name='about'),
    url(r'^drafts/$', views.draft_list, name='draft_list'),
    url('^$', views.post_list, name='post_list'),
]
Exemple #12
0
from django.contrib.auth.views import (PasswordChangeView, PasswordResetView,
                                       TemplateView)
from django.views.generic import View
from django.urls import path, include
from django.urls import reverse_lazy
import accounts.views as views

app_name = 'accounts'
urlpatterns = [
    path('change_password/',
         PasswordChangeView.as_view(
             success_url=reverse_lazy('accounts:change_password_done'),
             template_name='registration/change_password.html'),
         name='change_password'),
    path('reset_password/',
         PasswordChangeView.as_view(
             success_url=reverse_lazy('accounts:change_password_done'),
             template_name='registration/change_password.html'),
         name='change_password'),
    path('change_password/done',
         TemplateView.as_view(
             template_name='registration/change_password_done.html'),
         name='change_password_done'),
    path('', include('django.contrib.auth.urls')),
    path('signup/', views.SignUpView.as_view(), name='signup'),
]
Exemple #13
0
urlpatterns = []
if settings.DEBUG or os.environ.get("STANDALONE", False):
    # For showing images and audios in the case of pip and Docker.
    urlpatterns.append(
        re_path(
            r"^%s(?P<path>.*)$" % re.escape(settings.MEDIA_URL.lstrip("/")),
            serve,
            {"document_root": settings.MEDIA_ROOT},
        ))

urlpatterns += [
    path("admin/", admin.site.urls),
    path("api-auth/", include("rest_framework.urls")),
    path("v1/health/", include("health_check.urls")),
    path("v1/", include("api.urls")),
    path("v1/", include("roles.urls")),
    path("v1/", include("users.urls")),
    path("v1/", include("data_import.urls")),
    path("v1/", include("data_export.urls")),
    path("v1/", include("projects.urls")),
    path("v1/projects/<int:project_id>/metrics/", include("metrics.urls")),
    path("v1/projects/<int:project_id>/", include("auto_labeling.urls")),
    path("v1/projects/<int:project_id>/", include("examples.urls")),
    path("v1/projects/<int:project_id>/", include("labels.urls")),
    path("v1/projects/<int:project_id>/", include("label_types.urls")),
    path("swagger/",
         schema_view.with_ui("swagger", cache_timeout=0),
         name="schema-swagger-ui"),
    re_path("", TemplateView.as_view(template_name="index.html")),
]
sitemaps = {
    'static': StaticViewSitemap,
}

app_name = "ask"
urlpatterns = [
    path('', views.index, name='index'),
    path('login',
         views.CustomLoginView.as_view(template_name='ask/login.html'),
         name='login'),
    path('logout',
         views.CustomLogoutView.as_view(template_name='ask/logout.html'),
         name='logout'),
    path('signup', views.SignUpView.as_view(), name='signup'),
    path('terms',
         TemplateView.as_view(template_name='ask/terms.html'),
         name='terms'),
    path('privacypolicy',
         TemplateView.as_view(template_name='ask/privacypolicy.html'),
         name='privacypolicy'),
    path('profile', views.ProfileView.as_view(), name='profile'),
    path('user/<str:username>', views.UserView.as_view(), name='user'),
    path('unanswered', views.UnansweredView.as_view(), name='unanswered'),
    path('settings', views.SettingsView.as_view(), name='settings'),
    path('friends/recent',
         friends.FriendsRecent.as_view(),
         name='friends.recent'),
    path('friends/alph',
         friends.FriendsAlphabetical.as_view(),
         name='friends.alph'),
    path('friends/inv',
Exemple #15
0
urlpatterns = [path('admin/', admin.site.urls, name="admin")]

if not settings.SHOW_MAINTENANCE:
    urlpatterns += [
        path('', include('website.urls')),
        path('blog/', include('blog.urls')),
        path('mgmt/', include('mgmt.urls')),
        path(settings.LOGIN_URL[1:],
             LoginView.as_view(template_name="login.html"),
             name="login"),
        path(settings.LOGOUT_URL[1:],
             LogoutView.as_view(next_page=settings.LOGOUT_REDIRECT_URL),
             name="logout")
    ]
else:
    urlpatterns += [
        path('', TemplateView.as_view(template_name="maintenance.html")),
        path('mgmt/', include('mgmt.urls')),
        path(settings.LOGIN_URL[1:],
             LoginView.as_view(template_name="login.html"),
             name="login"),
        path(settings.LOGOUT_URL[1:],
             LogoutView.as_view(next_page=settings.LOGOUT_REDIRECT_URL),
             name="logout"),
        path('', include('website.urls'))
    ]

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemple #16
0
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

# TODO: adds AnnotationList and AnnotationDetail endpoint.
schema_view = get_schema_view(
    openapi.Info(
        title="doccano API",
        default_version='v1',
        description="doccano API description",
        license=openapi.License(name="MIT License"),
    ),
    public=True,
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('social/', include('social_django.urls')),
    path('api-auth/', include('rest_framework.urls')),
    path('v1/', include('api.urls')),
    path('swagger/',
         schema_view.with_ui('swagger', cache_timeout=0),
         name='schema-swagger-ui'),
    re_path('', TemplateView.as_view(template_name='index.html')),
]

if 'cloud_browser' in settings.INSTALLED_APPS:
    urlpatterns.append(path('cloud-storage/', include('cloud_browser.urls')))
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemple #17
0
#
# HappySchool is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with HappySchool.  If not, see <http://www.gnu.org/licenses/>.

from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings
from django.views.generic import RedirectView

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


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^channels-api/', include('channels_api.urls')),
    url(r'^core/', include('core.urls')),
    url(r'^auth', LoginView.as_view(template_name='core/auth.html'), name='auth'),
    url(r'^logout', LogoutView.as_view(next_page='auth'), name='logout'),
    url(r'^annuaire/', include('annuaire.urls'), name='annuaire'),
    url(r'^no_access/', TemplateView.as_view(template_name='core/no_access.html'), name='no_access'),
    url(r'^$', RedirectView.as_view(url='annuaire/', permanent=False)),
]

for app in ['infirmerie', 'appels', 'dossier_eleve', 'absence_prof', 'mail_notification', 'slas', 'mobility_survey', 'mail_answer']:
    if app in settings.INSTALLED_APPS:
        urlpatterns.append(url(r'^%s/' % (app), include('%s.urls' % (app))))
Exemple #18
0
from django.shortcuts import redirect
from django.urls import path
from .views import (TheFoodListView, UserRegisterFormView, WalletDetailView,
                    FoodListRedirectView, WalletDepositView,
                    WalletWithdrawView, additemview, removeitemview,
                    countincview, countdecview)

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

urlpatterns = [
    path('',
         TemplateView.as_view(template_name="food/index.html"),
         name="index"),
    path('foods/',
         TheFoodListView.as_view(template_name="food/foods2.html"),
         name="food-list"),
    path('login/',
         LoginView.as_view(template_name="food/login.html",
                           redirect_authenticated_user=True),
         name='login'),
    path('logout/',
         LogoutView.as_view(template_name="food/logout.html"),
         name='logout'),
    path('register/',
         UserRegisterFormView.as_view(template_name="food/register.html"),
         name='register'),
    path('wallet/',
         WalletDetailView.as_view(template_name="food/wallet.html"),
         name="wallet"),
    path('wallet/deposit/',
         WalletDepositView.as_view(template_name="food/wallet_deposit.html"),
Exemple #19
0
app_name ='cognito_prj'


"""cognito_prj URL Configuration

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

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'^accounts/', include(('django_warrant.urls','dw'))),
    path(r'user_info/', TemplateView.as_view(template_name='warrant/user_info.html'), name='user_info'),
    url(r'', LoginView.as_view(), {'template_name': 'warrant/login.html'}, name='login'),
]
Exemple #20
0
    path("logout", views.LogoutView.as_view(), name="logout"),
    path("password-reset/",
         views.PasswordResetView.as_view(),
         name="password_reset"),
    path(
        "reset/<uidb64>/<token>/",
        views.PasswordResetConfirmView.as_view(),
        name="password_reset_confirm",
    ),
    path("password-change/",
         views.PasswordChangeView.as_view(),
         name="password_change"),
    path(
        "activate/<str:activation_key>/",
        views.ActivationView.as_view(),
        name="registration_activate",
    ),
    path(
        "register/",
        views.RegistrationView.as_view(),
        name="registration_register",
    ),
    path(
        "register/closed/",
        TemplateView.as_view(
            template_name="registration/registration_closed.html"),
        name="registration_disallowed",
    ),
    path("account/edit/", views.EditView.as_view(), name="edit"),
]
Exemple #21
0
from django.urls import path
from django.contrib.auth.views import LoginView, TemplateView, LogoutView, PasswordResetView, PasswordResetDoneView,\
    PasswordResetConfirmView, PasswordResetCompleteView, PasswordChangeDoneView, PasswordChangeView
from . import views
from django.urls import reverse_lazy
app_name = 'accounts'

urlpatterns = [
    path('users/', views.UserList.as_view(), name='user_list'),
    path('users/<int:pk>/', views.UserDetail.as_view(), name='user_detail'),
    path('login/',
         LoginView.as_view(template_name='accounts/user-login.html'),
         name='login'),
    path('profile/',
         TemplateView.as_view(template_name='accounts/user-profile.html'),
         name='profile'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('AddUser/', views.CreateUserView.as_view(), name='user_signup'),
    path('UpdateUser/<int:pk>/',
         views.UpdateUserView.as_view(),
         name='user_update'),
    path(
        'password-reset/',
        PasswordResetView.as_view(
            template_name='accounts/password_reset_form.html',
            subject_template_name='accounts/password_reset_subject.txt',
            email_template_name='accounts/password_reset_email.html',
            success_url=reverse_lazy('accounts:password_reset_done')),
        name='password_reset',
    ),
    path('password_reset/done/',