Commit Graph

5038 Commits

Author SHA1 Message Date
Kaptian
fffde8a63b Update throttling.py
Use pk pseudo attribute for identifying the user (in case the user model is not the default and has a different column name for the unique id)
2015-02-05 13:27:26 -08:00
Tom Christie
3b00824560 Merge pull request #2518 from longhotsummer/patch-1
FIX: Don't default to list in method args
2015-02-04 14:30:53 +00:00
Greg Kempe
e13d2af137 Parens around if clause 2015-02-04 16:26:23 +02:00
Tom Christie
d21617ff3b Merge pull request #2519 from Ofir-Purple/optimize-token-auth-queries
Prefetching the user object when getting the token in TokenAuthentication
2015-02-04 14:20:21 +00:00
Greg Kempe
d920683237 Use inline if 2015-02-04 16:13:30 +02:00
Ofir Ovadia
58e7bbc8ec Prefetching the user object when getting the token in TokenAuthentication.
Since the user object is fetched 4 lines after getting Token from the database, this removes a DB query for each token-authenticated request.
2015-02-04 16:08:41 +02:00
Greg Kempe
7bb5fd270d FIX: Don't default to list in method args
Fixes @list_route and @detail_route so that they don't initialize their `methods` parameter as a list. In some cases the list gets cleared, and the result is that default parameter is now empty, and may get reused unexpectedly.
2015-02-04 16:03:03 +02:00
Xavier Ordoquy
46181341d5 Merge pull request #2512 from heywbj/docs
Add django-rest-framework-recursive to docs
2015-02-04 00:13:52 +01:00
Warren Jin
76efbdddb6 docs 2015-02-03 17:18:54 -05:00
Tom Christie
33cfc2e486 Merge pull request #2509 from jamescooke/doc-fixes
Small documentation fixes
2015-02-03 13:51:03 +00:00
James Cooke
f676569661 Small documentation fixes
* Remove "you you" from viewsets API-guide
* Fix link from routers API-guide to viewsets API-guide
2015-02-03 13:43:03 +00:00
Tom Christie
67933d658e Merge pull request #2503 from tail/missing-space-error-string
Fixed missing whitespace in error string.
2015-02-03 00:19:52 +00:00
Jason Yan
4b65e9e42b Fixed missing whitespace in error string. 2015-02-02 16:14:34 -08:00
Xavier Ordoquy
0a805d979d Merge pull request #2501 from thedrow/patch-10
Fixed typos in docstrings
2015-02-02 10:00:24 +01:00
Omer Katz
8f1d42e7d5 Fixed typos in docstrings. 2015-02-02 10:50:54 +02:00
Tom Christie
6e2ea852d0 Merge pull request #2498 from dustinfarris/update-eda-link
Update link for ember-django-adapter
2015-02-01 21:17:36 +00:00
Dustin Farris
2111a99b32 Update link for ember-django-adapter 2015-02-01 16:00:24 -05:00
José Padilla
d6153a7fae Merge pull request #2497 from jpadilla/master
Fix base_template examples
2015-02-01 16:48:22 -04:00
José Padilla
9437d9b8ee Fix base_template name in example 2015-02-01 16:18:40 -04:00
José Padilla
aaa1fcd5d1 Fixes #2493 2015-02-01 16:18:02 -04:00
Tom Christie
a89e05dc73 Merge pull request #2492 from tomchristie/empty_closable_objects
_closable_objects as an empty list, not deleted
2015-01-31 14:30:00 +00:00
Tom Christie
53b29f0902 _closable_objects as an empty list, not deleted 2015-01-31 08:27:17 +00:00
Tom Christie
ee2f2d6baa Added 1.8-alpha to supported list. 2015-01-30 15:58:33 +00:00
Tom Christie
7cf9dea7f9 Docs typo. Closes #2491. 2015-01-30 11:00:29 +00:00
Tom Christie
2a43d9db87 Merge pull request #2486 from maryokhin/master
Cleanup '.model' shortcut from code and docs
2015-01-29 21:25:07 +00:00
Tymur Maryokhin
e720927b78 Removed deprecated '.model' docs 2015-01-29 17:28:18 +01:00
Tymur Maryokhin
ba7dca893c Removed router check for deprecated '.model' attribute 2015-01-29 17:28:03 +01:00
Tom Christie
60a63ffd29 Merge pull request #2482 from mareknaskret/patch-1
Update filtering.md
2015-01-28 14:21:56 +00:00
mareknaskret
4a2a36ef82 Update filtering.md
Updated links for django-guardian package.
2015-01-28 15:17:56 +01:00
Tom Christie
6d89430dd2 Merge pull request #2475 from sdreher/master
ManyRelatedField.get_value clearing field on partial update
2015-01-28 09:26:49 +00:00
Tom Christie
81c2562ec4 Merge pull request #2479 from lucaswiman/custom_user_shim_db_table
Use the proper db_table argument when constructing meta
2015-01-28 09:20:27 +00:00
Tom Christie
761f264f59 Merge pull request #2473 from tomchristie/reload-settings
Reload api_settings when using Django's 'override_settings'
2015-01-28 09:05:51 +00:00
Lucas Wiman
a1eba885e2 Use the proper db_table argument when constructing meta 2015-01-27 19:30:44 -08:00
Xavier Ordoquy
0daf160946 Fix #2476 2015-01-28 00:06:34 +01:00
Xavier Ordoquy
cf8a09993f Merge pull request #2474 from linovia/release/3.0.4
Release notes for 3.0.4
2015-01-27 23:07:37 +01:00
Susan Dreher
e7da266a86 reorganize imports 2015-01-27 16:32:15 -05:00
Susan Dreher
1714ceae9f reorganize imports 2015-01-27 16:31:25 -05:00
Susan Dreher
8c3f82fb18 🐛 ManyRelatedField get_value clearing field on partial update
A PATCH to a serializer's non-related CharField was clearing an ancillary StringRelatedField(many=True) field.
The issue appears to be in the ManyRelatedField's get_value method, which was returning a [] instead of empty
when the request data was a MultiDict.

This fix mirrors code in fields.py, class Field, get_value, Ln. 272, which explicitly returns empty on a partial update.

Tests added to demonstrate the issue.
2015-01-27 16:18:51 -05:00
Xavier Ordoquy
5b369bf5fe Bumped the version. 2015-01-27 19:45:37 +01:00
Xavier Ordoquy
925ea4bdc6 Release notes for 3.0.4 2015-01-27 19:43:38 +01:00
Tom Christie
65bca59ea5 Reload api_settings when using Django's 'override_settings' 2015-01-27 13:51:30 +00:00
Tom Christie
fc70c0862f Galileo Press -> Rheinwerk Verlag 2015-01-26 14:07:21 +00:00
José Padilla
221a28ff92 Merge pull request #2458 from jfw/patch-3
typo in fields.md
2015-01-25 09:42:41 -04:00
Jeff Fein-Worton
0a65913fea typo in fields.md 2015-01-24 18:34:16 -08:00
Kevin Brown
9687f4ffae Merge pull request #2457 from jfw/patch-3
minor typo in viewsets docs
2015-01-24 16:30:53 -05:00
Jeff Fein-Worton
39da9c7c86 minor typo in viewsets docs 2015-01-24 12:53:21 -08:00
Tom Christie
0cb5acee75 Merge pull request #2453 from alexsdutton/data-and-files-none-data
Pass {} as data to DataAndFiles, as it ends up in a MergeDict
2015-01-23 18:03:40 +00:00
Alexander Dutton
a1fa7218eb Pass {} as data to DataAndFiles, as it ends up in a MergeDict
In the same vein as #2399.
2015-01-23 16:52:24 +00:00
Tom Christie
8f6d7f4a5a Merge pull request #2451 from tomchristie/dict-field
Added DictField and support for HStoreField.
2015-01-23 16:33:37 +00:00
Tom Christie
35f6a82462 Added DictField and support for HStoreField. 2015-01-23 16:27:23 +00:00