# Path: djangocms_page_meta/utils.py
# def get_cache_key(page, language):
#     """
#     Create the cache key for the current page and language
#     """
#     from cms.cache import _get_cache_key
# 
#     try:
#         site_id = page.node.site_id
#     except AttributeError:  # CMS_3_4
#         site_id = page.site_id
#     return _get_cache_key("page_meta", page, language, site_id)
# 
# def get_metatags(request):
#     language = get_language_from_request(request, check_path=True)
#     meta = get_page_meta(request.current_page, language)
#     return mark_safe(
#         render_to_string(request=request, template_name="djangocms_page_meta/meta.html", context={"meta": meta})
#     )


from cms.extensions import PageExtension, TitleExtension
from cms.extensions.extension_pool import extension_pool
from cms.models import Page, Title
from django.conf import settings
from django.core.cache import cache
from django.db import models
from django.db.models.signals import post_save, pre_delete
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from meta import settings as meta_settings
from .utils import get_cache_key, get_metatags
    from aldryn_snake.template_api import registry
    )
    og_publisher = models.CharField(_("Website Facebook URL"), max_length=255, default="", blank=True)
    og_app_id = models.CharField(_("Facebook App ID"), max_length=255, default="", blank=True)
    fb_pages = models.CharField(_("Facebook Pages ID"), max_length=255, default="", blank=True)
    twitter_author = models.CharField(
        _("Author Twitter Account"), max_length=255, default="", blank=True, help_text=_("'@' character not required.")
    )
    twitter_site = models.CharField(
        _("Website Twitter Account"),
        max_length=255,
        default="",
        blank=True,
        help_text=_("'@' character not required."),
    )
    twitter_type = models.CharField(
        _("Resource type"), max_length=255, choices=meta_settings.TWITTER_TYPES, blank=True
    )

    schemaorg_type = models.CharField(
        _("Resource type"),
        max_length=255,
        choices=meta_settings.SCHEMAORG_TYPES,
        blank=True,
        help_text=_("Use Article for generic pages."),
    )

    class Meta:
        verbose_name = _("Page meta info (all languages)")
        verbose_name_plural = _("Page meta info (all languages)")


# Path: djangocms_page_meta/utils.py
# def get_cache_key(page, language):
#     """
#     Create the cache key for the current page and language
#     """
#     from cms.cache import _get_cache_key
# 
#     try:
#         site_id = page.node.site_id
#     except AttributeError:  # CMS_3_4
#         site_id = page.site_id
#     return _get_cache_key("page_meta", page, language, site_id)
# 
# def get_metatags(request):
#     language = get_language_from_request(request, check_path=True)
#     meta = get_page_meta(request.current_page, language)
#     return mark_safe(
#         render_to_string(request=request, template_name="djangocms_page_meta/meta.html", context={"meta": meta})
#     )


# Path: djangocms_page_meta/models.py
from cms.extensions import PageExtension, TitleExtension
from cms.extensions.extension_pool import extension_pool
from cms.models import Page, Title
from django.conf import settings
from django.core.cache import cache
from django.db import models
from django.db.models.signals import post_save, pre_delete
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
from filer.fields.file import FilerFileField
from meta import settings as meta_settings
from .utils import get_cache_key, get_metatags
    from aldryn_snake.template_api import registry

    )
    og_publisher = models.CharField(_("Website Facebook URL"), max_length=255, default="", blank=True)
    og_app_id = models.CharField(_("Facebook App ID"), max_length=255, default="", blank=True)
    fb_pages = models.CharField(_("Facebook Pages ID"), max_length=255, default="", blank=True)
    twitter_author = models.CharField(
        _("Author Twitter Account"), max_length=255, default="", blank=True, help_text=_("'@' character not required.")
    )
    twitter_site = models.CharField(
        _("Website Twitter Account"),
        max_length=255,
        default="",
        blank=True,
        help_text=_("'@' character not required."),
    )
    twitter_type = models.CharField(
        _("Resource type"), max_length=255, choices=meta_settings.TWITTER_TYPES, blank=True
    )

    schemaorg_type = models.CharField(
        _("Resource type"),
        max_length=255,
        choices=meta_settings.SCHEMAORG_TYPES,
        blank=True,
        help_text=_("Use Article for generic pages."),
    )

    class Meta:
        verbose_name = _("Page meta info (all languages)")
        verbose_name_plural = _("Page meta info (all languages)")


    def __str__(self):