Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 4, 2005 21:10:30

s.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Generic Views - CRUD


The generic views seem very limiting. Is there a way to include
multiple objects in the same form?

I have an object, which relates to another via a foreign key. On
creation, it needs accept input for data to store in the other table
(and create two additional linked objects). I need to get information
for the master object, as well as values to store in the linked
records.

I can do this using request.POST, but I will have to map and validate
all the data on my own. Is there another way to do this?


Thanks

Offline

#2 Nov. 4, 2005 22:44:20

Ian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Generic Views - CRUD


Hi.

I would think some ajax mojo on the lookup field for the foreign key
would be able to populate these fields for you (and also change them
when the user changes the foreign key)http://code.djangoproject.com/wiki/NewAdminChangesdescribes some
other enhancements to the default CRUD tables, like being able to do
master-slave input views (eg.. invoice/invoice-item) which makes the
generic views more useful.

as for manipualtors.. you can set it up so that you only have to
validate/manipulate the fields you care about.
I did something like this onhttp://feh.holsman.net/articles/2005/10/18/django-custommanipulatorswhere it adds a custom field to the manipulator to populate another
relationship. this might help.

regards
Ian


On 11/5/05, sarahwithanx <> wrote:
>
> The generic views seem very limiting. Is there a way to include
> multiple objects in the same form?
>
> I have an object, which relates to another via a foreign key. On
> creation, it needs accept input for data to store in the other table
> (and create two additional linked objects). I need to get information
> for the master object, as well as values to store in the linked
> records.
>
> I can do this using request.POST, but I will have to map and validate
> all the data on my own. Is there another way to do this?
>
>
> Thanks
>
>


--
-- ++61-3-9877-0909
If everything seems under control, you're not going fast enough. -
Mario Andretti

Offline

Board footer

Moderator control

Enjoy the 20th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support