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 import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from dashboard.views import DashboardView from checkout.views import CheckoutAjaxView from products.views import UserLibraryListView urlpatterns = [ url(r'^$', DashboardView.as_view(), name="dashboard"), #url(r'^test/$', CheckoutView.as_view(), name="test"), url(r'^checkout/$', CheckoutAjaxView.as_view(), name="checkout"), url(r'^admin/', include(admin.site.urls)), url(r'^products/', include("products.urls", namespace='products')), url(r'^tags/', include("tags.urls", namespace='tags')), url(r'^seller/', include("sellers.urls", namespace='sellers')), url(r'^library/', UserLibraryListView.as_view(), name="library"), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
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.urls import path, include from django.conf.urls.static import static from django.contrib import admin from checkout.views import CheckoutTestView, CheckoutAjaxView from dashboard.views import DashboardView from products.views import UserLibraryListView urlpatterns = [ path('', DashboardView.as_view(), name='dashboard'), path('test/', CheckoutTestView.as_view(), name='test'), path('checkout/', CheckoutAjaxView.as_view(), name='checkout'), path('admin/', admin.site.urls), path('products/', include(('products.urls', 'products'), namespace='products')), path('seller/', include(('sellers.urls', 'sellers'), namespace='sellers')), path('tags/', include(('tags.urls', 'tags'), namespace='tags')), path('library/', UserLibraryListView.as_view(), name='library'), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
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. Import the include() function: from django.conf.urls import url, include 3. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from checkout.views import CheckoutAjaxView, CheckoutTestView from dashboard.views import DashBoardView from products.views import UserLibraryListView urlpatterns = [ url(r"^$", DashBoardView.as_view(), name="dashboard"), url(r"^checkout/$", CheckoutAjaxView.as_view(), name="checkout"), url(r"^test/$", CheckoutTestView.as_view(), name="test"), url(r"^admin/", admin.site.urls), url(r"^product/", include("products.urls", namespace="products")), url(r"^seller/", include("sellers.urls", namespace="sellers"), name="sellers"), url(r"^tag/", include("tags.urls", namespace="tags")), url(r"^library/", UserLibraryListView.as_view(), name="library"), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from jet.dashboard.dashboard_modules import google_analytics_views from django.conf.urls import url, include from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from dashboard.views import DashboardView from checkout.views import CheckoutTestView, CheckoutAjaxView from products.views import UserLibraryListView urlpatterns = [ url(r'^$', DashboardView.as_view(), name='dashboard'), url(r'^test/$', CheckoutTestView.as_view(), name='test'), url(r'^checkout/$', CheckoutAjaxView.as_view(), name='checkout'), url(r'^jet/', include('jet.urls', 'jet')), url(r'^jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')), url(r'^admin/', admin.site.urls), url(r'^notifications/', include('pinax.notifications.urls')), url(r'^messages/', include('django_messages.urls')), url(r'^ratings/', include('star_ratings.urls', namespace='ratings', app_name='ratings')), url(r'^review/', include('review.urls')), url(r'^', include('django_private_chat.urls')), url(r'^accounts/', include('allauth.urls')), url(r'^products/', include('products.urls', namespace='products')), url(r'^tags/', include('tags.urls', namespace='tags')), url(r'^seller/', include('sellers.urls', namespace='sellers')), url(r'^library/', UserLibraryListView.as_view(), name='library'), ] #
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 import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from checkout.views import CheckoutTestView, CheckoutAjaxView from dashboard.views import DashboardView from products.views import UserLibraryListView urlpatterns = [ url(r'^$', DashboardView.as_view(), name='dashboard'), url(r'^test/$', CheckoutTestView.as_view(), name='test'), url(r'^checkout/$', CheckoutAjaxView.as_view(), name='checkout'), url(r'^admin/', include(admin.site.urls)), url(r'^products/', include("products.urls", namespace='products')), url(r'^seller/', include("sellers.urls", namespace='sellers')), url(r'^tags/', include("tags.urls", namespace='tags')), url(r'^library/', UserLibraryListView.as_view(), name='library'), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
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 import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from dashboard.views import DashboardView from checkout.views import CheckoutAjaxView from products.views import UserLibraryListView urlpatterns = [ url(r'^$', DashboardView.as_view(), name="dashboard"), #url(r'^test/$', CheckoutView.as_view(), name="test"), url(r'^checkout/$', CheckoutAjaxView.as_view(), name="checkout"), url(r'^admin/', include(admin.site.urls)), url(r'^products/', include("products.urls", namespace='products')), url(r'^tags/', include("tags.urls", namespace='tags')), url(r'^seller/', include("sellers.urls", namespace='sellers')), url(r'^library/', UserLibraryListView.as_view(), name="library"), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)