On 2013-09-05, at 5:14 AM, Vincent Tou Liu <vin...@gmail.com> wrote:

> Dear all,
>  
> I am a newbie to djaogo and just started with the django doc 2 days ago.  I 
> have a problem with creating record in django admin page.  When I create new 
> poll record and click on "Save" button 3 times before the page reload, it 
> will create 3 records in the database.  How can I limit it to create just one 
> record?

Click the button once?

A more helpful suggestion would be to require the poll record to be unique so 
that your subsequent saves will fail. Look up the "unique=True" field attribute 
in the docs.

hth

                 - Tom

>  
> I am using django 1.5 on Postgresql 9.2.
>  
> Thanks.
>  
> Vincent
> 
> -- 
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.

Tom Lockhart
tlockhart1...@gmail.com



-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

<<inline: T_Lockhart_791_email_sig.png>>

Reply via email to