Design the page
This commit is contained in:
@ -166,6 +166,9 @@ STATIC_ROOT = os.path.realpath(__file__)
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, 'static')]
|
||||
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||
DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap4.html'
|
||||
# URL prefix for static files.
|
||||
|
@ -15,8 +15,10 @@ 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 . import settings
|
||||
from django.contrib import admin
|
||||
from django.contrib.staticfiles.urls import static
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
@ -25,3 +27,6 @@ urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include('tbde.urls')),
|
||||
]
|
||||
|
||||
urlpatterns += staticfiles_urlpatterns()
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
Reference in New Issue
Block a user