Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Django project model design

Name: Anonymous 2008-06-11 17:11

I'm designing a simple text-based game with Django, and I came up with this model for messages sent to/from players.


class Message(models.Model):
    sender = models.ForeignKey(Player, related_name='sent_message')
    receiver = models.ForeignKey(Player, related_name='received_message')
    subject = models.CharField(max_length=80)
    body = models.TextField()
    date = models.DateTimeField()


I'm not sure why "related_name" is needed; can /prog/ explain, and share their thoughts on this model?

Name: Anonymous 2008-06-13 14:14

>>39
Learn English.
dipshit
usually vulgar : a stupid or incompetent person

wise
characterized by wisdom : marked by deep understanding, keen discernment, and a capacity for sound judgment

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List