forked from 0x2620/pandora
text names
This commit is contained in:
parent
775003c298
commit
0ef598195c
4 changed files with 16 additions and 7 deletions
|
|
@ -188,6 +188,9 @@ class Text(models.Model):
|
|||
if self.type == 'pdf':
|
||||
response['uploaded'] = True if self.file and not self.uploading else False
|
||||
response['embeds'] = self.embeds
|
||||
response['names'] = []
|
||||
else:
|
||||
response['names'] = re.compile('<[^<>]*?data-name="(.+?)"').findall(self.text)
|
||||
return response
|
||||
|
||||
def path(self, name=''):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue