Exemple #1
0
from django.urls import path, re_path
from user.views import RegisterView, ActiveView, LoginView, \
    UserInfoView, UserOrderView, AddressView, LogoutView

urlpatterns = [
    path('register', RegisterView.as_view(), name='register'),
    re_path('active/(?P<token>.*)$', ActiveView.as_view(), name='active'),
    path('login', LoginView.as_view(), name='login'),
    path('logout', LogoutView.as_view(), name='logout'),
    path('', UserInfoView.as_view(), name='user'),
    path('order/<int:page>', UserOrderView.as_view(), name='order'),
    path('address', AddressView.as_view(), name='address'),
]
Exemple #2
0
from django.conf.urls import url, include
from django.contrib.auth.decorators import login_required

from user import views
from user.views import registerView, ActiveView, LoginView, UserInfoView, UserOrderView, UserSiteView, Logout

urlpatterns = [
    # url(r"^register$", views.register, name="register"),
    # url(r"^register_handle$", views.register_handle, name="register_handle"),
    url(r"^register$", registerView.as_view(), name="register"),  # 注册
    url(r"^active/(?P<token>.*?)$", ActiveView.as_view(), name="active"),  # 激活
    url(r"^login$", LoginView.as_view(), name="login"),  # 登录
    url(r"^logout$", Logout.as_view(), name="logout"),  # 退出
    url(r"^$", login_required(UserInfoView.as_view()), name="user"),  # 用户中心信息页
    url(r"^order/(?P<page>\d+)$", login_required(UserOrderView.as_view()), name="order"),  # 用户中心订单页
    url(r"^address$", login_required(UserSiteView.as_view()), name="address"),  # 用户中心地址页
]
Exemple #3
0
    https://docs.djangoproject.com/en/2.1/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 import settings
from django.urls import path, re_path
from django.views.static import serve

from search.views import IndexView, SearchSuggest, SearchView, favicon_view
from user.views import LoginView, LogoutView, RegisterView

urlpatterns = [
    path('favicon.ico', favicon_view),
    re_path('media/(?P<path>.*)', serve,
            {"document_root": settings.MEDIA_ROOT}),
    path('', IndexView.as_view(), name="index"),
    path('suggest/', SearchSuggest.as_view(), name="suggest"),
    path('search/', SearchView.as_view(), name="search"),
    path('login/', LoginView.as_view(), name="login"),
    path('logout/', LogoutView.as_view(), name="logout"),
    path("register/", RegisterView.as_view(), name="register"),
]
Exemple #4
0
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from user.views import RegisterView, ActiveView, LoginView, LogoutView, UserInfoView, UserOrderView, AddressView
app_name = 'user'
urlpatterns = [
    url(r'^register$', RegisterView.as_view(), name='register'),  # 注册
    url(r'^active/(?P<token>.*)$', ActiveView.as_view(),
        name='active'),  # 用户激活
    url(r'^login', LoginView.as_view(), name='login'),  # 登录
    url(r'^logout', LogoutView.as_view(), name='logout'),
    url(r'^$', UserInfoView.as_view(), name='user'),  # 用户中心-信息页
    url(r'^order$', UserOrderView.as_view(), name='order'),  # 用户中心-订单页
    url(r'^address$', AddressView.as_view(), name='address'),  # 用户中心-地址页
]

Exemple #5
0
from django.conf.urls import url

from user.views import LoginView, RegisterView, SendMsg

urlpatterns = [
    url(r'^login/$', LoginView.as_view(), name="login"),  # 用户登录
    url(r'^reg/$', RegisterView.as_view(), name="register"),  # 用户注册
    url(r"^send_msg/$", SendMsg.as_view(), name='send_msg'),  #发送信息
    #url(r'^member/$', member, name="member"),  # 用户中心
    # url(r'^detail/(?P<id>\d+)/$',detail,name="详情"),
    # url(r'^add/$',add,name="添加"),
    # url(r'^delete/(?P<id>\d+)/$',delete,name="删除"),
    # url(r'^edit/(?P<id>\d+)/$',edit,name="修改"),
    # url(r'^add_form/$',add_form,name="渲染form"),
]
Exemple #6
0
from django.urls import path

from user.views import LoginView

urlpatterns = [path('login/', LoginView.as_view())]
Exemple #7
0
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from user.views import RegisterView,ActiveView,LoginView,UserInfoView,UserOrderView,AddressView

app_name='user'
urlpatterns = [
    # url(r'^register$',views.register,name='register'), # 注册
    # url(r'^register_handle$',views.register_handle,name='register_handle') # 注册处理

    url(r'^register$', RegisterView.as_view(),name='register'), # 注册
    url(r'^active/(?P<token>.*)$',ActiveView.as_view(),name='active'), # 用户激活
    url(r'^login$',LoginView.as_view(),name='login'), # 登陆
    url(r'logout',LoginView.as_view(),name='logout'), # 退出
    # url(r'^$',login_required(UserInfoView.as_view()),name='user'), # 用户中心-信息页
    # url(r'order$',login_required(UserOrderView.as_view()),name='order'), # 用户中心-订单页
    # url(r'^address',login_required(AddressView.as_view()),name='address'), # 用户中心地址页面

    url(r'^$', UserInfoView.as_view(), name='user'),  # 用户中心-信息页
    url(r'order$', UserOrderView.as_view(), name='order'),  # 用户中心-订单页
    url(r'^address', AddressView.as_view(), name='address'),  # 用户中心地址页面

]
Exemple #8
0
from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic import TemplateView
import xadmin
from django.views.static import serve  #处理media文件
from MxOnline.settings import MEDIA_ROOT, STATIC_ROOT  #media路径

from user.views import LoginView, LogoutView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView, IndexView
from organization.views import OrgView

urlpatterns = [
    url(r'^xadmin/', xadmin.site.urls),
    #首页
    url('^$', IndexView.as_view(), name="index"),
    #用户登陆
    url('^login/$', LoginView.as_view(), name="login"),

    #退出
    url('^logout/$', LogoutView.as_view(), name="logout"),
    #注册页面
    url('^register/$', RegisterView.as_view(), name="register"),
    #图片验证码的配置
    url(r'^captcha/', include('captcha.urls')),
    #用户激活
    url(r'^active/(?P<active_code>.*)/$',
        ActiveUserView.as_view(),
        name="user_active"),
    #密码找回
    url(r'^forget/$', ForgetPwdView.as_view(), name="forget_pwd"),
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(),
        name="reset_pwd"),
Exemple #9
0
from timeslot.views import TimeSlotViewSet
from service.views import ServiceViewSet
from organisation.views import OrganisationViewSet
from organisation.views import OrganisationLocationViewSet
from organisation.views import LocationContactViewSet
from appointment.views import UserAppointmentViewSet
from user import views

print("inside urls")
router = routers.DefaultRouter()
router.register(r'user', UserDetailViewSet)
router.register(r'organisation', OrganisationViewSet)
router.register(r'organisationlocation', OrganisationLocationViewSet)
router.register(r'organisationcontact', LocationContactViewSet)
router.register(r'service', ServiceViewSet)
router.register(r'timeslot', TimeSlotViewSet)
router.register(r'appointment', UserAppointmentViewSet)
urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^user/auth$', AuthUserViewSet.as_view()),
    url(r'^user/me$', MeViewSet.as_view()),
    # url(r'^', include('user.urls')),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
    url(r'^$', include(router.urls)),
    url(r'^user/appointment/$', UserAppointmentViewSet.as_view()),
    url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
]
Exemple #10
0
    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.views.static import serve
from rest_framework.routers import DefaultRouter

import xadmin
from edp.settings import MEDIA_ROOT
from product.views import CategoryViewSet, ProductListViewSet, BannerViewSet
from trade.views import ShopingCartViewSet
from user.views import LoginView, CheckView

route = DefaultRouter()
# route = SimpleRouter()
route.register(r'categorys', CategoryViewSet)
route.register(r'product', ProductListViewSet)
route.register(r'banners', BannerViewSet)
route.register(r'shopcarts', ShopingCartViewSet)
urlpatterns = [
    url(r'^', include(route.urls)),
    url(r'^ueditor/', include('DjangoUeditor.urls')),
    url('admin/', xadmin.site.urls),
    url(r'^api-auth/', include('rest_framework.urls')),
    url(r'^media/(?P<path>.*)$', serve, {"document_root": MEDIA_ROOT}),
    url(r'^member/check', CheckView.as_view()),
    url(r'^member/login', LoginView.as_view()),
]
Exemple #11
0
from django.conf.urls import url

from user.views import LoginView, GetView, RegisterView, LogoutView, VKView, VKAuthView, FBView, FBAuthView

urlpatterns = [
    url(r'^login', LoginView.as_view()),
    url(r'^get', GetView.as_view()),
    url(r'^register', RegisterView.as_view()),
    url(r'^logout', LogoutView.as_view()),
    url(r'^vk-auth', VKAuthView.as_view()),
    url(r'^fb-auth', FBAuthView.as_view()),
    url(r'^vk', VKView.as_view()),
    url(r'^fb', FBView.as_view()),
]
Exemple #12
0
    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 rest_framework import routers
from rest_framework_jwt.views import obtain_jwt_token, verify_jwt_token

from task.views import TaskViewSet
from user.views import UserViewSet, LoginView, LogoutView
from .views import IndexView

router = routers.DefaultRouter()
router.register(r'tasks', TaskViewSet)
router.register(r'users', UserViewSet)
# router.register(r'task', TaskView)

urlpatterns = (
    url(r'^api/users/login/$', LoginView.as_view(), name='login'),
    url(r'^api/users/logout/$', LogoutView.as_view(), name='logout'),
    url(r'^api/', include(router.urls)),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
    url(r'^api-token-auth/', obtain_jwt_token),
    url(r'^api-token-verify/', verify_jwt_token),
    url(r'^admin/', admin.site.urls),
    url(r'^.*$', IndexView.as_view(), name='index'),
)
Exemple #13
0
from django.conf.urls import url
# from django.contrib.auth.decorators import login_required
from user.views import RegisterView, ActiveView, LoginView, LogoutView, UserInfoView, UserOrderView, AddressView

urlpatterns = [
    url(r'^register$', RegisterView.as_view(), name='register'),  # /user/register 用户注册
    url(r'^active/(?P<token>.*)$', ActiveView.as_view(), name='active'),  # /user/active 用户激活
    url(r'^login$', LoginView.as_view(), name='login'),  # /user/login 用户登录
    url(r'^logout$', LogoutView.as_view(), name='logout'),  # /user/logout 用户退出
    url(r'^$', UserInfoView.as_view(), name='user'),  # /user 用户中心-首页
    url(r'^order/(?P<page>\d+)$', UserOrderView.as_view(), name='order'),  # /user/order 用户中心-首页
    url(r'^address$', AddressView.as_view(), name='address'),  # /user/address 用户中心-首页
]
Exemple #14
0
from django.urls import re_path, include

from user.views import RegisterView, ActiveView, LogoutView, HomeView, LoginView, UserListView, RoleListView

app_name = "[user.urls,]"

urlpatterns = [
    re_path(r"^register/$", RegisterView.as_view(), name="register"),
    re_path(r"^active/(?P<token>.+)/$", ActiveView.as_view(), name="active"),
    re_path(r"^logout/$", LogoutView.as_view(), name="logout"),
    re_path(r"^home/$", HomeView.as_view(), name="home"),
    re_path(r"^login/$", LoginView.as_view(), name="login"),
    re_path(r"^user_list/$", UserListView.as_view(), name="user_list"),
    re_path(r"^role_list/$", RoleListView.as_view(), name="role_list"),
]
Exemple #15
0
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from user.views import RegisterView,ActiveView,LoginView,UserInfoView,UserOrderView,UserAddressView,LogoutView

urlpatterns = [
    #url(r'^register$',views.register,name='register'), #注册
    #url(r'^register_handle$',views.register_handle,name='register_handle'), #注册处理
    url(r'^register$', RegisterView.as_view(), name='register'), #注册
    # .as_view()会返回一个view对象
    url(r'^active/(?P<token>.*)$',ActiveView.as_view(), name='active'),#激活用户
    url(r'^login$',LoginView.as_view(),name='login'),#登录
    url(r'^logout$',LogoutView.as_view(),name='logout'),#注销登录

    # url(r'^$',login_required(UserInfoView.as_view()),name='user'),#用户中心-信息页
    # url(r'^order$',login_required(UserOrderView.as_view()),name='order'),#用户中心-订单页
    # url(r'^address$',login_required(UserAddressView.as_view()),name='address'),#用户中心-地址页

    url(r'^$',UserInfoView.as_view(),name='user'),#用户中心-信息页
    url(r'^order/(?P<page>\d+)$',UserOrderView.as_view(),name='order'),#用户中心-订单页
    url(r'^address$',UserAddressView.as_view(),name='address'),#用户中心-地址页
]

Exemple #16
0
from django.conf.urls import url

from user.views import (LoginView,
                        RegView,
                        ForgetpasswordView,
                        MemberView,
                        quit,
                        InfoView,
                        Gladdress,
                        Saftystep,
                        Money,
                        authCodeView,
                        head_photo)

urlpatterns = [
    url(r'^login/', LoginView.as_view(), name="登陆页面"),
    url(r'^reg/', RegView.as_view(), name="注册页面"),
    url(r'^forgetpassword/', ForgetpasswordView.as_view(), name="忘记密码页面"),
    url(r'^member/', MemberView.as_view(), name="个人中心"),
    url(r'^quit/', quit, name="安全退出"),
    url(r'^info/', InfoView.as_view(), name="个人资料"),
    url(r'^gladdress/', Gladdress.as_view(), name="收货地址"),
    url(r'^saftystep/', Saftystep.as_view(), name="安全设置"),
    url(r'^money/', Money.as_view(), name="我的钱包"),
    url(r'^authCodeView/', authCodeView.as_view(), name="登陆验证"),
    url(r'^head_photo/', head_photo, name="图片上传"),

]
Exemple #17
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from main.views import HomeView
from user.views import LoginView, RegisterView, logout_view

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^login/?$', LoginView.as_view(), name='login'),
    url(r'^register/?$', RegisterView.as_view(), name='register'),
    url(r'^logout/?$', logout_view),
    url(r'^admin/', include(admin.site.urls)),
)
Exemple #18
0
from bloginfo.views import AddView, DeleteView, EditView, EditAddView, get_blogs, get_details, search, EditInfo, getPerson

urlpatterns = [
    path('admin/', admin.site.urls),
    # path('', TemplateView.as_view(template_name="home.html"), name='login'),
    path('', Login.as_view(), name='home'),
    url('captcha/', include("captcha.urls")),
    url(r'^tinymce/', include('tinymce.urls')),
    path('register', RegisterView.as_view(), name="register"),
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(),
        name='reset_wpd'),
    url(r'^modify_pwd/$', ModifyView.as_view(), name='modify_pwd'),
    url(r'^active/(?P<active_code>.*)/$',
        ActiveView.as_view(),
        name='user_active'),
    url('login', LoginView.as_view(), name='user_login'),
    path('logout', views.logoutView, name='logout'),
    path('forgetpwd', ForgetPwdView.as_view(), name='forgetpwd'),
    path('addBlog', AddView.as_view(), name='addblog'),
    path('blogList', get_blogs, name='index'),
    path('modify', Modify.as_view(), name='modify'),
    path('contact', contact, name='contact'),
    path('deleteBlog', DeleteView.as_view(), name='delete'),
    path('editBlog', EditView.as_view(), name='edit'),
    path('editAdd', EditAddView.as_view(), name='editadd'),
    path('personal', EditInfo.as_view(), name='editinfo'),
    path('changeinfo', ChangeInfo.as_view(), name='changeinfo'),
    path('visit', getPerson.as_view(), name='getperson'),
    path('message', Message.as_view(), name='getmessage'),
    path('changeimage', changeimage, name='changeimage'),
    path('visitmessage', Message.as_view(), name='visitmessage'),
from timeslot.views import TimeSlotViewSet
from service.views import ServiceViewSet
from organisation.views import OrganisationViewSet
from organisation.views import OrganisationLocationViewSet
from organisation.views import LocationContactViewSet
from appointment.views import UserAppointmentViewSet
from user import views

print("inside urls")
router = routers.DefaultRouter()
router.register(r'user', UserDetailViewSet)
router.register(r'organisation', OrganisationViewSet)
router.register(r'organisationlocation', OrganisationLocationViewSet)
router.register(r'organisationcontact', LocationContactViewSet)
router.register(r'service', ServiceViewSet)
router.register(r'timeslot', TimeSlotViewSet)
router.register(r'appointment', UserAppointmentViewSet)
urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^user/auth$', AuthUserViewSet.as_view()),
    url(r'^user/me$', MeViewSet.as_view()),
    # url(r'^', include('user.urls')),
    url(r'^api-auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
    url(r'^$', include(router.urls)),
    url(r'^user/appointment/$', UserAppointmentViewSet.as_view()),
    url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'),
    url(r'^api-auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
]
Exemple #20
0
from django.urls import path

from user.views import LoginView

urlpatterns = [
    path('login', LoginView.as_view(), name='user-login-view'),
]
Exemple #21
0
"""library 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
from django.urls import path

from user.views import RegisterUserView, LoginView

urlpatterns = [
    path('admin/', admin.site.urls),
    path("", RegisterUserView.as_view(), name="index"),
    path("login", LoginView.as_view(), name="user_login"),
]
Exemple #22
0
from django.urls import path, include
from . import views
from user.views import LoginView

urlpatterns = [
    path('registration/', views.UserRegisterView.as_view()),
    path('login/', views.UserLoginView.as_view()),
    path('normal-login/', LoginView.as_view()),
    path('accounts/', include('allauth.urls')),
    path('rest-auth/', include('rest_auth.urls')),
    path('rest-auth/registration/', include('rest_auth.registration.urls')),
]
Exemple #23
0
from django.conf.urls import url
from django.urls import include, path, re_path
from django.contrib.auth.decorators import login_required
# from . import views
from user.views import RegisterView, ActiveView, LoginView, UserInfoView, UserOrderView, UserSiteView, LogoutView

app_name = 'user'
urlpatterns = [
    path('register/', RegisterView.as_view(), name='register'),
    path('', UserInfoView.as_view(), name='user'),
    re_path(r'^active/(?P<token>.*)$', ActiveView.as_view(),
            name='active'),  #使用正则匹配url
    re_path(r'^login', LoginView.as_view(), name='login'),  #使用正则匹配url
    # re_path(r'^$', UserInfoView.as_view(), name='user'),#使用正则匹配url
    # re_path(r'^order/(?P<page>d+)/$', UserOrderView.as_view(), name='order'),#使用正则匹配url
    # re_path(r'^order/(\d+)$', UserOrderView.as_view(), name='order'),#使用正则匹配url
    re_path(r'^order/(?P<page>\d+)$', UserOrderView.as_view(),
            name='order'),  #使用正则匹配url
    # re_path(r'^order/$', UserOrderView.as_view(), name='order'),#使用正则匹配url
    # re_path(r'^order/page<int:page>/', UserOrderView.as_view(), name='order'),#使用正则匹配url
    re_path(r'^address', UserSiteView.as_view(), name='address'),  #使用正则匹配url
    re_path(r'^logout', LogoutView.as_view(), name='logout'),  #使用正则匹配url
    # path('login/', LoginView.as_view(), name='login'),
    # path('register/', views.register, name='register'),
    # path('register_submit', views.register_submit, name='register_submit'),
]
Exemple #24
0
    RGDCreate,
    load_rguuid,
    load_destinationnumber,
)
urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'expex.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    #url(r'^$', TemplateView.as_view(template_name="homepage.html")),
    url(r'^$', HomePageView.as_view(), name='home'),
    (r'^api/', include(v1_api.urls)),
    url(r'^accounts/logout/$',
        logout, {'next_page': '/accounts/login'},
        name='acct_logout'),
    url(r'^accounts/login/$', LoginView.as_view(), name='acct_login'),
    url(r'^user/accounts/$', AccountList.as_view(), name='account_list'),
    url(r'^user/accounts/add/$', AccountAdd.as_view(), name='account_add'),
    url(r'^user/accounts/(?P<pk>\d+)/edit$',
        AccountUpdate.as_view(),
        name='account_edit'),
    url(r'^user/accounts/(?P<pk>\d+)/delete$',
        AccountDelete.as_view(),
        name='account_delete'),
    url(r'^user/devices/$', DeviceList.as_view(), name='device_list'),
    url(r'^user/devices/add/$', DeviceAdd.as_view(), name='device_add'),
    url(r'^user/devices/(?P<uuid>[0-9a-f-]+)/edit$',
        DeviceUpdate.as_view(),
        name='device_edit'),
    url(r'^user/devices/(?P<uuid>[0-9a-f-]+)/delete$',
        DeviceDelete.as_view(),
Exemple #25
0
from django.urls import re_path
from user.views import RegisterView, ActiveView, LoginView, LogoutView, UserInfoView, UserOrderView, AddressView
from django.contrib.auth.decorators import login_required

urlpatterns = [
    # path('register', views.register, name='register'),  # 注册
    re_path('^register$', RegisterView.as_view(), name='register'),  # 注册
    re_path('^active/(?P<token>.*)$', ActiveView.as_view(),
            name='active'),  # 激活
    re_path('^login$', LoginView.as_view(), name='login'),  # 登录
    re_path('^logout$', LogoutView.as_view(), name='logout'),  # 退出
    # re_path('^$', login_required(UserInfoView.as_view()), name='user'),  # 用户中心-信息页
    # re_path('^order$', login_required(UserOrderView.as_view()), name='order'),  # 用户中心-订单页
    # re_path('^address$', login_required(AddressView.as_view()), name='address'),  # 用户中心-地址页
    re_path('^$', UserInfoView.as_view(), name='user'),  # 用户中心-信息页
    re_path('^order$', UserOrderView.as_view(), name='order'),  # 用户中心-订单页
    re_path('^address$', AddressView.as_view(), name='address'),  # 用户中心-地址页
]
Exemple #26
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.contrib import admin
from django.urls import path, include
# from django.views.static import serve
# from django.conf import settings
# from django.conf.urls.static import static
import xadmin
from product.views import IndexView
from user.views import LoginView, RegisterView

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('xadmin/', xadmin.site.urls),
    path('', IndexView.as_view(), name="index_1"),  # 首页
    path('login/', LoginView.as_view(), name="login_1"),  # 登录页面
    path('register/', RegisterView.as_view(), name="register_1"),  # 注册页面
    path("user/", include("user.urls")),  # 用户相关视图板块
    path("product/", include("product.urls")),  # 产品/商品相关视图板块
    path("cart/", include("cart.urls")),  # 购物车操作相关视图
    path("order/", include("order.urls")),  # 订单相关处理视图 
    path("pay/", include("pay.urls")),  # 支付相关处理
    # 静态文件处理(主要是之前上传的文件等静态资源)========这个bug 应该说这个静态地址 研究了半天
    # path('media/<path:path>/', serve, {"document_root": settings.MEDIA_ROOT}),
    # path('static/<path:path>/', serve, {"document_root": settings.STATIC_ROOT}),
]  # + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Exemple #27
0
urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'pinpict.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

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

    ## site map
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': sitemaps}),

    ## user management
    ## login
    url(r'^login/$', LoginView.as_view(), name='user_login'),

    ## logout
    url(r'^logout/$', 'user.views.logout_view', name='user_logout'),

    ## registration
    url(r'^register/$', RegistrationView.as_view(), name='user_registration'),

    ## password recovery
    url(r'^recovery/$', RecoveryView.as_view(), name='user_recovery'),
    url(r'^recovery/(?P<uuid>[-\w]+)/$', 'user.views.confirm_recovery_view', name='user_confirm_recovery'),

    ## profil
    url(r'^profil/$', login_required(ProfilView.as_view()), name='user_profil'),

    ## password changement
from django.urls import path

from user.views  import SignupView, LoginView

urlpatterns = [
    path('/signup', SignupView.as_view()),
    path('/login', LoginView.as_view())
]
Exemple #29
0
from django.conf.urls import url

from user.views import register, MemberView, LoginView, forget_password, InforView, revise, SendMsm, AddressView, \
    Addresslist, AddressAddView, AddressEditView, delAddress

urlpatterns = [
    url('^register/$', register, name='注册'),
    url('^forget_password/$', forget_password, name='忘记密码'),
    url('^revise/$', revise, name='修改密码'),
    url('^login/$', LoginView.as_view(), name='登录'),
    url(r'^member/$', MemberView.as_view(), name='个人中心'),
    url(r'^infor/$', InforView.as_view(), name='个人资料'),
    url(r'^sendMsm/$', SendMsm.as_view(), name='验证码'),
    url(r'^add/$', AddressView.as_view(), name='添加地址'),
    url(r'^addresslist/$', Addresslist.as_view(), name='地址列表'),
    url(r'^addressadd/$', AddressAddView.as_view(),
        name="address_add"),  # 收货地址添加
    url(r'^addressedit/(?P<id>\d+)/$',
        AddressEditView.as_view(),
        name="address_edit"),  # 收货地址编辑
    url(r'^addressdel/$', delAddress, name="address_del"),  # 收货地址删除
]
Exemple #30
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 package.views import get_package_test, upload_pack, upload_pack_test
from general_user.views import get_package
from user.views import LoginView

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('user/', include('user.urls', namespace='userview')),
    path('pack/', include('package.urls', namespace='pack')),
    path('faq/', include('faq.urls', namespace='faq')),
    path('tinymce/', include('tinymce.urls')),
    path('pack_test', get_package_test),
    path('pack', get_package),
    # 将原有的包文件同步到oss中
    path('upload_pack', upload_pack),
    path('upload_pack_test', upload_pack_test),
    path('android/', include('apps.update.urls')),
    path('', LoginView.as_view()),
]
Exemple #31
0
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 user.views import index, RegisterView, LoginView, logout
from board import views
urlpatterns = [
    path('admin/', admin.site.urls),
    path('', index),
    path('register/', RegisterView.as_view()),
    path('login/', LoginView.as_view()),
    path('logout/', logout),
    path('board/detail/<int:pk>/', views.board_detail),
    path('board/list/', views.board_list),
    path('board/write/', views.board_write),
    path('board/update/<int:pk>/', views.board_update),
    path('board/delete/<int:pk>/', views.board_delete),
]
Exemple #32
0
router.register(r'getOrderByTBOrderNumberList',
                user_views.GetOrderByTBOrderNumberListViewSet,
                base_name='getOrderByTBOrderNumberList')  # new
# 通过淘宝订单号获取空包订单
router.register(r'getNullOrderByTBOrderNumberList',
                user_views.GetNullOrderByTBOrderNumberListViewSet,
                base_name='getNullOrderByTBOrderNumberList')  # new

#  获取用户被邀请用户信息

router.register(r'inviteInfo',
                user_views.InviteInfoViewSet,
                base_name='inviteInfo')

urlpatterns = [
    url('login/', LoginView.as_view()),  # new
    # 修改支付密码
    url('alterPayPwd/', AlterPayPasswordView.as_view()),  # new
    # 修改登录密码
    url('alterPwd/', AlterPasswordView.as_view()),  # new
    url('ordersPay/', user_trade_views.OrderPayView.as_view()),  # new
    url('nullOrdersPay/', user_trade_views.NullOrdersPayView.as_view()),  # new
    # 充值
    url('recharge/', user_trade_views.BalanceRecharge.as_view()),  # new
    # 根据穿过来的字段检查用户是否存在
    url('checkUser/', user_views.UserCheckView.as_view()),  # new
    # 找回密码
    url('forget_password/', user_views.ForgetPasswordView.as_view()),  # new
    # 重置密码
    url('reset_password/', user_views.ResetPasswordView.as_view()),  # new
    # 修改商品信息
Exemple #33
0
# 权限管理
router.register(r'auth', AuthViewset, basename='权限管理')
# 系统字典管理
router.register(r'confdict', ConfDictViewset, basename='系统字典管理')
# 全文检索路由 检索系统字典
# router.register(r'searchdict', ConfDictSearchView, basename='全文检索系统字典')
# 修改用户个人信息
router.register(r'updateuser', WeChatUpdateUserViewset, basename='修改个人信息')


urlpatterns = [
    url(r'^swagger(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'),
    url(r'^swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
    url(r'^redoc/$', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
    path('', include(router.urls)),
    path('adminlogin/', LoginView.as_view(), name='后台登录'),
    path('wxminilogin/', WeChatMiniLoginView.as_view(), name='微信小程序登录'),
    path('wxapplogin/', WeChatAppLoginView.as_view(), name='微信APP三方登录'),
    path('mobilelogin/', MobileLoginView.as_view(), name='手机快速登录登录'),
    path('getcode/', MobileCodeView.as_view(), name='获取手机验证码'),
    path('uploadfile/', UploadLocalFile.as_view(), name='文件上传'), # UploadFile UploadLocalFile 
    path('test/', TestView.as_view(), name='测试接口'),
    path('userinfo/', UserInfo.as_view(), name='个人信息'),
    path('celery/', BeginCelery.as_view(), name='celery测试'),
    path('test_fuc/', test_fuc, name='celery测试'),
]

if settings.DEBUG:
    import debug_toolbar

    urlpatterns.append(path(r'__debug__/', include(debug_toolbar.urls)))
Exemple #34
0
from django.conf.urls import url
from django.contrib.auth.decorators import login_required

from user.views import UserView, LoginView, UserhomeView, LogoutView

app_name = 'user'
urlpatterns = [
    url(r'login/', LoginView.as_view(), name='login'),
    url(r'^home/(?P<pk>\w+)/$', login_required(UserhomeView.as_view()), name="user_home"),
    url(r'^logout/$', login_required(LogoutView.as_view()), name="logout"),
    url(r'^signup/$', UserView.as_view(), name="signup"),
]