from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.auth.decorators import login_required from auth.views import LandingView from core.views import AboutView, HomeView, PostView admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), # #CAS url(r'^accounts/login/$', 'cas.views.login', name='login'), url(r'^accounts/logout/$', 'cas.views.logout', name='logout'), #OTHER LOGIN # url(r'^alt_login/$','auth.views.alt_login', name='alt_login'), #APP url(r'^$', LandingView.as_view(), name='login'), url(r'^home/?$', login_required(HomeView.as_view()), name='home'), url(r'^about/?$', AboutView.as_view(), name='about'), #post urls url(r'^posts/new/?$', login_required(PostView.as_view()), name='post_view'), url(r'^posts/(?P<post_id>\d+)/?$', login_required(PostView.as_view()), name='post_view') )
from django.urls import path from core.views import (HomeView, ShopView, ProductDetail, OrderSummaryView, add_to_cart) app_name = "core" urlpatterns = [ path("", HomeView.as_view(), name="index"), path("shop", ShopView.as_view(), name="shop"), path("products/<slug:slug>", ProductDetail.as_view(), name="product"), path("add-to-cart/<slug:slug>/", add_to_cart, name="add_to_cart"), path("oder-summary/", OrderSummaryView.as_view(), name="order_summary"), ]
from django.contrib import admin from django.urls import path, include from django.views.generic import TemplateView, RedirectView from material.frontend.urls import modules from core.views import HomeView from users.views import UserLookupLoginView from django.views import defaults as default_views def home_redirect(request): return redirect("http://127.0.0.1") urlpatterns = [ path("django_plotly_dash/", include("django_plotly_dash.urls")), url(r"^$", HomeView.as_view(template_name="pages/home.html"), name="home"), url(r"^", include("allauth_2fa.urls")), url( r"^favicon\.ico$", RedirectView.as_view(url=settings.STATIC_URL + "images/favicon.png", permanent=True), ), url(r"^wp-content/*", home_redirect), url( r"^about/$", TemplateView.as_view(template_name="pages/about.html"), name="about", ), url(r"^help/$", TemplateView.as_view(template_name="pages/help.html"), name="help"),
"""ptaDjango 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 from core.views import HomeView urlpatterns = [ path('admin/', admin.site.urls), path('',HomeView.as_view(),name="base"), ]
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 from core.views import HomeView, PatientView from patients.views import current_datetime, HomepageView from check.views import PatientTemperatureView from products.views import ProductView urlpatterns = [ path("", HomeView.as_view(), name="dashboard"), path("patient/", PatientView.as_view(), name="patient"), path("product/", ProductView.as_view(), name="product"), path('admin/', admin.site.urls), path("simple/", current_datetime), path("home-old", HomepageView.as_view()), path("temperature/", PatientTemperatureView.as_view()), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # https://docs.djangoproject.com/en/3.0/howto/static-files/
from django.urls import path from core.views import HomeView app_name = "core" urlpatterns = [path('', HomeView.as_view(), name="home")]
from django.contrib import admin from django.urls import path, include from django.contrib.auth.decorators import login_required from core.views import ( HomeView, ) urlpatterns = [ path('feed/', login_required(HomeView.as_view()), name='home_feed_view'), ]
from django.conf.urls import url from core.views import CadastroView from core.views import LoginView from core.views import HomeView urlpatterns = [ url(r'^cadastro/$', CadastroView.as_view(), name='cadastro'), url(r'^login/$', LoginView.as_view(), name='login'), url(r'^$', HomeView.as_view(), name='home'), ]
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.urls import url from django.contrib import admin from core.views import HomeView from core.views import about from core.views import LoginView from core.views import profile from core.views import logout from core.views import AlunoDetailView from core.views import AlunoListView urlpatterns = [ url(r'^home$', HomeView.as_view() ), url(r'^admin/', admin.site.urls), url(r'^about$', about ), url(r'^login$', LoginView.as_view() ), url(r'^profile$', profile ), url(r'^logout$', logout, name='logout' ), url(r'^aluno/(?P<pk>\d+)$',AlunoDetailView.as_view(), name='aluno-detail'), url(r'^alunos$', AlunoListView.as_view()), ]
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from core.views import ItemDetailView, CheckoutView, HomeView, add_to_cart, remove_from_cart, OrderSummaryView, remove_single_item_from_cart, PaymentView, final_checkout #search_products, from dispatch import receiver # from django.views.decorators.csrf import csrf_exempt urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name='home_page'), path('checkout/', CheckoutView.as_view(), name='checkout'), path('add-to-cart/<slug>', add_to_cart, name='add-to-cart'), path('remove-from-cart/<slug>', remove_from_cart, name='remove-from-cart'), path('products/<slug>/', ItemDetailView.as_view(), name='product_page'), path('order-summary', OrderSummaryView.as_view(), name='order_summary'), path('remove-single-item-from-cart/<slug>', remove_single_item_from_cart, name='remove_single_item_from_cart'), path('accounts/', include('allauth.urls')), path('verify/<int:id>', PaymentView.as_view(), name='verify_payment'), path('final-checkout/', final_checkout, name='f_checkout'), # path('search-products/', csrf_exempt(search_products), name='search-products'), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
HomeView, MaintenanceView, ReportView, ReportThanksView, TestView, ) # noqa: E402 MAINTENANCE_MODE = getattr(settings, "MAINTENANCE_MODE", False) if MAINTENANCE_MODE: urlpatterns = [ re_path(r".*", MaintenanceView.as_view(), name="maintenance_view"), ] else: urlpatterns = [ re_path(r"^$", HomeView.as_view(), name="home"), re_path(r"^leaflets/", include("leaflets.urls")), re_path(r"^parties/", include("parties.urls")), re_path(r"^person/", include("people.urls")), re_path(r"^constituencies/", include("constituencies.urls")), re_path(r"^analysis/", include("analysis.urls")), re_path(r"^api/", include("api.urls")), # Feeds re_path(r"^feeds/latest/$", feeds.LatestLeafletsFeed(), name="latest_feed"), re_path( r"^feeds/constituency/(?P<cons_slug>[\w_\-\.]+)/$", feeds.ConstituencyFeed(), name="constituency_feed", ),
from django.urls import path from core.views import HomeView urlpatterns = [ path('', HomeView.as_view(extra_context={'home': 'active'}), name='home') ]
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/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. 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.contrib import admin from core.views import HomeView urlpatterns = [ url(r'^polls/', include('polls.urls')), url(r'^admin/', admin.site.urls), url(r'^$', HomeView.as_view()), ]
"""isobar URL Configuration 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 core.views import HomeView, Articles, ArticleDetail, cool_view urlpatterns = [ url(r'^cool-view$', cool_view), url(r'^$', HomeView.as_view()), url(r'^articles/$', Articles.as_view()), url(r'^articles/(?P<pk>[0-9]+)/$', ArticleDetail.as_view()), url(r'^admin/', include(admin.site.urls)), ]
from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required from django.contrib import admin admin.autodiscover() from core.views import HomeView, CourseIndexView, CourseCreateView, ActivityCreateIndexView, LessonCreateView, LessonAddView from discussions.views import DiscussionCreateView, DiscussionDetailView from essays.views import EssayCreateView, EssayDetailView urlpatterns = patterns('', url(r'^$', 'core.views.login_view', name='login'), url(r'^home/$', login_required(HomeView.as_view()), name='home'), url(r'^course/(?P<pk>\d+)$', CourseIndexView.as_view(), name='course'), # url(r'^lesson/(?P<pk>\d+)$', LessonIndexView.as_view(), name='lesson'), url(r'^course/add/$', CourseCreateView.as_view(), name='create_collection'), url(r'^lesson/add/(?P<addpk>\d+)$', LessonCreateView.as_view(), name='create_lesson'), url(r'^lesson/add2/(?P<addpk>\d+)$', LessonAddView.as_view(), name='add_lesson'), url(r'^activity/add/(?P<pk>\d+)$', ActivityCreateIndexView.as_view(), name='create_activity'), url(r'^discussion/(?P<pk>\d+)$', DiscussionDetailView.as_view(), name='discussion'), url(r'^discussion/add/(?P<pk>\d+)$', DiscussionCreateView.as_view(), name='create_discussion'), url(r'^essay/(?P<pk>\d+)$', EssayDetailView.as_view(), name='essay'), url(r'^essay/add/(?P<pk>\d+)$', EssayCreateView.as_view(), name='create_essay'), url(r'^overdub/(?P<pk>\d+)$', 'overdub_discussions.views.overdub_detail_view', name='overdub'), url(r'^admin/', include(admin.site.urls)), )
router.register(r'certification_process', CertificationProcessViewSet, base_name='certification_process') router.register(r'evaluation', EvaluationViewSet, base_name='evaluation') router.register(r'certificate_template', CertificateTemplateViewSet, base_name='certificate_template') router.register(r'certificate_template_images', CertificateTemplateImageViewSet, base_name='certificate_template_images') router.register(r'states', StateViewSet, base_name='test') router.register(r'cities', CityViewSet, base_name='test2') urlpatterns = patterns( '', url(r'^$', HomeView.as_view(), name='home_view'), url(r'^courses', CoursesView.as_view(), name='courses'), # Uncomment the next line to enable the admin: url(r'^django/admin/doc/', include('django.contrib.admindocs.urls')), url(r'^django/admin/', include(django_admin.site.urls)), # Privileged browsing url(r'^admin/', include('administration.urls')), # Public browsing url(r'^my-courses/$', UserCoursesView.as_view(), name='user_courses'), url(r'^emit_recipt/(?P<course_id>[-a-zA-Z0-9_]+)$', EmitReceiptView.as_view(), name='emit_recipt'), url(r'^request_certificate/(?P<course_id>[-a-zA-Z0-9_]+)$',
"""sb_admin 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 include, path from core.views import HomeView urlpatterns = [ path('', HomeView.as_view(), name='Dashboard'), path('example/', include('example.urls', namespace='example-butoons')), path('admin/', admin.site.urls), ]
"""MagazOleney URL Configuration 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.contrib import admin from django.urls import path from core.views import HomeView urlpatterns = [path('', HomeView.as_view()), path('admin/', admin.site.urls)]
"""ptaDjango 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')) """ # URL django: onde são configuradas as rotas de URL (é definido que classe de view vai ser chamada quando uma URL é digitada no navegador) # Seção de importação de classes from django.contrib import admin from django.urls import path from core.views import HomeView # Lista de URLS urlpatterns = [ path('admin/', admin.site.urls), # URL do admin path('', HomeView.as_view(), name = 'base'), # URL base. Nela será chamada a classe da view Home ]
url(r'^access-forbidden/$', AccessForbiddenView.as_view(), name='access_forbidden'), # Email handling url(r'^ggv/(?P<crs_slug>[-\w]+)/email-question/worksheet/(?P<i>\d+)/(?P<j>\d+)/$', SendEmailWorksheetQuestionToInstructorsView.as_view(), name='email_instructor_question'), url(r'^ggv/(?P<crs_slug>[-\w]+)/email-error/worksheet/(?P<i>\d+)/(?P<j>\d+)/$', SendEmailWorksheetErrorToStaffView.as_view(), name='email_staff_ws_error'), url(r'^ggv/(?P<crs_slug>[-\w]+)/email-instructor/$', SendEmailToInstructor.as_view(), name='email_instructor'), url(r'^ggv/(?P<crs_slug>[-\w]+)/email-manager/deactivate$', SendEmailToManagerDeactivationRequest.as_view(), name='email_manager_deactivate'), url(r'^ggv/(?P<crs_slug>[-\w]+)/email-manager/activate$', SendEmailToManagerActivationRequest.as_view(), name='email_manager_activate'), url(r'^ggv/(?P<crs_slug>[-\w]+)/email-manager/new-account$', SendEmailToManagerCreateAccountRequest.as_view(), name='email_manager_request_account'), # Administration pages url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^ggvadmin/filebrowser/', include(site.urls)), url(r'^grappelli/', include('grappelli.urls')), # grappelli URLS url(r'^ggvadmin', admin.site.urls, name='staff_admin'), # admin site url(r'^faq/$', FaqView.as_view(), name='faq'), url(r'^home/$', HomeView.as_view(), name='ggvhome'), url(r'^', IndexView.as_view(), name='splash'), ] # 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.views.decorators.cache import cache_page admin.autodiscover() from api import feeds from core.views import HomeView, MaintenanceView, ReportView, ReportThanksView MAINTENANCE_MODE = getattr(settings, 'MAINTENANCE_MODE', False) if MAINTENANCE_MODE: urlpatterns = [ url(r'.*', MaintenanceView.as_view(), name='maintenance_view'), ] else: urlpatterns = [ url(r'^$', cache_page(60 * 5)(HomeView.as_view()), name='home'), url(r'^leaflets/', include('leaflets.urls')), url(r'^parties/', include('parties.urls')), url(r'^person/', include('people.urls')), url(r'^constituencies/', include('constituencies.urls')), url(r'^analysis/', include('analysis.urls')), url(r'^tags/', include('tags.urls')), url(r'^categories/', include('categories.urls')), url(r'^api/', include('api.urls')), # Feeds url(r'^feeds/latest/$', feeds.LatestLeafletsFeed(), name='latest_feed'), url(r'^feeds/constituency/(?P<cons_slug>[\w_\-\.]+)/$', feeds.ConstituencyFeed(), name='constituency_feed'),
from django.contrib import admin from django.urls import path from django.views.generic import TemplateView from core.views import HomeView, SomeView urlpatterns = [ #path('', TemplateView.as_view(template_name='index.html')), path('', HomeView.as_view()), path('some/', SomeView.as_view()), #path('id<int:user_id>', HomeView.as_view()), ]
from django.conf.urls import patterns, url from core.views import HomeView urlpatterns = patterns( '', url(r'^$', HomeView.as_view(), name="home"), )
# django from django.conf.urls import include, url, patterns from django.conf.urls.i18n import i18n_patterns from django.contrib import admin # rest from rest_framework.routers import DefaultRouter # mac from core.views import HomeView from core.api import ( AuctionHouseViewSet, ExpertViewSet, NewsletterEmailViewSet ) admin.autodiscover() router = DefaultRouter() router.register(r'auctionhouse', AuctionHouseViewSet) router.register(r'expert', ExpertViewSet) router.register(r'newsletter', NewsletterEmailViewSet) urlpatterns = patterns('', url(r'^api/', include(router.urls)), ) urlpatterns += i18n_patterns('', url(r'^admin', include(admin.site.urls)), url(r'^', include('cms.urls')), (r'^', HomeView.as_view()), )
# prophete URL Configuration from django.conf.urls import url from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from core.views import HomeView, PredictionView, calculate_forecast urlpatterns = [ url( r'^$', HomeView.as_view(), name='home' ), url( r'^data/(?P<prediction_pk>\d+)/$$', PredictionView.as_view(), name='prediction_view' ), url( r'^data/calculate/(?P<prediction_pk>\d+)/$$', calculate_forecast, name='calculate_forecast' ), url( r'^admin/', admin.site.urls ), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \ + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.core.urlresolvers import reverse_lazy from django.conf.urls import url from django.contrib.auth import views from core.views import HomeView, UserAuthView, UserCreateView urlpatterns = [ url(r'^$', HomeView.as_view(), name='home'), url(r'^login/$', UserAuthView.as_view(), name='login'), url(r'^logout/$', views.logout, {'next_page': reverse_lazy('core:home')}, name='logout'), url(r'^signup/$', UserCreateView.as_view(), name='signup'), ]
from django.conf.urls import url, include from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic import TemplateView from core.views import HomeView urlpatterns = [ url(r"^admin/", admin.site.urls), url(r"^accounts/", include("django.contrib.auth.urls")), url(r"^$", HomeView.as_view(), name="home"), url(r"^organisations/", include("organisations.urls")), url(r"", include("elections.urls")), url(r"^api/", include(("api.urls", "api"), namespace="api")), url("^markdown/", include("django_markdown.urls")), url(r"^election_radar/", include("election_snooper.urls")), url(r"^email/", include("dc_signup_form.urls")), url( r"^robots\.txt$", TemplateView.as_view(template_name="robots.txt", content_type="text/plain"), ), ] urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT, show_indexes=True)
OverdubDeleteView.as_view(), name='delete_overdub'), url(r'^searchcourse/$', CourseListView.as_view(), name='course_list'), url(r'^post/save/$', PostSaveView.as_view(), name='save_post'), url(r'^post/delete/$', PostDeleteView.as_view(), name='delete_post'), url(r'^upload/$', fileUpload, name='file_upload'), url(r'^subscribe/(\w+)/$', subscribeCourse, name='subscribe_course'), url(r'^perm/change/$', changePerm, name='change_perm'), url(r'^activity/copy/$', copyActivity, name='copy_activity'), url(r'^lesson/title/edit/$', editLessonTitle, name='edit_lesson_title'), url(r'^essaydraft/edit/$', editEssayDraft, name='edit_essay_draft'), url(r'^admin/', include(admin.site.urls)), #url(r'^socket\.io', include(socketio.sdjango.urls)), url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'), # # url(r'^accounts/login/$', 'django_cas.views.login', name='login'), # url(r'^accounts/logout/$', uhcaslogout, name='logout'), # url(r'^accounts/login/$', 'django_cas_ng.views.login', name='login'), # url(r'^accounts/logout/$', uhcaslogout, name='logout'), # url(r'^accounts/callback$', 'django_cas_ng.views.callback', name='cas_ng_proxy_callback'), url(r'^crossdomain.xml$', 'flashpolicies.views.simple', {'domains': ['*']}), url(r'^home/$', HomeView.as_view(), name='home'), url(r'^$', IndexView.as_view(), name='landing'), url(r'^profile/', include('user_profile.urls', namespace='profile')), ) urlpatterns += static(base.MEDIA_URL, document_root=base.MEDIA_ROOT) urlpatterns += static(base.STATIC_URL, document_root=base.STATIC_ROOT)
"""maratonaDjango URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/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. 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 from django.contrib import admin from core.views import HomeView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', HomeView.as_view(), name='home') ]
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.conf import settings from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.urls import path, include from django.conf.urls.static import static from core.views import HomeView urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name="home"), path('company/', include('apps.company.urls', namespace='company')), path('invoice/', include('apps.invoice.urls', namespace='invoice')), ] urlpatterns + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns = [ path('admin/', admin.site.urls), # 3rd party apps path('api-auth/', include('rest_framework.urls')), path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('rest-auth/', include('rest_auth.urls')), path('rest-auth/registration/', include('rest_auth.registration.urls')), path('api-token-auth/', views.obtain_auth_token), path('accounts/', include('allauth.urls')), #Custom URLS path('', home, name='home'), path('json/', HomeView.as_view(), name='home-json'), path('signup', SignupView.as_view(), name='signup'), path('login', login_view, name='login'), path('logout', logout, name='logout'), #Built in Django Auth #path('accounts/', include('django.contrib.auth.urls')), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
"""meuPerfil 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 from core.views import HomeView from django.conf.urls.static import static from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name='base'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.contrib import admin admin.autodiscover() from django.views.decorators.csrf import csrf_exempt from core.views import HomeView from core.views import SignUpView from core.views import GroupListAPIView from core.views import GroupAPIView from core.views import GroupSubjectsAPIView from core.views import UserAPIView from core.views import UserGroupsAPIView from core.views import UserPrivateAPIView from core.views import SignUpAPIView urlpatterns = patterns( '', url(r'^$', HomeView.as_view()), url(r'^signup', SignUpView.as_view()), url(r'^admin/', include(admin.site.urls)), url(r'^api/groups/(?P<pk>[0-9])/subjects', csrf_exempt(GroupSubjectsAPIView.as_view())), url(r'^api/groups/(?P<pk>[0-9])', csrf_exempt(GroupAPIView.as_view())), url(r'^api/groups', csrf_exempt(GroupListAPIView.as_view())), url(r'^api/users/(?P<username>\w+)/private', csrf_exempt(UserPrivateAPIView.as_view())), url(r'^api/users/(?P<username>\w+)/groups', csrf_exempt(UserGroupsAPIView.as_view())), url(r'^api/users/(?P<username>\w+)', csrf_exempt(UserAPIView.as_view())), url(r'^api/signup', csrf_exempt(SignUpAPIView.as_view())))
"""Destra 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 from core.views import HomeView from django.conf.urls.static import static from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name='index'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.views.decorators.cache import cache_page admin.autodiscover() from api import feeds # noqa: E402 from core.views import HomeView, MaintenanceView, ReportView, ReportThanksView # noqa: E402 MAINTENANCE_MODE = getattr(settings, 'MAINTENANCE_MODE', False) if MAINTENANCE_MODE: urlpatterns = [ url(r'.*', MaintenanceView.as_view(), name='maintenance_view'), ] else: urlpatterns = [ url(r'^$', cache_page(60 * 5)(HomeView.as_view()), name='home'), url(r'^leaflets/', include('leaflets.urls')), url(r'^parties/', include('parties.urls')), url(r'^person/', include('people.urls')), url(r'^constituencies/', include('constituencies.urls')), url(r'^analysis/', include('analysis.urls')), url(r'^tags/', include('tags.urls')), url(r'^categories/', include('categories.urls')), url(r'^api/', include('api.urls')), # Feeds url(r'^feeds/latest/$', feeds.LatestLeafletsFeed(), name='latest_feed'), url(r'^feeds/constituency/(?P<cons_slug>[\w_\-\.]+)/$', feeds.ConstituencyFeed(), name='constituency_feed'), url(r'^feeds/category/(?P<cat_slug>[\w_\-\.]+)/$', feeds.CategoryFeed(), name='category_feed'), url(r'^feeds/tag/(?P<tag_slug>[\w_\-\.]+)/$', feeds.TagFeed(), name='tag_feed'),
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. 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.contrib import admin from core.views import HomeView, SamplePageView urlpatterns = [ url(r'^$', HomeView.as_view(), name='index'), url(r'^sample/$', SamplePageView.as_view(), name='sample'), # Property related urls. url(r'^property/', include('properties.urls')), # Transaction related urls. url(r'^transaction/', include('transactions.urls')), # Messenger related urls. url(r'^messenger/', include('messenger.urls')), url(r'^admin/', admin.site.urls), ]
DashboardView, CampView, CampListView, SessionCreateView, SessionEditView, SessionView, ) from django.contrib import admin admin.autodiscover() urlpatterns = patterns( "", # Examples: # url(r'^$', 'barcamp.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r"^admin/", include(admin.site.urls)), url(r"^dashboard/", DashboardView.as_view(), name="dashboard"), url(r"^accounts/register/", RegisterView.as_view(), name="register"), url(r"^accounts/login/", LoginView.as_view(), name="login"), url(r"^accounts/logout/", LogoutView.as_view(), name="logout"), url(r"^camps/$", CampListView.as_view(), name="camp_list"), url( r"^(?P<camp>[-_a-zA-Z0-9]+)/(?P<session>[-_a-zA-Z0-9]+)/edit/$", SessionEditView.as_view(), name="session_edit" ), url(r"^(?P<camp>[-_a-zA-Z0-9]+)/(?P<session>[-_a-zA-Z0-9]+)/$", SessionView.as_view(), name="session_view"), url(r"^(?P<camp>[-_a-zA-Z0-9]+)/session/create/$", SessionCreateView.as_view(), name="session_create"), url(r"^(?P<camp>[-_a-zA-Z0-9]+)/$", CampView.as_view(), name="camp"), url(r"^$", HomeView.as_view(), name="home_view"), )
from django.urls import path from django.contrib.auth.decorators import login_required from core.views import ( HomeView, AboutView, ContactView, ResourceListByCategoryView, ResourceListAddedByUserView, ResourceCreateView, ResourceUpdateView, ResourceDeleteView, ) urlpatterns = [ path('', HomeView.as_view(), name='home_view'), path('category/<str:category_slug>/', ResourceListByCategoryView.as_view(), name='resource_list_view'), path('about/', AboutView.as_view(), name='about_view'), path('contact/', ContactView.as_view(), name='contact_view'), # URls for only authenticated users path('resource/list/', login_required(ResourceListAddedByUserView.as_view()), name='resource_list_by_me_view'), path('resource/create/', login_required(ResourceCreateView.as_view()), name='resource_create_view'), path('resource/update/<int:pk>/', login_required(ResourceUpdateView.as_view()),
from django.conf.urls.static import static from django.views.generic import TemplateView, RedirectView from core.views import HomeView # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = [ # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), url(r'^accounts/', include('allauth.urls')), url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='auth_logout'), url(r'^$', HomeView.as_view(), name="home"), url(r'thanks/$', TemplateView.as_view(template_name="thanks.html")), url(r'thanks/finished$', TemplateView.as_view(template_name="thanks_finished.html")), url(r'^about/$', TemplateView.as_view(template_name="about.html"), name="about"), url(r'^data/$', TemplateView.as_view(template_name="data.html"), name="data"), url(r'^privacy/$', TemplateView.as_view(template_name="privacy.html"), name="privacy"), url(r'^projects/$', TemplateView.as_view(template_name="projects.html"), name="projects"), url(r'^projects/polling-stations/$', TemplateView.as_view(template_name="polling-stations/home.html"), name="polling_one_pager" ), url(r'^projects/polling-stations/technical/$', TemplateView.as_view(template_name="polling-stations/technical.html"), name="polling_technical_explainer" ), url(r'^projects/polling-stations/techincal/$',