User generated local paths
This commit is contained in:
parent
d821a08cff
commit
dc68fdd53e
14 changed files with 50 additions and 38 deletions
|
@ -35,6 +35,11 @@ class BookWyrmModel(models.Model):
|
|||
''' this is just here to provide default fields for other models '''
|
||||
abstract = True
|
||||
|
||||
@property
|
||||
def local_path(self):
|
||||
''' how to link to this object in the local app '''
|
||||
return self.get_remote_id().replace('https://%s' % DOMAIN, '')
|
||||
|
||||
|
||||
@receiver(models.signals.post_save)
|
||||
#pylint: disable=unused-argument
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue