Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading Django Admin's assets partially #41

Open
beltekylevi opened this issue May 8, 2020 · 0 comments
Open

Loading Django Admin's assets partially #41

beltekylevi opened this issue May 8, 2020 · 0 comments

Comments

@beltekylevi
Copy link

  • django-spa version: 0.3.5
  • Django version: 2.1.7
  • Python version: 3.7.6
  • Operating System: macOS / Ubuntu 18.04 (Heroku-18)

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

I have a Django application in which I'd like to serve my SPA, bootstrapped with Create React App. In production the application is served by daphne. (version 2.2.5)

I followed the guide provided and the SPA is served well but in Django Admin I noticed that the assets are not loading properly. Most noticeably, missing icons and fonts.

I did not experience any missing resources. All resources were properly loaded.

What I Did

  • Looked into what is served and I noticed that /static/admin/css/base.[hash].css was missing the icons
  • Did the installation process step-by-step and checked when this weird behaviour starts
  • Figured out that it has to do something with the STATICFILES_STORAGE because when I change it from 'spa.storage.SPAStaticFilesStorage' to'whitenoise.storage.CompressedManifestStaticFilesStorage' the admin assets were loaded
python manage.py collectstatic --clear --noinput
daphne -b 0.0.0.0 -p 1234 boshi.asgi:application

Let me know if I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant