Tom Christie
8d0a91b002
Fix 3674 ( #4571 )
...
Handle ModelSerializer case for relationships to models with custom pk.
2016-10-13 12:43:43 +01:00
Tom Christie
9c996d7d2a
Clean up existing deprecation warnings. ( #4166 )
...
* Add Meta.fields = '__all__' to serializer classes where required.
* Add explicit on_delete=models.CASCADE to ForeignKey fields.
* Use '.remote_field' and '.model' in preference to '.rel' and '.to' when inspecting model fields.
* Use new value_from_object in preference to internal _get_val_from_obj
2016-06-02 14:39:10 +01:00
Karambir Singh Nain
69f1e3a9fd
Remove old django checks from tests and compat
...
Remove skipping of tests for Django<1.8. Remove several functions from compat.py not needed for Django>=1.8
2016-02-19 01:47:45 +05:30
Andrei Fokau
2acc6a756c
Use related_objects api for Django 1.9+
2015-11-19 13:04:37 +01:00
Martin Hill
ff36cbe4ba
same logic, more pythonic
2015-11-14 23:04:32 -05:00
Martin Hill
bac6f1fcf4
check if field.to_fields is None
2015-11-14 18:26:29 -05:00
Martin Hill
e475464945
fix for issue #3634
2015-11-14 17:00:07 -05:00
likeon
322bda8159
Added support for the to_field on ForeignKey fields
2015-10-21 15:33:18 +03:00
Carlton Gibson
45ace5010e
Remove OrderedDict fallback
2015-09-22 16:35:38 +02:00
Carlton Gibson
6e86a53c92
Remove apps.get_model
fallback
...
* Corrects presumed logic error in `ResolveModelWithPatchedDjangoTests`
2015-09-22 16:14:45 +02:00
Tom Christie
4f27697467
Fix get_model import
2015-08-27 17:28:12 +01:00
José Padilla
7351a3f6ca
Sort imports with isort
2015-06-25 16:55:51 -04:00
José Padilla
83c9136c90
Cleanup import following PEP 8 style guide
2015-06-25 16:10:17 -04:00
Ilias Kiourktsidis
0888f9cfc3
Use _meta instead of Meta on is_abstract_model function
2015-03-25 12:00:20 +00:00
Ilias Kiourktsidis
486f0a9367
Raise error when ModelSerializer used with abstract model
2015-03-23 15:01:19 +00:00
Tom Christie
dbd2352165
Fixes for latest pep8 updates. Refs #2563 .
2015-02-17 10:58:00 +00:00
Tom Christie
39f26c9eca
Merge master
2015-01-23 14:28:59 +00:00
Tom Christie
25a703b42c
Work around meta API differences
2015-01-23 11:15:11 +00:00
Tom Christie
6168f60ba8
Merge branch 'master' into version-3.1
2015-01-05 11:02:28 +00:00
Kyle Valade
a7479721c8
First pass at refactoring get_field_info in utils.model_meta
2014-12-29 00:35:00 -08:00
Tom Christie
2a1485e009
Final bits of docs for ModelSerializer fields API
2014-12-19 21:32:43 +00:00
Tom Christie
3a5b3772fe
Use ImproperlyConfigured when model meta lookup fails
2014-11-28 15:36:04 +00:00
Doug Beck
67735687b2
Ensure _resolve_model
does not return None
2014-11-18 01:26:23 -05:00
Tom Christie
4e001dbb7a
Drop usage of SortedDict. Closes #2027 .
2014-11-06 12:00:30 +00:00
Tom Christie
14ae52a24e
More gradual deprecation
2014-10-08 16:09:37 +01:00
Tom Christie
5b7e4af0d6
get_base_field() refactor
2014-09-18 11:20:56 +01:00
Tom Christie
40dc588a37
Drop label from serializer fields when not needed
2014-09-15 09:50:51 +01:00