mozilla / django-browserid

Django application for adding BrowserID support.
Mozilla Public License 2.0
180 stars 80 forks source link

Fix circular import issue with jingo. #275

Closed Osmose closed 9 years ago

Osmose commented 9 years ago

Turns out jingo imports all apps in INSTALLED_APPS when it’s loaded. Which loads django_browserid. Which imports django_browserid.compat. Which attempts to import jingo, which fails since that’s a circular import, causing the fake jingo.register shim to be used, which means the helpers aren’t available in the templates.

The solution? Shove the shim inside helpers.py, which is loaded as late as possible by jingo to avoid import issues like this.

Osmose commented 9 years ago

@rlr r?

Osmose commented 9 years ago

Tests pass on tox, Travis appears to be having some issues downloading Django for the tests, we might be running into https://github.com/travis-ci/travis-ci/issues/2389.

rlr commented 9 years ago

LGTM r+ :shipit: on the :ship: