I also recommend going through the deploy checklist. I ran into the same 
problem and then other problems after that because I didn’t follow this. 

https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/

Sent from my mobile device

> On May 10, 2018, at 10:53 PM, Andréas Kühne <[email protected]> 
> wrote:
> 
> Hi,
> 
> That is the way it should be if you look in the documentation:
> https://docs.djangoproject.com/en/2.0/howto/static-files/
> 
> Serving the files
> 
> In addition to these configuration steps, you’ll also need to actually serve 
> the static files.
> 
> During development, if you use django.contrib.staticfiles, this will be done 
> automatically by runserver when DEBUG is set to True (see 
> django.contrib.staticfiles.views.serve()).
> 
> This method is grossly inefficient and probably insecure, so it is unsuitable 
> for production.
> 
> See Deploying static files for proper strategies to serve static files in 
> production environments.
> 
> So it is exactly like gunicorn - because you need to serve your static files 
> from a webbserver instead of from django itself.
> 
> That's why it is failing.
> 
> What you could do (although I don't recommend it) - it to manually add the 
> static files serving to your urls.py file. See:
> https://docs.djangoproject.com/en/2.0/howto/static-files/#serving-static-files-during-development
> 
> This should be fine for a developer environment - but nothing else.
> 
> Regards,
> 
> Andréas
> 
> 2018-05-11 3:09 GMT+02:00 Gerald Brown <[email protected]>:
>> On my admin site if I have Debug set to true (I have read that for 
>> production this is a no-no) everything looks fine.  When I change it to 
>> FALSE all of the styling goes away as if it is being run using gunicorn.
>> 
>> Has anyone observed this?  If so have you found a correction?
>> 
>> Thanks.
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/2fb3aff8-40ec-464e-81e1-766cf08db433%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAK4qSCckZWh8hYJ6HQX-RvOAssSDmP4WCSFbh%2BGcty38GHay%2BQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5958579F-09A0-414D-8A21-E4690829545F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to