Skip to content

Commit

Permalink
Try solve build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvallejosdev committed Feb 13, 2024
1 parent 625a5e6 commit 6b27e84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pip install -r requirements.txt

# python3.9 manage.py collectstatic --no-input
python3.9 manage.py collectstatic --no-input
python3.9 manage.py migrate
2 changes: 1 addition & 1 deletion todo_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
if not DEBUG: # Tell Django to copy statics to the `staticfiles` directory
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles_build", "static")
MEDIA_ROOT = os.path.join(BASE_DIR, "staticfiles_build", "images")
# STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"

# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
Expand Down
5 changes: 5 additions & 0 deletions todo_project/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
path('admin/', admin.site.urls),
Expand All @@ -8,3 +10,6 @@
path("api/rest/auth/", include("dj_rest_auth.urls"), name='rest-auth'), # endpoints provided by dj-rest-auth
path('api/auth/', include('auth_api.urls'), name='auth'),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

0 comments on commit 6b27e84

Please sign in to comment.