How to register a model in django-tagging anywhere not in the applications?

Posted by culebrón on Stack Overflow See other posts from Stack Overflow or by culebrón
Published on 2010-06-15T12:56:12Z Indexed on 2010/06/15 13:22 UTC
Read the original article Hit count: 283

Filed under:
|

Is it possible to register a model in django-tagging not in tagging app, nor in my app?

The standard way is to edit apps/myapp/models.py this way:

from apps import tagging
tagging.register(MyModel)

I want to keep both applications without changes, for example, to be able to pull new versions and just replace them. So I tried putting this into project settings.py, in the end, but of course this fails.

from apps.myapp.models import MyModel
from apps import tagging
tagging.register(MyModel)

(This fails when importing MyModel.)

Any other way?

© Stack Overflow or respective owner

Related posts about django

Related posts about django-models