mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-03-17 06:50:24 +00:00
Django EAV 2 - EAV storage for modern Django
This merge does two things:
1. Removes completely dependency on the Sites framework (which was implemented erroneously).
Specifically, site field on Attribute and related constraints. With those changes, attributes are now global. That is, all attributes are visible to all entities. As a result, slug in now unique.
2. Content-type field is used to limit entities that can be assigned an attribute (see get_all_attributes method on Entity). This way attributes with content_type assigned are, for all intended purposes, private to Entity of that content type. The problem is that those attributes are still visible to other entities. Moreover, originally, attributes had non-unique slugs that are unique together with content_type and site. With removal of site (and because content_type is nullable) a situation might exist in which two attributes exist with the same slug/name but one with content_type and one with NULL. Simple solution to all this hassle is to drop private attributes altogether, which is what this pull-request does.
Resolves: #9
Commits:
* Remove sites dependency; fix Attribute uniqueness (#9)
* Add uniqueness test to attributes
* Remove content_type from Attribute class
* Update runtests
* Remove redudant call
* Fix wrong assertion in attribute test
* Fix string formatting
|
||
|---|---|---|
| docs | ||
| eav | ||
| tests | ||
| .coveralls.yml | ||
| .gitignore | ||
| .travis.yml | ||
| CONTRIBUTORS.md | ||
| LICENSE | ||
| README.md | ||
| requirements.txt | ||
| runtests | ||
| setup.py | ||
Django EAV 2 - Entity-Attribute-Value storage for Django
Introduction
Django EAV 2 is a fork of django-eav (which itself was derived from eav-django). This project aims to:
- add Python 3 support
- add Django 1.11 and 2.0 support
- modernize and clean-up the codebase
- drop Django <1.11 dependencies
- remove dependency on Sites framework
- fix unresolved issues
- update documentation (Sphinx + ReadTheDocs)
- create exhaustive (and automated) tests
- add new features
(For now) our progress can be tracked through issues. Feel free to join the discussion.