A weird behaviour of imagestore app

38 views
Skip to first unread message

chuwy

unread,
Apr 20, 2012, 9:21:10 AM4/20/12
to django...@googlegroups.com
Hi, all.
I'm trying to install imagestore app in my project. Default models are created succefully, and all other parts working properly.
But, it have a feature to extend base (abstract) models and create your own by some complicated mechanism. This is mine model:
from django.db import models 
from imagestore.models.bases.album import BaseAlbum 
class Newalbum(BaseAlbum): 
    title = models.CharField("title", max_length=128) 
    class Meta(BaseAlbum.Meta): 
        app_label = "imagestore" 
        abstract = False
Also I have a string IMAGESTORE_ALBUM_MODEL = 'art.models.Newalbum'
When I run syncdb it tells me Backend module "art" does not define a "Newalbum" class. ('module' object has no attribute 'Hook').
But of course it defined. 
And the strangeness is only begins. When I put debug statement in the place where imagestore trying to get my model it prints proper module (already imported) and proper class name (string). But! dir(mod)print only variables appeared before "from imagestore.models.bases.album import BaseAlbum" in above example only "models". Why? What I don't know about importing modules?
I already tried to install it in many awkward combinations of settings properties, versions of django (and required apps), app_label and so on. It creates tables, when I inherit Newalbum from typical models.Model, but this models hasn't any BaseClass' behaviour.
So, what I'm doing wrong?
Reply all
Reply to author
Forward
0 new messages