Commit graph

96 commits

Author SHA1 Message Date
wolfmetr
2b9b9d7aa7 Fix for issue #648: Ensure choices are valid (value, label) tuples to avoid 'not enough values to unpack' error
(cherry picked from commit 30e8873b10db560b845f23697e00d20c42d7a989)
2025-02-24 18:53:50 -08:00
Mike
fafe528ea5 feat(models): add database constraints to Value model 2025-02-24 18:26:28 -08:00
pre-commit-ci[bot]
28c67b3d04 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-13 09:09:40 -08:00
Mike
8f18d5e7e2 fix(attribute): restore backward compatibility for invalid slugs
Replace ValidationError with a warning when creating Attributes with invalid slugs. This change allows existing code to continue functioning while alerting users to potential issues.
2024-09-01 21:26:45 -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
pre-commit-ci[bot]
41fa7ddc5c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-08-31 21:20:36 -07:00
Mike
1262a52282 test(attributes): add slug parameter to attribute model test 2024-08-31 21:20:36 -07:00
Mike
27d3887604 feat(attribute): add slug validation for Python identifier compliance
Implement custom validation for Attribute model's slug field to ensure it's a valid Python identifier. Add corresponding test case.
2024-08-31 21:20:36 -07:00
Mike
3990d7d6cb test: remove special chars in attribute name test data 2024-08-31 21:20:36 -07:00
Mike
6f141ff4f2 refactor(slug): ensure generated slugs are valid Python identifiers 2024-08-31 21:20:36 -07:00
pre-commit-ci[bot]
6585010038 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-06-23 08:59:33 -07:00
Mike
8c87f2f53b fix: ensure default manager is correctly replaced and ordered 2024-06-23 08:59:33 -07:00
Mike
4d2c080857 test(forms): add test case for BaseEntityAdmin with no attributes 2024-03-06 09:34:45 -08:00
Mike
5bc35da842 refactor(tests): expand EntityAdmin form tests and move to base function 2024-03-06 09:34:45 -08: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
dd5f375640 test(queryset): add filter test for multiple EAV attributes 2023-09-08 14:06:52 -07:00
Mike
fb83744dd9 test: remove deprecated slug test 2022-08-12 14:45:30 -07:00
Mike
8c183333d1 chore: update text description 2022-08-12 14:24:47 -07:00
Mike
653ed7fd38 refactor: move generate_slug to logic 2022-08-12 14:23:41 -07:00
Mike
cc2acd0724 test: add Attribute model tests 2022-08-12 13:31:55 -07:00
Mike
d643bddb95 test: add TYPE_CSV form tests 2022-06-12 21:53:01 -07:00
David
99b9bfc3ef
fixes https://github.com/jazzband/django-eav2/issues/163 (#164)
* fixes https://github.com/jazzband/django-eav2/issues/163

* chore: revert content to master

* fix: don't expand relational fields

* chore: ignore .vscode

* chore: update changelog

* chore: remove stale code

Co-authored-by: Mike <mike@zivix.com>
Co-authored-by: Mike <22396211+Dresdn@users.noreply.github.com>
2022-02-08 18:13:12 -08: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
bb68d7cec7
fix: correct str() and repr() for EnumGroup and EnumValue (#92)
* test: add tests for Enum represtations

* chore: correct str() and repr() for EnumGroup and EnumValue
2021-10-26 07:04:44 -07:00
PUYUP
9b5df1c99e
fix: handle models with empty local_managers (#90)
* Fix value error

* test: add test for models with empty local_managers

* fix: check for local_managers being empty

Co-authored-by: Mike <22396211+Dresdn@users.noreply.github.com>
2021-10-26 06:10:36 -07: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
6013220684 test: Add new get_or_create() with defaults test 2021-10-20 07:06:09 -07:00
Mike
1e3c547551 test: use new test_project 2021-07-04 08:59:24 -07:00
Mike
3ebbf8d8e7 tests: refactor tests to use pytest 2021-06-17 16:38:46 -07:00
Mauro
b2c16c05c4 Adding CSV datatype + CSVField (widget, formfield also) + validators + tests 2021-05-10 17:13:42 -03:00
Mauro
39e1ff35f7 Adding a JSON Datatype 2021-04-04 23:53:45 -03:00
Zach Taylor
9a4c8f3ad3 Add instance parameter to config get_attributes 2020-10-22 15:53:34 -05:00
Daniel Indictor
89358a6c46
Made changes necessary to bump supported Django version to 3.0 2020-04-13 04:18:02 -04:00
Alexander Anikeev
e857819fce Add ability to assign enum values as strings (#46)
* Add ability to assign enum values as strings
* Remove unreachable code (enum validation now fails earlier)
* Enable filtering by enum value
2019-06-20 18:14:19 +02:00
Alexander Anikeev
cf8f95dfa7 Fix ordering with custom config (#44) 2019-02-01 20:38:41 +01:00
Siegmeyer
92ba7992d7
Add support for order_by clause to EavQuerySet (#39) 2018-09-21 13:47:03 +02:00
Iwo Herka
c033ee64a2 Add form test involving enums 2018-08-10 08:19:37 +00: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
MajekX
f35ceaed22 Add registration via metaclass (#23)
Example:

    class SomeModel(metaclass=EAVModelMeta):
        pass
2018-07-27 14:01:38 +00:00
Iwo Herka
e0a76f86b2 Rename "enums" attribute on the EnumGroup to "values" (#20) 2018-07-27 12:54:05 +00:00
MajekX
9d044ee8e2 Fix tests for Django 2.1+ (tip) (#25) 2018-07-27 13:47:01 +02:00
Iwo Herka
d26bcfdbe7 Fix test compatibility 2018-07-20 12:17:19 +00:00
Iwo Herka
8db7c39bbf Save M2M relations on form save (#13) 2018-07-13 14:06:21 +00:00
Iwo Herka
ab9636a1c5 Add test for invalid form 2018-07-13 12:05:34 +00:00
Iwo Herka
89f67a11ae Add test for register_eav decorator 2018-07-13 11:59:45 +00:00
Iwo Herka
23be8b41a9 Add tests for forms 2018-07-13 11:54:57 +00:00
Iwo Herka
0677e7f7b5 Clean up code a bit; work on code-style 2018-07-13 09:02:43 +00:00
Iwo Herka
dcfd8e4e7e Validate against illegal assignments (#17) 2018-06-21 14:27:04 +02:00
Iwo Herka
6f3329d2ae Work on code style in models (#3) 2018-06-20 15:51:02 +02:00