Commit graph

30 commits

Author SHA1 Message Date
Mike
fafe528ea5 feat(models): add database constraints to Value model 2025-02-24 18:26:28 -08:00
Mike
625b8a5315 chore(migrations): update defaults and meta options for Attribute and Value models 2024-09-01 14:57:47 -07:00
pre-commit-ci[bot]
6b7a04f8a7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-09-01 14:57:47 -07:00
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
mathiasag7
3b1be10e9b
feat: Provide UUIDField option for pk field and a natural key feature for serialization (#428) 2023-10-30 08:57:29 -07:00
Mike
8fbd18bf79 fix: generating migration for model text changes 2023-02-22 08:09:36 -07:00
Mike
066ae8e310 chore: remove support for Django 2.2 2023-02-10 09:56:08 -07:00
pre-commit-ci[bot]
6047a9c486
[pre-commit.ci] pre-commit autoupdate (#316)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-06 19:48:54 -08:00
Mike
31e12a0ef9 chore: remove unused EavSlugField 2022-08-12 14:36:49 -07:00
Mike
e5f9ecb9e9 chore: use Django's SlugField() for Attribute.slug 2022-08-12 13:36:26 -07:00
Mike
ed7a808ee8
Allow for integer values larger than 32-bits (#137)
* style: apply ignores to all migrations

* feat: support 64-bit integers

* doc: update changelog

* test: add test for bigger than 32-bit integer
2021-12-18 19:29:38 -08:00
Mike
a98766fc55
Add support for Entity models with UUID as a primary key. (#89)
* chore: fix repo links

* style: flake8 format models.Value

* test: add test for an entity with uuid pk

* feat: support entity models with uuid as pk

* test: check Value repr and str methods
2021-10-22 15:36:17 -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
eb21c74a21 Implement django_jsonfield_backport 2021-10-15 17:25:10 -07:00
~lmn
6d10892c20
Update 0005 migration - Default to empty str instead of list 2021-05-11 11:01:16 -03:00
Mauro
b2c16c05c4 Adding CSV datatype + CSVField (widget, formfield also) + validators + tests 2021-05-10 17:13:42 -03:00
Mauro
4e9f04bdc6 Adding value_bool migration 2021-04-23 16:07:55 -03:00
Mauro
39e1ff35f7 Adding a JSON Datatype 2021-04-04 23:53:45 -03: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
464a947548 Support attribute per model and attributes ordering 2016-10-14 02:00:55 +09:00
Hamdi Sahloul
f29f4ab2c3 Include migrations 2016-10-14 02:00:54 +09:00