Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Form errors" from History Panel #1466

Closed
ShaheedHaque opened this issue Apr 20, 2021 · 3 comments
Closed

"Form errors" from History Panel #1466

ShaheedHaque opened this issue Apr 20, 2021 · 3 comments

Comments

@ShaheedHaque
Copy link

I'm trying to use the History panel for the first time in version 3.2. The panel shows up like this:

image

But clicking the "Refresh" button simply results in this:

image

I tried a bit of debugging, and it seems the rendered HTML is missing a value for "store_id":

<form method="get" action="/paiyroll/__debug__/history_refresh/">
    <input type="hidden" name="store_id" id="id_store_id"><input type="hidden" name="hash" value="cf94a6358557404b74a3de051719390f720408bd" id="id_hash">
    <button class="refreshHistory">Refresh</button>
</form>

which naturally enough results in a request like this:

http://freenas:8001/paiyroll/__debug__/history_refresh/?store_id=&hash=fbaaf3b21d7c12dae06f2f7ef9fb40ea19e1c638

I can confirm that if I stuff in a random value into store_id when HistoryStoreForm is used to initially render the page like this:

kwargs = {'initial': {'store_id': 55}}

then the Request button eventually returns this:

image

I'm not sure what store_id is supposed to refer to: did I miss some configuration setting when I scanned the docs?

Aside: I should perhaps mention that I am using a mixed template setup using Jinja2 for my stuff, and the normal Django Templates for stuff like this, and also that I'm on Django 3.x with Channels (but this is in dev, so no nginx, gunicorn etc). Any clues welcome!

@tim-schilling
Copy link
Contributor

Hi @ShaheedHaque, are you using async views? Also, can you share the exact versions of Django, Python and the toolbar?

@ShaheedHaque
Copy link
Author

Hi @tim-schilling,

Thanks for the quick response. Here is the information you requested:

are you using async views?

No. There is some usage of django-channels to get to Websockets, but not in the views(s) of immediate interest.

Also, can you share the exact versions of Django, Python and the toolbar?

Django 3.1.5
Python 3.8.5
django-debug-toolbar 3.2

@tim-schilling
Copy link
Contributor

@ShaheedHaque this is due to channels not being supported by the toolbar well. I'm closing this in favor of #1413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants