django - model for a messaging app between users

30 views
Skip to first unread message

Aamu Padi

unread,
Nov 29, 2013, 10:29:08 AM11/29/13
to django...@googlegroups.com
How do I go about creating a message app, between users. What's the business logic for creating the model? All I can think of was like this:

models.py

    class Message(models.Model):
        description = models.TextField()
        date_added = models.DateTimeField(default=datetime.now)
        sender = models.ForeignKey(User)
        recipient = models.ForeignKey(User)

I am not very sure if this is the way to go. If you could kindly guide me on how to get started, will be very thank full. Thank you!
Reply all
Reply to author
Forward
0 new messages