Ejemplo n.º 1
0
    def listboard_urls(self):
        """Returns url patterns.

        configs = [(listboard_url, listboard_view_class, label), (), ...]
        """
        urlpatterns = [
            re_path(
                f"{self.label}/"
                f"(?P<{self.identifier_label}>{self.identifier_pattern})/"
                r"(?P<page>\d+)/",
                self.view_class.as_view(),
                name=self.url_name,
            ),
            re_path(
                f"{self.label}/" f"(?P<{self.identifier_label}>{self.identifier_pattern})/",
                self.view_class.as_view(),
                name=self.url_name,
            ),
            re_path(
                f"{self.label}" + r"/(?P<page>\d+)/",
                self.view_class.as_view(),
                name=self.url_name,
            ),
            re_path(f"{self.label}/", self.view_class.as_view(), name=self.url_name),
        ]
        return urlpatterns
Ejemplo n.º 2
0
    def urls(self):
        """
        Provides URLconf details for the ``Api`` and all registered
        ``Resources`` beneath it.
        """
        pattern_list = [
            re_path(r"^(?P<api_name>%s)%s$" % (self.api_name, trailing_slash),
                    self.wrap_view('top_level'),
                    name="api_%s_top_level" % self.api_name),
        ]

        for name in sorted(self._registry.keys()):
            self._registry[name].api_name = self.api_name
            pattern_list.append(
                re_path(r"^(?P<api_name>%s)/" % self.api_name,
                        include(self._registry[name].urls)))

        urlpatterns = self.prepend_urls()

        overridden_urls = self.override_urls()
        if overridden_urls:
            warnings.warn(
                "'override_urls' is a deprecated method & will be removed by v1.0.0. Please rename your method to ``prepend_urls``."
            )
            urlpatterns += overridden_urls

        urlpatterns += pattern_list
        return urlpatterns
Ejemplo n.º 3
0
 def prepend_urls(self):
     return [
         # for profile
         re_path(r"^(?P<resource_name>%s)/profile%s$" %
                 (self._meta.resource_name, trailing_slash()),
                 self.wrap_view('download_profile_data'),
                 name="api_download_profile_data"),
         # for trackers
         re_path(r"^(?P<resource_name>%s)/activity%s$" %
                 (self._meta.resource_name, trailing_slash()),
                 self.wrap_view('download_activity_data'),
                 name="api_download_activity_data"),
         # for quiz
         re_path(r"^(?P<resource_name>%s)/quiz%s$" %
                 (self._meta.resource_name, trailing_slash()),
                 self.wrap_view('download_quiz_data'),
                 name="api_download_quiz_data"),
         # for badges
         re_path(r"^(?P<resource_name>%s)/badges%s$" %
                 (self._meta.resource_name, trailing_slash()),
                 self.wrap_view('download_badge_data'),
                 name="api_download_badge_data"),
         # for points
         re_path(r"^(?P<resource_name>%s)/points%s$" %
                 (self._meta.resource_name, trailing_slash()),
                 self.wrap_view('download_points_data'),
                 name="api_download_points_data"),
     ]
Ejemplo n.º 4
0
 def prepend_urls(self):
     return [
         re_path(r"^leaderboard-all/$",
                 self.wrap_view('leaderboard_all'),
                 name="api_leaderboard_all"),
         re_path(r"^leaderboard/$",
                 self.wrap_view('leaderboard'),
                 name="api_leaderboard"),
     ]
Ejemplo n.º 5
0
 def prepend_urls(self):
     return [
         re_path(r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/download%s$" %
                 (self._meta.resource_name, trailing_slash()),
                 self.wrap_view('download_course'),
                 name="api_download_course"),
         re_path(r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)/activity%s$" %
                 (self._meta.resource_name, trailing_slash()),
                 self.wrap_view('download_activity'),
                 name="api_download_activity"),
     ]
Ejemplo n.º 6
0
 def get_urls(self):
     urls = super().get_urls()
     for prefix, router, name in self.routers:
         urls.append(
             re_path(
                 prefix,
                 include((router.urls, settings.VST_PROJECT),
                         namespace=getattr(router, 'router_version_name',
                                           name))))
     for prefix, view, _ in self.custom_urls:
         # can't be tested because this initialization takes place before
         # any test code can be run
         view = view.as_view() if hasattr(view, 'as_view') else view
         urls.append(re_path(f"^{prefix}/$", view))
     return urls
Ejemplo n.º 7
0
 def get_urls(self):
     urls = super().get_urls()
     for prefix, router, name in self.routers:
         urls.append(
             re_path(
                 prefix,
                 include((router.urls, settings.VST_PROJECT),
                         namespace=getattr(router, 'router_version_name',
                                           name))))
     for prefix, view, name in self.custom_urls:
         # can't be tested because this initialization takes place before
         # any test code can be run
         # pylint: disable=cell-var-from-loop
         view = getattr(view, 'as_view', lambda: view)()
         urls.append(re_path(f"^{prefix}/$", view, name=name))
     return urls
Ejemplo n.º 8
0
 def get_urls(self):
     urls = super().get_urls()
     for prefix, view, _ in self.custom_urls:
         # pylint: disable=cell-var-from-loop
         view = getattr(view, 'as_view', lambda: view)()
         urls.append(re_path(f"^{prefix}/$", view))
     return urls
Ejemplo n.º 9
0
 def prepend_urls(self):
     return [
         re_path(r"^(?P<resource_name>%s)/(?P<pk>\w[\w/-]*)%s$" %
                 (self._meta.resource_name, trailing_slash()),
                 self.wrap_view('tag_detail'),
                 name="api_tag_detail"),
     ]
Ejemplo n.º 10
0
 def prepend_urls(self):
     return [
         re_path(r"^(?P<resource_name>%s)/(?P<username>\w[\w/-]*)/$" %
                 (self._meta.resource_name),
                 self.wrap_view('user_course_progress'),
                 name="user_course_progress")
     ]
Ejemplo n.º 11
0
 def dashboard_urls(self):
     """Returns url patterns."""
     urlpatterns = [
         re_path(
             f"{self.label}/"
             f"(?P<{self.identifier_label}>{self.identifier_pattern})/"
             r"(?P<visit_schedule_name>\w+)/"
             r"(?P<schedule_name>\w+)/"
             r"(?P<visit_code>\w+)/"
             r"(?P<unscheduled>\w+)/",
             self.view_class.as_view(),
             name=self.url_name,
         ),
         re_path(
             f"{self.label}/"
             f"(?P<{self.identifier_label}>{self.identifier_pattern})/"
             r"(?P<visit_schedule_name>\w+)/"
             r"(?P<schedule_name>\w+)/"
             r"(?P<visit_code>\w+)/",
             self.view_class.as_view(),
             name=self.url_name,
         ),
         re_path(
             f"{self.label}/"
             f"(?P<{self.identifier_label}>{self.identifier_pattern})/"
             f"(?P<appointment>{UUID_PATTERN.pattern})/"
             r"(?P<scanning>\d)/"
             r"(?P<error>\d)/",
             self.view_class.as_view(),
             name=self.url_name,
         ),
         re_path(
             f"{self.label}/"
             f"(?P<{self.identifier_label}>{self.identifier_pattern})/"
             f"(?P<appointment>{UUID_PATTERN.pattern})/"
             r"(?P<reason>\w+)/",
             self.view_class.as_view(),
             name=self.url_name,
         ),
         re_path(
             f"{self.label}/"
             f"(?P<{self.identifier_label}>{self.identifier_pattern})/"
             f"(?P<appointment>{UUID_PATTERN.pattern})/",
             self.view_class.as_view(),
             name=self.url_name,
         ),
         re_path(
             f"{self.label}/"
             f"(?P<{self.identifier_label}>{self.identifier_pattern})/"
             r"(?P<schedule_name>\w+)/",
             self.view_class.as_view(),
             name=self.url_name,
         ),
         re_path(
             f"{self.label}/" f"(?P<{self.identifier_label}>{self.identifier_pattern})/",
             self.view_class.as_view(),
             name=self.url_name,
         ),
     ]
     return urlpatterns
Ejemplo n.º 12
0
    def listboard_urls(self):
        """Returns url patterns.

        configs = [(listboard_url, listboard_view_class, label), (), ...]
        """
        urlpatterns = [
            re_path(r'^' + f'{self.label}/'
                    f'(?P<{self.identifier_label}>{self.identifier_pattern})/'
                    '(?P<page>\d+)/',
                    self.view_class.as_view(), name=self.url_name),
            re_path(r'^' + f'{self.label}/'
                    f'(?P<{self.identifier_label}>{self.identifier_pattern})/',
                    self.view_class.as_view(), name=self.url_name),
            re_path(r'^' + f'{self.label}/(?P<page>\d+)/',
                    self.view_class.as_view(), name=self.url_name),
            re_path(r'^' + f'{self.label}/',
                    self.view_class.as_view(), name=self.url_name)]
        return urlpatterns
Ejemplo n.º 13
0
 def review_listboard_urls(self):
     url_patterns = [
         re_path(
             f"{self.label}/"
             f"(?P<{self.identifier_label}>{self.identifier_pattern})/"
             f"(?P<appointment>{UUID_PATTERN.pattern})/",
             self.view_class.as_view(),
             name=self.url_name,
         )
     ]
     url_patterns.extend(self.listboard_urls)
     return url_patterns
    def listboard_urls(self):
        """Returns url patterns.

        configs = [(listboard_url, listboard_view_class, label), (), ...]
        """
        urlpatterns = [
            re_path(r'^' + f'{self.label}/'
                    f'(?P<{self.identifier_label}>{self.identifier_pattern})/'
                    '(?P<page>\d+)/',
                    self.view_class.as_view(),
                    name=self.url_name),
            re_path(r'^' + f'{self.label}/'
                    f'(?P<{self.identifier_label}>{self.identifier_pattern})/',
                    self.view_class.as_view(),
                    name=self.url_name),
            re_path(r'^' + f'{self.label}/(?P<page>\d+)/',
                    self.view_class.as_view(),
                    name=self.url_name),
            re_path(r'^' + f'{self.label}/',
                    self.view_class.as_view(),
                    name=self.url_name)
        ]
        return urlpatterns
Ejemplo n.º 15
0
 def dashboard_urls(self):
     """Returns url patterns.
     """
     urlpatterns = [
         re_path(r'^' + f'{self.label}/'
                 f'(?P<{self.identifier_label}>{self.identifier_pattern})/'
                 f'(?P<visit_schedule_name>\w+)/'
                 f'(?P<schedule_name>\w+)/'
                 f'(?P<visit_code>\w+)/'
                 f'(?P<unscheduled>\w+)/',
                 self.view_class.as_view(), name=self.url_name),
         re_path(r'^' + f'{self.label}/'
                 f'(?P<{self.identifier_label}>{self.identifier_pattern})/'
                 f'(?P<appointment>{UUID_PATTERN.pattern})/'
                 f'(?P<scanning>\d)/'
                 f'(?P<error>\d)/',
                 self.view_class.as_view(), name=self.url_name),
         re_path(r'^' + f'{self.label}/'
                 f'(?P<{self.identifier_label}>{self.identifier_pattern})/'
                 f'(?P<appointment>{UUID_PATTERN.pattern})/'
                 f'(?P<reason>\w+)/',
                 self.view_class.as_view(), name=self.url_name),
         re_path(r'^' + f'{self.label}/'
                 f'(?P<{self.identifier_label}>{self.identifier_pattern})/'
                 f'(?P<appointment>{UUID_PATTERN.pattern})/',
                 self.view_class.as_view(), name=self.url_name),
         re_path(r'^' + f'{self.label}/'
                 f'(?P<{self.identifier_label}>{self.identifier_pattern})/'
                 '(?P<schedule_name>\w+)/',
                 self.view_class.as_view(), name=self.url_name),
         re_path(r'^' + f'{self.label}/'
                 f'(?P<{self.identifier_label}>{UUID_PATTERN.pattern})/',
                 self.view_class.as_view(), name=self.url_name),
         re_path(r'^' + f'{self.label}/'
                 f'(?P<{self.identifier_label}>{self.identifier_pattern})/',
                 self.view_class.as_view(), name=self.url_name)]
     return urlpatterns
Ejemplo n.º 16
0
from django.urls.conf import include, re_path

from tastypie.api import Api

from .api.resources import ArticleResource, AuthorProfileResource, SiteResource, UserResource

v1_api = Api()
v1_api.register(ArticleResource())
v1_api.register(AuthorProfileResource())
v1_api.register(SiteResource())
v1_api.register(UserResource())

urlpatterns = [
    re_path(r'^api/', include(v1_api.urls)),
]
Ejemplo n.º 17
0
    *paths_for_urlpatterns("edc_refusal"),
    *paths_for_urlpatterns("edc_registration"),
    *paths_for_urlpatterns("edc_review_dashboard"),
    *paths_for_urlpatterns("edc_subject_dashboard"),
    *paths_for_urlpatterns("edc_visit_schedule"),
    *paths_for_urlpatterns("mocca_ae"),
    *paths_for_urlpatterns("mocca_consent"),
    *paths_for_urlpatterns("mocca_export"),
    *paths_for_urlpatterns("mocca_lists"),
    *paths_for_urlpatterns("mocca_prn"),
    *paths_for_urlpatterns("mocca_screening"),
    *paths_for_urlpatterns("mocca_subject"),
]

if getattr(settings, "DEFENDER_ENABLED", False):
    urlpatterns.append(
        path("defender/", include("defender.urls")),  # defender admin
    )

urlpatterns += [
    path("admin/", admin.site.urls),
    path(
        "switch_sites/",
        LogoutView.as_view(next_page=settings.INDEX_PAGE),
        name="switch_sites_url",
    ),
    path("home/", HomeView.as_view(), name="home_url"),
    re_path(".", RedirectView.as_view(url="/"), name="home_url"),
    re_path("", HomeView.as_view(), name="home_url"),
]
Ejemplo n.º 18
0
from django.urls.conf import re_path
from author_manage.admin import resource_manager
from author_manage.admin import user_manager
from author_manage.views import *

# for security reasons all urls are accessible only for logged in users

app_name = 'author_manage'  # jm

urlpatterns = [

    # entry point to the web site, home page
    path('', HomeView.as_view(), name='home'),

    # pages, accessible only for the admin - for managing resources/users
    re_path(r'^resource-manager/', resource_manager.urls),
    re_path(r'^user-manager/', user_manager.urls),

    # profile page, where the user can change his name/see his current access requests
    # the admin can additionally see his current deletion requests
    re_path(r'^profile/$', ProfileView.as_view(), name='profile'),

    # subpage of the profile page, where the user can see all the resources that he owns
    re_path(r'^profile/my-resources/$',
            MyResourcesView.as_view(),
            name='my-resources'),

    # for every resource that a user owns, he has the option to edit its permissions
    # initially only the users that have ANY permissions about this resource are displayed
    re_path(
        r'^profile/my-resources/(?P<resourceid>\d+)-edit-users-permissions/$',
Ejemplo n.º 19
0
from django.urls.conf import re_path
from . import views

urlpatterns = [
    re_path('', views.setcook),
    re_path('', views.getcook),
]
Ejemplo n.º 20
0
from django.urls.conf import path, re_path
from .views import *

urlpatterns = [
    path('', order),
    path('order_handle/', order_handle),
    re_path(r'^pay_(\d+)/$', pay),
]
Ejemplo n.º 21
0
                                                   ])(views.LevelViewSet)))
router.register(
    r'workflow_webservice',
    authentication_classes([])(permission_classes([AllowAny
                                                   ])(views.WorkflowViewSet)))
router.register(
    r'workflowrouting_webservice',
    authentication_classes([])(permission_classes([AllowAny])(
        views.WorkflowRoutingViewSet)))

urlpatterns = [
    path('auth/code/', obtain_code_token),
    path('auth/login/', obtain_auth_token),
    path('auth/refresh-token/', refresh_auth_token),
    re_path('currency/ofcountry/(?P<country_id>.+)/$',
            views.tbl_currency_mst_view.as_view(
                {'get': 'list'})),  #Using only one viewset pass country_id
    re_path('master/oftype/(?P<master_type>.+)/$',
            views.MasterViewSet.as_view(
                {'get': 'list'})),  #Using only one viewset pass country_id
    re_path('getchannel/', views.tbl_channel_mst_view.as_view(
        {'get': 'list'})),  #Using only one viewset pass country_id
    re_path('getapplication/',
            views.tbl_service_asset_mst_view.as_view({'get': 'list'})),
    re_path('getLocation/',
            views.tbl_location_mst_view.as_view({'get': 'list'})),
    re_path('getemployee/',
            views.tbl_employee_mst_view.as_view({'get': 'list'})),
    re_path('getcompany/', views.tbl_company_mst_view.as_view({'get':
                                                               'list'})),
    re_path('getcompany-priority-link/',
Ejemplo n.º 22
0
from django.conf.urls.static import static
from django.urls import path
from django.urls.conf import re_path
from . import views
from django.conf import settings

urlpatterns = [
    re_path('^.*$', views.index),
]
Ejemplo n.º 23
0
    path("change_profile_pic",
         views.change_profile_picture,
         name="change_profile_picture"),
    path('', views.home_view, name='home'),
    path('login/',
         auth_views.LoginView.as_view(template_name="accounts/login.html"),
         name='user_login'),  # template_name="accounts/login.html",
    path('register_success/',
         views.successful_registration_view,
         name='registersucess'),
    path('register/', views.registration_view, name='signup'),
    path('logout/',
         auth_views.LogoutView.as_view(template_name="accounts/logout.html"),
         name='logout'),
    path('profile/', views.profile_view, name='view_profile'),
    path('people/', views.people_view, name='view_people'),
    path("social/follow/<ID>", views.follow_user, name="follow_user"),
    path("social/unfollow/<ID>", views.unfollow_user, name="unfollow_user"),
    path('users/<username>', views.friend_profile_view, name='view_friend'),
    path('profile/edit', views.edit_profile_view, name='edit_profile'),
    re_path('profile/(?P<pk>\d+)/edit_details',
            EditUserProfileView.as_view(),
            name='EditDetails'),
    path('change-password/',
         views.change_password_view,
         name='change_password'),
    path('profile/addskill/', views.add_skill_view, name='addskill'),
    path('profile/delete_skill/<ID>', views.delete_skill, name='deleteskill'),
    path("chat/", include("nspmessage.urls")),
]
Ejemplo n.º 24
0
from django.urls.conf import path, include, re_path
from .views import *

urlpatterns = [
    path('register/', register),
    path('register_handle/', register_handle),
    path('register_exit/', register_exit),
    path('login/', login),
    path('login_handle/', login_handle),
    path('info/', info),
    path('order/', order),
    path('site/', site),
    path('logout/', logout),
    re_path(r'^user_center_order&(\d+)/$', user_center_order)
]
Ejemplo n.º 25
0
from django.urls.conf import path, re_path

from .admin_site import edc_visit_schedule_admin
from .views import HomeView

app_name = 'edc_visit_schedule'

urlpatterns = [
    path('admin/', edc_visit_schedule_admin.urls),
    re_path(r'(?P<visit_schedule>[0-9A-Za-z_]+)/'
            '(?P<schedule>^[0-9A-Za-z_]+$)/(?P<visit_code>^[0-9]+$)/',
            HomeView.as_view(), name='home_url'),
    re_path(r'(?P<visit_schedule>[0-9A-Za-z_]+)/(?P<schedule>^[0-9A-Za-z_]+$)/',
            HomeView.as_view(), name='home_url'),
    re_path(r'(?P<visit_schedule>[0-9A-Za-z_]+)/',
            HomeView.as_view(), name='home_url'),
    path(r'', HomeView.as_view(), name='home_url'),
]
Ejemplo n.º 26
0
    path('change_email/',
         views.change_current_user_email_request,
         name='change-current-user-email'),
    path('change_email_confirm/<id>/',
         views.change_email_confirm,
         name='change-email-confirm'),
    path('profile/<int:pk>/',
         views.UserProfileView.as_view(),
         name='user-profile'),
    path('subscription/<int:pk>/add_family_member/',
         views.AddFamilyMemberView.as_view(),
         name='add-family-member'),
    path('subscription/<int:pk>/remove_family_member/',
         views.RemoveFamilyMemberView.as_view(),
         name='remove-family-member'),
    path('user/<int:pk>/purchase_subscription/',
         views.PurchaseSubscriptionView.as_view(),
         name='purchase-subscription'),
    path('directory/csv/',
         views.AllUsersSpreadsheetView.as_view(),
         name='all-users-csv'),
    path('directory/',
         views.MembershipSecretaryView.as_view(),
         name='membership-secretary'),
    path('add_user/', views.AddUserView.as_view(), name='add-user'),
    path('stripe_webhook/', views.stripe_webhook_view),
    path('<int:pk>/', views.UserAccountView.as_view(), name='user-account'),
    re_path('^$', views.current_user_account_view,
            name='current-user-account'),
]
Ejemplo n.º 27
0
admin.autodiscover()

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', indexPage.as_view(), name = 'index'),
    path('hdnytorv', hdnytorv.as_view(), name='hdnytorv'),
    path('hd2900', views.hd2900.as_view(), name='hd2900'),
    path('hd2900_takeaway_webshop', hd2900_webshop_Main.as_view(), name="hd2900_takeaway_webshop"),
    path('check-address-for-deliverable', AddressCheckForDeliverability.as_view()),
    path('changeItemQuantityInBasket', ChangeItemQuantity.as_view()),
    path('getTakeawayClosingOrderTime', lastPickupDeliveryOrderTime.as_view()),
    path('isPriceAboveDeliveryLimit', totalPriceDeliveryPossible.as_view()),
    path('hdbynight', views.hdbynight.as_view(), name='hdbynight'),
    path('takeawayCheckout', TakeawayCheckout.as_view()),
    path('deliveryFormCheckout', DeliveryForm.as_view()),
    path('pickupFormCheckout', PickUpForm.as_view()),
    path('local_delivery_checkout_is_address_deliverable', localDeliveryCheckoutAddressCheck.as_view()),
    path('process_pickup_or_delivery_form', deliveryPickupFormProcess.as_view()),
    path('localDeliveryPayment', Payment.as_view(), name = 'localDeliveryPayment'),
    path('getPaymentId', getPaymentId.as_view()),
    path('paymentComplete', PaymentComplete.as_view(), name = 'paymentComplete'),
    path('paymentNotification', paymentNotificationWebhook),
    path('verifyPayment', paymentVerificationStaticPage.as_view(), name = 'verifyPayment'),
    path('backendPaymentVerification', backendPaymentVerification.as_view()),
    re_path(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}), 
] 

#When in production medida url must always be added to urlpatterns
#if settings.DEBUG:
#urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Ejemplo n.º 28
0
from django.urls import path
from Profile.views import ViewFriendRequest, ViewFriendRequestState, ViewProfile
from django.urls.conf import re_path
#from django.urls.conf import re_path

app_name = 'profile'

urlpatterns = [
    # path('<int:pk>/', ViewProfile.as_view(), name='profile'),
    re_path(r'^$|(?P<id>\d+)', ViewProfile.as_view(), name='profile'),
    path('friend_request/', ViewFriendRequest.as_view(),
         name='friend-request'),
    path('friend_request_list/',
         ViewFriendRequestState.as_view(),
         name='friend-request-list'),
]
Ejemplo n.º 29
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'))
"""

# Uncomment next two lines to enable admin:
#from django.contrib import admin
#from django.urls import path

from django.urls.conf import include, re_path
import MyApp1.views

urlpatterns = [
    # Uncomment the next line to enable the admin:
    #path('admin/', admin.site.urls)
    re_path(r'^$', MyApp1.views.index, name='index'),
    re_path(r'^home$', MyApp1.views.index, name='home'),
    re_path(r'^about$', MyApp1.views.about, name='about'),
]
Ejemplo n.º 30
0
"""
from django.contrib import admin
from django.urls import include, path
from django.urls.conf import re_path
from django.views.defaults import page_not_found

from ladder.models import Lockdown
from smashLadder import views, settings

urlpatterns = []

# Verificar lockdown de seasons
try:
    if Lockdown.sistema_em_lockdown():
        urlpatterns.append(
            re_path(r'.*?', page_not_found,
                    {'exception': Exception('Gerando nova Season')}))
except:
    pass

urlpatterns.extend([
    path('admin/', admin.site.urls),
    path('contas/', include('django.contrib.auth.urls')),
    path('', views.home, name='inicio'),
    path('jogadores/', include('jogadores.urls.urls_jogadores')),
    path('ladder/', include('ladder.urls')),
    path('personagens/', include('jogadores.urls.urls_personagens')),
    path('stages/', include('jogadores.urls.urls_stages')),
    path('torneios/', include('torneios.urls')),
    path('treinamento/', include('treinamento.urls')),
])
Ejemplo n.º 31
0
from drf_yasg import openapi

from django.views.generic.base import TemplateView

schema_view = get_schema_view(
   openapi.Info(
      title="Snippets API",
      default_version='v1',
      description="Test description",
      terms_of_service="https://www.google.com/policies/terms/",
      contact=openapi.Contact(email="*****@*****.**"),
      license=openapi.License(name="BSD License"),
   ),
   public=True,
   permission_classes=(permissions.IsAuthenticatedOrReadOnly, ),
   authentication_classes=(authentication.TokenAuthentication, ),
)

urlpatterns = [
    path('', TemplateView.as_view(template_name='index.html'), name='index'),
    path('admin/', admin.site.urls),
    path('api/', include('api.urls')),

    re_path('docs(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'),
    path('docs/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
    path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
]

if bool(settings.DEBUG):
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Ejemplo n.º 32
0
Archivo: urls.py Proyecto: tash149/NSP
      views.SuccesfullRegistrationView,
      name='registersucess'),
 path('register/', views.RegistrationView, name='signup'),
 path('logout/',
      logout, {'template_name': 'accounts/logout.html'},
      name='logout'),
 path('profile/', views.ProfileView, name='view_profile'),
 path('people/', views.PeopleView, name='view_people'),
 path("social/follow/<ID>", views.followUser, name="followUser"),
 path("social/unfollow/<ID>", views.unfollowUser, name="unfollowUser"),
 path('users/<username>', views.FriendProfileView, name='view_friend'),
 path('profile/skills', views.SkillsView, name='skills'),
 path('about/', views.AboutView, name='about'),
 path('profile/edit', views.EditProfileView, name='edit_profile'),
 re_path('profile/(?P<pk>\d+)/edit_details',
         EditUserProfileView.as_view(),
         name='EditDetails'),
 path('change-password/', views.ChangePasswordView, name='change_password'),
 path('reset-password/', password_reset, name='reset_password'),
 path('reset-password/done/',
      password_reset_done,
      name='password_reset_done'),
 re_path('reset-password/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/',
         password_reset_confirm,
         name='password_reset_confirm'),
 path('reset-password/complete/',
      password_reset_complete,
      name='password_reset_complete'),
 path('profile/addskill/', views.AddSkillView, name='addskill'),
 path('profile/deleteskill/<ID>', views.deleteSkill, name='deleteskill'),
 path('developers/', views.DevelopersView, name='developers'),
Ejemplo n.º 33
0
from .views import (
    HomeView, RequisitionListboardView, AliquotListboardView,
    ResultListboardView, ReceiveView, ProcessView,
    ManifestListboardView, ReceiveListboardView, PackListboardView,
    ManageBoxListboardView, VerifyBoxListboardView, ManageBoxItemView,
    VerifyBoxItemView, ProcessListboardView, PackView, ManageManifestView,
    ManageManifestListboardView, ManifestView, AliquotView, RequisitionView)


app_name = 'edc_lab_dashboard'

urlpatterns = [
    # listboard urls
    re_path('listboard/requisition/(?P<page>[0-9]+)/$',
            RequisitionListboardView.as_view(),
            name='requisition_listboard_url'),
    path('listboard/requisition/', RequisitionListboardView.as_view(),
         name='requisition_listboard_url'),

    re_path('listboard/receive/(?P<page>[0-9]+)/$', ReceiveListboardView.as_view(),
            name='receive_listboard_url'),
    path('listboard/receive/', ReceiveListboardView.as_view(),
         name='receive_listboard_url'),

    re_path('listboard/process/(?P<page>[0-9]+)/$', ProcessListboardView.as_view(),
            name='process_listboard_url'),
    path('listboard/process/', ProcessListboardView.as_view(),
         name='process_listboard_url'),

    re_path('listboard/pack/(?P<page>[0-9]+)/$', PackListboardView.as_view(),