2👍
✅
How did you configure it? For admin app to load static files, you need to create a symbolic link inside your app’s static
directory. Have you done this?
ls -l
should give something like:
admin -> /usr/local/lib/python2.6/dist-packages/django/contrib/admin/media
2👍
I had exactly the same problem and I think I figured it out how to solve it. Actually it’s not that hard. All you need to modify is your settings.py(STATIC_ROOT and STATIC_URL) and server config file (url alias). I wrote a short blog post with 3 steps. http://www.ycshao.com/?p=898.
- [Django]-AttributeError: 'User' object has no attribute 'check_password' error in Django?
- [Django]-Anyone knows a good hack to make django-registration use emails as usernames?
- [Django]-Django: multiple accounts, with multiple users under each account, but account-specific data
0👍
dragon and ycshao have great answers. Just want to add that if you are running Apache server 2.4+. Instead of
Allow from all
You should use
Require all granted
It solved my static file hosting issue.
- [Django]-Django filters, got an unexpected keyword argument
- [Django]-How to stream a file in a request?
- [Django]-When deploy on Heroku, report TypeError: expected str, bytes or os.PathLike object, not tuple
Source:stackexchange.com