What could cause my django admin to not render the default filter_horizontal only on production?

Django 1.6 admin comes with UserAdmin and GroupAdmin which have nicely separated filter_horizontal and fieldsets.

Somehow, only on production, my auth.User and auth.Group both render all fieldsets, but no filter_horizontal. No JS errors.

Since it loads fieldsets, it clearly is reading the ModelAdmin correctly. But why would filter_horizontal be specifically ignored?

When I run the same environment via runserver on the production server, I get the correct fields.

I have also unregistered the default admin, and defined my own UserAdmin with filter_horizontal with no success.

This seems to imply filter_horizontal is specifically not working for production (uwsgi) but working for runserver with the same environment.

My uWSGI environment should match exactly the runserverenvironment, as I only have django installed in one environment on this server.

virtualenv=/home/yuji/.virtualenvs/grovemade

Any ideas?

Upvotes: 1

Views: 304

Answers (1)

Yup, answer was cloudflare. Cloudflare and django admin apparently do not play well.

Specifically, my setup

  • Async JS loading: CF Rocket
  • Django admin + django suit.

Solution: disable cloudflare.

Upvotes: 1

Related Questions