# Path: pages/models/pagedefaultcontent.py
# class PageDefaultContent(models.Model):
#     name = models.CharField(max_length=200, unique=True)
#     content_types = models.CharField(max_length=254)
#     objects = models.Manager()
# 
#     def __str__(self):
#         """id string of instance"""
#         return '{0}'.format(self.name)
# 
#     def get_content_types(self):
#         content_types = []
#         ctypes = self.content_types.split(':')
#         for ctype in ctypes:
#             try:
#                 pctype = PageContentType.objects.get(type=ctype)
#                 content_types.append(pctype)
#             except PageContentType.DoesNotExist:
#                 pass
#         return content_types
# 
#     def save(self, *args, **kwargs):
#         """Override the default ``save`` method."""
# 
#         # Call parent's ``save`` method
#         super(PageDefaultContent, self).save(*args, **kwargs)
# 
#     class Meta:
#         app_label = 'pages'
#         verbose_name = _('Default Content')
#         verbose_name_plural = _('Default Content')


from django.contrib import admin
from pages.models import PageDefaultContent



class PageDefaultContentAdmin(admin.ModelAdmin):
    list_display = ['__str__']
    list_display_links = ['__str__']

    save_on_top = True
    actions_on_bottom = True



# Path: pages/models/pagedefaultcontent.py
# class PageDefaultContent(models.Model):
#     name = models.CharField(max_length=200, unique=True)
#     content_types = models.CharField(max_length=254)
#     objects = models.Manager()
# 
#     def __str__(self):
#         """id string of instance"""
#         return '{0}'.format(self.name)
# 
#     def get_content_types(self):
#         content_types = []
#         ctypes = self.content_types.split(':')
#         for ctype in ctypes:
#             try:
#                 pctype = PageContentType.objects.get(type=ctype)
#                 content_types.append(pctype)
#             except PageContentType.DoesNotExist:
#                 pass
#         return content_types
# 
#     def save(self, *args, **kwargs):
#         """Override the default ``save`` method."""
# 
#         # Call parent's ``save`` method
#         super(PageDefaultContent, self).save(*args, **kwargs)
# 
#     class Meta:
#         app_label = 'pages'
#         verbose_name = _('Default Content')
#         verbose_name_plural = _('Default Content')


# Path: pages/admin/pagedefaultcontent.py
from django.contrib import admin
from pages.models import PageDefaultContent




class PageDefaultContentAdmin(admin.ModelAdmin):
    list_display = ['__str__']
    list_display_links = ['__str__']

    save_on_top = True
    actions_on_bottom = True



admin.site.register(PageDefaultContent, PageDefaultContentAdmin)