doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
encode(charset='utf-8', errors='replace') Encodes the URL to a tuple made out of bytes. The charset is only being used for the path, query and fragment. Parameters charset (str) – errors (str) – Return type werkzeug.urls.BytesURL
werkzeug.urls.index#werkzeug.urls.URL.encode
werkzeug.urls.url_decode(s, charset='utf-8', decode_keys=None, include_empty=True, errors='replace', separator='&', cls=None) Parse a query string and return it as a MultiDict. Parameters s (AnyStr) – The query string to parse. charset (str) – Decode bytes to string with this charset. If not given, bytes are ret...
werkzeug.urls.index#werkzeug.urls.url_decode
werkzeug.urls.url_decode_stream(stream, charset='utf-8', decode_keys=None, include_empty=True, errors='replace', separator=b'&', cls=None, limit=None, return_iterator=False) Works like url_decode() but decodes a stream. The behavior of stream and limit follows functions like make_line_iter(). The generator of pairs i...
werkzeug.urls.index#werkzeug.urls.url_decode_stream
werkzeug.urls.url_encode(obj, charset='utf-8', encode_keys=None, sort=False, key=None, separator='&') URL encode a dict/MultiDict. If a value is None it will not appear in the result string. Per default only values are encoded into the target charset strings. Parameters obj (Union[Mapping[str, str], Iterable[Tupl...
werkzeug.urls.index#werkzeug.urls.url_encode
werkzeug.urls.url_encode_stream(obj, stream=None, charset='utf-8', encode_keys=None, sort=False, key=None, separator='&') Like url_encode() but writes the results to a stream object. If the stream is None a generator over all encoded pairs is returned. Parameters obj (Union[Mapping[str, str], Iterable[Tuple[str, ...
werkzeug.urls.index#werkzeug.urls.url_encode_stream
werkzeug.urls.url_fix(s, charset='utf-8') Sometimes you get an URL by a user that just isn’t a real URL because it contains unsafe characters like β€˜ β€˜ and so on. This function can fix some of the problems in a similar way browsers handle data entered by the user: >>> url_fix('http://de.wikipedia.org/wiki/Elf (Begriff...
werkzeug.urls.index#werkzeug.urls.url_fix
werkzeug.urls.url_join(base, url, allow_fragments=True) Join a base URL and a possibly relative URL to form an absolute interpretation of the latter. Parameters base (Union[str, Tuple[str, str, str, str, str]]) – the base URL for the join operation. url (Union[str, Tuple[str, str, str, str, str]]) – the URL to j...
werkzeug.urls.index#werkzeug.urls.url_join
werkzeug.urls.url_parse(url, scheme=None, allow_fragments=True) Parses a URL from a string into a URL tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is ignored. Optionally fragments can be stripped from the URL by setting allow_fragments to False. The inverse of this functi...
werkzeug.urls.index#werkzeug.urls.url_parse
werkzeug.urls.url_quote(string, charset='utf-8', errors='strict', safe='/:', unsafe='') URL encode a single string with a given encoding. Parameters s – the string to quote. charset (str) – the charset to be used. safe (Union[str, bytes]) – an optional sequence of safe characters. unsafe (Union[str, bytes]) – ...
werkzeug.urls.index#werkzeug.urls.url_quote
werkzeug.urls.url_quote_plus(string, charset='utf-8', errors='strict', safe='') URL encode a single string with the given encoding and convert whitespace to β€œ+”. Parameters s – The string to quote. charset (str) – The charset to be used. safe (str) – An optional sequence of safe characters. string (str) – er...
werkzeug.urls.index#werkzeug.urls.url_quote_plus
werkzeug.urls.url_unparse(components) The reverse operation to url_parse(). This accepts arbitrary as well as URL tuples and returns a URL as a string. Parameters components (Tuple[str, str, str, str, str]) – the parsed URL as tuple which should be converted into a URL string. Return type str
werkzeug.urls.index#werkzeug.urls.url_unparse
werkzeug.urls.url_unquote(s, charset='utf-8', errors='replace', unsafe='') URL decode a single string with a given encoding. If the charset is set to None no decoding is performed and raw bytes are returned. Parameters s (Union[str, bytes]) – the string to unquote. charset (str) – the charset of the query string...
werkzeug.urls.index#werkzeug.urls.url_unquote
werkzeug.urls.url_unquote_plus(s, charset='utf-8', errors='replace') URL decode a single string with the given charset and decode β€œ+” to whitespace. Per default encoding errors are ignored. If you want a different behavior you can set errors to 'replace' or 'strict'. Parameters s (Union[str, bytes]) – The string ...
werkzeug.urls.index#werkzeug.urls.url_unquote_plus
class werkzeug.user_agent.UserAgent(string) Represents a parsed user agent header value. The default implementation does no parsing, only the string attribute is set. A subclass may parse the string to set the common attributes or expose other information. Set werkzeug.wrappers.Request.user_agent_class to use a subcl...
werkzeug.utils.index#werkzeug.user_agent.UserAgent
class werkzeug.useragents.UserAgent(environ_or_string) Represents a parsed user agent header value. This uses a basic parser to try to extract some information from the header. Parameters environ_or_string (t.Union[str, WSGIEnvironment]) – The header value to parse, or a WSGI environ containing the header. Return ...
werkzeug.utils.index#werkzeug.useragents.UserAgent
browser: Optional[str] = None The browser name, if it could be parsed from the string.
werkzeug.utils.index#werkzeug.user_agent.UserAgent.browser
language: Optional[str] = None The browser language, if it could be parsed from the string.
werkzeug.utils.index#werkzeug.user_agent.UserAgent.language
platform: Optional[str] = None The OS name, if it could be parsed from the string.
werkzeug.utils.index#werkzeug.user_agent.UserAgent.platform
string: str The original header value.
werkzeug.utils.index#werkzeug.user_agent.UserAgent.string
to_header() Convert to a header value. Return type str
werkzeug.utils.index#werkzeug.user_agent.UserAgent.to_header
to_header() Convert to a header value. Return type str
werkzeug.utils.index#werkzeug.useragents.UserAgent.to_header
version: Optional[str] = None The browser version, if it could be parsed from the string.
werkzeug.utils.index#werkzeug.user_agent.UserAgent.version
Utilities Various utility functions shipped with Werkzeug. HTML Helpers class werkzeug.utils.HTMLBuilder(dialect) Helper object for HTML generation. Per default there are two instances of that class. The html one, and the xhtml one for those two dialects. The class uses keyword parameters and positional parameters...
werkzeug.utils.index
class werkzeug.routing.UUIDConverter(map, *args, **kwargs) This converter only accepts UUID strings: Rule('/object/<uuid:identifier>') Changelog New in version 0.10. Parameters map (Map) – the Map. args (Any) – kwargs (Any) – Return type None
werkzeug.routing.index#werkzeug.routing.UUIDConverter
werkzeug.utils.validate_arguments(func, args, kwargs, drop_extra=True) Checks if the function accepts the arguments and keyword arguments. Returns a new (args, kwargs) tuple that can safely be passed to the function without causing a TypeError because the function signature is incompatible. If drop_extra is set to Tr...
werkzeug.utils.index#werkzeug.utils.validate_arguments
werkzeug.wsgi.wrap_file(environ, file, buffer_size=8192) Wraps a file. This uses the WSGI server’s file wrapper if available or otherwise the generic FileWrapper. Changelog New in version 0.5. If the file wrapper from the WSGI server is used it’s important to not iterate over it from inside the application but to p...
werkzeug.wsgi.index#werkzeug.wsgi.wrap_file
class werkzeug.datastructures.WWWAuthenticate(auth_type=None, values=None, on_update=None) Provides simple access to WWW-Authenticate headers. property algorithm A string indicating a pair of algorithms used to produce the digest and a checksum. If this is not present it is assumed to be β€œMD5”. If the algorithm i...
werkzeug.datastructures.index#werkzeug.datastructures.WWWAuthenticate
static auth_property(name, doc=None) A static helper function for Authentication subclasses to add extra authentication system properties onto a class: class FooAuthenticate(WWWAuthenticate): special_realm = auth_property('special_realm') For more information have a look at the sourcecode to see how the regular ...
werkzeug.datastructures.index#werkzeug.datastructures.WWWAuthenticate.auth_property
set_basic(realm='authentication required') Clear the auth info and enable basic auth.
werkzeug.datastructures.index#werkzeug.datastructures.WWWAuthenticate.set_basic
set_digest(realm, nonce, qop=('auth'), opaque=None, algorithm=None, stale=False) Clear the auth info and enable digest auth.
werkzeug.datastructures.index#werkzeug.datastructures.WWWAuthenticate.set_digest
to_header() Convert the stored values into a WWW-Authenticate header.
werkzeug.datastructures.index#werkzeug.datastructures.WWWAuthenticate.to_header
Versioning Versioning an interface is just a "polite" way to kill deployed clients. β€” Roy Fielding. API versioning allows you to alter behavior between different clients. REST framework provides for a number of different versioning schemes. Versioning is determined by the incoming client request, and may either be ba...
django_rest_framework.api-guide.versioning.index#acceptheaderversioning
Renderers Before a TemplateResponse instance can be returned to the client, it must be rendered. The rendering process takes the intermediate representation of template and context, and turns it into the final byte stream that can be served to the client. β€” Django documentation REST framework includes a number of bui...
django_rest_framework.api-guide.renderers.index#adminrenderer
Permissions Authentication or identification by itself is not usually sufficient to gain access to information or code. For that, the entity requesting access must have authorization. β€” Apple Developer Documentation Together with authentication and throttling, permissions determine whether a request should be granted...
django_rest_framework.api-guide.permissions.index#allowany
Throttling HTTP/1.1 420 Enhance Your Calm Twitter API rate limiting response Throttling is similar to permissions, in that it determines if a request should be authorized. Throttles indicate a temporary state, and are used to control the rate of requests that clients can make to an API. As with permissions, multiple ...
django_rest_framework.api-guide.throttling.index#anonratethrottle
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. β€” Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#apiexception
Authentication Auth needs to be pluggable. β€” Jacob Kaplan-Moss, "REST worst practices" Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token that it was signed with. The permission and throttling policies can then...
django_rest_framework.api-guide.authentication.index
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. β€” Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#authenticationfailed
Serializers Expanding the usefulness of the serializers is something that we would like to address. However, it's not a trivial problem, and it will take some serious design work. β€” Russell Keith-Magee, Django users group Serializers allow complex data such as querysets and model instances to be converted to native P...
django_rest_framework.api-guide.serializers.index#baseserializer
Authentication Auth needs to be pluggable. β€” Jacob Kaplan-Moss, "REST worst practices" Authentication is the mechanism of associating an incoming request with a set of identifying credentials, such as the user the request came from, or the token that it was signed with. The permission and throttling policies can then...
django_rest_framework.api-guide.authentication.index#basicauthentication
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#booleanfield
Renderers Before a TemplateResponse instance can be returned to the client, it must be rendered. The rendering process takes the intermediate representation of template and context, and turns it into the final byte stream that can be served to the client. β€” Django documentation REST framework includes a number of bui...
django_rest_framework.api-guide.renderers.index#browsableapirenderer
Caching A certain woman had a very sharp consciousness but almost no memory ... She remembered enough to work, and she worked hard. - Lydia Davis Caching in REST Framework works well with the cache utilities provided in Django. Using cache with apiview and viewsets Django provides a method_decorator to use decorators...
django_rest_framework.api-guide.caching.index
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#charfield
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#choicefield
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. β€” Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#createapiview
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. β€” Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#createmodelmixin
Pagination Django provides a few classes that help you manage paginated data – that is, data that’s split across several pages, with β€œPrevious/Next” links. β€” Django documentation REST framework includes support for customizable pagination styles. This allows you to modify how large result sets are split into individu...
django_rest_framework.api-guide.pagination.index#cursorpagination
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#datefield
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#datetimefield
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#decimalfield
Routers Resource routing allows you to quickly declare all of the common routes for a given resourceful controller. Instead of declaring separate routes for your index... a resourceful route declares them in a single line of code. β€” Ruby on Rails Documentation Some Web frameworks such as Rails provide functionality f...
django_rest_framework.api-guide.routers.index#defaultrouter
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. β€” Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#destroyapiview
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. β€” Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#destroymodelmixin
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#dictfield
Filtering The root QuerySet provided by the Manager describes all objects in the database table. Usually, though, you'll need to select only a subset of the complete set of objects. β€” Django documentation The default behavior of REST framework's generic list views is to return the entire queryset for a model manager....
django_rest_framework.api-guide.filtering.index#djangofilterbackend
Permissions Authentication or identification by itself is not usually sufficient to gain access to information or code. For that, the entity requesting access must have authorization. β€” Apple Developer Documentation Together with authentication and throttling, permissions determine whether a request should be granted...
django_rest_framework.api-guide.permissions.index#djangomodelpermissions
Permissions Authentication or identification by itself is not usually sufficient to gain access to information or code. For that, the entity requesting access must have authorization. β€” Apple Developer Documentation Together with authentication and throttling, permissions determine whether a request should be granted...
django_rest_framework.api-guide.permissions.index#djangomodelpermissionsoranonreadonly
Permissions Authentication or identification by itself is not usually sufficient to gain access to information or code. For that, the entity requesting access must have authorization. β€” Apple Developer Documentation Together with authentication and throttling, permissions determine whether a request should be granted...
django_rest_framework.api-guide.permissions.index#djangoobjectpermissions
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#durationfield
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#emailfield
Settings Namespaces are one honking great idea - let's do more of those! β€” The Zen of Python Configuration for REST framework is all namespaced inside a single Django setting, named REST_FRAMEWORK. For example your project's settings.py file might include something like this: REST_FRAMEWORK = { 'DEFAULT_RENDERER_...
django_rest_framework.api-guide.settings.index#encodings
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. β€” Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#filefield
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#filepathfield
Parsers Machine interacting web services tend to use more structured formats for sending data than form-encoded, since they're sending more complex data than simple forms β€” Malcom Tredinnick, Django developers group REST framework includes a number of built in Parser classes, that allow you to accept requests with va...
django_rest_framework.api-guide.parsers.index#fileuploadparser
Filtering The root QuerySet provided by the Manager describes all objects in the database table. Usually, though, you'll need to select only a subset of the complete set of objects. β€” Django documentation The default behavior of REST framework's generic list views is to return the entire queryset for a model manager....
django_rest_framework.api-guide.filtering.index
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#floatfield
Parsers Machine interacting web services tend to use more structured formats for sending data than form-encoded, since they're sending more complex data than simple forms β€” Malcom Tredinnick, Django developers group REST framework includes a number of built in Parser classes, that allow you to accept requests with va...
django_rest_framework.api-guide.parsers.index#formparser
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. β€” Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#genericapiview
ViewSets After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. β€” Ruby on Rails Documentation Django REST framework allows you to combine the logic for a set of related views in a single class, called a V...
django_rest_framework.api-guide.viewsets.index#genericviewset
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#hiddenfield
Versioning Versioning an interface is just a "polite" way to kill deployed clients. β€” Roy Fielding. API versioning allows you to alter behavior between different clients. REST framework provides for a number of different versioning schemes. Versioning is determined by the incoming client request, and may either be ba...
django_rest_framework.api-guide.versioning.index#hostnameversioning
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#hstorefield
Renderers Before a TemplateResponse instance can be returned to the client, it must be rendered. The rendering process takes the intermediate representation of template and context, and turns it into the final byte stream that can be served to the client. β€” Django documentation REST framework includes a number of bui...
django_rest_framework.api-guide.renderers.index#htmlformrenderer
Serializer relations Data structures, not algorithms, are central to programming. β€” Rob Pike Relational fields are used to represent model relationships. They can be applied to ForeignKey, ManyToManyField and OneToOneField relationships, as well as to reverse relationships, and custom relationships such as GenericFor...
django_rest_framework.api-guide.relations.index#hyperlinkedidentityfield
Serializers Expanding the usefulness of the serializers is something that we would like to address. However, it's not a trivial problem, and it will take some serious design work. β€” Russell Keith-Magee, Django users group Serializers allow complex data such as querysets and model instances to be converted to native P...
django_rest_framework.api-guide.serializers.index#hyperlinkedmodelserializer
Serializer relations Data structures, not algorithms, are central to programming. β€” Rob Pike Relational fields are used to represent model relationships. They can be applied to ForeignKey, ManyToManyField and OneToOneField relationships, as well as to reverse relationships, and custom relationships such as GenericFor...
django_rest_framework.api-guide.relations.index#hyperlinkedrelatedfield
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#imagefield
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#integerfield
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#ipaddressfield
Permissions Authentication or identification by itself is not usually sufficient to gain access to information or code. For that, the entity requesting access must have authorization. β€” Apple Developer Documentation Together with authentication and throttling, permissions determine whether a request should be granted...
django_rest_framework.api-guide.permissions.index#isadminuser
Permissions Authentication or identification by itself is not usually sufficient to gain access to information or code. For that, the entity requesting access must have authorization. β€” Apple Developer Documentation Together with authentication and throttling, permissions determine whether a request should be granted...
django_rest_framework.api-guide.permissions.index#isauthenticated
Permissions Authentication or identification by itself is not usually sufficient to gain access to information or code. For that, the entity requesting access must have authorization. β€” Apple Developer Documentation Together with authentication and throttling, permissions determine whether a request should be granted...
django_rest_framework.api-guide.permissions.index#isauthenticatedorreadonly
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#jsonfield
Parsers Machine interacting web services tend to use more structured formats for sending data than form-encoded, since they're sending more complex data than simple forms β€” Malcom Tredinnick, Django developers group REST framework includes a number of built in Parser classes, that allow you to accept requests with va...
django_rest_framework.api-guide.parsers.index#jsonparser
Renderers Before a TemplateResponse instance can be returned to the client, it must be rendered. The rendering process takes the intermediate representation of template and context, and turns it into the final byte stream that can be served to the client. β€” Django documentation REST framework includes a number of bui...
django_rest_framework.api-guide.renderers.index#jsonrenderer
Pagination Django provides a few classes that help you manage paginated data – that is, data that’s split across several pages, with β€œPrevious/Next” links. β€” Django documentation REST framework includes support for customizable pagination styles. This allows you to modify how large result sets are split into individu...
django_rest_framework.api-guide.pagination.index#limitoffsetpagination
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. β€” Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#listapiview
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. β€” Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#listcreateapiview
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#listfield
Generic views Django’s generic views... were developed as a shortcut for common usage patterns... They take certain common idioms and patterns found in view development and abstract them so that you can quickly write common views of data without having to repeat yourself. β€” Django Documentation One of the key benefit...
django_rest_framework.api-guide.generic-views.index#listmodelmixin
Serializers Expanding the usefulness of the serializers is something that we would like to address. However, it's not a trivial problem, and it will take some serious design work. β€” Russell Keith-Magee, Django users group Serializers allow complex data such as querysets and model instances to be converted to native P...
django_rest_framework.api-guide.serializers.index#listserializer
Metadata [The OPTIONS] method allows a client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval. β€” RFC7231, Section 4.3.7. REST framework includes a configurable mechanism for determining how ...
django_rest_framework.api-guide.metadata.index
Exceptions Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure. β€” Doug Hellmann, Python Exception Handling Techniques Exception handling in REST framework views REST framework's views handle various exceptions, and deal with returning appropriate erro...
django_rest_framework.api-guide.exceptions.index#methodnotallowed
Serializer fields Each field in a Form class is responsible not only for validating data, but also for "cleaning" it β€” normalizing it to a consistent format. β€” Django documentation Serializer fields handle converting between primitive values and internal datatypes. They also deal with validating input values, as well...
django_rest_framework.api-guide.fields.index#modelfield
Serializers Expanding the usefulness of the serializers is something that we would like to address. However, it's not a trivial problem, and it will take some serious design work. β€” Russell Keith-Magee, Django users group Serializers allow complex data such as querysets and model instances to be converted to native P...
django_rest_framework.api-guide.serializers.index#modelserializer
ViewSets After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output. β€” Ruby on Rails Documentation Django REST framework allows you to combine the logic for a set of related views in a single class, called a V...
django_rest_framework.api-guide.viewsets.index#modelviewset
Parsers Machine interacting web services tend to use more structured formats for sending data than form-encoded, since they're sending more complex data than simple forms β€” Malcom Tredinnick, Django developers group REST framework includes a number of built in Parser classes, that allow you to accept requests with va...
django_rest_framework.api-guide.parsers.index#multipartparser
Renderers Before a TemplateResponse instance can be returned to the client, it must be rendered. The rendering process takes the intermediate representation of template and context, and turns it into the final byte stream that can be served to the client. β€” Django documentation REST framework includes a number of bui...
django_rest_framework.api-guide.renderers.index#multipartrenderer