I made a Django admin site using Django development version but it isn't being styled:
'django-admin' is not recognized as an internal or external command, operable program or batch file. To fix this, first close the terminal window and relaunch it with administrator privileges. Once you launch the elevated terminal window change directory to where you wish to start your Django project.
The static folder should be created in your project folder, that's where you can create in static folder a folder called css, and then in the css folder add the css files.
After setting up your STATIC_ROOT
and STATIC_URL
, you may have to run
python manage.py collectstatic
ADMIN_MEDIA_PREFIX
is deprecated now, use STATIC_URL
instead. Setting STATIC_URL = '/static/'
in settings.py should do the job. Try:
import os.path import sys PROJECT_ROOT = os.path.normpath(os.path.dirname(__file__))
and then:
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static') STATIC_URL = '/static/'
Works on Django 1.4 pre-alpha SVN-16920.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With