Hi Arnold,
On Sep 5, 5:00 am, Arnold Chen <[EMAIL PROTECTED]> wrote:
> I am using django version 1.0.
>
> I have a admin with a form for custom validation. My validation is
> done in def clean(self):
>
> The problem is that I have a requirement to get the record id to check
> against database for data validation. But i don't know how to do.
> My model is:
>
> class Category(models.Model):
> name = models.CharField(max_length=100)
> parent = models.ForeignKey('self')
>
> The validation is to check if user selected the record itself as its
> "parent", which is illogical.
>
> I think i need to get the record id to check against database.
> However, i am only able to get form values, but not the record id. Do
> you have any idea?
What does your custom model form look like?
-Rajesh D
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---