Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftype -> get_internal_type(), deepcopy django settings #20

Merged
merged 1 commit into from Nov 1, 2016

Conversation

brad
Copy link
Contributor

@brad brad commented Nov 1, 2016

Hi Samuel,
I ran into the same issue as #19 and when I looked into it, I saw that the problem was when we try to output field.ftype in the template, but ftype is a non-existant attribute. I changed it to use get_internal_type() and added a test_meatball to check that all the existing field types get output to the template (and a non-existent field type is not output). As a side effect of adding the new test, the tests ran in a different order and I found another bug where the global django settings were getting overridden permanently by settings in override_settings. I used copy.deepcopy to prevent this and wrote a new test which fails before the change and passes afterward.

* Fix bug where `ftype` doesn't exist by using `get_internal_type()` which is part of the API since Django 1.7
* Fix bug where using `override_settings` will actually overwrite the global django settings

See LegoStormtroopr#19
@coveralls
Copy link

coveralls commented Nov 1, 2016

Coverage Status

Coverage increased (+0.8%) to 93.75% when pulling b3cf721 on orcasgit:internal-type into 53d4f50 on LegoStormtroopr:master.

@LegoStormtroopr
Copy link
Owner

This is amazing! Thanks for the help @brad I'll get this in and up on pypi later this week

@LegoStormtroopr LegoStormtroopr merged commit 103055d into LegoStormtroopr:master Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants