Commit Graph

56 Commits

Author SHA1 Message Date
Sergey Sinitsyn
a6e525cf3a Add help_text and verbose_name attribute mapping for related field 2014-04-24 15:58:53 +06:00
Xavier Ordoquy
9e291879d1 Added an optional unique field to Album and checked that duplicates are detected. 2014-03-06 15:24:07 +01:00
Xavier Ordoquy
5a662dd60e Moving models back to test_serializer. 2014-01-31 11:20:53 +01:00
Xavier Ordoquy
c6d89afdf7 Define the upload_to for file fields. 2014-01-28 23:43:09 +01:00
Xavier Ordoquy
6aadd1639b Moved all the reused models to the models files to avoid conflicts with the refactored apps. 2014-01-28 18:53:24 +01:00
dpetzel
735c75abb9 add test case around ensuring proper field inference for boolean model field types 2013-10-18 21:10:49 -04:00
Andy Freeland
7d43f41e4a Remove 'Hold down "Control" ...' message from help_text
When getting the help_text from a field where `many=True`, Django
appends 'Hold down "Control", or "Command" on a Mac, to select more than
one.' to the help_text. This makes some sense in Django's ModelForms,
but no sense in the API.
2013-07-04 01:51:24 -04:00
Tom Christie
c36ff4e052 Cleaning up imports and whitespace 2013-05-31 11:17:33 +01:00
Markus Törnqvist
e2a5ec0350 Change BasicModel.verbose_name
Isn't it nicer to test for a text which is different from
what the previous broken behavior was? Now we can really
tell it works!
2013-05-18 17:42:56 +03:00
Markus Törnqvist
e2d3aa65d7 Move and rename LabelModelSerializer for further reuse 2013-05-18 16:56:26 +03:00
Markus Törnqvist
85faebbb75 Merge branch 'mikee2185-master' into mjtorn-master
Conflicts:
	rest_framework/fields.py
	rest_framework/serializers.py
	rest_framework/tests/models.py
	rest_framework/tests/serializer.py

Fixed all the conflicts.
2013-05-18 13:24:36 +03:00
Tom Christie
773a92eab3 Move models into test modules, out of models module 2013-05-10 21:57:05 +01:00
Tom Christie
b052c92ac3 Cleanup imports
Mostly adding `from __future__ import unicode_literals` everywhere.
2013-02-04 20:55:35 +00:00
Tom Christie
b73d7e9bb4 Cleaning up GFK test module. Refs #607. 2013-01-25 13:58:19 +00:00
Mark Aaron Shirley
a897eb5480 Create separate *NullableOneToOneTests TestCase 2013-01-07 16:27:31 -08:00
Mark Aaron Shirley
213981cef3 Handle ObjectDoesNotExist exceptions when serializing null reverse one-to-one 2013-01-04 21:11:03 +01:00
Tom Christie
6da21fa796 Merge pull request #541 from yprez/default_and_partial_serializers2
Fix "default" values and partial serializers.  Fixes #532.
2013-01-03 14:05:36 -08:00
Mark Aaron Shirley
8fd1f09dad Move relation tests models into models.py 2013-01-03 10:23:13 +01:00
Yuri Prezument
36e1987f59 Regression test for #532 - values overriden by "default" setting 2012-12-25 18:50:00 +02:00
Michal Dvorak (cen38289)
5ba2437f2d Merge remote-tracking branch 'tom/master'
Conflicts:
	rest_framework/tests/serializer.py
2012-12-21 10:53:23 +01:00
Tom Christie
a493c83248 urls, patterns, include imports move to compat to support incoming 1.3 thru 1.6 import compatability 2012-12-19 23:12:27 +00:00
Tom Christie
46b313315a Merge pull request #510 from joual/master
Fixes #509
2012-12-19 14:39:11 -08:00
Michal Dvorak (cen38289)
8ac77eaae8 Merge remote-tracking branch 'tom/master'
Conflicts:
	rest_framework/serializers.py
	rest_framework/tests/serializer.py
2012-12-17 17:01:00 +01:00
Joel Marcotte
01e06bcdf8 Added test for "positive_integer in choices tuple does not get parsed if not string".
Signed-off-by: Joel Marcotte <skaner@gmail.com>
2012-12-15 16:33:08 -05:00
Tom Christie
35f72cecb1 Fix model validation exclusions. Fixes #500. Fixes #506. 2012-12-15 20:40:41 +00:00
Marko Tibold
c65f22e0e4 Merge branch 'master' of https://github.com/tomchristie/django-rest-framework into #431 2012-12-06 23:47:47 +01:00
Michal Dvorak
ad01fa0eae #467 Added unit test 2012-12-03 19:07:07 +01:00
Pavel Savchenko
e311b763e1 add traverse_related feature + tests (fixes issue#461) 2012-11-30 01:34:46 +02:00
Marko Tibold
ca5b99486d Added _post_clean() behaviour by adding a .perform_model_validation() method.
Fixed some tests that were failing due to extra strict validation.
2012-11-22 22:36:37 +01:00
Stephan Groß
03100168ff added missing line 2012-11-21 11:57:00 +01:00
Stephan Groß
6ba4df8a27 Merge remote-tracking branch 'upstream/master' into regex_field
Conflicts:
	docs/topics/release-notes.md
2012-11-21 11:56:34 +01:00
Stephan Groß
ed713d0354 added tests 2012-11-21 11:07:08 +01:00
Jamie Matthews
68c397371c Fix related serializers with source argument that resolves to a callable 2012-11-20 09:41:36 +00:00
Jacob Magnusson
d67ee708e5 Add support for min_length / max_length keywords
on basic ModelFields
2012-11-18 18:14:21 +01:00
Marko Tibold
df689a7442 Reproduces #380 2012-11-10 12:00:20 +01:00
Ben Konrath
09f39bd23b Merge branch 'master' into restframework2-filter 2012-11-06 03:22:25 +01:00
Stephan Groß
03095f607a added testcase for custom slug field in hyperlinkedrelatedfield 2012-11-05 16:37:37 +01:00
Jacob Magnusson
1b49615c00 Added test that makes sure that fields with
dictionaries as data are returned as expected and
not turned into string representations
2012-11-03 00:32:02 +01:00
Ben Konrath
9c82f9717e Merge branch 'master' into restframework2-filter 2012-11-01 14:06:56 +01:00
Tom Christie
0047a46020 Merge fixes for 'blank=True' fields. Fixes #324, Fixes #325
Thanks to @Roarster.
2012-10-30 11:03:03 +00:00
Marko Tibold
6ccbdd10ad Adding failing tests that show null=True model fields are won't validate if their value is omitted. 2012-10-30 00:03:24 +01:00
Marko Tibold
bc99142c7d Added wo tests. One for PUTing on a non-existing id-based url. And another for PUTing on a non-existing slug-based url.
Fix doctoring for 'test_put_cannot_set_id'.
2012-10-28 19:35:50 +01:00
Tom Christie
b9e576f16e Push tests into a seperate app namespace 'rest_framework.test'
Prevents tests from running by default when rest_framework is installed
as 3rd party app.
Fixes #316, #185
2012-10-27 18:44:23 +01:00
Tom Christie
67f1265e49 Fix failing 'default' on ModelSerializer 2012-10-26 13:20:30 +01:00
Ian Strachan
c7a0d52fd7 #314 Fix for manytomany field being required in the payload even though the field is specified as readonly in the serializer 2012-10-22 22:24:26 +01:00
Jamie Matthews
45d4622f09 Fix serialization of reverse relationships 2012-10-22 15:12:25 +01:00
Rob Dobson
38673c35d4 Make default field check safe for boolean values whereby 'False' may be an acceptable default value 2012-10-17 19:12:34 +01:00
Ben Konrath
1e9ece0f93 First attempt at adding filter support.
The filter support uses django-filter to work its magic.
2012-10-11 12:01:07 +02:00
Tom Christie
52ba2e3333 Fix #285 2012-10-08 12:52:56 +01:00
Tom Christie
693892ed01 Fix for field to make it easier to access field relationships 2012-10-04 22:07:24 +01:00