-
Notifications
You must be signed in to change notification settings - Fork 46
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
add integration with django-autocomplete-light #74
base: develop
Are you sure you want to change the base?
Conversation
5cd146c
to
993043d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you rebase tests should hopefully pass
I have updated the whole codebase and added testing in all supported versions of Django. Could you please rebase this to the current |
@PetrDlouhy with a little bit of latency i've rebased this PR against current |
eade02f
to
8b7394c
Compare
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## develop #74 +/- ##
===========================================
- Coverage 94.46% 91.90% -2.57%
===========================================
Files 9 9
Lines 307 321 +14
===========================================
+ Hits 290 295 +5
- Misses 17 26 +9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@MRoci Thank you very much for your contribution. Can you please also add some tests for the new code? |
adds UserSuDalForm form class which leverages the autocomplete facilities provided by django-autocomplete-light. It expects: * 'django-light-autocomplete' to be installed * 'dal' to be present into INSTALLED_APPS * 'SU_DAL_VIEW_NAME' setting to contain the name of the autocomplete view If 'SU_DAL_VIEW_NAME' setting key is present and form_class is default su_login view tries to automatically use UserSuDalForm, avoiding the end user to customize django_su's urls. Required configuration is added into README
Since the improvements due to the autocompletion feature are fundamental to have an usable user experience with a very large user base i think it would be nice to have
django-autocomplete-light
support already built into the library as well as fordjango-ajax-selects
.This could lead in a smoother integration and having fewer dependencies to mantain in projects that heavily rely on
dal
.This PR looks for a setting key called
SU_DAL_VIEW_NAME
and if present it tries to use thedal
autocompletion widget in the form.Maybe the configuration work documented in the README could be reduced if we brought the autocompletion view into the library as well