Skip to content

Commit

Permalink
Add note to FAQ in docs (#162)
Browse files Browse the repository at this point in the history
* Add note to FAQ in docs

Spent some time while implementing django-hosts and fixing our tests, so I thought it was worth adding here

* Update docs/faq.rst

* Update docs/faq.rst

* Update docs/faq.rst

---------

Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
  • Loading branch information
avilaton and hramezani committed Oct 27, 2023
1 parent 6b6d0a4 commit 57c16c5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,16 @@ Also, you have to install `django-debug-toolbar 0.9.X`_ or higher.

.. _`Django Debug toolbar`: https://github.com/django-debug-toolbar/django-debug-toolbar/
.. _`django-debug-toolbar 0.9.X`: http://pypi.python.org/pypi/django-debug-toolbar


My tests using client.post(...) are failing now, what should I do?
--------------------------------------------------------------

Yes, django-hosts might make your existing pytest tests fail if you are using
client.post(...). All you need to do is to set the correct SERVER_NAME on that call
depending on the host that should handle the call

.. code-block:: python
client.post(..., SERVER_NAME='api-server.something')

0 comments on commit 57c16c5

Please sign in to comment.