skip to Main Content

I’m trying to add django-seo into my site. But I can’t cope with setting up. I followed instructions documentation, but error occurs.

This is what I did:

  1. Installed django-seo packacge
  2. Added rollyourown.seo to INSTALED_APPS
  3. Created file in my site content app

And this is what I wrote into file:

from rollyourown import seo

class Metadata(seo.Metadata):
    title       = seo.Tag(head=True, max_length=68)
    description = seo.MetaTag(max_length=155)
    keywords    = seo.KeywordTag()
    heading     = seo.Tag(name="h1")

    class Meta:
        seo_views = ('SiteContent',)
        seo_models = ('SiteContent',)

When Meta class is removed, I can’t add any meta tags to contnet via Django Admin Site( I registered it in admin site ). I’ve read that django-seo use get_absolute_url() to deal with it. But in my site app I don’t use this function for provide more some utilities to multilanguage.

But if i add Meta class, i will get this error:

Traceback (most recent call last):
  File "F:/Site/", line 10, in <module>
  File "", line 385, in execute_from_command_line
  File "", line 354, in execute
  File "", line 21, in setup
  File "", line 108, in populate
  File "", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "", line 37, in import_module
  File "", line 10, in <module>
  File "", line 5, in <module>
    class Metadata(seo.Metadata):
  File "", line 166, in __new__
    options = Options(Meta, help_text)
  File "", line 19, in __init__
    self._set_seo_models(meta.pop('seo_models', []))
  File "", line 96, in _set_seo_models
  File "", line 54, in alias
    return getattr(loading, function_name)(*args, **kwargs)
  File "", line 101, in wrapper
    result = user_function(*args, **kwds)
  File "", line 168, in get_models
  File "", line 131, in check_models_ready
    raise AppRegistryNotReady("Models aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

I tried diffrent solutions but nothing helped.



  1. Django-SEO is not compatible with Django 1.7, which is the first version of Django that includes the AppRegistry.

    Either rollback to Django 1.6.x or remove Django-SEO.

    Login or Signup to reply.
  2. I got it working by changing get_query_set() to get_queryset()(changed in django1.8) in file

    Login or Signup to reply.
  3. As original Django-SEO is not supported anymore, these guys made and support their own version / fork of Django-SEO. I use it with Django 1.8.8, Python 3 is supported too.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top