On Fri, May 21, 2010 at 6:59 PM, Goran <thego...@gmail.com> wrote: [SNIP] > Region: <select name="region_no"> > <option value="">-- Region --</option> > {{ region }} > {% for reg in region %} > <option>{{ reg }}</option><br/> > {% endfor %} > </select><br/> > > view after submit form > > def newreg(request): > regog = request.POST['region_no'] > > no1 = NewReg(region=Region(regog) ) #here i need integer which > is ID of selected option from database
Are you talking about: # in your template <option value="{{ reg.id }}">{{ reg }}</option> Does works for you? ~Rolando -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.