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

fix HTML search in Django >= 1.8 #355

Merged
merged 2 commits into from
Aug 12, 2022
Merged

fix HTML search in Django >= 1.8 #355

merged 2 commits into from
Aug 12, 2022

Conversation

Lioscro
Copy link
Collaborator

@Lioscro Lioscro commented Aug 4, 2022

The context_instance kwarg to render_to_string has been deprecated since Django 1.8. Added a check for the Django version to call the function with correct arguments.

@Lioscro Lioscro changed the title don't use deprecated context_instance in search fix HTML search in Django >= 1.8 Aug 4, 2022
@Chris7
Copy link
Member

Chris7 commented Aug 9, 2022

Thanks for catching this -- you can actually just do the fix for the latest django, this is our current support of the next release: 'Django>=3,<4 ;python_version>="3.7"',

If its possible a unit test would be great to catch this in the future, but no worries if that is a tall ask as its already not covered.

@Lioscro
Copy link
Collaborator Author

Lioscro commented Aug 12, 2022

Tests are in. Think I'll leave the version check for now since it can't hurt.

@Chris7 Chris7 merged commit d9dd323 into wooey:master Aug 12, 2022
self.json_view_func = wooey_views.WooeyScriptSearchJSON.as_view()
self.json_html_view_func = wooey_views.WooeyScriptSearchJSONHTML.as_view()
# the test server doesn't have celery running
settings.WOOEY_CELERY = False
Copy link
Member

Choose a reason for hiding this comment

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

this should be put in test_settings

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

2 participants