from django.conf.urls import url from ui.views import IndexView from users.views import LoginView, LogoutView from wins.views import NewWinView, ThanksView, ConfirmationView urlpatterns = [ url(r"^wins/new/", NewWinView.as_view(), name="new"), url(r"^wins/thanks/", ThanksView.as_view(), name="thanks"), url( r"^wins/review/(?P<pk>[a-z0-9\-]+)/", ConfirmationView.as_view(), name="responses" ), url(r'^accounts/login/', LoginView.as_view(), name="login"), url(r"^accounts/logout/", LogoutView.as_view(), name="logout"), url(r"^$", IndexView.as_view(), name="index"), ]
from django.conf.urls import url, include from django.contrib import admin import xadmin import DjangoUeditor import os from django.conf.urls.static import static from djangoblog import settings from django.views.static import serve from users.views import RegisterView, LoginView, LogoutView, ActiveView from blogs.views import IndexView from djangoblog.settings import MEDIA_ROOT urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^xadmin/', xadmin.site.urls), url(r'^index/$', IndexView.as_view(), name='index'), url(r'^register/', RegisterView.as_view(), name='register'), url(r'^login/', LoginView.as_view(), name='login'), url(r'^logout/', LogoutView.as_view(), name='logout'), url(r'^active/(?P<active_code>\w+)/$', ActiveView.as_view(), name='active'), url(r'^blog/', include('blogs.urls', namespace='blog')), url(r'^ueditor/', include('DjangoUeditor.urls')), url(r'^media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}), ] if settings.DEBUG: media_root = os.path.join(settings.BASE_DIR, settings.MEDIA_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=media_root)
schema_view = get_schema_view( openapi_info, validators=['flex', 'ssv'], public=True, ) _patterns = [ # Base views path('', HomeView.as_view(), name='home'), path('search/', SearchView.as_view(), name='search'), # Login/logout path('login/', LoginView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name='logout'), # Apps path('circuits/', include('circuits.urls')), path('dcim/', include('dcim.urls')), path('extras/', include('extras.urls')), path('ipam/', include('ipam.urls')), path('secrets/', include('secrets.urls')), path('tenancy/', include('tenancy.urls')), path('user/', include('users.urls')), path('virtualization/', include('virtualization.urls')), # API path('api/', APIRootView.as_view(), name='api-root'), path('api/circuits/', include('circuits.api.urls')), path('api/dcim/', include('dcim.api.urls')),
from users.views import LoginView, RegisterView, ActiveUserView, ForgetPWDView, ResetView, ModifyPwdView, LogoutView, \ IndexView # 全局404页面配置 handler404 = 'users.views.page_not_found' handler403 = 'users.views.page_is_403' handler500 = 'users.views.page_is_500' urlpatterns = [ path('xadmin/', xadmin.site.urls), # TemplateView.as_view会将template转换为view path('', IndexView.as_view(), name='index'), # 注册登录等用户相关 ↓↓↓↓ # # 登录界面 path('login/', LoginView.as_view(), name='login'), # 登出界面 path('logout/', LogoutView.as_view(), name="logout"), # 注册界面 path('register/', RegisterView.as_view(), name='register'), # 验证码 path("captcha/", include('captcha.urls')), # 验证激活是否成功 re_path('active/(?P<active_code>.*)/', ActiveUserView.as_view(), name="user_active"), # 忘记密码验证 path('forget_pwd/', ForgetPWDView.as_view(), name='forget_pwd'), # 重设密码 re_path('reset/(?P<active_code>.*)/', ResetView.as_view(), name="reset_pwd"), # 重设成功
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.views.static import serve import xadmin from users.views import IndexView, LogoutView, UpdateEmailView, SendEmailCodeView, LoginView, ActiveUserView, EmailVerifyRecord, ResetView, RegisterView, ForgetPwdView, ModifyPwdView from wenews.settings import MEDIA_ROOT urlpatterns = [ url(r'^xadmin/', xadmin.site.urls), url(r'^index/$', IndexView.as_view(), name='index'), url(r'^$', IndexView.as_view(), name='index'), url(r'^news/', include('news.urls', namespace='news')), # 配置上传文件的访问处理函数 url(r'^media/(?P<path>.*)$', serve, {'document_root': MEDIA_ROOT}), url('^login/$', LoginView.as_view(), name='login'), # 这里是方法,有括号 url('^logout/$', LogoutView.as_view(), name='logout'), # 这里是方法,有括号 url('^register/$', RegisterView.as_view(), name='register'), url('^captcha/', include('captcha.urls')), url(r'^active/(?P<active_code>.*)/$', ActiveUserView.as_view(), name='user_active'), # ?P(p是大写的)提取一个变量作为参数 <active_code>是变量名,再后面是正则表达式 url('^forget/$', ForgetPwdView.as_view(), name='forget_pwd'), url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(), name='reset_pwd'), url(r'^modify_pwd/$', ModifyPwdView.as_view(), name='modify_pwd'), url(r'^users/', include('users.urls', namespace='users')), ]
from django.conf.urls import url from users.views import ( DashboardView, LoginView, LogoutView, SignupView, SignupAPIView, UserProfileAPIView, ) urlpatterns = [ url(r'^signup/$', SignupView.as_view(), name='signup'), url(r'^dashboard(?:/(?P<cat_id>[\d]+))?/$', DashboardView.as_view(), name='dashboard'), url(r'^login/$', LoginView.as_view(), name='login'), url(r'^logout/$', LogoutView.as_view(), name='logout'), url(r'^api/user-signup/$', SignupAPIView.as_view(), name='api_signup'), url(r'^api/userprofile/$', UserProfileAPIView.as_view(), name='api_userprofile'), ]
from django.urls import path from users.views import LoginView, LogoutView from django.conf.urls import include, url urlpatterns = [ path('login', LoginView.as_view(), name='users_login'), path('logout', LogoutView.as_view(), name='users_logout'), ]
handler500 = views.handle_500 __patterns = [ # Include the peering app re_path(r"", include("peering.urls")), # Include the peeringdb app re_path(r"", include("peeringdb.urls")), # Include the users app re_path(r"^user/", include("users.urls")), # Include the utils app re_path(r"", include("utils.urls")), # Users login/logout re_path(r"^login/$", LoginView.as_view(), name="login"), re_path(r"^logout/$", LogoutView.as_view(), name="logout"), # Home re_path(r"^$", views.Home.as_view(), name="home"), # Admin re_path(r"^admin/", admin_site.urls), # Error triggering re_path(r"^error500/$", views.trigger_500), # API re_path(r"^api/$", views.APIRootView.as_view(), name="api-root"), re_path(r"^api/peering/", include("peering.api.urls")), re_path(r"^api/peeringdb/", include("peeringdb.api.urls")), ] # Add debug_toolbar in debug mode if settings.DEBUG: import debug_toolbar
}, template_name="registration/educational_login.html", ), name='login', ), path( 'accounts/external/login/', LoginView.as_view( redirect_authenticated_user=True, template_name="registration/external_login.html", ), name='external-login', ), path( 'accounts/logout/', LogoutView.as_view(), name='logout', ), path( 'accounts/logged_out/', TemplateView.as_view(template_name="registration/logged_out.html"), name='logged_out', ), path( 'accounts/', include('django.contrib.auth.urls'), ), path( 'accounts/register/', RegisterView.as_view(), name='register',
from quiz.api import QuizDetailAPI from users.views import LoginView, LogoutView, RegisterView from editor.views import DashboardView, DeleteMapView, EditorView, NewView, \ delete_question, publish_quiz, remix_quiz, save_quiz_settings from score.api import ScoreAPI, me from text.views import render_page from wizard.views import wizard urlpatterns = [ path('admin/', admin.site.urls), path('quiz/<str:slug>/', QuizView.as_view(), name="quiz"), path('comments/<int:pk>/', add_comment, name="add-comment"), path('profile/<user>/', ProfileView.as_view(), name="profile"), path('search/', SearchView.as_view(), name="search"), path('users/login/', LoginView.as_view(), name="login"), path('users/logout/', LogoutView.as_view(), name="logout"), path('users/register/', RegisterView.as_view(), name="register"), path('dashboard/', DashboardView.as_view(), name="dashboard"), path('dashboard/delete/<int:pk>/', DeleteMapView.as_view(), name="delete-quiz"), path('dashboard/create/', NewView.as_view(), name="create-quiz"), path('dashboard/remix/<int:pk>/', remix_quiz, name="remix"), path('editor/<str:slug>/', EditorView.as_view(), name="editor"), path('editor/question/<int:pk>/', delete_question, name="delete-question"), path('editor/publish/<int:pk>/', publish_quiz, name="publish"), path('editor/settings/<int:pk>/', save_quiz_settings, name="save-quiz-settings"), path('api/quiz/<str:slug>/', QuizDetailAPI.as_view(),
from django.urls import path from users.views import (RegistrationView, ActivationView, LoginView, LogoutView) urlpatterns = [ path('register/', RegistrationView.as_view()), path('activation/', ActivationView.as_view()), path('login/', LoginView.as_view()), path('logout/', LogoutView.as_view()), ]
# 进行users 子应用的视图路由 from django.urls import path from users.views import RegisterView, ImageCodeView, SmsCodeView, LoginView, LogoutView, ForgetPasswordView, UserCenterView, WriteBlogView, SelfBlogView urlpatterns = [ # path第一个参数:路由 # path第二个参数:视图函数名 path('register/', RegisterView.as_view(), name='register'), # 图片验证码路由 path('imagecode/', ImageCodeView.as_view(), name='imagecode'), # 短信发送路由 path('smscode/', SmsCodeView.as_view(), name='smscode'), # 登录路由 path('login/', LoginView.as_view(), name='login'), # 登出路由 path('logout/', LogoutView.as_view(), name='logout'), # 忘记密码路由 path('forget_password/', ForgetPasswordView.as_view(), name='forgetpassword'), # 用户中心路由 path('center/', UserCenterView.as_view(), name='center'), # 写博客路由 path('write_blog/', WriteBlogView.as_view(), name='writeblog'), # 个人博客路由 path('self_blog/', SelfBlogView.as_view(), name='selfblog') ]
from django.conf.urls import url from users.views import SignupView, LoginView, LogoutView, SignupSuccessfulView, ProfileUpdatedView, ProfileView urlpatterns = [ url(r'^profile/?$', ProfileView.as_view(), name="users_profile"), url(r'^profile/updated/?$', ProfileUpdatedView.as_view(), name="users_profile_updated"), url(r'^signup/?$', SignupView.as_view(), name="users_signup"), url(r'^signup/successful/?$', SignupSuccessfulView.as_view(), name="users_signup_successful"), url(r'^login/?$', LoginView.as_view(), name="users_login"), url(r'^logout/?$', LogoutView.as_view(), name="users_logout"), ]
html += "<ul>" for group in request.user.ad_groups.all(): html += "<li>%s</li>" % str(group) html += "</ul>" else: html += "not logged in" html += "</body></html>" return HttpResponse(html) urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^api-tokens/?$', get_api_tokens_view), url(r'^accounts/profile/', show_login), url(r'^accounts/login/', LoginView.as_view()), url(r'^accounts/logout/', LogoutView.as_view()), url(r'^accounts/', include(allauth.urls)), url(r'^oauth2/applications/', permission_denied), url(r'^oauth2/', include(oauth2_provider.urls, namespace='oauth2_provider')), url(r'^openid/', include(oidc_provider.urls, namespace='oidc_provider')), url(r'^user/(?P<username>[\w.@+-]+)/?$', UserView.as_view()), url(r'^user/$', UserView.as_view()), url(r'^jwt-token/$', GetJWTView.as_view()), url(r'^login/$', LoginView.as_view()), url(r'^logout/$', LogoutView.as_view()), url(r'^email-needed/$', EmailNeededView.as_view(), name='email_needed'), ] if settings.DEBUG: urlpatterns += [url(r'^static/(?P<path>.*)$', static_views.serve)]
from django.urls import path, include from rest_framework.routers import DefaultRouter from posts.api import PostViewSet from posts.views import HomeView, PostDetailView, NewPostView from users.views import UsersView, UserPostView, LoginView, LogoutView, SignupView from users.api import UserViewSet, UserPostViewSet router = DefaultRouter() router.register('posts', PostViewSet, base_name='posts') router.register('users', UserViewSet, base_name='users') router.register('blogs', UserPostViewSet, base_name='blogs') urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name="home"), path('blogs/<username>/<int:pk>', PostDetailView.as_view(), name="post-detail"), path('blogs/', UsersView.as_view(), name="user-list"), path('blogs/<username>', UserPostView.as_view(), name="user-post-list"), path('new-post', NewPostView.as_view(), name='new-post'), path('login', LoginView.as_view(), name='login'), path('logout', LogoutView.as_view(), name='logout'), path('signup', SignupView.as_view(), name='signup'), # API URLs path('api/v1/', include(router.urls)), #path('api/v1/blogs/', UserPostViewSet.as_view({'list'}), name='blog-list'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf import settings from django.conf.urls import include from django.urls import path from . import views from .admin import admin_site from users.views import LoginView, LogoutView handler500 = views.handle_500 __patterns = [ # Home path("", views.Home.as_view(), name="home"), # Login/Logout path("login/", LoginView.as_view(), name="login"), path("logout/", LogoutView.as_view(), name="logout"), # Apps path("", include("peering.urls")), path("", include("peeringdb.urls")), path("", include("utils.urls")), path("user/", include("users.urls")), # API path("api/", views.APIRootView.as_view(), name="api-root"), path("api/peering/", include("peering.api.urls")), path("api/peeringdb/", include("peeringdb.api.urls")), path("api/utils/", include("utils.api.urls")), # Admin path("admin/", admin_site.urls), # Error triggering path("error500/", views.trigger_500), ]
# -*- coding: utf-8 -*- from django.conf.urls import url from users.views import LoginView, LogoutView, SignUpView urlpatterns = [ # Users URLs url(r'^login$', LoginView.as_view(), name='users_login'), url(r'^logout$', LogoutView.as_view(), name='users_logout'), url(r'^signup$', SignUpView.as_view(), name='users_signup'), ]
), public=True, permission_classes=(permissions.AllowAny, ), ) urlpatterns = [ path('admin/', admin.site.urls), path('auth/', include('djoser.urls') ), # for register, password change and retrieving user data path('auth/google/', SocialLogin.as_view({ 'post': 'create', 'put': 'log_in' })), # for google reg/auth path('api/v1/', include('users.urls')), path("token/login/", EmailTokenObtainPairView.as_view(), name="token_obtain_pair"), # for auth path("token/refresh/", TokenRefreshView.as_view(), name="token_refresh"), path("token/logout/", LogoutView.as_view(), name="blacklist_token"), path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from django.urls import path from users.views import LoginView, LogoutView, SessionCheckView urlpatterns = [ path("login/", LoginView.as_view()), path("logout/", LogoutView.as_view()), path("check/", SessionCheckView.as_view()), ]
import xadmin from django.urls import path, include, re_path from django.views.generic import TemplateView from DjangoEduSysDemo.settings import MEDIA_ROOT from DjangoEduSysDemo.settings import STATICFILES_DIRS from users.views import LoginView, RegisterView, ActiveUserView, ResetView, ModifyPwdView, ForgetPwdView, LogoutView, IndexView urlpatterns = [ path('xadmin/', xadmin.site.urls), # path('', TemplateView.as_view(template_name='index.html'), name='index'), path('', IndexView.as_view(), name='index'), path('login/', LoginView.as_view(), name='login'), path('register/', RegisterView.as_view(), name='register'), path('logout/', LogoutView.as_view(), name="logout"), path('captcha/', include('captcha.urls')), re_path('active/(?P<active_code>.*)/', ActiveUserView.as_view(), name='user_active'), path('forget/', ForgetPwdView.as_view(), name='forget_pwd'), re_path('reset/(?P<active_code>.*)/', ResetView.as_view(), name='reset_pwd'), path('modify_pwd/', ModifyPwdView.as_view(), name='modify_pwd'), path("org/", include('organization.urls', namespace="org")), path("course/", include('course.urls', namespace="course")), # 个人信息 path("users/", include('users.urls', namespace="users")), # 处理图片显示的url,使用Django自带serve,传入参数告诉它去哪个路径找,我们有配置好的路径MEDIAROOT re_path(r'^media/(?P<path>.*)', serve, {"document_root": MEDIA_ROOT}), # 静态文件 re_path(r'^static/(?P<path>.*)', serve, {"document_root": STATICFILES_DIRS[0]}),
url(r'^$', HomeView.as_view(), name='ofertas_home'), url(r'^ofertas/$', login_required(ListView.as_view()), name='ofertas_list'), url(r'^ofertas/(?P<pk>[0-9]+)$', login_required(DetailView.as_view()), name='ofertas_detail'), url(r'^ofertas/nueva$', login_required(CreateView.as_view()), name='crear_oferta'), #USERS URLS #url(r'^login$', LoginView.as_view(), name='users_login'), url(r'^accounts/login/$', login, {'template_name': 'users/login.html'}, name='login'), url(r'^logout$', LogoutView.as_view(), name='users_logout'), #REGISTRO URLS url(r'^registrar$', RegistroUsuario.as_view(), name='registrar'), #POSTULAR URLS url(r'^ofertas/postular$', Postulacion.as_view(), name='postular'), #URLS RECUPERACION PASSWORD url(r'^reset/password_reset', password_reset, { 'template_name': 'recuperacion/password_reset_form.html', 'email_template_name': 'recuperacion/password_reset_email.html' }, name='password_reset'), url(r'^password_reset_done',
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 # 用于处理静态文件 from users.views import LogoutView, LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView from users.views import IndexView from Lfonlion.settings import MEDIA_ROOT urlpatterns = [ url(r'^xadmin/', xadmin.site.urls), # 后台管理url url('^$', IndexView.as_view(), name="index"), # TemplateView.as_view(template_name="index.html") url('^login/$', LoginView.as_view(), name="login"), # 登录url # url('^login/$', LoginUnsafeView.as_view(), name="login"), # sql注入验证 url('^logout/$', LogoutView.as_view(), name="logout"), # 退出登录url url('^register/$', RegisterView.as_view(), name="register"), # 注册url 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"), url(r'^modify_pwd/$', ModifyPwdView.as_view(), name="modify_pwd"), # 课程机构url设置 url(r'^org/', include('organization.urls', namespace="org")), # 课程相关url设置 url(r'^course/', include('courses.urls', namespace="course")), # 配置上传文件的访问处理函数 url(r'^media/(?P<path>.*)$', serve, {"document_root": MEDIA_ROOT}),
from django.contrib import admin from django.views.generic import TemplateView from django.views.static import serve import xadmin from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView from users.views import LogoutView, IndexView from organization.views import OrgView from edonline.settings import MEDIA_ROOT urlpatterns = [ url(r'^xadmin/', xadmin.site.urls), url(r'^$', IndexView.as_view(), name="index"), 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'^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"), url(r'^modify/$', ModifyPwdView.as_view(), name="modify_pwd"), # 课程机构url配置 url(r'^org/', include(('organization.urls', 'organization'), namespace="org")), # 课程首页url配置 url(r'^course/', include(('courses.urls', 'courses'), namespace="course")), # 课程讲师url配置 url(r'^teacher/', include(('organization.urls', 'organization'), namespace="org")),
router = SimpleRouter() router.register('user_identity', UserIdentityViewSet) router.register('user_device', UserDeviceViewSet) router.register('user_login_entry', UserLoginEntryViewSet) router.register('service', ServiceViewSet) router.register('user_consent', UserConsentViewSet) v1_scope_path = path('scope/', ScopeListView.as_view(), name='scope-list') v1_api_path = path('v1/', include((router.urls + [v1_scope_path], 'v1'))) urlpatterns = [ path('admin/', admin.site.urls), path('api-tokens/', get_api_tokens_view), path('accounts/profile/', show_login), path('accounts/login/', LoginView.as_view()), path('accounts/logout/', LogoutView.as_view()), path('accounts/', include(auth_backends.urls, namespace='auth_backends')), path('accounts/', include(social_auth_urls, namespace='social')), path('oauth2/applications/', permission_denied), path('oauth2/authorize/', TunnistamoAuthorizationView.as_view(), name="oauth2_authorize"), path('oauth2/', include(oauth2_provider.urls, namespace='oauth2_provider')), re_path(r'^openid/authorize/?$', TunnistamoOidcAuthorizeView.as_view(), name='authorize'), re_path(r'^openid/end-session/?$', TunnistamoOidcEndSessionView.as_view(), name='end-session'), path('openid/', include(oidc_provider.urls, namespace='oidc_provider')), re_path(r'^\.well-known/openid-configuration/?$', OIDCProviderInfoView.as_view(), name='root-provider-info'), re_path(r'^user/(?P<username>[\w.@+-]+)/?$', UserView.as_view()), path('user/', UserView.as_view()), path('jwt-token/', GetJWTView.as_view()), path('login/', LoginView.as_view()), path('logout/', LogoutView.as_view()), path('email-needed/', EmailNeededView.as_view(), name='email_needed'),
import xadmin from django.urls import path, re_path, include from django.views.static import serve from .settings import MEDIA_ROOT # , STATIC_ROOT from users.views import LoginView, RegisterView, ActiveUserView, IndexView from users.views import ForgetPwdView, ResetView, ModifyPwdView, LogoutView urlpatterns = [ path('xadmin/', xadmin.site.urls), # 登陆类url re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^login/$', LoginView.as_view(), name='login'), re_path(r'^logout/$', LogoutView.as_view(), name='logout'), re_path(r'^register/$', RegisterView.as_view(), name='register'), re_path(r'^forget/$', ForgetPwdView.as_view(), name='forget'), # captcha库 re_path(r'^captcha/', include('captcha.urls')), # 邮箱激活验证链接 re_path(r'^active/(?P<active_code>.*)/$', ActiveUserView.as_view(), name='user_active'), re_path(r'^reset/(?P<reset_code>.*)/$', ResetView.as_view(), name='user_reset'), # re_path(r'^update_email/(?P<reset_code>.*)/$', ResetView.as_view(), name='user_reset'), re_path(r'^modify_pwd/$', ModifyPwdView.as_view(), name='modify_pwd'),
from se2015.views import IndexView from records.views import ExerciseRecordView, ExamRecordView from records.views import ExamRecordUserView from exercises.views import ExerciseView, SkillView, GradeView, ExamDetailView from exercises.views import ExamListView urlpatterns = [ url(r'^api/v1/avatar/(?P<username>.+)/$', AvatarView.as_view()), url(r'^api/v1/exam_list/(?P<grade_id>.+)/$', ExamListView.as_view()), url(r'^api/v1/exam/(?P<exam_id>.+)/$', ExamDetailView.as_view()), url(r'^api/v1/exam_record_user/(?P<exam_id>.+)/$', ExamRecordUserView.as_view()), url(r'^api/v1/exam_record/(?P<exam_id>.+)/$', ExamRecordView.as_view()), url(r'^api/v1/exercise/(?P<grade_id>.+)/(?P<skill_id>.+)/$', ExerciseView.as_view()), url(r'^api/v1/exercise/(?P<grade_id>.+)/$', SkillView.as_view()), url(r'^api/v1/grades/$', GradeView.as_view()), url(r'^api/v1/accounts/records/(?P<username>.+)/$', ExerciseRecordView.as_view(), name='recordDetail'), url(r'^api/v1/accounts/(?P<username>.+)/$', UserDetailView.as_view(), name='detail'), url(r'^api/v1/accounts/', UserListView.as_view(), name='list'), url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'), url(r'^api/v1/auth/logout/$', LogoutView.as_view(), name='logout'), url(r'^admin/', include(admin.site.urls)), url('^.*$', IndexView.as_view(), name='index'), ]
name="confirmation-thanks" ), url( r"^wins/review/sample/$", ConfirmationView.as_view(), name="response_sample" ), url( r"^accounts/login/$", LoginView.as_view(), name="login", ), url( r"^accounts/logout/$", LogoutView.as_view(), name="logout", ), url(r"^admin$", AdminView.as_view(), name="admin-index"), url(r"^add-user$", AddUserView.as_view(), name="add-user"), url(r"^new-password$", NewPassView.as_view(), name="new-password"), url(r"^send-customer-email$", SendCustomerEmailView.as_view(), name="send-customer-email"), url(r"^send-admin-customer-email$", SendAdminCustomerEmailView.as_view(), name="send-admin-customer-email"), url(r"^change-customer-email$", ChangeCustomerEmailView.as_view(), name="change-customer-email"), url(r"^delete$", SoftDeleteWinView.as_view(), name="soft-delete"), url(r"^csv-upload$", AdminUploadCSVView.as_view(),
from drf_auto.views import DRFDocsView from advert.views import (AdvertCrudView, AdvertListView, CategoryListView, AdvertRetrieveUpdateDeleteView, ImageAdUploadView, ImageAdDeleteView) from users.views import LoginView, LogoutView, RegistrationView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^api-docs/$', DRFDocsView.as_view(), name='docs'), url(r'^category/list/$', CategoryListView.as_view()), ] # advert urlpatterns += [ url(r'^advert/$', AdvertCrudView.as_view()), url(r'^advert/(?P<pk>\d+)/$', AdvertRetrieveUpdateDeleteView.as_view()), url(r'^advert/list/$', AdvertListView.as_view()), url(r'^advert/images/(?P<advert>\d+)/$', ImageAdUploadView.as_view()), url(r'^advert/images/(?P<advert>\d+)/delete/(?P<pk>\d+)/$', ImageAdDeleteView.as_view()) ] # register urlpatterns += [ url(r'auth/login/$', LoginView.as_view()), url(r'auth/logout/$', LogoutView.as_view()), url(r'auth/register/$', RegistrationView.as_view()), ]
""" from django.conf.urls import url, include from django.contrib import admin from rest_framework.routers import DefaultRouter from blogs.views import lastest_posts, blogs_list, blog_detail, post_detail, NewPostView from users.views import LoginView, SignUpView, LogoutView from users.api import UserViewSet from blogs.api import BlogViewSet, PostViewSet router = DefaultRouter() router.register("users", UserViewSet, base_name="users_api") router.register("blogs", BlogViewSet, base_name="blogs_api") router.register("posts", PostViewSet, base_name="posts_api") router.register(r'blogs/(?P<blog_id>[0-9]+)/posts', PostViewSet) urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', lastest_posts, name="index"), url(r'^blogs/?$', blogs_list, name="blog_list"), url(r'^blogs/(?P<slug>[\w.@+-]+)/?$', blog_detail, name="blog_detail"), url(r'^blogs/(?P<slug>[\w.@+-]+)/(?P<post_pk>[0-9]+)/?$', post_detail, name="post_detail"), url(r'^new_post', NewPostView.as_view(), name="new_post"), url(r'^login',LoginView.as_view(), name="login"), url(r'^logout',LogoutView.as_view(), name="logout"), url(r'^signup',SignUpView.as_view(), name="signup"), #api url(r'^api/1.0/', include(router.urls)), ]
from learn.views import LearningOverviewView from users.views import LoginView, LogoutView, \ RegisterView, AcivateUserView, ForgetPasswordView, ResetPasswordView, ModifyPasswordView, RegisterMobileView, \ UserVirificationSmsView, VerifySmsView from django.conf import settings urlpatterns = [ url(r'^xadmin/', xadmin.site.urls), url(r'^media/(?P<path>.*)$', serve, {"document_root": settings.MEDIA_ROOT}), url(r'^static/(?P<path>.*)$', serve, {"document_root": settings.STATIC_ROOT}), url(r'^$', LearningOverviewView.as_view(), name="index"), url(r'^accounts/login/$', LoginView.as_view(), name="user_login"), url(r'^accounts/logout/$', LogoutView.as_view(), name="user_logout"), url(r'^register/$', RegisterView.as_view(), name="user_register"), url(r'^register_mobile/$', RegisterMobileView.as_view(), name="user_register_mobile"), url(r'^send_verification_sms/$', UserVirificationSmsView.as_view(), name="user_verification_sms"), url(r'^forget_password/$', ForgetPasswordView.as_view(), name="forget_password"), url(r'^forget_password_verify_sms/$', VerifySmsView.as_view(), name="verify_sms"), url(r'^reset_password/(?P<activate_code>.*)/$', ResetPasswordView.as_view(),
from django.conf.urls import include, url,patterns from django.contrib import admin from users.views import RegisterView,LoginView, LogoutView, UserProfileView, GameView from django.views.generic import View from django.views.decorators.csrf import csrf_exempt urlpatterns = patterns('', url(r'^$', GameView.as_view()), url(r'^login/$', csrf_exempt(LoginView.as_view())), url(r'^register/$', csrf_exempt(RegisterView.as_view())), url(r'^logout/$', csrf_exempt(LogoutView.as_view())), url(r'^profile/$', csrf_exempt(UserProfileView.as_view())), # url(r'^search$', SearchView.as_view()), # # url(r'^post$', PostView.as_view()), # # url(r'^repost$', RepostView.as_view()), )
ChangeCustomerEmailView.as_view(), name='admin-change-customer-email', ), url( r"^admin/soft-delete/$", SoftDeleteWinView.as_view(), name='admin-soft-delete', ), # Override DRF's default 'cause our includes brute-force protection url(r"^auth/login/$", LoginView.as_view(), name="login"), url(r"^auth/is-logged-in/$", IsLoggedIn.as_view(), name="is-logged-in"), url(r"^user/me/$", LoggedInUserRetrieveViewSet.as_view({'get': 'retrieve'}), name="user_profile"), url(r"^auth/logout/", LogoutView.as_view(), name="logout"), url( r'^activity-stream/$', ActivityStreamViewSet.as_view({'get': 'list'}), name='activity-stream'), ] if settings.API_DEBUG or WINS_CSV_SECRET_PATH: secret_path = '/' + WINS_CSV_SECRET_PATH if WINS_CSV_SECRET_PATH else '' urlpatterns.append( url(fr"^csv{secret_path}/wins/$", CompleteWinsCSVView.as_view(), name="csv_wins"), )
from se2015.views import IndexView from records.views import ExerciseRecordView, ExamRecordView from records.views import ExamRecordUserView from exercises.views import ExerciseView, SkillView, GradeView, ExamDetailView from exercises.views import ExamListView urlpatterns = [ url(r'^api/avatar/(?P<username>.+)/$', AvatarView.as_view()), url(r'^api/v1/exam_list/(?P<grade_id>.+)/$', ExamListView.as_view()), url(r'^api/v1/exam/(?P<exam_id>.+)/$', ExamDetailView.as_view()), url(r'^api/v1/exam_record_user/(?P<exam_id>.+)/$', ExamRecordUserView.as_view()), url(r'^api/v1/exam_record/(?P<exam_id>.+)/$', ExamRecordView.as_view()), url(r'^api/v1/exercise/(?P<grade_id>.+)/(?P<skill_id>.+)/$', ExerciseView.as_view()), url(r'^api/v1/exercise/(?P<grade_id>.+)/$', SkillView.as_view()), url(r'^api/v1/grades/$', GradeView.as_view()), url(r'^api/v1/accounts/records/(?P<username>.+)/$', ExerciseRecordView.as_view(), name='recordDetail'), url(r'^api/v1/accounts/(?P<username>.+)/$', UserDetailView.as_view(), name='detail'), url(r'^api/v1/accounts/', UserListView.as_view(), name='list'), url(r'^api/v1/auth/login/$', LoginView.as_view(), name='login'), url(r'^api/v1/auth/logout/$', LogoutView.as_view(), name='logout'), url(r'^admin/', include(admin.site.urls)), url('^.*$', IndexView.as_view(), name='index'), ]
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.views.static import serve import xadmin from users.views import LoginView, LogoutView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView from users.views import IndexView from testonline.settings import MEDIA_ROOT 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"), url(r'^modify_pwd/$', ModifyPwdView.as_view(), name="modify_pwd"), # 课程机构url配置 url(r'^org/', include('organization.urls', namespace='org')), # 课程相关url配置 url(r'^course/', include('courses.urls', namespace='course')), # 配置上传文件的访问处理函数 url(r'^media/(?P<path>.*)$', serve, {"document_root": MEDIA_ROOT}),
from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required from django.contrib.auth.views import password_reset_confirm, password_reset_complete from users.views import LoginView, LogoutView, RegistrationView, GetUserView, PasswordResetView urlpatterns = patterns('', url(r'^login/', LoginView.as_view()), url(r'^logout/', LogoutView.as_view()), url(r'^register/', RegistrationView.as_view()), url(r'^get/', GetUserView.as_view()), url(r'^password_reset/', PasswordResetView.as_view()), url(r'^confirm_reset/(?P<uidb64>[\d\w\-_]+)/(?P<token>[\d\w-]+)/', password_reset_confirm, name='password_reset_confirm'), url(r'^complete_reset/', password_reset_complete, name='password_reset_complete'), )
3. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ from django.conf.urls import url, include from django.views.generic import TemplateView from django.views.static import serve from extra_apps import xadmin from users.views import LoginView, RegisterView, ActiveUserView, ForgetPwdView, ResetView, ModifyPwdView from users.views import LogoutView, IndexView from Gmooc.settings import MEDIA_ROOT, STATIC_ROOT urlpatterns = [ url(r'^xadmin/', xadmin.site.urls), url('^$', IndexView.as_view(), name='index'), # 对应在html文件中的url url('^login/$', LoginView.as_view(), name='login'), # 对应在html文件中的url url('^logout/$', LogoutView.as_view(), name='logout'), # 对应在html文件中的url url('^register/$', RegisterView.as_view(), name='register'), # 对应在html文件中的url 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<reset_code>.*)/$', ResetView.as_view(), name='reset_pwd'), url(r'^modify_pwd/$', ModifyPwdView.as_view(), name='modify_pwd'), # 课程机构url配置 url(r'^org/', include('organization.urls', namespace='org')), # 课程相关url配置 url(r'^course/', include('courses.urls', namespace='course')), # 配置上传文件的访问方法函数
urlpatterns = [ # (?P<pk>[0-9]+) => valor en parámetro pk (?P<pk>), que será 1 o más números del 0 al 9 url(r'^admin/', include(admin.site.urls)), # urls nombradas url(r'^blogs/$', BlogsView.as_view(), name='blog_home'), # listado de blogs, con vista basada en clase BlogsView url(r'^$', HomeView.as_view(), name='post_home'), # listado de posts publicados, con vista basada en clase HomeView url(r'^blogs/(?P<username>[a-z]+)/$', UserPostsView.as_view(), name='blog_posts'), # listado posts blog usuario, basada en la clase UserPostView url(r'^blogs/(?P<username>[a-zA-Z]+)/(?P<post_id>[0-9]+)$', DetailView.as_view(), name='post_detail'), # detalle post, basado en clase DetailView url(r'^signup/$', SignupView.as_view(), name='user_signup'), # signup o creación de cuenta de usuario, con vista basada en clase SignupView url(r'^login$', LoginView.as_view(), name='user_login'), # login, con vista basada en clase LoginView url(r'^logout$', LogoutView.as_view(), name='user_logout'), # logout, con vista basada en clase LogoutView url(r'^new-post/$', CreateView.as_view(), name='post_create'), # creación nuevo post, con vista basada en clase CreateView # Users' API URLs url(r'^api/1.0/users/$', UserListAPI.as_view(), name='user_list_api'), # url con listado de users para la API, basado en clases url(r'^api/1.0/users/(?P<pk>[0-9]+)$', UserDetailAPI.as_view(), name='user_detail_api'), #url detalle usuario para la api # Posts' API URLs url(r'^api/1.0/blogs/(?P<username>[a-z]+)/$', PostListAPI.as_view(), name='post_list_api'), # API listado de posts de blog url(r'^api/1.0/posts/(?P<pk>[0-9]+)$', PostDetailAPI.as_view(), name='post_detail_api'), # API detalle de post: CRUD. # Blogs' API URLs url(r'^api/1.0/blogs/$', BlogListAPI.as_view(), name='blog_list_api') # API listado blogs ]
from users.views import SendTrainerMessageView from users.views import IndexView from users.views import TrainerLoginView from users.views import TrainerDashboardView from users.views import SendClientMessageView from users.views import GetUserChatView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^trainers/login/$', TrainerLoginView.as_view(), name='trainer-login-view'), url(r'^trainers/dashboard/$', TrainerDashboardView.as_view(), name='trainer-dashboard-view'), url(r'^trainers/send-client-message/$', SendClientMessageView.as_view(), name="send-client-message"), url(r'^trainers/get-user-chat/$', GetUserChatView.as_view(), name='get-user-chat-view'), urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^users/login/$', LoginView.as_view(), name='login-view'), url(r'^users/logout/$', LogoutView.as_view(), name='logout-view'), url(r'^users/registration/$', RegistrationView.as_view(), name='registration-view'), url(r'^dashboard/$', DashboardView.as_view(), name="dashboard-view"), url(r'^dashboard/send-trainer-message/$', SendTrainerMessageView.as_view(), name="send-trainer-message"), url(r'^$', IndexView.as_view(), name='index') url(r'^$', RedirectView.as_view(url='users/login/')) ]