BondokBE

urls.py

Feb 10th, 2019
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. from django.contrib import admin
  2. from django.urls import path, include
  3. from django.conf import settings
  4. from django.conf.urls.static import static
  5.  
  6. urlpatterns = [
  7.     path('admin/', admin.site.urls),
  8.     path('posts/', include('posts.urls')),
  9.     path('comments/', include('comments.urls')),
  10.     path('hitcount/', include('hitcount.urls', namespace='hitcount')),
  11. ]
  12.  
  13. if settings.DEBUG:
  14.     urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
  15.     urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Advertisement
Add Comment
Please, Sign In to add comment