Makes attachment Images a serializable class
This commit is contained in:
parent
69a6644011
commit
624ff71a11
4 changed files with 56 additions and 13 deletions
|
@ -151,17 +151,6 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
|||
return super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class Attachment(BookWyrmModel):
|
||||
''' an image (or, in the future, video etc) associated with a status '''
|
||||
status = models.ForeignKey(
|
||||
'Status',
|
||||
on_delete=models.CASCADE,
|
||||
related_name='attachments'
|
||||
)
|
||||
image = models.ImageField(upload_to='status/', null=True, blank=True)
|
||||
caption = models.TextField(null=True, blank=True)
|
||||
|
||||
|
||||
class GeneratedNote(Status):
|
||||
''' these are app-generated messages about user activity '''
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue