Beispiel #1
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 import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views

from accounts.views import (Login, Logout, Register)

urlpatterns = [
    url(r"^login/", Login.as_view(), name="login"),
    url(r"^logout/$", Logout.as_view(), name="logout"),
    url(r"^register/$", Register.as_view(), name="register"),
    url(r"^account/", include("accounts.urls")),
    url(r"^admin/", admin.site.urls),
    url(r"^author/", include("authors.urls")),
    url(r"^cabinet/", include("cabinets.urls")),
    url(r"^comments/", include("comments.urls")),
    url(r"^moderator/", include("moderator.urls")),
    # password reset
    url(r'^password_reset/$',
        auth_views.password_reset, {
            'template_name': 'accounts/password_reset_form.html',
            'html_email_template_name': 'accounts/password_reset_email.html',
            'subject_template_name': 'accounts/password_reset_subject.txt'
        },
        name='password_reset'),
Beispiel #2
0
            DisabledView.as_view(),
        ),
    ]
else:
    urlpatterns = [
        url(r"^admin/", include(admin.site.urls)),
        # fae2 specific
        url(r"^", include("reports.urls")),
        url(r"^abouts/", include("abouts.urls")),
        url(r"^contact/", include("contact.urls")),
        url(r"^account/", include("accounts.urls")),
        url(r"^subscription/", include("subscriptions.urls")),
        url(r"^rulesets/", include("rulesets.urls")),
        url(r"^usage/", include("stats.urls")),
    ]

    if SHIBBOLETH_ENABLED:
        urlpatterns += [
            url(r"^login/$", ShibbolethLogin.as_view(), name="login"),
            url(r"^logout/$", ShibbolethLogout.as_view(), name="logout"),
            url(r"^shib-discovery/$", ShibbolethDiscovery.as_view(), name="shib_discovery"),
            url(r"^header-info/$", HeaderInfo.as_view(), name="header_info"),  # debug information
        ]
    else:
        urlpatterns += [
            url(r"^accounts/", include("registration.backends.hmac.urls")),
            url(r"^registration/", include("django.contrib.auth.urls")),
            url(r"^logout/$", Logout.as_view(), name="logout"),
            url(r"^reset/", include("password_reset.urls")),
        ]
Beispiel #3
0
from django.conf.urls import url
from django.urls import path

from accounts.views import Login, Logout

app_name = 'accounts'
urlpatterns = [
    #    path('signup/', Signup.as_view(), name='signup'),
    path('login/', Login.as_view(), name='login'),
    path('logout/', Logout.as_view(), name='logout'),

    #   path('employee_list/', EmployeeList.as_view(), name='employee_list'),
    #url(r'employee_detail/(?P<employee_id>[0-9]+)/$', EmployeeDetail.as_view(), name='employee_detail'),
    # path('employee_add/', EmployeeAdd.as_view(), name='employee_add'),
    #path('employee_edit/', EmployeeEdit.as_view(), name='employee_edit'),
    #path('employee_remove/', EmployeeRemove.as_view(), name='employee_remove'),
    #path('api/', getApi.as_view(), name='api'),
]
Beispiel #4
0
        # fae2 specific
        url(r'^', include('reports.urls')),
        url(r'^abouts/', include('abouts.urls')),
        url(r'^contact/', include('contact.urls')),
        url(r'^account/', include('accounts.urls')),
        url(r'^subscription/', include('subscriptions.urls')),
        url(r'^rulesets/', include('rulesets.urls')),
        url(r'^usage/', include('stats.urls')),
    ]

    if SHIBBOLETH_ENABLED:
        urlpatterns += [
            url(r'^login/$', ShibbolethLogin.as_view(), name='login'),
            url(r'^logout/$', ShibbolethLogout.as_view(), name='logout'),
            url(r'^shib-discovery/$',
                ShibbolethDiscovery.as_view(),
                name='shib_discovery'),
            url(r'^inst/(?P<domain>\w+)/$',
                ShibbolethInstitution.as_view(),
                name='shib_institution'),
            url(r'^header-info/$', HeaderInfo.as_view(),
                name='header_info'),  # debug information
        ]
    else:
        urlpatterns += [
            url(r'^accounts/', include('registration.backends.hmac.urls')),
            url(r'^registration/', include('django.contrib.auth.urls')),
            url(r'^logout/$', Logout.as_view(), name='logout'),
            url(r'^reset/', include('password_reset.urls')),
        ]
Beispiel #5
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin

from reports import views

from accounts.views import Logout

urlpatterns = [
    url(r'^admin/',   include(admin.site.urls)),
    url(r'^registration/', include('django.contrib.auth.urls')),
    url(r'^logout/$', Logout.as_view(), name='logout'),
    # fae2 specific 
    url(r'^',           include('reports.urls')),
    url(r'^abouts/',    include('abouts.urls')),
    url(r'^accounts/',  include('accounts.urls')),
    url(r'^rulesets/',  include('rulesets.urls')),
]
Beispiel #6
0
from django.conf.urls import url
from django.urls import path
from rest_framework_mongoengine import routers

from accounts.views import AuthToken, Logout, CreateUser, UpdateUser

router = routers.DefaultRouter()

urlpatterns = [
    url(r'^login$', AuthToken.as_view()),
    url(r'^logout$', Logout.as_view()),
    url(r'^users/signup$', CreateUser.as_view()),
    # ?P<username> is a part of url but will be accepted as a url parameter
    url(r'^users/(?P<username>\w+)$', UpdateUser.as_view()) 
    #url(r'users/', UpdateUser.as_view())
]

urlpatterns += router.urls
from django.conf.urls import patterns, include, url
from django.contrib import admin
from accounts.views import Index, Login, Signup, Contact, Logout

urlpatterns = patterns(
	"",
	url(r'^$', Index.as_view(), name="home"),
	url(r'^login/$', Login.as_view(), name="login"),
	url(r'^signup/$', Signup.as_view(), name="signup"),
	url(r'^contact/$', Contact.as_view(), name="contact"),
	url(r'^logout/$', Logout.as_view(), name="logout"),

	)

Beispiel #8
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 donation.views import LandingPage,AddDonation, FormConfirmationView, ArchiveDonation, SingleDonation
from accounts.views import Login, Logout, Register, ProfileView, ChangePassword, EditProfile

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', LandingPage.as_view(), name="url_landing_page"),
    path('add/', AddDonation.as_view(), name="url_add_donation"),
    path('login/', Login.as_view(), name="url_login"),
    path('logout/', Logout.as_view(), name="url_logout"),
    path('register/', Register.as_view(), name="url_register"),
    path('accounts/', include("django.contrib.auth.urls")),
    path('profile/', ProfileView.as_view(), name="url_profile"),
    path('add/confirmation/', FormConfirmationView.as_view(), name="url_confirmation"),
    path('profile/change/', ChangePassword.as_view(), name="url_change"),
    path('profile/edit/', EditProfile.as_view(), name="url_edit"),
    path('archive-donations/<int:donation_id>/', ArchiveDonation.as_view(), name="url_archive"),
    path('donation/<int:pk>/', SingleDonation.as_view(), name="url_donation"),
]
Beispiel #9
0
from django.urls import path, include
from django.conf.urls import url
from .router import router
import meetings 
#from rest_framework_jwt.views import obtain_jwt_token
from django.views.static import serve
from django.conf import settings
from accounts.views import Logout,MyTokenObtainPairView,ForgetPasswordView,ChangePasswordView
from rest_framework_simplejwt import views as jwt_views



urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include(router.urls)),
    path('meetings/', include('meetings.urls')),
    #path('paid_user/',UserViewSetPaid.as_view()),
    #path('login/',obtain_jwt_token),
    path('chat/', include('chat.api.urls', namespace='chat')),
    url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT,}),
    #path('paid_user/',UserViewSetPaid.as_view())
    path('logout/' ,Logout.as_view()),
    path('login/' , MyTokenObtainPairView.as_view()),
    path('api/token/refresh/', jwt_views.TokenRefreshView.as_view(), name='token_refresh'),
    path('forgetpassword/' ,ForgetPasswordView.as_view()),
    path('api/token/verify/', jwt_views.TokenVerifyView.as_view(), name='token_verify'),
    path('changePassword/v1/',ChangePasswordView.as_view())


]
Beispiel #10
0
    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 rest_framework.authtoken.views import obtain_auth_token

from accounts.views import Logout


api_urlpatterns = [
    path('', include('info_sources.urls'))
]

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include(api_urlpatterns)),
    path('api/auth/api-token-auth/', obtain_auth_token),
    path('api/auth/logout/', Logout.as_view(), name='logout'),
]
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.views.decorators.csrf import csrf_exempt

from accounts.views import login, Logout
from accounts.v1.user_profile import NickNameValidation, UserProfileDetails, UserProfileList, ChangePassword
from accounts.v1.signup import Signup
from accounts.v1.forget_password import ForgetPassword, PasswordResetViaOTP

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
    url(r'^v1/login/$', csrf_exempt(login)),
    url(r'^v1/logout/$', csrf_exempt(Logout.as_view())),
    url(r'^v1/nick-name/availability/$', csrf_exempt(NickNameValidation.as_view())),
    url(r'^v1/signup/$', csrf_exempt(Signup.as_view())),

    # user profile update
    url(r'^v1/profile/$', csrf_exempt(UserProfileDetails.as_view())),
    url(r'^v1/user-list/$', csrf_exempt(UserProfileList.as_view())),
    url(r'^v1/change-password/$', csrf_exempt(ChangePassword.as_view())),

    # Forget Password
    url(r'^v1/forget/password/$', csrf_exempt(ForgetPassword.as_view())),
    url(r'^v1/set/password/$', csrf_exempt(PasswordResetViaOTP)),
]