a guest Aug 18th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- class Message(Model):
- id = AutoField(primary_key=True)
- user = ForeignKey(User)
- test = CharField(max_length=100)
- messages = Message.objects.raw('SELECT * FROM message m JOIN user u ON m.user_id = u.id')
RAW Paste Data