Skip to content
Dynamic attributes for django models http://django-not-eav.rtfd.org
Find file
Pull request Compare This branch is 13 commits behind jpic:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docs
not_eav
test_project
.gitignore
.travis.yml
README.rst
setup.py

README.rst

https://secure.travis-ci.org/yourlabs/django-not-eav.png?branch=master

This app attempts the impossible: implement a bad idea the right way.

Concept

django-not-eav provides a special model: Attribute.

When such a model is created:

  • a model field is generated and added to the corresponding model class dynamically,
  • a column is created, using south API,
  • the admin is reloaded.

not_eav.autodiscover() is in charge of iterating over all Attribute to add the model fields to the model class dynamically.

You can add or remove fields in the admin, but you may not change a field name or type.

The advantage of this pattern over classic eav heavy solutions is that dynamic fields can be treated like regular fields.

The inconvenient is that it gives the website administrator the opportunity to mess up with his database.

In the end, this app enables the website administrator to become the developer of his own application.

This app will be the base requirement for the 3 upcomming apps, enabling the website administrator to:

  • create his forms,
  • create his list views,
  • create his details views,

Requirements

  • Python 2.7
  • South
  • Django 1.4+

Resources

You could subscribe to the mailing list ask questions or just be informed of package updates.

Demo

See test_project/README

Something went wrong with that request. Please try again.