mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 00:49:49 +03:00
Allowing . in urls so TimescaleDB primary keys work
This commit is contained in:
parent
73f7bf4941
commit
74fce83385
|
@ -219,7 +219,7 @@ class SimpleRouter(BaseRouter):
|
|||
# consume `.json` style suffixes and should break at '/' boundaries.
|
||||
lookup_field = getattr(viewset, 'lookup_field', 'pk')
|
||||
lookup_url_kwarg = getattr(viewset, 'lookup_url_kwarg', None) or lookup_field
|
||||
lookup_value = getattr(viewset, 'lookup_value_regex', '[^/.]+')
|
||||
lookup_value = getattr(viewset, 'lookup_value_regex', '[^/]+')
|
||||
return base_regex.format(
|
||||
lookup_prefix=lookup_prefix,
|
||||
lookup_url_kwarg=lookup_url_kwarg,
|
||||
|
|
Loading…
Reference in New Issue
Block a user