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

Feature/django1 10 monkeypatching fix #39

Merged
merged 4 commits into from
Mar 16, 2017

Conversation

bermudezjd
Copy link
Contributor

This PR updates the patch_reverse module, used by MultiLTILaunchMiddleware, to be compatible with Django 1.10. In prior verisons of Django, the reverse method was located within the urlresolvers module within django.core. In 1.10+, there is a new urls module which imports reverse from a sub-module. We need to patch that inclusion, as well as the import of reverse within django.shortcuts.

This PR also splits out the test cases for the reusable application into a tests module outside of the application package and introduces tox to make testing across Django versions easier.

@sapnamysore
@cmurtaugh

tests/urls.py Outdated

urlpatterns = [
# url(r'^admin/', admin.site.urls),
]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this as there are no urls?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see this is referenced in the settings..
Can the commented lines be cleaned up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll actually just remove the module entirely since it's not being used. I had intended to add some tests related to monkey-patching, but it's more complicated than I thought so we can rely on manual testing for now.

'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add newline

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@sapnamysore
Copy link

👍

@bermudezjd bermudezjd merged commit 1d7bd62 into master Mar 16, 2017
@bermudezjd bermudezjd deleted the feature/django1_10_monkeypatching_fix branch March 16, 2017 16:55
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.

3 participants