text names

This commit is contained in:
j 2013-11-08 18:57:24 +00:00
commit 0ef598195c
4 changed files with 16 additions and 7 deletions

View file

@ -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=''):