Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = models.CharField(max_length=300, default='')
- def __str__(self):
- return self.file_name
- def file_link(self):
- if self.file:
- return "<a href='%s'>download</a>" % (self.file)
- else:
- return "No attachment"
- file_link.allow_tags = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement