Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_inline() should return multiple inlines when Meta.use_sites or Meta.use_i18n are True #32

Open
mandx opened this issue Apr 22, 2012 · 1 comment

Comments

@mandx
Copy link

mandx commented Apr 22, 2012

When defining a MySEOMetadata metadata model, if it's Meta.use_sites is set to True or it's Meta.use_i18n is set to True, then rollyourown.seo.admin.get_inline(SEOMetadata) should return an inline which allows for adding multiple items, so the webmaster can edit metadata for each site/language right in the item admin page.

In rollyourown.seo.admin, line 111 (as of v1.0, current Pypi's stable version), something like:

def get_inline(metadata_class):
    attrs = {
        'max_num': None if check_if_using_sites_or_i18n(metadata_class) else 1,
        'extra': 1,
        'model': metadata_class._meta.get_model('modelinstance'),
        'ct_field': "_content_type",
        'ct_fk_field': "_object_id",
        'formset': MetadataFormset,
        }
    return type('MetadataInline', (generic.GenericStackedInline,), attrs)
@patxisan
Copy link

patxisan commented Jul 1, 2015

+1
Completely agree. Indeed, it seems a contradiction that I can set different "metadata" by language, but then I can not allocate more than one, to each model instance.

Is there some kind of workaround to assign different "metatags" by language to each instance from the admin interface?

I take this opportunity to thank you for your work. It's really good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants