from django.urls import path

from user.views import LogInView, SignUpView, TokenCheckView

urlpatterns = [
    path('/login', LogInView.as_view()),
    path('/signup', SignUpView.as_view()),
    path('/token', TokenCheckView.as_view()),
]
"""westagram URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.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.urls import path
from user.views  import SignUpView, LoginView

urlpatterns=[
    path('/signup', SignUpView.as_view()), #as_view는 내장되있던 method
    path('/login',LoginView.as_view())
]
from django.urls import path, include
from user.views import SignUpView, LoginView, FollowView

urlpatterns = [
    path('/create', SignUpView.as_view()),
    path('/login', LoginView.as_view()),
    path('/read/follow', FollowView.as_view()),
    path('/create/follow/<int:pk>', FollowView.as_view()),
]
示例#4
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.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from questions.views import NewQuestionsView, AddQuestionView, TopQuestionsView, LikeView
from user.views import SignUpView, LogInView, UserSettingsView
from django.contrib.auth.views import LogoutView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', NewQuestionsView.as_view(), name='new_questions'),
    # path('question/', include('questions.urls')),
    path('question/', include('questions.urls.question')),
    path('ask/', AddQuestionView.as_view(),  name='add_question'),
    path('hot/', TopQuestionsView.as_view(), name='top_questions'),
    path('signup/', SignUpView.as_view(), name='sign_up'),
    path('login/', LogInView.as_view(), name='log_in'),
    path('logout/', LogoutView.as_view(), name='log_out'),
    # path('tag/', include('questions_by_tag.urls')),
    path('tag/', include('questions.urls.questions_by_tag')),
    path('settings/', UserSettingsView.as_view(), name='user_settings'),
    path('like_comment/<int:pk>', LikeView.as_view(), name='like_comment'),
    path('like_question/<int:pk>', LikeView.as_view(), name="like_question" )
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
示例#5
0
from django.urls import path
from user.views import SignUpView, LogInView

urlpatterns = [
    path('/index', SignUpView.as_view()),
    path('/login', LogInView.as_view())
]
示例#6
0
from django.urls import path

from user.views import SignUpView


urlpatterns = [
    path("/signup", SignUpView.as_view())
]
from django.urls import path
from user.views import SignUpView, LoginView

urlpatterns = [
    path('', SignUpView.as_view()),
    path('/login', LoginView.as_view())
]
示例#8
0
from django.urls import path, include
from django.conf.urls import url
from user.views import SignUpView, SignInView, LogOutView, UserMainPage

urlpatterns = [
    # url(r'^SignIn$', SignInView.as_view(), name='SignIn'),
    # url(r'^SignUp$', SignUpView.as_view(), name='SignUp'),
    # url(r'^LogOut$', LogOutView.as_view(), name='LogOut'),
    path('SignIn', SignInView.as_view(), name='SignIn'),
    path('SignUp', SignUpView.as_view(), name='SignUp'),
    path('LogOut', LogOutView.as_view(), name='LogOut'),
    path('<str:username>/', UserMainPage.as_view(), name='UserMainPage')
]
示例#9
0
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from user.views import AdminSignupView, ContractorSignupView, SignUpView
from django.contrib.auth import views as auth_views

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', views.home, name='home'),
    url(r'user/', include(('user.urls', 'user'), namespace='user')),
    url(r'jobs/', include(('jobs.urls', 'jobs'), namespace='jobs')),
    url(r'machines/',
        include(('machines.urls', 'machines'), namespace='machines')),
    url('accounts/', include('django.contrib.auth.urls')),
    url('accounts/signup/$', SignUpView.as_view(), name='signup'),
    url('accounts/signup/administrator/$',
        AdminSignupView.as_view(),
        name='admin_signup'),
    url('accounts/signup/contractor/$',
        ContractorSignupView.as_view(),
        name='contractor_signup'),
    url(r'login/$',
        auth_views.LoginView.as_view(template_name='jobs/login.html'),
        name='login'),
    url(r'logout/$',
        auth_views.LogoutView.as_view(next_page='login'),
        name='logout'),
]

if settings.DEBUG:
示例#10
0
    # login logout signup
    path('logout/',
         PostLogoutView.as_view(next_page=reverse_lazy('FLEX:index'),
                                template_name='flexart/index.html'),
         name="logout"),

    # path('logged_out/',
    #      TemplateView.as_view(template_name='flexart/index.html'), name='logout_post'),
    path('login/',
         CustomLoginView.as_view(
             template_name='flexart/index_login.html',
             extra_context={'next': reverse_lazy('FLEX:index')}),
         name="login"),
    path('signup/',
         SignUpView.as_view(success_url=reverse_lazy('FLEX:login'),
                            template_name='flexart/index_register.html'),
         name="signup"),

    # password change
    path('password_change/',
         CustomPasswordChangeView.as_view(
             template_name='flexart/index_password_change_form.html',
             success_url=reverse_lazy('FLEX:password_change_done')),
         name="password_change"),
    path('password_change/done/',
         CustomPasswordChangeDoneView.as_view(
             template_name='flexart/index_password_change_done.html'),
         name="password_change_done"),

    # password reset
    # get email
from django.conf.urls import url
from user.views import (ResentOTPView, OTPVerificationView, ChangePasswordView,
                        LoginView, LogoutView, SignUpView)

urlpatterns = [
    url(r'^signup$', SignUpView.as_view()),
    url(r'^re-sent-otp$', ResentOTPView.as_view()),
    url(r'^otp-verification$', OTPVerificationView.as_view()),
    url(r'^reset-password$', ChangePasswordView.as_view()),
    url(r'^login$', LoginView.as_view()),
    url(r'^logout$', LogoutView.as_view()),
]
示例#12
0
from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

from user.views import SignUpView

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'game.views.home', name='connect4_home'),
    url(r'^connect4/', include('game.urls')),
)

urlpatterns += patterns(
    'django.contrib.auth.views',
    
    url(r'^login/$', 'login',
        {'template_name': 'login.html'},
        name='connect4_login'),
    
    url(r'^logout/$', 'logout',
        {'next_page': r'/'},
        name='connect4_logout'),
)

urlpatterns += patterns('user.views',
                            url(r'^user/home$', 'home', name='user_home'),
                            url(r'^user/signup$', SignUpView.as_view(), name='user_signup'),
                            url(r'^user/get_info$', 'get_user_news'),
                        )
示例#13
0
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from user.views import index, SignOut, SignUpView, SignInView
from product.views import productList, ProductRegister, ProductDetail
from order.views import (OrderCreate, OrderList, OrderCancel, OrderCreateAPI,
                         OrderDeleteAPI)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', index),
    path('signup/', SignUpView.as_view()),
    path('signin/', SignInView.as_view()),
    path('signout/', SignOut),
    path('product/', productList.as_view()),
    path('product/create/', ProductRegister.as_view()),
    path('product/<int:pk>/', ProductDetail.as_view()),
    path('order/create/', OrderCreate.as_view()),
    path('order/', OrderList.as_view()),
    path('order/cancel/', OrderCancel.as_view()),
    path('api/order/create/', OrderCreateAPI.as_view()),
    path('api/order/delete/<int:pk>', OrderDeleteAPI.as_view()),
]
示例#14
0
from user.views import SignInView, SignUpView
from place.views import PlaceViewSet
from contrib.views import ContributionViewSet
from django.contrib import admin
from django.urls import path, include
from rest_framework.routers import DefaultRouter

router = DefaultRouter(trailing_slash=False)
router.register('places', PlaceViewSet)
router.register('contributions', ContributionViewSet, basename='contrib')

urlpatterns = [
    path('admin/', admin.site.urls),
    # API
    path('api/auth/signup/', SignUpView.as_view(), name='signup'),
    path('api/auth/signin/', SignInView.as_view(), name='signin'),
    path('api/', include(router.urls)),
]