Hi.

So i am in the midst of porting my forum application over to the
magic-removal branch, and also cleaning up the code a bit to make use
of the new features along the way.

One of the things I have in my model is the 'site' which is a foreign
key to the Site model.

now I'd like this field to be invisible to the rest of the
application. I've got the retrieval function going via the manager
model.. which works great, but now I'm having some issues creating new
objects.

my basic problem seems to be that I need to break the model/features
to get it done.

1. I need to set the foreign key to allow for blanks to get the
validator to go through
2. I need to set the 'site_id' magic field explicitly
3. to get the 'id' I think it is doing a db-call (not 100% on this)

is there a better way? I really don't want to do this in middleware or
in the views as it seems like this kind of change should be localized
in the model area (or am I just being anal)

regards
Ian

--
[EMAIL PROTECTED] -- blog: http://feh.holsman.net/ -- PH: ++61-3-9877-0909

If everything seems under control, you're not going fast enough. -
Mario Andretti

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to