Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

raise ImproperlyConfigured exception ifbasename is not unique#8438

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
auvipy merged 5 commits intoencode:masterfromdgravitate:reject-duplicate-basenames
Dec 10, 2022

Conversation

@dgravitate
Copy link
Contributor

Whenbasename is dynamically generated inBaseRouter.get_default_basename, it could (and does) generate a conflicting basename when multiple routes use the same Model. Additionally, developers could inadvertently use a basename that has already been used elsewhere.

In either case, this can lead to unexpected results when (correctly) usingreverse() to get the URL

@stale
Copy link

stalebot commentedMay 31, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stalestalebot added the stale labelMay 31, 2022
@auvipyauvipy self-requested a reviewNovember 22, 2022 07:10
@stalestalebot removed the stale labelNov 22, 2022
@auvipy
Copy link
Collaborator

@sevdog can you review this please?

@auvipyauvipy added this to the3.14 milestoneNov 22, 2022
@dgravitatedgravitate marked this pull request as draftDecember 1, 2022 03:23
@dgravitatedgravitateforce-pushed thereject-duplicate-basenames branch from7081209 tobadd1c1CompareDecember 1, 2022 03:25
@dgravitatedgravitate marked this pull request as ready for reviewDecember 1, 2022 04:21
Copy link
Collaborator

@auvipyauvipy left a comment

Choose a reason for hiding this comment

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

can we add additional tests using DefaultRouter() ?

@dgravitate
Copy link
ContributorAuthor

can we add additional tests using DefaultRouter() ?

Added additional tests using DefaultRouter

@auvipy
Copy link
Collaborator

I think this should be accepted as this change add checks which is good for developer experience. And not introduce any API surface or major behavioral changes

@auvipyauvipy merged commit48a21aa intoencode:masterDec 10, 2022
kernicPanel added a commit to openfun/joanie that referenced this pull requestMar 18, 2024
DRF verson 3.15 raises a ImproperlyConfigured exception if url basenames arenot uniques.encode/django-rest-framework#8438
kernicPanel added a commit to openfun/joanie that referenced this pull requestMar 18, 2024
DRF verson 3.15 raises a ImproperlyConfigured exception if url basenames arenot uniques.encode/django-rest-framework#8438
tijuca added a commit to tijuca/drf-extensions that referenced this pull requestMar 24, 2024
auvipy added a commit to chibisov/drf-extensions that referenced this pull requestSep 4, 2024
* tests: Use basename='xxx' to set a unique basenameSince DRF 3.15.0 a unique basename must be used dueencode/django-rest-framework#8438Fixes#341* Update tests_app/tests/functional/mixins/detail_serializer_mixin/urls.py---------Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
m-haines added a commit to cedadev/app_datamad that referenced this pull requestOct 7, 2024
…mysqlclient. This resulted in the following changes having to be made# Django 3.2 -> 4.2 changes## ./datamad2/models/users.pyfrom django.utils.translation import ugettext_lazy as _  --> from django.utils.translation import gettext_lazy as _## ./datamad2/admin.pyadmin.site.register(User, UserAdmin) etc at eof changed to @admin.register(User) decorator above class definition of the user type. eof registers all deletedSlightly concerned this does not give the same functionality, TODO check## ./datamad2/utils.pyfrom django.utils.encoding import force_text  --> from django.utils.encoding import force_str## ./datamadsite/settings.pyUSE_L10N = True --> line deletedcrispy_bootstrap4 added to INSTALLED_APPS# ./datamadsite/settings_local.py.tmplAdded the Additional allowed template packs:CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4"CRISPY_TEMPLATE_PACK = "bootstrap4"# bootstrap_datepicker_plus updates## grants.py and data_products.pyfrom bootstrap_datepicker_plus import DatePickerInput --> from bootstrap_datepicker_plus.widgets import DatePickerInput## Changed format='' for bootstrap_datepicker_plus.widgets.DatePickerInput from format='%d/%m/%Y' to options={'format':'%d/%m/%Y'} to fix the following error:./app_datamad_new/Lib/site-packages/bootstrap_datepicker_plus/_base.py:38:FutureWarning: The 'format' parameter is ignored, set 'format' in options instead.seehttps://github.com/monim67/django-bootstrap-datepicker-plusbootstrap_datepicker_plus.widgetsRemoved ifequal from pagination.html as it was removed in Django 4.0 and replaced with "if x = condition" instead# djangorestframework updating to 3.15.2 from 3.12.4# Updating to drf 3.15.2 from 3.12.4, had to specify basename for datacentres/ datacenter in datamad2_api/urls.py due to importing name from "DataCentre" model queryset leading to identical routings for  the "datacentre" and "datacenter" base URLs.This is due to a change from drf 3.14 -> 3.15 enforcing the followingencode/django-rest-framework#8438Added new script DataMad_csv_create.py to import data from UKRIs DataBank database into a .csv fileCreated two example Docker files for local debugging, if the user wanted to.setup.py to Python 3.12 from Python 3.6Updated the README.md file.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@auvipyauvipyauvipy approved these changes

+1 more reviewer

@sevdogsevdogsevdog requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.15

Development

Successfully merging this pull request may close these issues.

3 participants

@dgravitate@auvipy@sevdog

[8]ページ先頭

©2009-2025 Movatter.jp