Skip to content
Advertisement

Tag: django-forms

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,

Image is not updating in Django

Please help me. I am trying to update the profile in which username and email are updated but the image dose not. My code is…. profile.html views.py forms.py Answer I believe your issue lies in views.py. Firstly, you are checking to see if the method for retrieving the view is POST. If it is not, you are initializing a form

Django Query Multi Table

I’m trying to do a form query on a field and the goal is to get all the kids enrolled in all the teachers classes in this drop down menu. The query I have right now is getting all the classes a teacher is enrolled in . However how do I retrieve the kids within those classes. I attached a

Django ModelForm has no model class specified, Although model in Meta class is set to a model

Error is “ModelForm has no model class specified.” forms.py code models.py code views.py code The error is occurs when I’m trying to create a new user form (user_form = UserForm()). Although in my meta class I set models to the User model imported from django.contrib.auth.models. Error Info Picture Answer I think your spellings in your forms are wrong could you

Django user registration form not showing properly

I am making a Django project where there are two types of users customer and restaurant. Both can register separately. Everything is running fine except that I cannot add CSS class to password field and there are warning showing around password field which I don’t how they are coming. Models.py Forms.py soryy for bad code pasting.Just for clarification class ‘CustomerSignupform’

Advertisement