You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Thanks for creating this module. It is quite useful.
In the README instructions, it says
Add url(r'^advanced_filters/', include('advanced_filters.urls')) to your project's urlconf.
What do you think about importing the module and referencing it instead?
Using 'advanced_filters.urls' simply as a string makes it harder for people and linters to detect that the project is being used.
If you are e.g. cleaning up your requirements.txt, this usage might get missed, since it only exists inside the string. And the name 'advanced_filters' inside the string does not match the module name 'django-advanced-filters'.
Instead, what do you think about using this module via an import?
# in urls.py
from advanced_filters import urls as advanced_filters_urls
# ...
urlpatterns = [
# ...
url(r"^advanced_filters/", include(advanced_filters_urls)),
# ...
]
This way, linters can better detect that any codebase is using the module. And it is more obvious where and how we use it.
This would make it harder to miss.
I could send a patch to update the README.md if that's helpful.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello! Thanks for creating this module. It is quite useful.
In the README instructions, it says
What do you think about importing the module and referencing it instead?
Using 'advanced_filters.urls' simply as a string makes it harder for people and linters to detect that the project is being used.
If you are e.g. cleaning up your
requirements.txt
, this usage might get missed, since it only exists inside the string. And the name 'advanced_filters' inside the string does not match the module name 'django-advanced-filters'.Instead, what do you think about using this module via an import?
This way, linters can better detect that any codebase is using the module. And it is more obvious where and how we use it.
This would make it harder to miss.
I could send a patch to update the README.md if that's helpful.
Thanks!
The text was updated successfully, but these errors were encountered: