SHARE
TWEET

Untitled

a guest Aug 18th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Message(Model):
  2.     id = AutoField(primary_key=True)
  3.     user = ForeignKey(User)
  4.     test = CharField(max_length=100)
  5.      
  6. messages = Message.objects.raw('SELECT * FROM message m JOIN user u ON m.user_id = u.id')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top