Many thanks, works fine and looks much better to me.
Dne pondělí 31. října 2016 10:21:37 UTC+1 Michal Petrucha napsal(a):
>
> On Sun, Oct 30, 2016 at 06:39:19AM -0700, Moreplavec wrote:
> > I found in Django Tutorial solution:
> > https://docs.djangoproject.com/en/1.10/intro/tutorial04/ :
> >
On Sun, Oct 30, 2016 at 06:39:19AM -0700, Moreplavec wrote:
> I found in Django Tutorial solution:
> https://docs.djangoproject.com/en/1.10/intro/tutorial04/ :
>
> Now i have:
>
> return HttpResponseRedirect(reverse('crm:company_detail', args=(company.pk,)))
> #return redirect('views.company_de
I found in Django Tutorial solution:
https://docs.djangoproject.com/en/1.10/intro/tutorial04/ :
Now i have:
return HttpResponseRedirect(reverse('crm:company_detail', args=(company.pk,)))
#return redirect('views.company_detail', pk=company.pk)
And it works fine!
--
You received this message
Greetings,
trying to create new app with simple Form to create and update Company
info. My view looks like:
def company_new(request):
if request.method == "POST":
form = CompanyForm(request.POST)
if form.is_valid():
company = form.save(commit=False)
co
4 matches
Mail list logo