# Path: pages/models/pagecontenttype.py
# class PageContentType(models.Model):
#     type = models.CharField(_('Type'), max_length=100, blank=False)
#     class_name = models.CharField(_('Class'), max_length=100, blank=False)
#     admin_class_name = models.CharField(_('Admin Class'), max_length=100, blank=False)
#     is_extended = models.BooleanField('Extended', default=False)
#     objects = ContentTypeManager()
# 
#     def __str__(self):
#         """id string of instance"""
#         return '{0}'.format(self.type)
# 
#     class Meta:
#         app_label = 'pages'
#         verbose_name = _('Content Type')
#         verbose_name_plural = _('Content Types')


from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from pages.models.pagecontenttype import PageContentType
"""Implements PageDefaultContent model"""

from __future__ import unicode_literals




@python_2_unicode_compatible
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:

# Path: pages/models/pagecontenttype.py
# class PageContentType(models.Model):
#     type = models.CharField(_('Type'), max_length=100, blank=False)
#     class_name = models.CharField(_('Class'), max_length=100, blank=False)
#     admin_class_name = models.CharField(_('Admin Class'), max_length=100, blank=False)
#     is_extended = models.BooleanField('Extended', default=False)
#     objects = ContentTypeManager()
# 
#     def __str__(self):
#         """id string of instance"""
#         return '{0}'.format(self.type)
# 
#     class Meta:
#         app_label = 'pages'
#         verbose_name = _('Content Type')
#         verbose_name_plural = _('Content Types')


# Path: pages/models/pagedefaultcontent.py
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from pages.models.pagecontenttype import PageContentType

"""Implements PageDefaultContent model"""

from __future__ import unicode_literals




@python_2_unicode_compatible
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)