SHARE
TWEET

Untitled

a guest Nov 15th, 2017 59 in 6 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Doc(models.Model):
  2.     title = models.CharField(max_length=255, null=True, blank=True)
  3.     file = models.FileField(upload_to='')
  4.     uploaded_at = models.DateTimeField(auto_now_add=True)
  5.     parrent_dir =  models.ForeignKey('Dirs', null=True, blank=True)
  6.  
  7.     def __str__(self):
  8.         return str(self.file)
  9.  
  10. class Dirs(models.Model):
  11.     dir_name = models.CharField(max_length=255, null=True)
RAW Paste Data
Top