mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Updated Stuff that needs to change (markdown)
parent
8bb5d7e10e
commit
99a22b40eb
|
@ -2,26 +2,26 @@ Stuff that needs to change
|
|||
==========================
|
||||
|
||||
1. Drop short status codes.
|
||||
2. Response to inherit from HttpResponse.
|
||||
+ Becomes a type of standard Django Template Response, with .render() method.
|
||||
+ add_header() dropped from View - set headers on the response as with standard Django.
|
||||
3. Request to extend from HttpRequest.
|
||||
+ self.DATA, self.FILES, self.auth, self.method will become request.DATA, request.FILES, request.method...
|
||||
4. Resource.filter_response, Resource.validate_request -> Serializer.serialize, Deserializer.deserialize
|
||||
+ Serializer, Deserializer will be decoupled from Resource.
|
||||
+ Method names changed to serialize, deserializer - conceptually more obvious.
|
||||
2. Response to inherit from `HttpResponse`.
|
||||
+ Becomes a type of standard Django Template Response, with `.render()` method.
|
||||
+ `add_header()` dropped from `View` - set headers on the response as with standard Django.
|
||||
3. Request to extend from `HttpRequest`.
|
||||
+ `self.DATA`, `self.FILES`, `self.auth`, `self.method` will become `request.DATA`, `request.FILES`, `request.method`...
|
||||
4. `Resource.filter_response`, `Resource.validate_request` -> `Serializer.serialize`, `Deserializer.deserialize`
|
||||
+ `Serializer`, `Deserializer` will be decoupled from `Resource`.
|
||||
+ Method names changed to `serialize`, `deserializer` - conceptually more obvious.
|
||||
+ Views will have `.serializer`, `.deserializer`
|
||||
5. View and Resource concepts separated.
|
||||
5. `View` and `Resource` concepts separated.
|
||||
+ Views handle request and response objects, provide `.get()`, `.post()`, `.put()`...
|
||||
+ Resources handle instances and filter arguments, provide `.read()`, `.create()`, `.list()`...
|
||||
+ Views can no longer return raw objects, must return responses.
|
||||
+ Views no longer have optional `model`, `form` properties that automagically create resources,
|
||||
if they use a resource, it must be provided using `.resource`
|
||||
6. Drop set_script_prefix munging.
|
||||
6. Drop `set_script_prefix` munging.
|
||||
+ Provide a `reverse` call that extends the standard `reverse`,
|
||||
but can take the current request as an argument if an absolute URL is required.
|
||||
7. Hooks throughout for creating .resource, .serializer, .renderer etc... instances inside the View, given the classes.
|
||||
8. InstanceMixin needs to disappear.
|
||||
7. Hooks throughout for creating `.resource`, `.serializer`, `.renderer` etc... instances inside the View, given the classes.
|
||||
8. `InstanceMixin` needs to disappear.
|
||||
|
||||
Stuff that might not be quite perfect, but will do for now
|
||||
==========================================================
|
||||
|
@ -40,6 +40,16 @@ Stuff that's not quite figured out
|
|||
What needs to be done
|
||||
=====================
|
||||
|
||||
1. Get cracking on 1.0 documentation.
|
||||
1. Get cracking on 1.0 documentation. (Can start on docs, before code is complete)
|
||||
+ Introduction, Getting started.
|
||||
+ API guide.
|
||||
* Views.
|
||||
* Requests & Responses.
|
||||
* Renderers & Parsers.
|
||||
* Authentication & Permissions.
|
||||
* Serializing & Deserializing.
|
||||
* Resources.
|
||||
+ Examples. (Use existing examples.)
|
||||
+ Contributing and other topics.
|
||||
2. Gradually migrate codebase towards 1.0, in way that causes minimal disruption.
|
||||
3. Triage and clean up existing tickets.
|
Loading…
Reference in New Issue
Block a user