-
Notifications
You must be signed in to change notification settings - Fork 30
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
Reg. Django Admin admin panel #18
Comments
Can you explain "adding a uses from django zappa based admin panel" a bit more? I don't understand. |
I can able to login to the django admin panel. Through admin panel, i tried access users list, add tried add new user. I got the user addition form. while submitting the form. users gets logged out. Browser redirected to login page. Process get repeated on every attempt |
I can confirm this |
I'm 90% sure I know what this (and it's fixed in core) - but just to help me diagnose/reproduce - is the user created upon form submission? Also - are you using the application on a domain, or on the raw APIGW URL? |
Are you sure it's not because the sessionid and csrftoken cookies aren't set? |
That's my current diagnosis. This is fixed in the Zappa-core middleware, which D-Z is not using - yet! See #52 Again, I hope that this will be fixed be E.O.D. If not, it should be soon, this is the current Zappa priority. Thanks for your patience. |
The other benefit of this is that it means that you won't have to add ZappaMiddleware to your Django config anymore. |
Confirming this for myself.. {"message": "Could not parse request body into json: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value\n at [Source: [B@64744c6; line: 1, column: 3]"} |
Weirdly enough, this may be because the django-admin defaults to "multipart/form-data".. investigating.. |
Here is a screenshot of what parsed and unparsed session cookies I'm seeing. https://s3.amazonaws.com/ipoots-zappa/django-zappa-session.png |
Notice how immediately after first request after logging in the sessionid value is gone. |
This is the same behavior I noticed on the API Gateway version of the site. |
The cookie thing is fixed in core (and I think the head of D-Z master now), but the admin forms won't work until "multipart/form-data" forms work. Previously, this was impossible, but they made a change to API GW earlier this week that might allow it to work, but I need to investigate further. Stay tuned.. |
Awesome |
Okay, this is gonna work! I'm not all the way there yet but it'll pretty sure it will based on what I have so far. This means file uploads will work through Zappa too now. |
Okay, I got it working! |
Something going on the the cookies now.. grrrrr.. |
Okay! This should now be fixed in 0.13.0. You will need to call the 'deploy' command again so that the template mappings update. |
I'm still seeing the logouts locally. Here is my pip freeze -l output. base58==0.2.2 |
Locally? You'll need to remove the DjangoZappaMiddleware from your middleware, and you'll need to re-'deploy' for the new templates. |
Update it works on Lambda. Except you can't update any records via admin. I suspect it is because there are only 4 parameters and to update records in admin you need at least 5. Realistically there might need to be 8. Where is the code that sets up the template for this? Maybe I can work on it. |
Screencast of what I'm seeing. https://youtu.be/fUrbDVLjekw |
Ah, good catch! You can update that with: 'parameter_depth': 10 which has a default of 5. Again, this will require a different 'deploy'. I'm working on a 'redeploy' right now to avoid that. I'll also increase the default. |
Ahh! Awesome. |
when i tried to use django zappa for configure the django admin panel. session get logged out for every two subsequent clicks. I was unable to reach till adding a uses from django zappa based admin panel. I thought zappa cokkie getting expired.
The text was updated successfully, but these errors were encountered: