Commit Graph

8103 Commits

Author SHA1 Message Date
Michael
2c992f09da Mention Django 2.1 compat where missing (#6158) 2018-09-04 11:33:42 -07:00
Jon Dufresne
468cdd16ed Remove unnecessary models.py file (#6142)
Since Django 1.7, an empty models.py file is not required.

See
https://docs.djangoproject.com/en/dev/releases/1.7/#app-loading-refactor

> It is possible to omit models.py entirely if an application doesn’t
> have any models.
2018-08-28 09:51:28 +02:00
Ryan P Kilby
c4b068cfd3
Fix dist build (#6139)
* Use tox-venv to reduce warnings in output

* Remove .egg-info/ to allow wheel installation

tox now invokes pip as a python module instead of through its entry
point. "python -m" adds the current directory to the PYTHONPATH, picking
up the .egg-info/ metadata directory, tricking pip into thinking that
the package is already installed (and thus not installing the wheel).
Deleting the metadata directory fixes this.
2018-08-24 15:57:45 -07:00
Craig Johnson
90ed2c1ef7 Small grammar correction in quickstart. (#6121)
Just felt the sentence could use some improving.
2018-08-13 10:32:17 +01:00
Craig de Stigter
81fa4b4f75 Fix CSRF cookie check failure when using session auth with django 1.11.6+ (#6113)
Test included. Fixes #6088
2018-08-07 08:18:56 +01:00
Oleg
2fab7838ef Improve ModelSerializer.create() error message. (#6112) 2018-08-06 20:11:55 +02:00
Oleg
8b5e830bce Handle models without .objects manager in ModelSerializer. (#6111)
* Handle models without .objects manager in ModelSerializer.

* Improvements according to review comments.
2018-08-06 14:30:43 +02:00
Jon Dufresne
5ad24b0811 Test using Django 2.1 final release (#6109) 2018-08-06 10:06:17 +02:00
Shabda Raaj
8f9b875456 Add building with drf book (#6102)
* Added building APIs with Django and DRF book

* Added book cover
2018-08-01 16:43:09 +01:00
Michael
8493990a66 Add Django 2.1 to classifiers (#6099) 2018-07-29 11:54:10 +01:00
Daniel Hahler
f404fda29c codecov: enable status for patch/changes, comment: diff (#6080)
Ref: https://github.com/encode/django-rest-framework/pull/6077#issuecomment-403838095

This is https://github.com/encode/django-rest-framework/pull/6050
without the project status, and fixes/improves the comment added in
https://github.com/encode/django-rest-framework/pull/6077.
2018-07-10 16:32:47 +02:00
dengshilong
0484d01aae Fix typo error, Link to Field (#6078) 2018-07-10 11:03:39 +02:00
Ryan P Kilby
987d73a03d Add minimal codecov comment (#6077) 2018-07-10 10:59:08 +02:00
Ryan P Kilby
33f8910b26
Fix deprecation warnings in tests (#6076)
* Fix deprecated arguments in schema tests

* Update optional reqs, fixing markdown deprecation
2018-07-09 23:56:52 -04:00
Eze Sunday
a0277919f0 Fix grammar mistake in html-and-forms.md (#6070) 2018-07-08 16:11:05 -04:00
Ryan P Kilby
38b3d0109b Only catch TypeError/ValueError for object lookups (#6028)
* Only catch TypeError/ValueError for object lookups

* Test wrapped TypeError/ValueError handling

* Raise NotImplementedError in tests instead of pass
2018-07-06 12:18:17 +02:00
Ryan P Kilby
a628a2dbce Drop Django 1.10 support (#5657)
* Remove Django 1.10 from CI

* Remove Django 1.10 compat code
2018-07-06 12:14:31 +02:00
Ryan P Kilby
9b8af04e7f Move guardian imports out of compat (#6054) 2018-07-06 11:32:02 +02:00
Ryan P Kilby
99ca078ebb Add "Community" section to docs, minor cleanup (#5993)
* Add 'Community' tab to navigation, move articles

* Drop DRF 2.x announcements and the docs note

* Drop embedded tutorial/guide/topics links

* Conver mixture of tabs/spaces => spaces

* Fix topics/community links
2018-07-06 11:28:18 +02:00
Ryan P Kilby
7095021db7 Rename base_name => basename for consistency's sake (#5990)
* Rename base_name => basename for consistency

* Update tests to use basename
2018-07-06 11:03:12 +02:00
Ryan P Kilby
f89cc066bc Admin renderer urls (#5988)
* Make admin detail link have small width

* Disable admin detail link when no URL

* Add 'AdminRenderer.get_result_url'

Attempts to reverse the result's detail view URL.
2018-07-06 10:58:26 +02:00
Daniel Hahler
3578bd6883 get_error_detail: use error_dict/error_list (#5785) 2018-07-06 10:44:58 +02:00
Ryan P Kilby
6511b52cca Fix schemas for extra actions (#5992)
* Add failing test for extra action schemas

* Add ViewInspector setter to store instances

* Fix schema disabling for extra actions

* Add docs note about disabling schemas for actions
2018-07-06 10:35:36 +02:00
Daniel Hahler
b23cdaff4c tox/pytest: move posargs, use -ra (#6039)
- tox: move {posargs} to the end, so that it can override previous
  entries, e.g. `-ra` when `-rw` was used.
- pytest: add `-ra` to addopts: it is good to see a summary of skipped
  and failed tests at the end.
2018-07-06 10:34:11 +02:00
Ryan P Kilby
0148a9f8da Improvements to ViewSet extra actions (#5605)
* View suffix already set by initializer

* Add 'name' and 'description' attributes to ViewSet

ViewSets may now provide their `name` and `description` attributes
directly, instead of relying on view introspection to derive them.
These attributes may also be provided with the view's initkwargs.

The ViewSet `name` and `suffix` initkwargs are mutually exclusive.

The `action` decorator now provides the `name` and `description` to
the view's initkwargs. By default, these values are derived from the
method name and its docstring. The `name` may be overridden by providing
it as an argument to the decorator.

The `get_view_name` and `get_view_description` hooks now provide the
view instance to the handler, instead of the view class. The default
implementations of these handlers now respect the `name`/`description`.

* Add 'extra actions' to ViewSet & browsable APIs

* Update simple router tests

Removed old test logic around link/action decorators from `v2.3`. Also
simplified the test by making the results explicit instead of computed.

* Add method mapping to ViewSet actions

* Document extra action method mapping
2018-07-06 10:33:10 +02:00
Daniel Hahler
56967dbd90 Fix upload parser test (#6044) 2018-07-05 23:52:32 -04:00
Ryan P Kilby
0e10d32fb1
Add NotImplementedError to coverage exclusion (#6057) 2018-06-24 17:56:31 -04:00
Ryan P Kilby
c5ab65923f
tests/test_permissions.py: do not add view perm for dj21 (#6055) 2018-06-23 07:31:06 -04:00
Daniel Hahler
499533d219 Use [tool:pytest] header in setup.cfg (#6045) 2018-06-22 18:14:26 -04:00
Chris Shyi
d9f541836b Update to Django 2.0 Routing Syntax (#6049) 2018-06-22 10:28:59 +02:00
Ryan P Kilby
1a170438d2 Add "optionals not required" build (#6047) 2018-06-22 10:16:57 +02:00
Daniel Hahler
7e0ad9262e tests: update pytest/pytest-django (#6042) 2018-06-21 16:23:52 -04:00
Daniel Hahler
a44cb67988 tests: fix usage of transaction.non_atomic_requests (#6043) 2018-06-21 14:44:58 -04:00
Daniel Hahler
06526cafe5 runtests.py: clean up PYTEST_ARGS (#6040)
1. `tests` and `--tb=short` is not necessary, since it is in
`pytest.addopts` already.
2. removes `-s` (shortcut for --capture=no): it is typically a good idea
   to not display output from successful tests.
2018-06-21 14:28:25 +01:00
Çağıl
8f55cd8db5 Fix url for group_names action example (#6036) 2018-06-21 04:29:05 -04:00
Asif Saifuddin Auvi
d778c5e51e Update tox to use Django v2.1b1 (#6037) 2018-06-21 09:07:33 +02:00
William S. Vincent
feffa109a8 Add REST APIs with Django book (#6033)
Just published book dedicated to DRF.
2018-06-20 00:24:26 +01:00
Xavier Ordoquy
3fcc076d91
Merge pull request #6024 from tveastman/master
Documentation: Correct the signature for HyperlinkedRelatedField.get_object()
2018-06-13 07:43:35 +02:00
Tom Eastman
be2bcf7e3f Documentation: Correct the signature for HyperlinkedRelatedField.get_object() 2018-06-13 16:39:28 +12:00
Emeka Icha
a21484d90e (fix) link to disqus article on cursor pagination (#6020) 2018-06-12 10:34:28 +01:00
Xavier Ordoquy
8688c99602
Merge pull request #6019 from jdufresne/pypi-register
Update incorrect PyPI URL to register an account
2018-06-10 09:49:16 +02:00
Jon Dufresne
89fb0b0f99 Update incorrect PyPI URL to register an account
To register an account on PyPI, the URL is
https://pypi.org/account/register/, which changed after the move to
pypi.org.
2018-06-09 19:09:31 -07:00
Tom Christie
26b0f650d6
Update LICENSE.md 2018-06-04 09:16:18 +01:00
Tom Christie
206423009b
Update LICENSE.md 2018-06-04 09:15:05 +01:00
Steven Loria
cf925caa48 Render markdown readme on PyPI (#6004)
* Render markdown readme on PyPI

PyPI now supports GitHub-flavored Markdown descriptions
(https://blog.thea.codes/github-flavored-markdown-on-pypi/),
so there's no need to convert the README to rst with pypandoc
any more.

* Remove readme checking

Checking markdown descriptions is not necessary.
See https://github.com/pypa/readme_renderer#markdown

* Upgrade twine
2018-06-03 19:21:04 +01:00
Matt Layman
f67d23c441 Add docs link to Caching API Guide. (#6012) 2018-05-31 09:58:02 +02:00
Teppei Fukuda
fe54575e6a Fix exceptions.md (#6003) 2018-05-25 10:42:22 +01:00
Xavier Ordoquy
a7cd1dbc43
Merge pull request #6001 from auvipy/master
updated tox and travis for django 2.1 alpha1
2018-05-23 21:10:27 +02:00
Asif Saifuddin Auvi
2634294667 updated tox and travis for django 2.1 alpha1 2018-05-23 16:33:15 +06:00
int3l
1ee3829a2f Update the http signature auth library ref link (#5997)
* Update the http signature auth library ref link

It seems that the djangorestframework-httpsignature package is outdated
and there is updated fork named drf-httpsig.

* Fixing the link ref format in the http signature section
2018-05-22 12:22:09 +01:00