Initially I had written the "else" statement at the wrong place. Moved it under
the very first "if" and used then returned the HTTPresponse on the right place
inside the function
Regards,
Amitesh S
On Wednesday, 13 November, 2019, 5:42:57 AM IST, o1bigtenor
wrote:
On Tue, Nov 12,
On Tue, Nov 12, 2019 at 12:39 PM 'Amitesh Sahay' via Django users
wrote:
>
> Hello Kasper,
>
> Thank you for the hint. I found my mistake and resolved it.
>
So what did you do?
(doesn't need to have all the detail just the idea please)
TIA
--
You received this message because you are subscribed
Hello Kasper,
Thank you for the hint. I found my mistake and resolved it.
Regards,
Amitesh
On Tuesday, 12 November, 2019, 2:02:09 AM IST, Kasper Laudrup
wrote:
Hi Amitesh,
In this view:
On 11/11/2019 20.36, 'Amitesh Sahay' via Django users wrote:
>
> def contact(request):
>
Hi Amitesh,
In this view:
On 11/11/2019 20.36, 'Amitesh Sahay' via Django users wrote:
def contact(request):
if request.method =='POST':
name_r = request.POST.get('name')
email_r = request.POST.get('email')
phone_r = request.POST.get('phone')
comment_r
Hello Members,
I am creating a simple django forms and integrating it with models. I have
followed the django docs to perform the task, but I believe that I am doing
some mistake due to which I am getting
"ValueError at /blog/contact/". Below is the full error stack:
Environment:
Request Metho
itten already
to the database. If I change my order lines in admin to add up to 6 my
model won't know about those lines until they're written to the
database.
So I am left with the idea that I have to put my validation rules in a
third place - where both my admin forms and models can access th
I have the following code:
def sites(request):
if 'url' in request.GET:
url = request.GET['url']
website = WebSite.objects.get( url = url )
form = WebSiteForm(instance = website)
return submit_web_form( request, form )
else:
form = WebSiteForm(reque
It is not my case, because I have only one form, and there is an one-to-many
relationship between form and model.
2008/3/26, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>
> Check out this guide:
> http://collingrady.wordpress.com/2008/02/18/editing-multiple-objects-in-django-with-newforms/
>
> On Mar
Check out this guide:
http://collingrady.wordpress.com/2008/02/18/editing-multiple-objects-in-django-with-newforms/
On Mar 26, 3:02 pm, "didier rano" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a model like that:
>
> REF(Model)
> M2(Model):
> title
> ForeignKey(REF)
>
> I need to create a fo
Hi,
I have a model like that:
REF(Model)
M2(Model):
title
ForeignKey(REF)
I need to create a form with
M2Form(Form):
title
MultipleChoice(REF)
This form should generate many M2 with the same title. Is it possible to
use NewForms for it ?
Didier Rano
--~--~-~--~~-
>(the save() method shouldn't raise
>any validation errors except those triggered by the database server due
>to IntegrityErrors).
So what is the recommended place to write validations in models, for
now?
On Feb 22, 12:25 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-02-21 at
On Thu, 2008-02-21 at 08:54 -0800, shabda wrote:
> I have some models, and some forms to write data to them. The
> attributes in models need to have soem validations, (For example, name
> must be alpha numeric, price must be less that 1000 etc). SO I write
> the validations in model.save() and ra
I have some models, and some forms to write data to them. The
attributes in models need to have soem validations, (For example, name
must be alpha numeric, price must be less that 1000 etc). SO I write
the validations in model.save() and raise Exceptions, when a
validation fails. I also need to wr
13 matches
Mail list logo