aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/routers.py
AgeCommit message (Collapse)Author
2015-03-13Fix lookup_url_kwarg handling in viewsets.Raphaël Barrois
The ``lookup_url_kwarg`` is intended to set the name of a field in the URL regexps when using custom ``lookup_field``, but the routers ignore it altogether.
2015-02-25Remove duplicated code in routers.SimpleRouterYannick PEROUX
2015-02-25Fix removal of url_path on @detail_route and @list_route. Fix # #2583Yannick PEROUX
SimpleRouter.get_routes was popping out the url_path kwarg from list_route and detail_route decorators. This was causing troubles when the route was re-used, for example if the viewset was inherited.
2015-01-29Removed router check for deprecated '.model' attributeTymur Maryokhin
2015-01-19NotImplemented -> NotImplementedErrorTom Christie
2014-12-28Support namespaced router URLs with DefaultRouter.Tom Christie
2014-12-19Merge pull request #2010 from tanwanirahul/masterTom Christie
Ability to customize method names without creating a custom router
2014-12-19Change decorator attribute name to url_path per suggestionstanwanirahul
2014-11-06Drop usage of SortedDict. Closes #2027.Tom Christie
2014-11-03Ability to override default method names by customizing ittanwanirahul
2014-10-20Used Django utils SortedDict instead of stdlib's OrderedDict forErik Wickstrom
wider compatability.
2014-10-19Maintain order of views on router for api root view.Erik Wickstrom
2014-09-17Update routers.pyTom Christie
2014-09-11Added DefaultRouter support (and test) for viewsets without the default ↵Marek Skrajnowski
action implemented, which is usually the list action.
2014-09-09Make sure APIRoot.get can take on args, kwargs so router can be embedded ↵Gaurav Dadhania
within any URL pattern.
2014-08-20Deprecate .model in related routers/permissionsTom Christie
2014-01-13Minor tweaks to 'lookup_value_regex' workTom Christie
2014-01-04Router: Do not automatically adjust lookup_regex when trailing_slash is TruePaul Melnikow
BREAKING CHANGE When trailing_slash is set to True, the router no longer will adjust the lookup regex to allow it to include periods. To simulate the old behavior, the programmer should specify `lookup_regex = '[^/]+'` on the viewset. https://github.com/tomchristie/django-rest-framework/pull/1328#issuecomment-31517099
2014-01-04Allow viewset to specify lookup value regex for routingPaul Melnikow
This patch allows a viewset to define a pattern for its lookup field, which the router will honor. Without this patch, any characters are allowed in the lookup field, and overriding this behavior requires subclassing router and copying and pasting the implementation of get_lookup_regex. It's possible it would be better to remove this functionality from the routers and simply expose a parameter to get_lookup_regex which allows overriding the lookup_regex. That way the viewset config logic could be in the a subclass, which could invoke the super method directly. I'm using this now for PostgreSQL UUID fields using https://github.com/dcramer/django-uuidfield . Without this patch, that field passes the lookup string to the database driver, which raises a DataError to complain about the invalid UUID. It's possible the field ought to signal this error in a different way, which could obviate the need to specify a pattern.
2013-12-23Merge branch 'bennbollay-patch-1' into 2.4.0Tom Christie
Conflicts: .travis.yml docs/api-guide/routers.md rest_framework/compat.py tox.ini
2013-12-13Add notes on lookup_prefix argument and why it's there even though unused by ↵Tom Christie
the default implementations.
2013-12-10SimpleRouter.get_lookup_regex got lookup_prefixAlan Justino
This allows @alanjds/drf-nested-routers to not duplicate/monkeypatch work made here
2013-09-25Drop 1.3 supportTom Christie
2013-08-30Merge masterTom Christie
2013-08-23Don't consume .json style suffixes with routers.Tom Christie
When trailing slash is false, the lookup regex should not consume '.' characters. Fixes #1057.
2013-07-15Combined link_* and action_* decorators into detail_route and list_route, ↵Alex Burgel
marked the originals as deprecated.
2013-07-15Introduce DynamicDetailRoute and DynamicListRoute to distinguish between ↵Alex Burgel
different route types
2013-07-15Changed collection_* decorators to list_*Alex Burgel
2013-07-15Revert route name change and add key to Route object to identify different ↵Alex Burgel
route types
2013-07-15Add support for collection routes to SimpleRouterAlex Burgel
2013-06-26Raise exception when attempting to dynamically route to a method that is ↵Jamie Matthews
already routed to. Fixes #940
2013-06-21Merge pull request #941 from FreakyDug/masterTom Christie
Fixed a couple of small problems I found when using the action decorator.
2013-06-21Update assertion error to reference 'base_name' argument, not incorrect ↵Tom Christie
'name' argument. Closes #933
2013-06-21Allow uppercase methods in action decorator.Philip Douglas
Previously, using uppercase for the method argument would silently fail to route those methods.
2013-06-07Allow the default router to have a custom name.Ethan Fremen
Signed-off-by: Ethan Fremen <ethan@matterport.com>
2013-06-04Added trailing_slash argument to routers. Closes #905Tom Christie
2013-05-24Allow action decorator to handle multiple http methodsAlex Burgel
2013-05-16Version 2.3.3Tom Christie
2013-05-14Merge branch 'master' of https://github.com/avinash240/django-rest-frameworkTom Christie
2013-05-14Fix Django 1.3 compat with routersTom Christie
2013-05-11added support for multiple @action and @link decorators on a viewset, along ↵Marlon Bailey
with a router testcase illustrating the failure against the master code base
2013-05-02Automagically determine base_name in router classTom Christie
2013-04-29Remove AutoRouter. (Adding shortcut to generic views/viewsets means it's ↵Tom Christie
unneccessary)
2013-04-292.2's PendingDeprecationWarnings now become DeprecationWarnings. 2.3's ↵Tom Christie
PendingDeprecationWarnings added.
2013-04-26Bits of cleanupTom Christie
2013-04-26Deal with List/Instance suffixes for viewsetsTom Christie
2013-04-25Added AutoRouter. Don't know if this is a good idea.Tom Christie
2013-04-24Various clean up and lots of docsTom Christie
2013-04-04TweaksTom Christie
2013-04-04Factor view names/descriptions out of View classTom Christie