Draft: Add warning async is not supported - #1911
Conversation
| self.assertNotIn("/ajax/", history_panel.text) | ||
| self.assertIn("/json_view/", history_panel.text) | ||
|
|
||
|
|
There was a problem hiding this comment.
| from django.test import AsyncRequestFactory | |
https://docs.djangoproject.com/en/stable/topics/testing/advanced/#asyncrequestfactory
There was a problem hiding this comment.
You must move that line up near the top of the file with the other imports.
Modify line 16 to read from django.test import AsyncRequestFactory, RequestFactory
|
As far as I see the problem would become irrelevant soon, after #1933 If so, feel free to close this PR |
| try: | ||
| from django.test import AsyncRequestFactory | ||
| except ImportError: | ||
| AsyncRequestFactory = None |
There was a problem hiding this comment.
AsyncRequestFactory is defined in Django >= v3.1 so the ImportError should not happen on all supported versions of Django.
Just modify line 16 to read from django.test import AsyncRequestFactory, RequestFactory
|
Sorry @denisSurkov as you mentioned #1938 should make this work unnecessary. It should be merged in the next few weeks so I think we can put this to rest for the time being. I appreciate your help and desire to make the toolbar a better library! If you're looking to contribute, there are several things that could be improved. If you're async focused, #1938 has identified several panels that are async incompatible ( |
Description
Add warning async is not supported.
Fixes #1845
Checklist:
docs/changes.rst.