edited flag for names and titles
This commit is contained in:
parent
ebc123a186
commit
634190cca6
4 changed files with 4 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ def get_title_sort(title):
|
|||
class Title(models.Model):
|
||||
title = models.CharField(max_length=1000, unique=True)
|
||||
title_sort = models.CharField(max_length=1000)
|
||||
edited = models.BooleanField(default=False)
|
||||
|
||||
imdbId = models.CharField(max_length=7, blank=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ def editTitle(request):
|
|||
if 'titleSort' in data:
|
||||
title.title_sort = data['titleSort']
|
||||
title.title_sort = unicodedata.normalize('NFKD', title.title_sort)
|
||||
title.edited = True
|
||||
title.save()
|
||||
response['data'] = title.json()
|
||||
return render_to_json_response(response)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue