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

history property not picked when model class is in a models directory #7

Closed
mghantous opened this issue Apr 11, 2013 · 2 comments · Fixed by #34
Closed

history property not picked when model class is in a models directory #7

mghantous opened this issue Apr 11, 2013 · 2 comments · Fixed by #34
Labels
bug Issues related to confirmed bugs P2

Comments

@mghantous
Copy link

I have multiple model files under a models directory. Example:

    myapp/
            models/
                        __init__.py
                        model1.py
                        model2.py
                        model3.py

The model classes within model1.py, model2.py, etc are using an app_label and have a history property. Example:

    class Meta:
        app_label = 'myapp'

    history = HistoryRecords()

The history property is not getting picked up by south as a schema change (not sure about syncdb).

However, when I use a "traditional" app directory structure with a single models.py file, everything works. Example:

    myapp/
        models.py

Does this require an enhancement? Perhaps I am doing something wrong on my end. Thanks.

@treyhunner
Copy link
Member

That sounds like a bug.

I'd recommend writing a test and submitting it, but the project lacks any tests at the moment... I'm hoping to change that soon.

Pull requests welcome.

mghantous pushed a commit to mghantous/django-simple-history that referenced this issue Apr 12, 2013
dnozay added a commit to dnozay/django-simple-history that referenced this issue Apr 23, 2013
dnozay added a commit that referenced this issue Apr 23, 2013
register() will place records under given app.
Meta app_label will place both model / records under given app.
@dnozay
Copy link
Contributor

dnozay commented Apr 24, 2013

fixed in commit: e12135f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to confirmed bugs P2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants