Thanks for the info. I will check it out.  I am still in development so it will be awhile before I need it.

On Friday, 11 May, 2018 01:53 PM, Andréas Kühne 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| <https://docs.djangoproject.com/en/2.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles>, this will be done automatically by|runserver| <https://docs.djangoproject.com/en/2.0/ref/django-admin/#django-admin-runserver>when|DEBUG| <https://docs.djangoproject.com/en/2.0/ref/settings/#std:setting-DEBUG>is set to|True|(see|django.contrib.staticfiles.views.serve()| <https://docs.djangoproject.com/en/2.0/ref/contrib/staticfiles/#django.contrib.staticfiles.views.serve>).

This method is*grossly inefficient*and probably*insecure*, so it is*unsuitable for production*.

SeeDeploying static files <https://docs.djangoproject.com/en/2.0/howto/static-files/deployment/>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 <gsbrow...@gmail.com <mailto:gsbrow...@gmail.com>>:

    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 django-users+unsubscr...@googlegroups.com
    <mailto:django-users+unsubscr...@googlegroups.com>.
    To post to this group, send email to django-users@googlegroups.com
    <mailto:django-users@googlegroups.com>.
    Visit this group at https://groups.google.com/group/django-users
    <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
    
<https://groups.google.com/d/msgid/django-users/2fb3aff8-40ec-464e-81e1-766cf08db433%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout
    <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 django-users+unsubscr...@googlegroups.com <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
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 <https://groups.google.com/d/msgid/django-users/CAK4qSCckZWh8hYJ6HQX-RvOAssSDmP4WCSFbh%2BGcty38GHay%2BQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/03ccfc31-0e17-5d70-c1bf-ef379cd2c033%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to