request to post UnboundLocalError

12 views
Skip to first unread message

Deepak kumar

unread,
Oct 23, 2022, 3:22:52 PM10/23/22
to Django users
please check to pdf and send to my email dk92...@gmail.com

django.pdf

Jitendra kumar Patra

unread,
Oct 23, 2022, 6:24:18 PM10/23/22
to django...@googlegroups.com
Declare the contact variable before the return statement 

On Mon, 24 Oct, 2022, 00:52 Deepak kumar, <dk92...@gmail.com> wrote:
please check to pdf and send to my email dk92...@gmail.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce32825e-f275-4735-af27-6626e19f60ban%40googlegroups.com.

Yusuf Olamilekan muktar

unread,
Oct 24, 2022, 9:36:09 AM10/24/22
to django...@googlegroups.com
Hello,

The variable 'contact' on line 27 is messing with python as the model name 'contact' is not being recognized but instead, the variable is being recognized.
I'd advise you to change the variable name. i.e.
contact = contact(....) 
to 
contact_var = contact(...)
contact_var.save()



Mailtrack Sender notified by
Mailtrack
10/24/22, 09:04:18 AM

On Sun, Oct 23, 2022 at 8:22 PM Deepak kumar <dk92...@gmail.com> wrote:
please check to pdf and send to my email dk92...@gmail.com

Reply all
Reply to author
Forward
0 new messages