Hi Django users group.
I am test and learning django out. I have a testing server and got my test page up.
Started to play with the Django suit control panel and ran in to some problems with my setup.
Server: Digital Ocean one click install.
Ubuntu 14.04
Nginx
Postgres
python 2.7
django 1.6
Test server
user: demo
pasword: demo
Static file command I ran
python manage.py collectstatic
results: 0 static files copied, 116 unmodified.
Setting.py: Basics
DEBUG = False
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ['*']
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
'/home/django/django_project/static/',
Nginx setting:
# Your Django project's media files - amend as required
location /media {
alias /home/django/django_project/django_project/media;
}
# your Django project's static files - amend as required
location /static {
alias /home/django/django_project/django_project/static;
}
# Proxy the static assests for the Django Admin panel
location /static/admin {
alias /usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin/;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
My goal is to get the Django suit working. I do not see anything in my static files directory for the admin suit so the css can be applied.
I am missing something very simple to get this working.
Thank you for taking time to look at this and wish to get some clues.
Roger