コード例 #1
0
ファイル: urls.py プロジェクト: hectep/quora
from django.contrib import admin
from django.urls import path, include, re_path
from django_registration.backends.one_step.views import RegistrationView

from core.views import IndexTemplateView
from profiles.forms import ProfileForm

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/register/',
         RegistrationView.as_view(form_class=ProfileForm, success_url='/'),
         name='django_registration_register'),
    path('accounts/', include('django_registration.backends.one_step.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
    path('api-auth/', include('rest_framework.urls')),
    path('api/rest-auth/', include('rest_auth.urls')),
    path('api/rest-auth/registration/',
         include('rest_auth.registration.urls')),
    path('api/', include('profiles.api.urls')),
    path('api/', include('questions.api.urls')),
    re_path(r'^.*$', IndexTemplateView.as_view(), name='entry-point')
]
コード例 #2
0
    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, auth
from django.urls import path, include, re_path
from django_registration.backends.one_step.views import RegistrationView
from users.forms import BlogUserForm
from main_core.views import FirstTemplateView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/register/',
         RegistrationView.as_view(form_class=BlogUserForm, success_url='/'),
         name='django_registration_register'),
    path('accounts/', include("django_registration.backends.one_step.urls")),
    path('accounts/', include("django.contrib.auth.urls")),
    path("api-auth/", include("rest_framework.urls")),
    path("api/", include("users.api.urls")),
    path("api/rest-auth/", include("rest_auth.urls")),
    path("api/rest-auth/registration/",
         include("rest_auth.registration.urls")),
    path("", FirstTemplateView.as_view(), name='entry-point'),
    path("api/", include("blog.api.urls"))
]
コード例 #3
0
from django.contrib import admin
from django.urls import path, include, re_path
from django_registration.backends.one_step.views import RegistrationView

from users.forms import CustomUserForm
from core.views import IndexTemplateView

urlpatterns = [
    path('admin/', admin.site.urls),

    path('accounts/', include("django.contrib.auth.urls")),
    path('accounts/register/', RegistrationView.as_view(
        form_class=CustomUserForm, success_url="/",), name="django_registration_register"),
    path('accounts/', include("django_registration.backends.one_step.urls")),

    path('api-auth/', include("rest_framework.urls")),

    path('api/', include("users.api.urls")),
    path('api/', include("questions.api.urls")),

    path('api/rest-auth/', include("rest_auth.urls")),
    path('api/rest-auth/registration/', include("rest_auth.registration.urls")),

    re_path(r"^.*$", IndexTemplateView.as_view(), name="entry-point")
]
コード例 #4
0
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_registration.backends.one_step.views import RegistrationView
from django.urls import path, include
from accounts import views, forms

urlpatterns = [
    path('admin/', admin.site.urls),

    # route to api for authentication and registration
    path('auth/', include('djoser.urls')),
    path('auth/', include('djoser.urls.jwt')),
    # handle custom user model registration form
    path('',
         RegistrationView.as_view(
             form_class=forms.CustomUserCreationForm,
             template_name='registration.html',
             success_url="login",
         ),
         name="register"),
    path("accounts/", include("django_registration.backends.one_step.urls")),
    path("accounts/", include("django.contrib.auth.urls")),
    path('login/', views.login_view, name='login'),
]
コード例 #5
0
ファイル: urls.py プロジェクト: LewisNjagi/project_prompt
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.contrib import admin
from django.urls import path, include
from django.contrib.auth import views
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django_registration.backends.one_step.views import RegistrationView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('awwards.urls')),
    path('accounts/register/',
         RegistrationView.as_view(success_url='/'),
         name='django_registration_register'),
    path('accounts/', include('django.contrib.auth.urls')),
    path('accounts/', include('django_registration.backends.one_step.urls')),
]
コード例 #6
0
ファイル: urls.py プロジェクト: HannesKimara/awwwards
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.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, include
from django.contrib.auth import views as auth_views
from django_registration.backends.one_step.views import RegistrationView

urlpatterns = [
    path('', include('awwward.urls')),
    path('admin/', admin.site.urls),
    path('accounts/register/',
         RegistrationView.as_view(success_url='/account'),
         name='django_registration_register'),
    path('accounts/login/',
         auth_views.LoginView.as_view(extra_context={'next': '/'}),
         name='django_registration_login'),
    path('accounts/', include('django_registration.backends.one_step.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
]
コード例 #7
0
from django.urls import path, include
from django_registration.backends.one_step.views import RegistrationView
from .forms import PrototypeUserForm

from . import views

urlpatterns = [
    path('', views.index, name='index'),
    path('tasks/', views.TaskListView.as_view(), name='tasks'),
    path('tasks/<int:pk>', views.TaskDetailView.as_view(), name='task-detail'),
    path('guest/', views.enter_as_guest, name='enter-as-guest'),
    path(
        'accounts/register/',
        RegistrationView.as_view(form_class=PrototypeUserForm),
        name='django_registration_register',
    ),
    path('accounts/', include('django_registration.backends.one_step.urls')),
    path('convert/', include('lazysignup.urls')),
    # TODO: только lazy uzer может переходить по convert
    path('tasks/success', views.submit_success, name='task_submit_success'),
    path('tasks/count', views.task_count, name='tasks_count')
    # Костыль. Используется для того, чтобы HTTP-клиент (например, locust) мог получить количество объектов Task
]
コード例 #8
0
"""GymSchedule 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, auth
from django.urls import path, include, re_path
from django_registration.backends.one_step.views import RegistrationView
from users.forms import SiteUserForm
urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/register/', RegistrationView.as_view(form_class= SiteUserForm, success_url='/'
                                                        ),name='django_registration_register'),
    path('accounts/', include("django_registration.backends.one_step.urls")),
    path('accounts/', include("django.contrib.auth.urls")),
    path("api-auth/", include("rest_framework.urls")),
    path("api/", include("users.api.urls")),
    path("api/rest-auth/", include("rest_auth.urls")),
    path("api/", include("schedule.api.urls"))
]
コード例 #9
0
ファイル: urls.py プロジェクト: raymondyegon/neighbourhood
"""hood URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.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, include
from django.contrib.auth import views
from django.conf.urls import url
from rest_framework.authtoken.views import obtain_auth_token
from django_registration.backends.one_step.views import RegistrationView

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'', include('mtaani.urls')),
    url(r'^accounts/register/', RegistrationView.as_view(success_url='/accounts/login'), name='django_registration_register'),
    # url(r'^accounts/', include('django_registration.backends.one_step.urls')),
    url(r'^accounts/', include('django.contrib.auth.urls')),
    # url(r'^logout/$', views.logout, {"next_page": '/'},name='logout')
]
コード例 #10
0
ファイル: urls.py プロジェクト: uoon-dev/toy-quora
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import include, path, re_path

from django_registration.backends.one_step.views import RegistrationView

from core.views import IndexTemplateView
from users.forms import CustomUserForm

urlpatterns = [
    path('admin/', admin.site.urls),
    path("accounts/",
        include("django.contrib.auth.urls")),
    path("accounts/register/",
        RegistrationView.as_view(
            form_class=CustomUserForm,
            success_url="/"), name="django_registration_register"),
    path("api/",
        include("users.api.urls")),
    path("api/",
        include("questions.api.urls")),
    path("api-auth/",
        include("rest_framework.urls")),
    path("api/rest-auth/",
        include("rest_auth.urls")),
    path("api/rest-auth/registration/",
        include("rest_auth.registration.urls")),
    re_path(r"^.*$", IndexTemplateView.as_view(), name="entry-point"),
]
コード例 #11
0
"""regamesite URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.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.auth import views as auth_views
from django.urls import include, path
from django_registration.backends.one_step.views import RegistrationView
from regame.forms import NoEmailUserForm

urlpatterns = [
    path('accounts/register/',
         RegistrationView.as_view(success_url='/', form_class=NoEmailUserForm),
         name='django_registration_register'),
    path('accounts/login/', auth_views.LoginView.as_view(), name='login'),
    path('accounts/logout/', auth_views.LogoutView.as_view(), name='logout'),
    path('', include('regame.urls')),
]
コード例 #12
0
from django.urls import include, path, reverse_lazy
from django_registration.backends.one_step.views import RegistrationView

from .forms import *
from .views import *

urlpatterns = [
    path('profile/', ProfileView.as_view(), name='profile'),
    path(
        'register/',
        RegistrationView.as_view(
            form_class=RegisterForm,
            success_url=reverse_lazy('index'),
        ),
        name='register',
    ),
    path('', include('django_registration.backends.one_step.urls')),
    path('', include('django.contrib.auth.urls')),
]
コード例 #13
0
The `urlpatterns` list routes URLs to views. For more information please see:
    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.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from django_registration.backends.one_step.views import RegistrationView
from MainApp.forms import UserForm


urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('MainApp.urls')),
    path('accounts/register/', RegistrationView.as_view(form_class=UserForm
                      ),name='django_registration_register',),
    path('accounts/', include('django_registration.backends.one_step.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \
              + static(settings.STATIC_URL, document_root=settings.STATICFILES_DIRS)
コード例 #14
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
from django.conf.urls import include

from django_registration.forms import RegistrationFormUniqueEmail
from aero_calculation.forms import MyRegistrationForm
from django_registration.backends.one_step.views import RegistrationView

from aero_calculation.forms import ProjectForm

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('aero_calculation.urls')),
    path('accounts/register/',
         RegistrationView.as_view(form_class=MyRegistrationForm),
         {'form': RegistrationFormUniqueEmail},
         name='django_registration_register'),
    path('accounts/', include('django.contrib.auth.urls')),
    path('accounts/', include('django_registration.backends.one_step.urls')),
]
コード例 #15
0
"""awwards_prj 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 django.conf.urls import include,url
from django_registration.backends.one_step.views import RegistrationView
from django.contrib.auth.views import LogoutView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('',include('awward.urls')),
    path('accounts/register/', RegistrationView.as_view(success_url='/'), name='django_registration_register'),
    path('accounts/', include('django_registration.backends.one_step.urls')),
    path('accounts/',include('django.contrib.auth.urls')),
    path('accounts/logout',LogoutView.as_view(redirect_field_name ='/accounts/login')),
    path('tinymce/', include('tinymce.urls') ),
]
コード例 #16
0
from django.contrib import admin
from django.urls import include, path, re_path
from django.conf.urls.static import static
from django.conf import settings
from django_registration.backends.one_step.views import RegistrationView
from core.views import IndexTemplateView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/', include('django.contrib.auth.urls')),    
    path('accounts/register/', RegistrationView.as_view(
                                success_url='/'),
                                name='django_registration_register'),
    path('api-auth/', include('rest_framework.urls')),
    path('api/', include('users.api.urls')),
    path('api/rest-auth/', include('rest_auth.urls')),
    path('api/rest-auth/registration/', include('rest_auth.registration.urls')),
    path('api/', include('places.api.urls')),    
    re_path(r"^(?!media).*$", IndexTemplateView.as_view(), name="entry-point"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
コード例 #17
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.conf.urls import url
from django.contrib import admin
from django.urls import path, include
from django.views.generic import RedirectView
from django_registration.backends.one_step.views import RegistrationView
from Planner2.views import not_implemented

urlpatterns = [
    path('admin/', admin.site.urls),
    path('tasks/', include('tasks.urls')),
    path('accounts/register/',
         RegistrationView.as_view(),
         name='django_registration_register'),
    path('accounts/', include('django_registration.backends.one_step.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
    path('accounts/', include('accounts.urls')),
    path('', RedirectView.as_view(url='/tasks/', permanent=True)),
    path('not_implemented/', not_implemented, name="not_implemented"),
]

# username: test_user
# pass:     test_password
コード例 #18
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, re_path
from django_registration.backends.one_step.views import RegistrationView
from users.forms import CustomUserForm
from core.views import IndexTemplateView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/register/', RegistrationView.as_view(
        form_class=CustomUserForm,
        success_url='/'
    ), name='django-registration-register'),
    path('accounts/', include('django.contrib.auth.urls')),
    path('accounts/', include('django_registration.backends.one_step.urls')),

    path('api/', include('users.api.urls')),
    path('api/', include('questions.api.urls')),

    path('api-auth/', include('rest_framework.urls')),
    path('api/rest-auth/', include('rest_auth.urls')),
    path('api/rest-auth/registration/', include('rest_auth.registration.urls')),

    re_path('^.*$', IndexTemplateView.as_view(), name='entry-point')
]
コード例 #19
0
ファイル: urls.py プロジェクト: RYAN2540/neighborhood-watch
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.contrib import admin
from django.urls import path, re_path, include
from django_registration.backends.one_step.views import RegistrationView
from django.contrib.auth import views as auth_views
from django.contrib.auth.views import LoginView, LogoutView

urlpatterns = [
    re_path(r'^admin/', admin.site.urls),
    re_path(r'^', include('neighborhoodapp.urls')),
    re_path('^accounts/register/',
            RegistrationView.as_view(success_url='/sendemail'),
            name='django_registration_register'),
    re_path(r'^accounts/',
            include('django_registration.backends.one_step.urls')),
    re_path(r'^accounts/', include('django.contrib.auth.urls')),
    re_path(r'^logout/$', auth_views.LogoutView.as_view()),
]
コード例 #20
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, reverse_lazy
from django.contrib.auth import views
from django_registration.backends.one_step.views import RegistrationView
from django.contrib.auth.views import LoginView
from django.conf import settings
from django.conf.urls.static import static
from rest_framework.authtoken.views import obtain_auth_token

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('award.urls')),
    path('accounts/register/',
         RegistrationView.as_view(success_url=reverse_lazy('newprofile')),
         name='django_registration_register'),
    path('accounts/', include('django_registration.backends.one_step.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
    path('accounts/login',
         LoginView.as_view(redirect_field_name='/', success_url='/'),
         name='login'),
    path('api_token-auth/', obtain_auth_token),
]
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
コード例 #21
0
ファイル: urls.py プロジェクト: valenwin/avision_blog
from django.urls import path
from django_registration.backends.one_step.views import RegistrationView

from .forms import CustomSignUpForm

urlpatterns = [
    path('accounts/signup/', RegistrationView.as_view(
        form_class=CustomSignUpForm,
        success_url='/'
    ), name='django_registration_register'),

]
コード例 #22
0
ファイル: urls.py プロジェクト: Erick-ViBe/ViBeDo
    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, re_path

from django_registration.backends.one_step.views import RegistrationView

from core.views import IndexTemplateView

urlpatterns = [
    path('admin/', admin.site.urls),
    path("accounts/register/",
         RegistrationView.as_view(success_url="/", ),
         name="django_registration_register"),

    # Register and Login via browser
    path('accounts/', include('django_registration.backends.one_step.urls')),

    # Register and Login via browser
    path('accounts/', include('django.contrib.auth.urls')),

    # Login via REST
    path("api/rest-auth/", include("rest_auth.urls")),

    # Registration via REST
    path("api/rest-auth/registration/",
         include("rest_auth.registration.urls")),
    path("api/", include("todos.api.urls")),
コード例 #23
0
ファイル: urls.py プロジェクト: paulmburu08/Merit
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 django.conf.urls import url, include
from django.contrib.auth import views
from django_registration.backends.one_step.views import RegistrationView

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'', include('meritapp.urls')),
    url(r'^tinymce/', include('tinymce.urls')),
    url('^accounts/register/',
        RegistrationView.as_view(success_url='/new/profile'),
        name='django_registration_register'),
    url(r'^accounts/', include('django_registration.backends.one_step.urls')),
    url(r'^accounts/', include('django.contrib.auth.urls')),
    url(r'^logout/$', views.LogoutView.as_view(), {"next_page": '/'}),
]
コード例 #24
0
ファイル: urls.py プロジェクト: mattcc82/django_vue
from django_registration.backends.one_step.views import RegistrationView

from core.views import IndexTemplateView
from users.forms import CustomUserForm

# https://django-registration.readthedocs.io/en/3.0.1/index.html

urlpatterns = [
    # admin urls
    path('admin/', admin.site.urls),

    # django-registration package urls
    # custom model/form for register
    path('accounts/register/',
         RegistrationView.as_view(
             form_class=CustomUserForm,
             template_name='django_registration/registration.html',
             success_url='/'),
         name='django_registration_register'),

    # other urls used by django-registration package
    path('accounts/', include('django_registration.backends.one_step.urls')),

    # login urls provided by django
    path('accounts/', include('django.contrib.auth.urls')),

    # our 'users' api urls
    path('api/', include('users.api.urls')),

    # # our 'questions' api urls
    path('api/', include('questions.api.urls')),
コード例 #25
0
ファイル: urls.py プロジェクト: Taras2907/QuestionTime
    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, re_path
from users.forms import CustomUserForm
from django_registration.backends.one_step.views import RegistrationView
from core.views import IndexTempalteView

urlpatterns = [
    path('admin/', admin.site.urls),

    path("accounts/", include("django.contrib.auth.urls")),

    path("accounts/register/", RegistrationView.as_view(
                                            form_class=CustomUserForm,
                                            success_url='/'),
                                            name='django_registration_register'),

    path("accounts/", include("django_registration.backends.one_step.urls")),

    path("api/", include("users.urls")),

    path("api/", include("questions.api.urls")),

    path("api-auth/", include("rest_framework.urls")),

    path("api/rest-auth/", include("rest_auth.urls")),

    path("api/rest-auth/registration/", include("rest_auth.registration.urls")),
コード例 #26
0
ファイル: urls.py プロジェクト: chentihe/stockEngine
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, re_path
from django_registration.backends.one_step.views import RegistrationView
from core.views import IndexTemplateView
from users.forms import CustomUserForm

urlpatterns = [
    path('admin/', admin.site.urls),

    path('accounts/register/', 
    RegistrationView.as_view(
        form_class=CustomUserForm,
        success_url='/'
    ), name='django_registration_register'),

    path('accounts/',
        include('django_registration.backends.one_step.urls')),

    path('accounts/',
        include('django.contrib.auth.urls')),

    path('api/',
    include('users.api.urls')),

    path('api-auth/',
        include('rest_framework.urls')),

    path('api/rest-auth/',
コード例 #27
0
ファイル: urls.py プロジェクト: nickoralias/question-time
    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 include, path, re_path
from django_registration.backends.one_step.views import RegistrationView

from core.views import IndexTemplateView
from users.forms import CustomUserForm

# https://django-registration.readthedocs.io/en/3.0/activation-workflow.html

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/register/',
         RegistrationView.as_view(
             form_class=CustomUserForm,
             success_url='/',
         ),
         name='django-registration-register'),
    path('accounts/', include('django_registration.backends.one_step.urls')),
    path('accounts/', include('django.contrib.auth.urls')),
    path('api/', include('users.api.urls')),
    path('api/', include('questions.api.urls')),
    path('api-auth/', include('rest_framework.urls')),
    path('api/rest-auth/', include('rest_auth.urls')),
    path('api/rest-auth/registration/',
         include('rest_auth.registration.urls')),
    re_path(r'^.*$', IndexTemplateView.as_view(), name='entry-point')
]
コード例 #28
0
ファイル: urls.py プロジェクト: trialservice/WF-website
from wagtailautocomplete.urls.admin import urlpatterns as autocomplete_admin_urls

from magazine import urls as magazine_urls
from search import views as search_views

from django_registration.backends.one_step.views import RegistrationView
# TODO: Change this line to send verification emails when registering users
# Note: this will require two activation email tempates (subject and body)
# from django_registration.backends.activation.views import RegistrationView
from accounts.forms import CustomUserForm

urlpatterns = [
    url(r"^django-admin/", admin.site.urls),
    url(
        r'^accounts/register/$',
        RegistrationView.as_view(form_class=CustomUserForm),
        name='django_registration_register',
    ),
    path("accounts/", include("django_registration.backends.one_step.urls")),
    path("accounts/", include("django.contrib.auth.urls")),
    url(r"^admin/autocomplete/", include(autocomplete_admin_urls)),
    url(r"^admin/", include(wagtailadmin_urls)),
    path("cart/", include("cart.urls", namespace="cart")),
    path("magazine/", include(magazine_urls), name="magazine"),
    path("orders/", include("orders.urls", namespace="orders")),
    path("payment/", include("payment.urls", namespace="payment")),
    url(r"^documents/", include(wagtaildocs_urls)),
    url(r"^search/$", search_views.search, name="search"),
    # For anything not caught by a more specific rule above, hand over to
    # Wagtail's page serving mechanism. This should be the last pattern in
    # the list:
コード例 #29
0
    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 import views
from django.contrib.auth import views as auth_views
from django_registration.backends.one_step.views import RegistrationView
from rest_framework import routers
from posts.views import ProfileViewSet, UserViewSet, ProfileViewSet
from rest_framework.authtoken.views import obtain_auth_token

router = routers.DefaultRouter()
router.register(r'profiles', ProfileViewSet)
router.register(r'users', UserViewSet)
router.register(r'projects', ProfileViewSet)

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'^', include('posts.urls')),
    url('accounts/register/',
        RegistrationView.as_view(success_url='/accounts/login/'),
        name='django_registration_register'),
    url('accounts/', include('django_registration.backends.one_step.urls')),
    url('accounts/', include('django.contrib.auth.urls')),
    url("logout/", auth_views.LogoutView.as_view()),
    url(r'', include(router.urls)),
    url(r'api-auth/', include('rest_framework.urls',
                              namespace='rest_framework')),
]
コード例 #30
0
from django.contrib.auth.views import LoginView, LogoutView
from django.urls import path, include
from acounts.forms import RegisterForm
from acounts.views import *
from django_registration.backends.one_step.views import RegistrationView

urlpatterns = [
    path('profile/', ProfileView.as_view(), name="profile"),
    path(
        'register/',
        RegistrationView.as_view(
            success_url=reverse_lazy('main'),
            form_class=RegisterForm), name="register"
    ),
    path('', include("django_registration.backends.one_step.urls")),
    path('', include("django.contrib.auth.urls")),
    ]