Fix Django static files configuration for CI/CD pipeline
- Add STATIC_ROOT setting for collectstatic command - Configure STATICFILES_DIRS for proper static file management - Create app/static directory structure with documentation - Resolve CI ImproperlyConfigured error for staticfiles app - Ensure static files are properly collected during deployment
This commit is contained in:
@@ -75,6 +75,13 @@ USE_I18N = True
|
||||
USE_TZ = True
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
STATIC_ROOT = BASE_DIR / 'staticfiles'
|
||||
|
||||
# Additional locations of static files
|
||||
STATICFILES_DIRS = [
|
||||
BASE_DIR / "static",
|
||||
]
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
MEDIA_URL = '/media/'
|
||||
MEDIA_ROOT = BASE_DIR / 'media'
|
||||
|
||||
Reference in New Issue
Block a user