Commit Graph

2203 Commits

Author SHA1 Message Date
Tom Christie
c3425accde Fix incorrect HTML parsing for DictField 2015-02-11 14:19:07 +00:00
Tom Christie
fbb21caaaa Merge master 2015-02-09 20:43:50 +00:00
Tom Christie
b2939c157d Fixes for latest version of pep8 2015-02-09 17:43:20 +00:00
Tom Christie
54d82f59ed Py3 compat fix 2015-02-09 17:19:22 +00:00
Tom Christie
d13c807616 Fix misleading AttributeErrors 2015-02-09 17:02:54 +00:00
Tom Christie
0240df1a38 Minor internal API cleanpu 2015-02-06 16:15:10 +00:00
Tom Christie
670723f021 Minor cleanups/improvements to ModelSerializer API 2015-02-06 15:45:02 +00:00
Tom Christie
dec3493d7c Minor cleanup 2015-02-06 14:43:43 +00:00
Tom Christie
a435b1b355 Merge branch 'version-3.1' of git://github.com/jpadilla/django-rest-framework into version-3.1 2015-02-06 14:39:31 +00:00
Tom Christie
1f99612845 Upgrade pending deprecations to deprecations 2015-02-06 13:21:35 +00:00
José Padilla
7f801b9a01 Add trim_whitespace to CharField #2517
If set to `True` then leading and trailing
whitespace is trimmed. Defaults to `True`.
2015-02-06 01:09:19 -04:00
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
José Padilla
c696b0ba0c Fix possible nested array fields 2015-02-05 10:12:14 -04:00
José Padilla
720d154c83 Merge remote-tracking branch 'upstream/version-3.1' into version-3.1 2015-02-04 23:34:20 -04:00
José Padilla
48fa77c09e Add child to ListField when using ArrayField 2015-02-04 23:33:59 -04:00
Tom Christie
e1c4513312 Fix NamespaceVersioning with hyperlinked serializer fields 2015-02-05 00:58:09 +00:00
Tom Christie
83673e8f74 Merge branch 'version-3.1-2489' of git://github.com/brandoncazander/django-rest-framework into brandoncazander-version-3.1-2489 2015-02-04 23:32:48 +00: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
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
Tom Christie
8b4ce5c636 Minor authentication message improvement. 2015-02-04 09:07:10 +00:00
Brandon Cazander
77d061d234 Provide rest_framework.resolve. Fixes #2489 2015-02-02 20:37:33 -08:00
Jason Yan
4b65e9e42b Fixed missing whitespace in error string. 2015-02-02 16:14:34 -08:00
Omer Katz
8f1d42e7d5 Fixed typos in docstrings. 2015-02-02 10:50:54 +02:00
José Padilla
b844cc4bb6 Merge remote-tracking branch 'upstream/version-3.1' into version-3.1
Conflicts:
	rest_framework/serializers.py
2015-02-01 15:34:33 -04:00
José Padilla
37dce89354 Add support for Django 1.8’s ArrayField 2015-02-01 15:33:34 -04:00
Tom Christie
e63f49bd1d Fix field mappings for 1.8 fields 2015-01-31 19:59:52 +00:00
Tom Christie
2cc4cb2465 Fix error text in test. 2015-01-31 08:53:40 +00:00
Tom Christie
53b29f0902 _closable_objects as an empty list, not deleted 2015-01-31 08:27:17 +00:00
Tom Christie
6838f17325 Add built-in translations. 2015-01-30 16:41:21 +00:00
Tom Christie
0d96cf2ca2 Latest translation source messages. 2015-01-30 16:27:49 +00:00
José Padilla
760b25bc20 Fix AttributeError on renamed _field_mapping 2015-01-30 11:36:03 -04:00
Tom Christie
4ee4b4f2dc Merge master 2015-01-30 14:00:25 +00:00
Tymur Maryokhin
ba7dca893c Removed router check for deprecated '.model' attribute 2015-01-29 17:28:03 +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
Brandon Cazander
ac87490b91 Clone the versioning_scheme when necessary. Fixes #2477 2015-01-27 17:10:17 -08: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
Tom Christie
65bca59ea5 Reload api_settings when using Django's 'override_settings' 2015-01-27 13:51:30 +00:00
Brandon Cazander
bf58c1265d Set a version attribute on cloned requests if necessary. 2015-01-26 22:56:57 -08:00
Brandon Cazander
ed04725822 Use enhanced request when cloning requests for checking permissions on other methods. Fixes #2455 2015-01-24 01:44:40 -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
35f6a82462 Added DictField and support for HStoreField. 2015-01-23 16:27:23 +00:00
Tom Christie
889a07f556 Support assignment in ClassLookupDict 2015-01-23 15:32:21 +00:00