fnp
/
edumed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kontakt/contact page accessible under katalog.* domain.
[edumed.git]
/
contact
/
admin.py
diff --git
a/contact/admin.py
b/contact/admin.py
index
3776fc4
..
33b1963
100644
(file)
--- a/
contact/admin.py
+++ b/
contact/admin.py
@@
-7,7
+7,7
@@
from django.template import Template
from django.utils.safestring import mark_safe
from django.utils.safestring import mark_safe
-class ContactAdminMeta(admin.ModelAdmin.__
meta
class__):
+class ContactAdminMeta(admin.ModelAdmin.__class__):
def __getattr__(cls, name):
if name.startswith('admin_list_'):
return lambda self: ""
def __getattr__(cls, name):
if name.startswith('admin_list_'):
return lambda self: ""
@@
-29,7
+29,7
@@
class ContactAdmin(admin.ModelAdmin):
except BaseException, e:
return ''
else:
except BaseException, e:
return ''
else:
- return
obj.body.get(field_name, ''
)
+ return
Contact.pretty_print(obj.body.get(field_name, ''), for_html=True
)
def __getattr__(self, name):
if name.startswith('admin_list_'):
def __getattr__(self, name):
if name.startswith('admin_list_'):
@@
-75,7
+75,7
@@
class ContactAdmin(admin.ModelAdmin):
# Create field getters for fields and attachments.
for k, v in instance.body.items():
# Create field getters for fields and attachments.
for k, v in instance.body.items():
- f = (lambda v: lambda self: v)(
v
)
+ f = (lambda v: lambda self: v)(
Contact.pretty_print(v, for_html=True)
)
f.short_description = orig_fields[k].label if k in orig_fields else _(k)
setattr(self, "body__%s" % k, f)
f.short_description = orig_fields[k].label if k in orig_fields else _(k)
setattr(self, "body__%s" % k, f)