Added contentlet unicode and fixed container context bug.
[philo.git] / admin.py
index 0744e0b..5737041 100644 (file)
--- a/admin.py
+++ b/admin.py
@@ -41,6 +41,7 @@ class CollectionMemberInline(admin.TabularInline):
        extra = 1
        classes = ('collapse-closed',)
        allow_add = True
+       fields = ('member_content_type', 'member_object_id', 'index',)
 
 
 class CollectionAdmin(admin.ModelAdmin):
@@ -231,6 +232,8 @@ class PageAdmin(EntityAdmin):
                for container_name, container_content_type in contentreference_containers:
                        if ('contentreference_container_%s' % container_name) in form.cleaned_data:
                                content = form.cleaned_data[('contentreference_container_%s' % container_name)]
+                               if content == None:
+                                       continue
                                contentreference, created = page.contentreferences.get_or_create(name=container_name, defaults={'content': content})
                                if not created:
                                        contentreference.content = content