Merge lp://qastaging/~nicopace/charms/trusty/python-django/allowed_host_patch into lp://qastaging/charms/python-django

Proposed by nicopace
Status: Merged
Merged at revision: 37
Proposed branch: lp://qastaging/~nicopace/charms/trusty/python-django/allowed_host_patch
Merge into: lp://qastaging/charms/python-django
Diff against target: 12 lines (+2/-1)
1 file modified
hooks/hooks.py (+2/-1)
To merge this branch: bzr merge lp://qastaging/~nicopace/charms/trusty/python-django/allowed_host_patch
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Approve
Kevin W Monroe Approve
Review via email: mp+254958@code.qastaging.launchpad.net

Description of the change

there is a bug that rised when implementing gunicorn tests, that showed a 400 error on every request to gunicorn published python-django charm.
While I was digging over that bug, i discovered that, despite the documentation stated that if you don't specify a django_allowed_hosts config value, the default would be the FQDN and IP Address of the host, but it wasn't working that way.
This patch solves that problem.

To post a comment you must log in.
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

I was able to verify the 400 errors without your changes, and I saw the default hostname/fqdn/ip were not being set in ./juju-settings/30-allowed.py.

I then applied your changes and verified successful page requests as well as correct defaults in 30-allowed.py when django_allowed_hosts is empty.

We'll get an official ~charmer ack soon, but until then, +1 LGTM. Thanks for the fix!

review: Approve
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: