Exemple #1
0
from django.contrib.auth.urls import path
from . import views
urlpatterns = [
    path("", views.comment, name="comment"),
    path("like", views.like, name="like")
]
Exemple #2
0
from django.contrib.auth.urls import path
from . import views
urlpatterns = [
    path("send_blog/", views.send_blog, name="send_blog"),
    path("blog_main/", views.blog_main, name="blog_main"),
    path("type_class<id>/", views.classify_type, name="class_type"),
    path("date_class<year><month>/", views.classify_date, name="class_date"),
    path("blog<id>/", views.blog_detail, name="blog_detail"),
    path("search/", views.search, name="search")
]
Exemple #3
0
from __future__ import unicode_literals

import django.urls
from django.contrib.auth.urls import path
import django.contrib.auth.views

from accountsplus import views
from accountsplus import forms

urlpatterns = [
    path('logout/', views.logout_then_login, name='logout'),
    path('password_change/', views.password_change, name='password_change'),
    path('password_reset/', views.PasswordResetView.as_view(), name='password_reset'),
    django.urls.re_path('reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        django.contrib.auth.views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),

    # override the admin password reset flow to use the normal site password
    # reset flow
    path('password_reset/', views.PasswordResetView.as_view(), name='admin_password_reset'),

    path('login/',
        django.contrib.auth.views.LoginView.as_view(),
        kwargs={'authentication_form': forms.EmailBasedAuthenticationForm, 'redirect_authenticated_user': True},
        name='login'),
    path('', django.urls.include(django.contrib.auth.urls)),

    # masquerade views
    path('admin/masquerade/end/', views.end_masquerade, name='end_masquerade'),
    path('admin/masquerade/<int:user_id>/', views.masquerade, name='masquerade'),
]
Exemple #4
0
from django.contrib.auth.urls import path
from . import views

urlpatterns=[
    path("login/",views.log_in,name="login"),
    path("logout/",views.log_out,name="logout"),
    path("signup/",views.sign_up,name="signup"),
    path("send",views.send_email,name="send_email"),
    path("personal",views.personal,name="personal"),
    path("change_nickname",views.change_nickname,name="change_nickname"),
    path("change_email",views.change_email,name="change_email")
]
Exemple #5
0
"""mysite URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. 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 include, url
from django.contrib.auth.urls import path
from django.contrib import admin

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

#Add Django site authentication urls (for login, logout, password management)
urlpatterns += [
    path('accounts/', include('django.contrib.auth.urls')),
]