thanks !
for solution it will be helpful to me. On Monday, May 6, 2019 at 7:01:07 PM UTC+5:30, Jamiu Olashile Salimon wrote: > > use this to access the city_name field value; > > form.cleaned_data[“city_name”] > > Use to a print statement to see for yourself. > > On Mon, 6 May 2019 at 1:42 PM, Mayur Bagul <[email protected] > <javascript:>> wrote: > >> Hello Community, >> >> I've been stuck to this problem from one week. I have read Django Doc. >> and i found little bit relevant to my problem. >> >> *Form.py* >> >> >> from django import forms >> >> class NameForm(forms.Form): >> city_name = forms.CharField(label='city name', max_length=100) >> >> >> >> *Views.py* >> >> >> >> from django.http import HttpResponseRedirect >> from django.shortcuts import render >> >> from .forms import NameForm >> >> def get_name(request): >> >> if request.method == 'POST': >> >> form = NameForm(request.POST) >> >> * # Here i wanted to extract value stored inside Text Box* *How i >> can do that?* >> >> *#i wanted to extract city entered by user and store into another >> variable how to do it?* >> >> *# i wanted to use that variable to put it for filter * >> >> >> info = Data.objects.filter(city__exact=*'city'*) >> >> above line is for retrieving record for entered city >> from database. >> >> >> return render(request, 'name.html', {'info': info}) >> >> else: >> form = NameForm() >> >> return render(request, 'name.html', {'form': form}) >> >> >> >> >> *Please help me with this guys !* >> >> *i really need help on this because im not getting syntax for this on any >> resource.* >> >> *Thanking you.* >> >> -- >> 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 [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/666102fa-661e-4330-97f1-1414d7b08bce%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/666102fa-661e-4330-97f1-1414d7b08bce%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4f04c728-62f4-4b16-b09d-a8d474b64b69%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

