forked from 0x2620/pandora
log page changes too
This commit is contained in:
parent
cd1f4c93ee
commit
a62a992ad2
2 changed files with 10 additions and 0 deletions
|
|
@ -137,6 +137,8 @@ def editPage(request):
|
|||
if request.user.get_profile().capability('canEditSitePages'):
|
||||
data = json.loads(request.POST['data'])
|
||||
page, created = models.Page.objects.get_or_create(name=data['name'])
|
||||
if not created:
|
||||
page.log()
|
||||
page.body = data['body']
|
||||
page.save()
|
||||
response = json_response({'name': page.name, 'page': page.body})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue