willhardy/django-seo

Not able to access metadata for model instance.

nuno-iglesias opened this issue · 1 comments

hi,
i don't know if this is the right place for asking ...but ...here it goes;-)

I'm trying to make this nice piece of code working on a site.
Till now, I’ve managed to display meta information for "paths".
Now I’m trying to display meta associated to a model instance.
I'm not sure what I’m doing wrong, but i can¡t render the meta info in my templates.

Now i'll try to explain in which point i'm:

1-.I've created a Basic seo model in a file named "seo.py" (like in the example).
In this file, i hace Meta definition like this:
seo_views = ('beldemi.web.Promotion', ) (this is my model)
2-. In my admin.py I have added the "metaDataModel" as an inline form my model "Promotion".
Now I’m able to see the MymetaData objects when creating new "Promotion" instances.
3-. From the admin interface now i can see the (model instance, model , path, and views) admin pages.
in the "Model Instance" i can see a record of every "promotion" object i have created.
for each record i see a row like this:
Path: empty
ContentType : promotion
Object_id= [number]

PROBLEM

I'm not able to render the data in the template.
From the template i can access my object like this {{promotion}}
I understand that i should render "METAData" like this: {{get_metadata MyMetaData for promotion}}

If anybody can help.... :D

Solved.
I was not doing things properly.
Not defining "get_absolute_url" for mmy model.