Guest User

Untitled

a guest
Jan 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. class Categories(models.Model):
  2.     nom = models.CharField(max_length=255)
  3.    
  4.     def __unicode__(self):
  5.         return self.nom
  6.        
  7.        
  8. class SousCategories(models.Model):
  9.     categorie = models.ForeignKey(Categories)
  10.     nom = models.CharField(max_length=255)
  11.    
  12.     def __unicode__(self):
  13.         return self.nom
Add Comment
Please, Sign In to add comment