Let me refine the situation:
[model A] -> foreign key on [model B] -> foreign key on [model C]

When I create [Model A], it may only refer to any [model B]
that is attached to a specific [model C].

If I get it right, I should create a custom AddManipulator,
with  a [model C] as its parameter. A bit like this:

-------------
class MyAddManipulator(ModelA.AddManipulator):
  def __init__(self, model_c_id):
    ModelA.AddManipulator.__init__(self)
    for f in self.fields:
      if f.field_name == 'model_a_fk':
        # Do specific query to create the custom SelecField
        ...
-------------

If this is the right way to do it:
- (how) may I make this manipulator the default AddManipulator
of my [model A] ?
- is it not a bit redundant? Initiating the default
manipulator with the list of [model B], then restricting that
list to a subset of [model B] ?

What is the 'coolest (django-like)' way to do it?
Documentation lacks information about
Models->Manipulators->Forms, I think.

Thanks for reading to that point...

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)




--~--~---------~--~----~------------~-------~--~----~
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