I am trying to create a page to generate passwords and the user will select either level 0 or level 1 for varying strengths of the password. And I am not able to get the users selection of level 0 or level 1 using the radio button. My views.py My forms.py My html file Sorry if the problem may seem
Tag: forms
Edit Form Submit handler for a Model
I have a fairly simple django model in a Wagtail CMS; essentially: I need to perform an action when this model is saved via the Wagtail model edit form (eg /admin/section/thingy/123/edit). Currently, I have registered a post_save signal, however this has resulted in the method being called when the model is saved programmatically (via an import sync task). I’ve had
No Django POST data when sent over a form?
I am on a development server (no CSRF protection), sending over login data to Django via a web form (Django: 127.0.0.1:8000). HTML: Django: I’m pretty sure that the POST data is not being transmitted (TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘str’) in the print statement, but I can’t figure out why. (The HTML is on localhost and the
Django Rendering Form in HTML Issue
I’m attempting to render a form, in html and have tried the normal {{ form }}. However when I go to the site set up by: python manage.py runserver. I get the following where the form should go (highlighted section on screen-capture) webpage This is the code for the form in question. forms.py This is the html in question. I’ve
How to get Radio Radio Button Data from POST Request Data in an HTML form?
So I’m coding a test platform consisting of Multiple Choice Questions ( MCQs ) in Django. Everything is working fine but somehow I think that the radio button value from my question page is not getting fetch via POST request. Would appreciate some help! Here are my models : Here are my views : Here’s my question page : I’ve
When i hit the “PUBLISH COMMENT BUTTON” the comments does not get posted in my frontend in django
i am making a comment section in django but when i hit the comment section the comment does get published to the comment section of my website it just refreshed the page and does nothing but when i add a comment from my backend which is the admin section it works perfectly fine and get updated in my front end
Posting file upload via AJAX returns empty dictionary on Flask side
I have a Flask app that was working until I added login functionality. The issue I’m having is I have a modal that the user can upload a file with. HTML Then an AJAX call to upload the file: And finally the Flask code I’m using to debug: The command line output on the python side is: So it’s returning
Tkinter displaying users choice back to them once they have clicked a button and submitted and submitted
I’m trying to create a form where a user picks a time, and depending on the option they pick. It is then displayed back to the user once they click the submit button. But when i click an option and submit it prints all four options regardless. I also am trying to make it such that once a user clicks
Why am I getting django.db.models error telling me I have no attribute for TextChoices in Django (3.1.6) and Python(3.8)?
thanks so much for reading. I’ve got this running on my computer no problem. It’s working on my VS on Windows 10. But this error keeps coming up, it looks like TextChoices is no longer usable? AttributeError: module ‘django.db.models’ has no attribute ‘TextChoices’ I’m putting it u0p on PythonAnywhere, Python 3.8, and Django 3.1.6 I am still new at this,
Selenium + Python – entering text in form with no label/id?
I”m trying to enter some text in the box as shown below. I’ve narrowed the element down to SMDMainText. I’ve tried numerous ways of finding the element, however when I try to send_keys(), the result is that I get the error “element not interactable”. The issue that I’m facing is that I’m trying to find an element called <input automplete=”on”>