Hey guys, I’m kind of stumped if anyone could lend a hand. I’ve got a lot experience with django, but I cannot for the life of me figure out what’s going on here.
I have a Django site with wagtail and puput integrated into it. For some reason, in production, the static files are working for the regular site, but not for the django admin or wagtail admin. Any idea what I could be missing?
It’s not a permissions issue, as the static files appear to be 404 not found.
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')),
path('', views.home, name='home'),
path('clubs/', include('clubs.urls', namespace="clubs")),
path('members/', include('members.urls', namespace="members")),
path('videos/', include('videos.urls', namespace="videos")),
path('cms/', include(wagtailadmin_urls)),
path('documents/', include(wagtaildocs_urls)),
path('blog/', include(wagtail_urls)),
path('posts/', include(puput_urls)),
] +static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
settings.py
STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), ]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
folder structure
staticfiles/
admin/
wagtailadmin/
...