* Extract method for `manual_fields` processing
Allows reuse of logic to replace Field instances in a field list by `Field.name`.
Adds a utility function for the logic plus a wrapper method on `AutoSchema`.
Closes#5632
* Manual fields suggestions (#2)
* Use OrderedDict in inspectors
* Move empty check to 'update_fields()'
* Make 'update_fields()' an AutoSchema staticmethod
* Add 'AutoSchema.get_manual_fields()'
* Conform '.get_manual_fields()' to other methods
* Add test for update_fields
* Make sure `manual_fields` is a list.
(As documented to be)
* Add docs for new AutoSchema methods.
* `get_manual_fields`
* `update_fields`
* Add release notes for PR.
* Use createsuperuser email and username flags
* Only remove db.sqlite3
* Remove global permission class
This interferes with Core API schema endpoint
* Add default pagination class
* Specify changes made in snippets/urls.py
* Auth urls were already set in tutorial/urls.py
* Specify changes made in snippets/urls.py
* Use the suggested admin username from quickstart
* Move global pagination setting away from quickstart section
* Add readme build to CI
* Fix pandoc import in setup.py
* Replace sponsor HTML with markdown
This loses the image centering, but can be converted to RST.
* Fix README RST conversion
- Links do not render correctly inside italics
- Add hr between image caption and section, fixes markup on older
versions of pandoc.
* Update assertion style in user logout test
* Apply middlewares to django request object
* Fix test for request auth hiding AttributeErrors
* Re-raise/wrap auth attribute errors
* Fix test for py2k
* Add docs for WrappedAttributeError
* SchemaJSRenderer renders invalid Javascript
Under Py3 the base64.b64encode() method returns a binary object, which gets rendered as `b'...'` in schema.js. This results in the output becoming:
var coreJSON = window.atob('b'eyJf...'');
which is invalid Javascript. Because base64 only uses ASCII characters it is safe to decode('ascii') it. Under Py2 this will result in a unicode object, which is fine. Under Py3 it results in a string, which is also fine. This solves the problem and results in a working schema.js output.
* Add regression test for #5608
* Add regression test for #5608
* Apparently the linter on Travis wants the imports in a different order than on my box...
* Remove trailing whitespace from lines
* Remove trailing nad leading whitespace from files
Allows for cleaner diffs in future changes. For editors that
automatically clean up whitespace on save, will avoid unrelated line
changes in diffs.
The urlparse shim in compat.py duplicates Django's bundled six. Can rely
on upstream instead of duplicating their works. Unifies shim with other
files already using six.
Fixed some regressions where compat was imported during app loading and
led to importing django.contrib.auth.models which ended in a
`AppRegistryNotReady` exception.
Fixed some regressions where compat was imported during app loading and
led to importing django.contrib.auth.models which ended in a
`AppRegistryNotReady` exception.