Tom Christie
8d4ba478cc
Fix rendering of forms and add error rendering on HTML form
2013-10-02 16:13:34 +01:00
Tom Christie
a14f1e8864
Serializers can now be rendered directly to HTML
2013-10-02 13:45:35 +01:00
Tom Christie
75d6446c87
Allow .template_name attribute specified on view. Closes #1000
2013-09-26 16:09:08 +01:00
Tai Lee
a9dbd46c94
Refs #1109 -- Update docs. Integrate changes from feedback.
2013-09-14 00:54:44 +10:00
Tai Lee
bb3261ca48
Fixed #1105 -- Add hook for custom context in BrowsableAPIRenderer
.
...
Replace hard coded response status check with `allow_form` context
variable, so that it can be overridden in a custom renderer class.
2013-09-13 23:11:44 +10:00
Tom Christie
3fba60e99c
Drop broken placeholder serializations.
2013-08-30 09:02:54 +01:00
Tom Christie
e4d2f54529
Fix indenting on raw data forms
2013-08-29 20:39:05 +01:00
Tom Christie
c7f3b8bebe
Include serialized content in raw data form.
2013-08-29 17:23:26 +01:00
Tom Christie
37e2720a40
Add override_method
context manager and cleanup.
2013-08-29 12:55:56 +01:00
Tom Christie
18007d6846
Simplifying raw data renderering support
2013-08-28 21:52:56 +01:00
Tom Christie
8d590ebfde
First hacky pass at displaying raw data
2013-08-27 11:22:19 +01:00
Tom Christie
be0f5850c3
Extra docs
2013-08-23 16:51:34 +01:00
Tom Christie
c77e4a2c59
Merge branch 'master' into html-form-renderer
2013-08-23 16:46:14 +01:00
Tom Christie
436e66a42d
JSON responses should not include a charset
2013-08-23 16:45:55 +01:00
Tom Christie
e23d588852
Adding standard renderer attributes and documenting
2013-08-23 16:16:41 +01:00
Tom Christie
10d386ec6a
Cleanup and dealing with empty form data.
2013-08-23 16:10:20 +01:00
Tom Christie
0966a2680b
First pass at HTMLFormRenderer
2013-08-23 14:38:31 +01:00
Christopher Paolini
e6662d434f
Improved view/description function setting
...
Now supports each View having its own name and description function and
overriding the global default.
2013-08-17 17:44:51 -04:00
Tom Christie
664f8c6365
Added APIClient.authenticate()
2013-06-29 21:02:58 +01:00
Tom Christie
7224b20d58
Added APIRequestFactory
2013-06-28 17:17:39 +01:00
Tom Christie
f8a0d31d71
Remove ConfigurationError in favor of Django's ImproperlyConfigured
2013-06-05 13:45:28 +01:00
Tom Christie
2a38aa7291
Version 2.3.4
2013-05-24 23:55:59 +01:00
Tom Christie
7a93fdbe0a
Last bits of charset sorting-out-ness
2013-05-22 16:46:15 +01:00
Tom Christie
cdc3c37465
Merge and styling fixes
2013-05-21 12:01:56 +01:00
Tom Christie
f19e0d544f
Fix charset issues
2013-05-20 21:00:56 +01:00
Tom Christie
7c945b43f0
Only use object permissions in browsable api form generation if an object exists
2013-05-18 23:52:02 +01:00
Tom Christie
4802177766
Enforce object permissions check when rendering forms in browseable API
2013-05-18 21:19:53 +01:00
Tom Christie
4631b91e14
Fix broken 'binary content' in browseable API
2013-05-18 21:12:44 +01:00
Tom Christie
d4721fc1f7
Correct charset on UnicodeJSONRenderer
2013-05-18 17:25:38 +01:00
Tom Christie
bac4bf6e95
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
2013-05-18 17:22:27 +01:00
Tom Christie
0d3d66cb02
Added proper charset support
2013-05-18 17:21:43 +01:00
Pablo Recio
6dbbbc16da
Better checking if the content can be printable in the BrowsableAPI
2013-05-18 17:06:54 +02:00
Pablo Recio
97f034e3d6
Adds UnicodeJSONRenderer which doesn't ensure ascii
2013-05-18 17:06:54 +02:00
Pablo Recio
c69f960066
Adding a class attribute into JSONRenderer for ensuring ascii, and using it consistently
2013-05-18 17:06:54 +02:00
Karol Majta
ebe959b52a
charset param gets now appended to response's Content-Type. Closes #807
2013-05-18 16:45:05 +02:00
Markus Törnqvist
e7ddaf5472
Turns out label and help_text are not always there
2013-05-18 16:50:59 +03:00
Markus Törnqvist
1343398868
Renderer uses form field's label and help, not attribute name
2013-05-18 15:15:02 +03:00
Tom Christie
aea040161a
Forms in Broseable API support dynamic serializers based on request method
2013-05-18 09:36:09 +01:00
Tom Christie
b70c9cc107
Merge master
2013-05-05 18:12:35 +01:00
Victor Shih
8cabae22c5
Example and spelling fixes. Change "browseable" to "browsable" for consistency.
2013-05-01 21:26:40 -07:00
Tom Christie
8dff8d2fdc
Add get_breadcrumbs hook to BrowseableAPIRenderer. Closes #733 .
2013-04-30 14:34:03 +01:00
Tom Christie
8fa79a7fd3
Deal with List/Instance suffixes for viewsets
2013-04-26 14:59:21 +01:00
Tom Christie
f68721ade8
Factor view names/descriptions out of View class
2013-04-04 21:42:26 +01:00
Tom Christie
3357a36e37
assert package requirements are met for YAMLRenderer
2013-02-22 20:46:43 +00:00
Tom Christie
0c7d6062b2
Py3/2 compat fixes for uncode view names/descriptions
2013-02-22 20:18:16 +00:00
Tom Christie
a39de47cc7
XML cleanup
2013-02-22 19:46:47 +00:00
Tom Christie
3ad5ebaea6
Fix name fallback for BrowsableAPIRenderer
2013-02-22 13:38:20 +00:00
Michael Elovskikh
aa95ccbab7
Fixed UnicodeDecodeError on get_name and get_description methods
2013-02-22 18:50:09 +06:00
Tom Christie
048ef6a039
Polishing touches to #663
2013-02-22 08:39:26 +00:00
Michael Elovskikh
8fdf925015
Added tabs between object form and generic content form on PUT/PATCH form
...
Some extra behaviour to `BrowsableAPIRenderer` to handle PATCH form.
Added PATCH button on generic content PUT form.
Tabs between object form and generic content form on PUT/PATCH form wich are
both allways visible now.
Fix #570
Refs #591
2013-02-15 14:41:12 +06:00
Tom Christie
f5a0275547
Tidy up internal view permission checking logic.
...
Also document correctly - these methods are now public and will fall
under the deprecation policy from now on.
2013-02-12 08:58:28 +00:00
Tom Christie
09b01887f2
New style object-level permission checks
2013-02-12 08:58:28 +00:00
Marc Tamlyn
bd7977eed7
Purge naked excepts.
...
Most of these had obvious exceptions which would be thrown. Some I'm not
sure about but they should at least catch only Exception so as not to
ignore SystemExit and other inappropriate Error classes.
2013-02-06 13:05:17 +00:00
Tom Christie
8e846bdf52
Merge branch 'py3k' into 2.2
...
Conflicts:
rest_framework/relations.py
rest_framework/serializers.py
rest_framework/tests/relations_hyperlink.py
rest_framework/tests/relations_slug.py
2013-02-04 20:37:09 +00:00
Tom Christie
2c634c0e5c
Use request.QUERY_PARAMS internally
...
(instead of request.GET)
2013-02-04 19:51:31 +00:00
Tom Christie
d9c7b1c585
Merge branch 'p3k' of https://github.com/linovia/django-rest-framework into working
...
Conflicts:
rest_framework/authentication.py
rest_framework/relations.py
rest_framework/serializers.py
rest_framework/settings.py
rest_framework/tests/authentication.py
rest_framework/tests/genericrelations.py
rest_framework/tests/generics.py
rest_framework/tests/relations_hyperlink.py
rest_framework/tests/relations_nested.py
rest_framework/tests/relations_pk.py
rest_framework/tests/serializer.py
2013-02-01 11:58:55 +00:00
Tom Christie
be6df3ae3c
Merge branch 'master' into many-fields
...
Conflicts:
rest_framework/relations.py
2013-01-30 13:41:56 +00:00
Tom Christie
4601487248
Use many=True style for pk relations.
2013-01-30 12:41:18 +00:00
Juan Riaza
a061e3d9e2
deprecate simplejson
2013-01-05 13:40:02 +01:00
Xavier Ordoquy
737349d238
Merge remote-tracking branch 'reference/py3k' into p3k
2013-01-02 16:09:21 +01:00
Tom Christie
aa72f8d63d
Fix bug with M2M in browseable API
2012-12-17 21:59:51 +00:00
Stephan Groß
e044fa089b
fixed #469 - RegexField <--> BrowsableAPI Bug
2012-12-04 09:40:23 +01:00
Xavier Ordoquy
5fad46d7e2
Merge remote-tracking branch 'reference/master' into p3k
2012-12-02 12:43:32 +01:00
Xavier Ordoquy
d6b4a6b04a
Fixed a bug with type and python 2.x compat.
2012-12-02 01:24:15 +01:00
Xavier Ordoquy
73572bc199
trunk bug.
2012-12-02 01:23:39 +01:00
Marko Tibold
968f4a5ca4
Merge branch 'custom-serializer-form-class' of https://github.com/ludwigkraatz/django-rest-framework into mergebranch#390
...
Conflicts:
rest_framework/fields.py
rest_framework/renderers.py
Manually solved
2012-11-29 01:10:32 +01:00
Xavier Ordoquy
b3698acb6c
First passing test under p3k \o/
2012-11-22 00:20:49 +01:00
Tom Christie
b0bad35ef0
Tweak to work with serializer performance improvement
2012-11-21 17:32:32 +00:00
Stephan Groß
834f31ae4d
added RegexField to field_mapping in BrowsableAPIRenderer
2012-11-21 14:58:04 +01:00
Tom Christie
4e42ef0bd5
Merge pull request #429 from minddust/minor_fixes
...
updated to buildin status codes
2012-11-19 08:47:51 -08:00
Stephan Groß
728e505180
updated to buildin status codes
2012-11-19 17:35:32 +01:00
Marko Tibold
403886b79b
Merge commit '3b258d69c92e9d9293f7c5d1690f0ca434e677e3' into file_and_image_fields
2012-11-15 22:48:22 +01:00
Stephan Groß
44ff2e0add
fixed some typos
2012-11-14 19:36:29 +01:00
Marko Tibold
8cdbc0a33a
Properly render file inputs in the Browsable api.
2012-11-14 00:09:39 +01:00
Ludwig Kraatz
5cd64cc551
Fields specify what FormFieldClass should be used by BrowsableApiRenderer
...
added SerializerField Attribute "form_field_class" and defaults for
existing Fields
2012-11-08 16:02:03 +01:00
Ludwig Kraatz
08fef1ac81
Allowing custom Serializer Fields to have different BrowsableApiRendered Form Fields than CharField
...
moved field_mapping
from local serializer_to_form_fields var
to BrowsableAPIRenderer class attr
2012-11-08 14:58:53 +01:00
Ludwig Kraatz
b4b860b45b
moved field_mapping to be BrowsableAPIRenderer attr
...
from local serializer_to_form_fields var
to BrowsableAPIRenderer class attr
in order to - allow customization when subclassing
2012-11-08 14:54:01 +01:00
Tom Christie
b19c58ae17
Support for HTML error templates. Fixes #319 .
2012-11-06 10:44:19 +00:00
Michael Shepanski
3d0f8b792f
Fix for bug #363 : ChoiceField missing in renderers.py
2012-11-04 12:31:37 -05:00
Tom Christie
36e21153fb
Merge master
2012-11-01 23:11:28 +00:00
Tom Christie
d327c5f531
Relational field support in browseable API.
...
Add slug relational fields.
Add quickstart.
2012-11-01 23:04:13 +00:00
Pavel Savchenko
d3aedd5fb1
return choices as unicode and not string,
...
might as well have jsonp return unicode
2012-11-01 15:00:22 +02:00
Tom Christie
4cdd0b845e
Final docs tweaks for 2.0
2012-10-30 13:59:31 +00:00
Tom Christie
6e4ab09aae
readonly -> read_only
2012-10-28 20:21:45 +00:00
Tom Christie
12c363c1fe
TemplateHTMLRenderer, StaticHTMLRenderer
2012-10-28 18:12:56 +00:00
Tom Christie
2efb5f8a14
Object-level permissions respected by Browseable API
2012-10-26 12:46:15 +01: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
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
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
Tom Christie
fb56f215ae
Added media_type
to .parse()
- Consistency with renderer API.
2012-10-17 22:39:07 +01: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
Tom Christie
d905d1cbd3
Fix yaml rendering
2012-10-10 16:34:00 +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
97a7f27c82
Rename HTMLTemplateRenderer -> HTMLRenderer, DocuemntingHTMLRenderer -> BrowseableAPIRenderer
2012-10-09 15:58:48 +01:00
Tom Christie
f4d4d54e03
Adding migration and changelog docs
2012-10-08 12:17:43 +01:00
Tom Christie
26c7d6df6c
HTMLTemplateRenderer working
2012-10-05 12:13:44 +01:00
Tom Christie
4af7fb96f7
Tidy up renderers slightly
2012-10-05 11:12:52 +01:00
Tom Christie
d07dc77e91
Accepted media type uses most specific of client/renderer media types.
2012-10-05 10:23:47 +01:00
Tom Christie
cc0d2601b8
Minor fixes
2012-10-04 21:36:40 +01:00
Tom Christie
a02707e12f
Tweaks
2012-10-03 21:08:32 +01:00
Tom Christie
a366d6e612
M2M fields supported
2012-10-03 16:08:20 +01:00
Tom Christie
f1f7f5d4e3
Added failing test for m2m data
2012-10-03 11:50:08 +01:00
Tom Christie
1a05942166
Stopgap fix for model fields rendering in browseable API
2012-10-03 09:45:27 +01:00
Tom Christie
c30e0795be
Rename generic views
2012-10-03 09:26:15 +01:00
Tom Christie
84f7758039
Remove support for doctests
2012-09-28 11:53:51 +01:00
Tom Christie
ee36e4ab0c
Only display forms when user has permissions. #159
2012-09-27 21:51:46 +01:00
Tom Christie
b7b7ca5af9
Don't display readonly fields
2012-09-25 13:35:28 +01:00
Tom Christie
d9cba6398e
Clean up bits of templates etc
2012-09-20 17:44:34 +01:00
Tom Christie
f4670c8996
Hack out bunch of unneccesary private methods on View class
2012-09-20 14:00:53 +01:00
Tom Christie
7efc6e8205
Remove dumbass __all__ variables
2012-09-20 13:22:07 +01:00
Tom Christie
4b691c4027
Change package name: djangorestframework -> rest_framework
2012-09-20 13:06:27 +01:00