I couldn't open the screenshot . But to work with the django forms you need to
perform below tasks.
1) create model of your choice in models.py.2). Python manage.py
makemigrations3) python manage py migrate.4 create a python file called
forms.py inside your app.5) import your models there ( fro
It's not strange. You can't access to an attribute of a form class
directly. Remember how do you define the form in a view. You're passing
arguments such as *data=request.POST*. You're trying to access an undefined
attribute. Because It's a form class and needs input.
Try to print *t.__dict__ *yo
In addition, you must define your model in models.py
And to get this attributes on your views.py from a post request, you could use
like {{ form.attribute }}
Regards
Sent from my iPhone
> On 27 Apr 2020, at 10:29, DimGo wrote:
>
>
> Why is this this strange error?
> --
> You received thi
3 matches
Mail list logo