add relation w/ user
This commit is contained in:
parent
8e2ae12f0c
commit
f1cbde2951
|
@ -1,4 +1,5 @@
|
|||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
import uuid
|
||||
|
||||
|
@ -18,7 +19,7 @@ class Wishlist(models.Model):
|
|||
w.save()
|
||||
return w
|
||||
|
||||
class Item(models.Model):
|
||||
class Wish(models.Model):
|
||||
|
||||
wishlist = models.ForeignKey(Wishlist, related_name='items')
|
||||
name = models.CharField(max_length=255)
|
||||
|
@ -41,4 +42,5 @@ class Item(models.Model):
|
|||
return i
|
||||
|
||||
class Part(models.Model):
|
||||
pass
|
||||
wish = models.ForeignKey('Wish')
|
||||
user = models.ForeignKey(User)
|
||||
|
|
Loading…
Reference in New Issue