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
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
bc0e994784
Added example of using APIException class. Closes #1300
2013-12-21 21:10:05 +00:00
Tom Christie
1f3ded4559
Docs tweaks
2013-12-21 17:18:25 +00:00
Vitaly Babiy
22343ee117
Added links to djangorestframework-camel-case in the third party
...
sections of the docs for both parsers and renderers.
2013-12-21 07:07:06 -05: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
ed931b90ae
Further docs tweaks
2013-12-13 00:11:59 +00:00
Tom Christie
83da4949c0
Allow NUM_PROXIES=0 and include more docs
2013-12-13 00:02:18 +00:00
Tom Christie
df2d9034c2
Add third party packages
2013-12-12 23:10:31 +00:00
OddBloke
4f473f0b9e
Use get_user_model instead of User in Generating Tokens example
...
Because that's a better way of doing it.
2013-12-11 13:56:56 +00:00
OddBloke
5acefd3b17
Add full required imports to Generating Tokens example
...
Previously we were missing User and post_save.
2013-12-11 13:55:54 +00:00
David Ray
7382f8c6ad
Update routers.md
...
Reference to ```DefaultRouter``` should be ```SimpleRouter```
2013-12-10 14:56:07 -05:00
Tom Christie
785a42cd5a
Tweak REST condition text.
2013-12-10 08:38:43 +00:00
Maxim Kamenkov
9ba7be959c
Added REST Condition to 3rd party permissions packages list.
2013-12-09 20:33:06 +02:00
Tom Christie
b599447b71
Merge pull request #1277 from Ian-Foote/master
...
Fix typo "Not" -> "Note"
2013-12-09 01:54:37 -08:00
Ian
de319f3e28
Fix typo "Not" -> "Note"
2013-12-09 09:53:16 +00:00
taras
3399158d62
RelatedField is function of serializer class
2013-12-08 11:40:40 -05:00
kahnjw
887da7f6c5
Add missing tick marks
2013-12-06 14:30:33 -08:00
kahnjw
196c5952e4
Fix typo
2013-12-06 14:24:16 -08:00
kahnjw
100a933279
Add documentation to explain what effect these changes have.
2013-12-06 14:22:08 -08:00
Tom Christie
910de38a9c
Version 2.3.10
2013-12-06 22:13:50 +00:00
Tom Christie
f8088bedef
Upgrade JSONP security warning.
2013-12-05 09:01:00 +00:00
Drew Kowalik
f2682537e0
fix broken documentation links
2013-12-04 16:10:05 -08:00
Tom Christie
3c3906e278
Clarify wording, fixes #1133 .
2013-12-04 08:51:34 +00:00
Pablo Recio
699ec7236b
Adds pre_delete and post_delete hooks on
2013-12-03 00:07:41 +00:00
Stephan Groß
850cd83ba7
Fix TemplateHTMLRenderer example
2013-12-02 11:44:04 +01:00
Omer Katz
c46106c961
Rephrased documentation changes according to feedback on IRC.
2013-11-27 14:47:37 +02:00
Omer Katz
2dce8d7a8a
Recommend using Pillow instead of PIL.
2013-11-27 13:23:49 +02:00
Tom Christie
3765865b4b
Update 'default' explanation. Closes #1239
2013-11-20 17:40:56 +00:00
Tom Christie
128bda5712
Use less specfic language in UltaJSON notes
2013-11-15 15:24:32 +00:00
Jacob Haslehurst
52ac2199a8
Added drf-ujson-renderer to renderers docs
...
drf-ujson-renderer is a third party renderer that implements JSON renderering using UltraJSON
2013-11-11 22:24:37 +11:00
Doğan Çeçen
fd2c291c4d
Typo on api-guide/fields.md and serializers.py
2013-11-11 11:54:30 +02:00
erkarl
f72488d609
Updated OAuth2 authentication docs.
2013-10-31 03:47:23 +02:00
Kit Randel
7d5499bcac
In the API test client example 'data' was not defined. There's also no
...
need to define 'expected' as we can just test against the dict.
2013-10-25 11:45:33 +13:00
Tom Christie
d1edef410d
Merge pull request #1199 from yamila-moreno/get-filter-backends
...
Added get_filter_backends method
2013-10-24 07:29:21 -07:00
Yamila Moreno
82e9ddcf7a
Added get_filter_backends method
2013-10-24 16:16:01 +02:00
Yamila
c92af2b1dd
Typo on generic-views.md
2013-10-24 15:56:53 +02:00
Jacek Bzdak
cc9c7cd8a4
Small documentation fix
2013-10-22 13:15:48 +02:00
Jacek Bzdak
8fffc346c1
Merge remote-tracking branch 'origin/master'
2013-10-22 13:13:01 +02:00
Jacek Bzdak
25c9d552c0
Explained a bit more about django-filter implementation.
...
Well, I spent some time trying to gues how djang-filter works, and
if this changes would be introduced, I would have saved this time.
2013-10-22 13:11:14 +02:00
Tom Christie
76672787cd
Added . Closes #1188 .
2013-10-21 09:47:07 +01:00
Jesús Espino
ed9c3258a6
Remove the detail=None from APIException signature
...
The documentation not match with the implementation. The APIException doesn't have detail parameter in the constructor class, actually doesn't have constructor method at all.
2013-10-21 10:24:06 +02:00
Álvaro Lázaro
89ac03af26
Add missing commas in relations.md
2013-10-12 20:31:33 +02:00
Carlton Gibson
0bbc775b95
Merge pull request #1071 from craigds/field-transform-methods
...
Feature: add transform_<fieldname> methods to serializers
2013-10-09 01:11:46 -07:00
Omer Katz
ab4be47379
Fixed code example.
2013-10-03 17:34:34 +02:00
Tom Christie
afc9e9e038
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
2013-10-03 15:18:47 +01:00
Tom Christie
f6301636fb
Drop erronous left-over bit of docs. Closes #1147
2013-10-03 15:18:38 +01:00