Marko Tibold
91ea57bf98
ModelSerializer.get_field() now returns a ChoiceField if the model has choices.
2012-10-22 21:38:18 +02:00
Marko Tibold
d1e05ea8d4
Merge commit '95a670de41a246777bc1e448dca8cc576b7b86ea' into BrowsableAPIRenderer
...
Conflicts:
rest_framework/renderers.py - manually resolved conflict
2012-10-22 20:09:36 +02:00
Tom Christie
95a670de41
Merge field changes: .default and .widget
2012-10-22 15:24:09 +01:00
Jamie Matthews
45d4622f09
Fix serialization of reverse relationships
2012-10-22 15:12:25 +01:00
Marko Tibold
ab1a12bfec
Refactoring BrowsableAPIRenderer
2012-10-21 23:04:12 +02:00
Marko Tibold
c30712a5c8
Remove redundant check if method=='DELETE'
2012-10-21 22:23:54 +02:00
Tom Christie
93f1aa4f69
Remove initial
kwarg, add default
.
2012-10-21 17:41:05 +01:00
Marko Tibold
71a93930fd
Fixing spelling errors.
2012-10-21 16:34:07 +02:00
Tom Christie
efabd2bb1b
docs, docs, docs, docs, docs, docs, docs
2012-10-19 19:59:55 +01:00
Tom Christie
a7390fe704
Fix up widget choices
2012-10-19 09:47:01 +01:00
Tom Christie
dab177e29e
Drop help_text
2012-10-19 09:20:54 +01:00
Tom Christie
643d3491a6
First pass at pastebin tutorial
2012-10-18 23:48:52 +01:00
Ian Strachan
d70e387f10
Added tests for dotted notation in serializer field source
2012-10-18 23:45:16 +01:00
Tom Christie
c341799344
Apply readonly on RelatedField
2012-10-18 22:19:54 +01:00
Tom Christie
d1746e2f3c
Allow callables in dotted notation like Field(source='foo.bar')
2012-10-18 22:03:48 +01:00
Tom Christie
fed235dd01
Make settings consistent with corrosponding view attributes
2012-10-17 23:09:11 +01:00
Tom Christie
e126b61542
Negotiation API finalized. .select_renderers and .select_parsers
2012-10-17 22:58:18 +01:00
Tom Christie
fb56f215ae
Added media_type
to .parse()
- Consistency with renderer API.
2012-10-17 22:39:07 +01:00
Tom Christie
4231995fbd
parser_context includes view
, request
, args
, kwargs
. (Not meta
and upload_handlers
)
...
Consistency with renderer API.
2012-10-17 22:19:59 +01:00
Tom Christie
99d48f9003
Drop .parse_string_or_stream() - keep API minimal.
2012-10-17 22:07:56 +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
eofs
520a183cc6
Typo in class name
2012-10-17 10:41:23 +03:00
Tom Christie
ae680b13da
Merge branch 'restframework2' of https://github.com/tomchristie/django-rest-framework into restframework2
2012-10-16 09:20:20 +01:00
Tom Christie
4fe734a91a
Merge pull request #296 from ulmus/restframework2
...
Removed serializers.TextField and related tests
2012-10-15 06:04:55 -07:00
Tom Christie
3c8f01b985
Explicit CSRF failure message. Fixes #60 .
2012-10-15 14:03:36 +01:00
Tom Christie
9c1fba3483
Tweak parsers to take parser_context
2012-10-15 13:27:50 +01:00
Jens Alm
9f3ff0105a
Removed serializer.TextField and related tests
2012-10-15 14:09:29 +02:00
Jens Alm
c942726509
Added docs, integer fields and refactored models.TextField to use CharField
...
I realized that per the django forms, there is no need for a separate
TextField, an unlimited CharField is perfectly good.
Also added default field for the different IntegerField types
2012-10-15 13:46:44 +02:00
Jens Alm
afbc9684f2
Revert "Support for request-based queryset limits on ListModelMixin"
...
This reverts commit de4604be0a
.
2012-10-15 11:49:56 +02:00
Jens Alm
de4604be0a
Support for request-based queryset limits on ListModelMixin
...
ListModelMixin uses the get_queryset from the MultipleObjectMixin. This
method can be overridden on the View class to return a different
queryset, but get_queryset doesn't accept a request parameter in. This
commit adds the limit_list hook to override if you want to limit the
queryset based on request-information such as the logged in user.
2012-10-15 11:47:56 +02:00
Jens Alm
36cc56bc9d
Added tests for TextField
2012-10-15 10:06:50 +02:00
Jens Alm
241be38340
Added TextField to recognized fields
2012-10-15 09:14:01 +02:00
Tom Christie
551c86c43a
Documentation for parsers
2012-10-14 22:43:07 +01:00
Tom Christie
7608cf1193
Improve documentation for Requests
2012-10-13 15:07:43 +01:00
Tom Christie
9094f93d18
Sanitise JSON error messages
2012-10-11 11:21:50 +01:00
Tom Christie
83f39b3dce
Don't fail when no data provided
2012-10-10 16:41:08 +01:00
Tom Christie
221ecd2182
Fix session auth
2012-10-10 16:36:25 +01:00
Tom Christie
d905d1cbd3
Fix yaml rendering
2012-10-10 16:34:00 +01:00
Tom Christie
5c7f3e23ee
Tidy up APISettings object to not rely on module state
2012-10-10 12:54:40 +01:00
Tom Christie
db6b5a990b
Fix key ordering in json. (sort if it's a sorted dictc representation, or not otherwise)
2012-10-10 12:32:23 +01:00
Tom Christie
648d2be29b
Make sure JSON output in Browseable API is nicely indented
2012-10-10 12:15:18 +01:00
Tom Christie
ccd2b0117d
Permissions and throttles no longer have a view attribute on self. Explicitly passed to .has_permissions(request, view, obj=None) / .allow_request(request, view)
2012-10-10 10:02:37 +01:00
Tom Christie
900c4b625b
api_key -> auth_token to avoid TastyPie conflict
2012-10-10 09:50:15 +01:00
Tom Christie
44281c3996
Remove 'tut 6 - resources' from the docs, since it doesn't exist yet
2012-10-10 09:36:18 +01:00
Tom Christie
a3ab66eca4
Add 'to_many' flag in get_related_field
2012-10-09 17:51:32 +01:00
Tom Christie
9bbc1cc403
Add flag in get_related_field
2012-10-09 17:49:04 +01:00
Tom Christie
97a7f27c82
Rename HTMLTemplateRenderer -> HTMLRenderer, DocuemntingHTMLRenderer -> BrowseableAPIRenderer
2012-10-09 15:58:48 +01:00
Tom Christie
94401b43d2
Flesh out quickstart guide and make some style tweaks
2012-10-09 13:50:26 +01:00
Tom Christie
7c4d50f621
Fix browseable API form display error for authenticated permissions
2012-10-09 12:48:49 +01:00
Tom Christie
115e61be09
Added quickstart guide
2012-10-09 12:01:17 +01:00