I have one app in my django project.
I created seo.py file and add:
from rollyourown import seo
class MyMetadata(seo.Metadata):
title = seo.Tag(head=True, max_length=68)
description = seo.MetaTag(max_length=155)
keywords = seo.KeywordTag()
class HelpText:
title = "This will appear in the window/tab name, as well as in search results."
keywords = "A comma separated list of words or phrases that describe the content"
description = "This will appear in the description"
class Meta:
seo_views = ('app_name', )
in my base.html in head I added:
{% load seo %}
{% get_metadata %}
but nothing is displayed. What is wrong? (Of course, I added data in the admin panel – My metadatas (View))
Loading a template tag library will not work if you haven’t put that application in your INSTALLED_APPS variable in settings.py. Have you put rollyourown.seo in there?
The paths you need to set up should be in the format ‘/pagename/’. For your homepage you just need ‘/’.