Adds model and beginning of boilerplate for tags
This commit is contained in:
parent
9c645c6ab6
commit
13b512b569
8 changed files with 57 additions and 3 deletions
|
@ -11,7 +11,7 @@ class FedireadsModel(models.Model):
|
|||
def absolute_id(self):
|
||||
''' constructs the absolute reference to any db object '''
|
||||
base_path = 'https://%s' % DOMAIN
|
||||
if self.user:
|
||||
if hasattr(self, 'user'):
|
||||
base_path = self.user.absolute_id
|
||||
model_name = type(self).__name__.lower()
|
||||
return '%s/%s/%d' % (base_path, model_name, self.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue