Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

if settings.debug

# Required Imports
from django.conf.urls.static import static
from django.conf import settings

# Below Urlpatterns
if settings.DEBUG:
	urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Comment

PREVIOUS NEXT
Code Example
Python :: python list Clear the list content 
Python :: python timeout exception 
Python :: python selenium send keys enter send 
Python :: Program to Compute LCM 
Python :: python do something while waiting for input 
Python :: what is a print statement 
Python :: astype python 
Python :: SciPy Convex Hull 
Python :: only read some columns from csv 
Python :: how to make a leaderboard in python 
Python :: current url in djago 
Python :: calculate term frequency python 
Python :: python extract substring 
Python :: python 3.11 release date 
Python :: how to add values to a list in python 
Python :: python inject into process 
Python :: binary to string python 
Python :: python cv2 write to video 
Python :: select default option django form 
Python :: qpushbutton pyqt5 
Python :: Invalid password format or unknown hashing algorithm. 
Python :: write list to csv python 
Python :: python png library 
Python :: tkinter treeview 
Python :: distance of a point from a line python 
Python :: np.eye 
Python :: create file in a specific directory python 
Python :: python error handling 
Python :: python plot label value 
Python :: list length in python 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =