Hey is this possible?

I'm getting angry 500s back

class TeamBulletin(models.Model):
        team = models.ForeignKey(Team)
        author = models.ForeignKey(User)
        title = models.CharField(max_length = 500, blank = False)
        body = models.TextField(blank = False)
        image = models.ImageField(upload_to='images/team/%s/bulletins/' %  
self.team.id,blank = True)
        editdate = models.DateTimeField(null = True)
        createdate = models.DateTimeField(blank = False)
        def __str__(self):
                return self.team.name


It's particularly angry at the image field portion.  I'm trying to get  
it so that these images are organized under their own teams  
respectively, but I have no way of access the team.id from within the  
class.
Or is this a value I have to pull using a function?

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to