On 3/10/06, Gavin <[EMAIL PROTECTED]> wrote:
I want expenditures to be a ForeignKey, but I want to create it based
on values entered (num_units * unit_cost, account).

My question: How can I create a foreign key based on the values entered
for other fields?

_pre_save() is a function that if you define for your model, will be called just before the model is saved in the database. You can put your logic there.


--
Amit Upadhyay
Blog: http://www.rootshell.be/~upadhyay
+91-9867-359-701
--~--~---------~--~----~------------~-------~--~----~
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