On Tue, Dec 18, 2012 at 2:48 AM, Satinderpal Singh <satinder.goray...@gmail.com> wrote: > I created a search box for searching the information about the client > so that this information uses to create the report.
add these lines : > def search(request): <snip> > {% endfor %} > > i want to get job id to be saved through header view: > def header(request): job =Job.objects.get(id=request.GET['q']) > if request.method=='POST': > form = headForm(request.POST) > if form.is_valid(): > cd = form.cleaned_data profile = form.save(commit=False) profile.job = job profile.save() form.save() > HttpResponseRedirect(reverse('Automation.report.views.result')) > > But get the following error: > IntegrityError at /report/header/ > (1048, "Column 'job_id' cannot be null") > > Please anybody tell me where i am wrong? > Hope this helps you. -- Sandeep Kaur E-Mail: mkaurkha...@gmail.com Blog: sandymadaan.wordpress.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.