Commit graph

14 commits

Author SHA1 Message Date
Mike
b5b576aca5 refactor: apply ruff linter rules and standardize code style
Replace flake8 with ruff and apply consistent linting rules across the entire codebase. Update type annotations, quotation marks, and other style-related changes to comply with the new standards.
2024-09-01 14:57:47 -07:00
Mike
31e12a0ef9 chore: remove unused EavSlugField 2022-08-12 14:36:49 -07:00
Mike
065de53ba4 style: run isort 2021-10-16 10:43:20 -07:00
Mike
b1badf8dc5 style: run black formatter 2021-10-16 10:43:02 -07:00
Mike Stralek
9983786184 create manage.py; move new field to own migration 2021-01-04 17:41:57 -08:00
Zach Taylor
5d8ba99361 Change foreign key to many to many to allow more flexibility 2020-10-21 16:03:20 -05:00
Zach Taylor
aaaa813b9b Remove verbose_name and add documentation 2020-10-20 15:02:45 -05:00
Zach Taylor
2c5e1e6602 Add entity_ct to Attribute model 2020-10-20 11:28:14 -05:00
John Carter
5ba33e7e6e patch migration, made tox check for missing migrations (#35)
Add tox for missing migrations; fix verbose names in models and migration
2018-08-02 11:16:44 +02:00
Iwo Herka
e0a76f86b2 Rename "enums" attribute on the EnumGroup to "values" (#20) 2018-07-27 12:54:05 +00:00
Iwo Herka
d8251d2646 Remove unused field from attribute 2018-06-20 11:44:07 +02:00
Iwo Herka
4958bfd04b
Remove Sites framework dependency (#9) (#15)
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
2018-06-04 17:19:05 +02:00
Hamdi Sahloul
5da8007d8b Backwards compatibility 2016-11-03 05:11:44 +09:00
Hamdi Sahloul
f29f4ab2c3 Include migrations 2016-10-14 02:00:54 +09:00