fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes #4204: use div instead of p in visual editor to prevent nesting issues.
[redakcja.git]
/
src
/
toolbar
/
admin.py
diff --git
a/src/toolbar/admin.py
b/src/toolbar/admin.py
index
654480c
..
1fa695b
100644
(file)
--- a/
src/toolbar/admin.py
+++ b/
src/toolbar/admin.py
@@
-1,3
+1,6
@@
+# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from django import forms
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from django import forms
@@
-15,13
+18,13
@@
class ButtonAdminForm(forms.ModelForm):
value = self.cleaned_data['params']
try:
return json.dumps(json.loads(value))
value = self.cleaned_data['params']
try:
return json.dumps(json.loads(value))
- except ValueError
,
e:
+ except ValueError
as
e:
raise forms.ValidationError(e)
class ButtonAdmin(admin.ModelAdmin):
form = ButtonAdminForm
raise forms.ValidationError(e)
class ButtonAdmin(admin.ModelAdmin):
form = ButtonAdminForm
- list_display = ('slug', 'label', 'tooltip', 'accesskey')
+ list_display = ('slug', 'label', 'tooltip', 'accesskey'
, 'scriptlet'
)
list_display_links = ('slug',)
list_editable = ('label', 'tooltip', 'accesskey')
prepopulated_fields = {'slug': ('label',)}
list_display_links = ('slug',)
list_editable = ('label', 'tooltip', 'accesskey')
prepopulated_fields = {'slug': ('label',)}