Hi everyone,

I've had a good search on the web, the wiki and the list archives, as
well as asking on IRC, and I'm yet to come up with a good solution to
this problem.

Basically, I'm trying to run a custom validator on a field which is
part of a model linked by a ForeignKey and set to
edit_inline=meta.STACKED.

The custom validator is almost completely the same as
RequiredIfOtherFieldDoesNotEqual, but is posted at the link below just
in case I've missed something obvious.

I am trying to attach this validator to a field which is part of a
model (as seen in the link below) that has a ForeignKey relationship to
another model (representing a person), and that can be edited from
within the parent model's admin pages.

However, in order to get this validator to run, I have to pass the
other_field name as 'parent.n.child' - in this case, payment.0.method -
in order to get the validator to run correctly. I don't have a way to
pass the field name without the number, and I'm not sure of a good way
to derive it (how can I tell which number this payment is?).

Google will no doubt mangle my code beautifully, so if you've got any
idea what I'm on about I'd really appreciate it if you could have a
look at http://django.pastebin.com/565256

Thanks in advance,

David Adam
[EMAIL PROTECTED]
[EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to