Commit Graph

39 Commits

Author SHA1 Message Date
José Padilla
16d442dda3 Use MkDocs meta.source to render source code links 2014-11-25 12:44:11 +00:00
Tom Christie
4d8c63abc9 Deprecate .model in related routers/permissions 2014-08-20 17:15:46 +01:00
Xavier Ordoquy
4876bec9f5 Merge remote-tracking branch 'origin/master' into 2.4.0
Conflicts:
	rest_framework/fields.py
2014-07-26 00:06:56 +02:00
Chibisov Gennady
c1426d1078 Fixes #1651. Add link to drf-extensions nested routers to docs 2014-06-26 23:29:00 +04:00
Xavier Ordoquy
d08536ad9d Merge remote-tracking branch 'origin/master' into 2.4.0
Conflicts:
	.travis.yml
	docs/api-guide/fields.md
	docs/api-guide/routers.md
	docs/topics/release-notes.md
	rest_framework/authentication.py
	rest_framework/serializers.py
	rest_framework/templatetags/rest_framework.py
	rest_framework/tests/test_authentication.py
	rest_framework/tests/test_filters.py
	rest_framework/tests/test_hyperlinkedserializers.py
	rest_framework/tests/test_serializer.py
	rest_framework/tests/test_testing.py
	rest_framework/utils/encoders.py
	tox.ini
2014-04-13 00:05:57 +02:00
Paul Melnikow
899381575a Fix a typo 2014-01-04 17:03:01 -05:00
Paul Melnikow
3cd15fb171 Router: Do not automatically adjust lookup_regex when trailing_slash is True
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-04 16:57:50 -05:00
Paul Melnikow
a1d7aa8f71 Allow viewset to specify lookup value regex for routing
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.
2014-01-04 16:45:03 -05:00
Tom Christie
75e8724731 Fuller notes on the 'base_name' argument. Closes #1160. 2013-12-23 14:38:51 +00:00
Tom Christie
52686420f4 Merge branch 'bennbollay-patch-1' into 2.4.0
Conflicts:
	.travis.yml
	docs/api-guide/routers.md
	rest_framework/compat.py
	tox.ini
2013-12-23 09:48:59 +00:00
Tom Christie
39dbea4da4 Links to drf-nested-routers 2013-12-13 20:27:17 +00:00
Tom Christie
9c41c007af Merge branch 'master' into 2.4.0
Conflicts:
	.travis.yml
	docs/api-guide/routers.md
	docs/topics/release-notes.md
	rest_framework/compat.py
2013-12-13 16:32:34 +00:00
Tom Christie
7e7336db91 Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
Conflicts:
	docs/api-guide/routers.md
2013-12-13 09:04:54 +00:00
S. Andrew Sheppard
73e8536e0d third-party package: wq.db 2013-12-12 21:45:44 -06:00
Tom Christie
df2d9034c2 Add third party packages 2013-12-12 23:10:31 +00:00
David Ray
7382f8c6ad Update routers.md
Reference to ```DefaultRouter``` should be ```SimpleRouter```
2013-12-10 14:56:07 -05:00
Omer Katz
ab4be47379 Fixed code example. 2013-10-03 17:34:34 +02:00
Tom Christie
bf07b8e616 Better docs for customizing dynamic routes. Refs #908 2013-08-29 08:53:19 +01:00
Tom Christie
16ffdedd14 Merge master 2013-08-21 21:31:59 +01:00
Tom Christie
5e40e50f2b Include import paths throughout docs.
Closes #1051.  Thanks to @pydanny for the report.
2013-08-21 19:46:09 +01:00
Tom Christie
4292cc18fa Docs tweaking 2013-08-19 20:53:30 +01:00
Tom Christie
c607414f16 Merge 2013-08-19 20:36:18 +01:00
Veronica Lynn
4d8d2340be Fixed typos in a bunch of docs 2013-08-07 14:00:06 -04:00
James Summerfield
4ff1dc6a11 Fixing typos in routers.md 2013-08-03 10:23:39 +01:00
Alex Burgel
eaae8fb2d9 Combined link_* and action_* decorators into detail_route and list_route, marked the originals as deprecated. 2013-07-15 18:35:13 -04:00
Tom Christie
6d1c474618 Minor tidying 2013-07-02 22:29:38 +01:00
Rudolf Olah
e460180a4d #955 updated router docs with more information on the Route named tuple and its parameters. 2013-07-02 13:20:25 -04:00
Rudolf Olah
f5f23793e3 #955 updated documentation for overriding routes attribute in Router sub-classes 2013-06-27 16:30:24 -04:00
Tom Christie
2d5f7f201f Update router docs on base_name. Refs #933. 2013-06-21 22:19:14 +01:00
Tom Christie
f1251e8c58 Added trailing_slash argument to routers. Closes #905 2013-06-04 20:59:12 +01:00
Stephan Groß
7a570e16e9 Fix md formatting and typos 2013-05-28 17:13:12 +02:00
Pascal Borreli
8f35ac4f93 Fixed typos 2013-05-28 15:09:23 +01:00
Tom Christie
74beaefd12 Simplifying bits of docs 2013-05-02 12:08:05 +01:00
Tom Christie
d17e2d852f Remove AutoRouter. (Adding shortcut to generic views/viewsets means it's unneccessary) 2013-04-29 12:46:57 +01:00
Tom Christie
8fa79a7fd3 Deal with List/Instance suffixes for viewsets 2013-04-26 14:59:21 +01:00
Tom Christie
74b3307978 Docs, docs, docs 2013-04-25 20:43:37 +01:00
Tom Christie
9abaf77401 More viewset/router docs 2013-04-25 17:39:33 +01:00
Tom Christie
b94da2468c Various clean up and lots of docs 2013-04-24 22:40:24 +01:00
Tom Christie
027792c981 Viewsets and routers in seperate docs 2013-04-09 11:54:51 +01:00