Re: New to django, python, etc. - ForeignKey question

2009-12-06 Thread Guy
Thanks so much. I figured that the problem stemmed from working within the class rather than an instance, as you suggest. The suggestion to override the save fxn makes so much sense that I am now embarrassed for asking the question in the first place. It's amazing how much sense things make

Re: New to django, python, etc. - ForeignKey question

2009-12-05 Thread Sam Lai
The error is occurring here as you have mentioned - rolestartdate = models.DateField(default = \ Project.objects.get (pk=project.id).startdate) You're right that Django creates an attribute named id for every model without a primary key explicitly specified, but I

New to django, python, etc. - ForeignKey question

2009-12-05 Thread Guy
I am using the code shown below. The part causing the problem is the Role class which describes the role a person might have on a project. As part of that role, I would have an attribute that records the start and end date of the person's involvement. The problem seems to be coming when I make