Thanks for your response and sorry about the cryptic nature of the query. In my model I have a table class (Reimburse) that records an items' unit price, the number of items bought and an account (a ForeignKey) from which the cost (unit price * number of items) will be recorded against. I want to be able to record this transaction in an expenditures table - recording the cost and account.
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? I hope that is clearer. cheers, g --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---