django admin

18 views
Skip to first unread message

Baraka Nzavi

unread,
Oct 10, 2021, 4:32:49 PM10/10/21
to Django users
hello guys...what leads to the admin interface misbehaving in that the styling does not show

Kasper Laudrup

unread,
Oct 10, 2021, 4:47:48 PM10/10/21
to django...@googlegroups.com
On 10/10/2021 21.31, Baraka Nzavi wrote:
> hello guys...what leads to the admin interface misbehaving in that the
> styling does not show
>

Most likely the stylesheets (.css files) are not available to the
browser for some reason.

Impossible to know what the reason for that might be unless you provide
some details.

Learn how to ask a question that someone has a chance to answer if you
want to get some help.

Kind regards,

Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature

Mike Dewhirst

unread,
Oct 10, 2021, 6:28:25 PM10/10/21
to django...@googlegroups.com
Try manage.py collectstatic



--
(Unsigned mail from my phone)

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c6a6bc37-1f3a-45d5-9b21-509295dfd220n%40googlegroups.com.

David Nugent

unread,
Oct 10, 2021, 8:33:09 PM10/10/21
to django...@googlegroups.com
Just a general note but collectstatic should not be required for Django development in localdev.

Django will locate static files using STATICFILES_FINDERS when serving static is enabled (which normally is the case for localdev). It uses the same algorithm to do so as collectstatic.

If you're getting 404s for static files, then there can be a number of causes, apart from the usual PEBCAK:
  • STATICFILES_FINDERS does not include all of the required finders (filesystem, app_directories) If not set, these are the default anyway.
  • One or more directories is missing from STATICFILES_DIRS.
In the case of admin assets, these should always render except in the first case, so after checking on these settings check the traceback in the console to help triage the cause.

Regards, David
Reply all
Reply to author
Forward
0 new messages