mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-04-28 10:41:15 +08:00
Clean up imports and .env variables
This commit is contained in:
parent
71eda8a496
commit
658753dea4
4 changed files with 51 additions and 58 deletions
|
@ -1,7 +1,7 @@
|
|||
from django.conf.urls.static import static
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
from django.urls import path, include
|
||||
from config.settings import DEBUG, CLOUD, MEDIA_ROOT
|
||||
from config.settings import DEBUG, SERVE_MEDIA, MEDIA_ROOT
|
||||
urlpatterns = [
|
||||
path('accounts/', include('accounts.urls')),
|
||||
path('subscriptions/', include('subscriptions.urls')),
|
||||
|
@ -11,7 +11,7 @@ urlpatterns = [
|
|||
]
|
||||
|
||||
# URLs for local development
|
||||
if DEBUG and not CLOUD:
|
||||
if DEBUG and SERVE_MEDIA:
|
||||
urlpatterns += staticfiles_urlpatterns()
|
||||
urlpatterns += static(
|
||||
'media/', document_root=MEDIA_ROOT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue