edited flag for names and titles

This commit is contained in:
j 2011-10-11 17:01:11 +02:00
commit 634190cca6
4 changed files with 4 additions and 0 deletions

View file

@ -19,6 +19,7 @@ def get_name_sort(name):
class Person(models.Model):
name = models.CharField(max_length=200, unique=True)
name_sort = models.CharField(max_length=200)
edited = models.BooleanField(default=False)
numberofnames = models.IntegerField(default=0)
#FIXME: how to deal with aliases

View file

@ -29,6 +29,7 @@ def editName(request):
response = json_response()
if 'nameSort' in data:
person.name_sort = utils.sort_string(data['nameSort'])
person.edited = True
person.save()
response['data'] = person.json()
return render_to_json_response(response)