Skip to content
This repository

Dynamic model definition and alteration (evolving schemas)

tag: v0.0.3.1

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 mutant
Octocat-spinner-32 requirements
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE



Django provides a great ORM and with the power of South one can easily perform schema alteration.

However, some projects may require runtime schema alteration and that's what django-mutant provides.

The main concept was inspired by those projects:

Direction of the project

The project is still in an early phase but a couple of complex things already works such as declaration of RelatedField (ForeignKey, ManyToManyField) between models and an easy way of declaring subclasses of FieldDefinition which allow any Field subclass to be be represented easily:

class DateFieldDefinition(FieldDefinition):
    auto_now = fields.BooleanField(_(u'auto now'), default=False)
    auto_now_add = fields.BooleanField(_(u'auto_now_add'), default=False)

    class Meta:
        app_label = 'mutant'
        defined_field_class = fields.DateField
        defined_field_options = ('auto_now', 'auto_now_add',)
        defined_field_category = _(u'datetime')

This approach also allows projects such as django-non-rel to be truly useful since both your schema and your ORM wrapper around it are flexible.

Get in touch and contribute

From now on I think the best way to contribute and get in touch is using github messaging system (issues and pull requests)

Build Status

Development version can be installed from pip: pip install django-mutant==dev.

Something went wrong with that request. Please try again.