from django.contrib import admin from django.conf import settings from django.urls import path, include from django.conf.urls.static import static from main.views import IndexPageView urlpatterns = [ path("admin/", admin.site.urls), path("accounts/", include("accounts.urls")), path("courses/", include("grades.urls"), name="courses"), path("", IndexPageView.as_view(), name="home"), path("bookmarks/", include("bookmarks.urls"), name="bookmarks"), path("grades/", include("grades.urls"), name="grades"), path("messages/", include("messages.urls"), name="messages"), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.contrib import admin from django.conf import settings from django.urls import path, include from django.conf.urls.static import static from main.views import IndexPageView, ChangeLanguageView, AboutView, ExploreView urlpatterns = [ path('admin/', admin.site.urls), path('', IndexPageView.as_view(), name='index'), path('i18n/', include('django.conf.urls.i18n')), path('language/', ChangeLanguageView.as_view(), name='change_language'), path('about/', AboutView.as_view(), name='about_us'), path('accounts/', include('accounts.urls')), path('location/', include('location.urls')), path('explore/', ExploreView.as_view(), name='explore'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
ActivateView, LogOutView, ChangeEmailView, ChangeEmailActivateView, ChangeProfileView, ChangePasswordView, RestorePasswordView, RestorePasswordDoneView, RestorePasswordConfirmView, ) from main.views import IndexPageView app_name = 'accounts' urlpatterns = [ path('', IndexPageView.as_view()), path('log-in/', LogInView.as_view(), name='log_in'), path('log-out/', LogOutView.as_view(), name='log_out'), path('resend/activation-code/', ResendActivationCodeView.as_view(), name='resend_activation_code'), path('sign-up/', SignUpView.as_view(), name='sign_up'), path('activate/<code>/', ActivateView.as_view(), name='activate'), path('restore/password/', RestorePasswordView.as_view(), name='restore_password'), path('restore/password/done/', RestorePasswordDoneView.as_view(), name='restore_password_done'), path('restore/<uidb64>/<token>/', RestorePasswordConfirmView.as_view(),
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.conf import settings from django.contrib import admin from django.conf.urls.static import static from main.views import IndexPageView urlpatterns = [ url('i18n/', include('django.conf.urls.i18n')), url(r'^stocks/', include('stocks.urls')), url(r'^accounts/', include('accounts.urls')), url(r'^portfolio/', include('portfolio.urls')), url(r'^admin/', admin.site.urls), url(r'^$', IndexPageView.as_view(), name='index'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) import debug_toolbar urlpatterns = [ url(r'__debug__/', include(debug_toolbar.urls)), # For django versions before 2.0: # url(r'^__debug__/', include(debug_toolbar.urls)), ] + urlpatterns
"""reactproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/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 main.views import IndexPageView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', IndexPageView.as_view()), ]
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 main.views import IndexPageView from django.conf import settings from django.contrib.staticfiles.urls import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns = [ path('admin/', admin.site.urls), path('orders/', include('orders.urls')), path('games/', include('games.urls')), path('accounts/', include('profiles.urls')), path('states/', include('saves.urls')), path('scores/', include('scores.urls')), path('developers/', include('games.developers_urls')), path('', IndexPageView.as_view(), name='index_page_view') ] urlpatterns += staticfiles_urlpatterns() urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from django.contrib import admin from django.conf import settings from django.urls import path, include from django.conf.urls.static import static from main.views import IndexPageView, ChangeLanguageView urlpatterns = [ path('admin/', admin.site.urls), path('', IndexPageView.as_view(), name='index'), path('<symbol>/', IndexPageView.as_view(), name='symbol'), path('<symbol>/<volume>', IndexPageView.as_view(), name='volume'), path('i18n/', include('django.conf.urls.i18n')), path('language/', ChangeLanguageView.as_view(), name='change_language'), path('accounts/', include('accounts.urls')), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)