Commit graph

152 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
Mike
4deda2abc5 refactor: move Sequence import to type-checking block
- Fix Ruff TC003 linting error
2025-02-13 09:09:40 -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
a95f2a1c33 style(lint): apply ruff formatting rules with defined target-version 2025-02-13 07:40:43 -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
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
9f4bddb94d fix(eav): update ClassVar type hint for Python 3.8 compatibility 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
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
6f141ff4f2 refactor(slug): ensure generated slugs are valid Python identifiers 2024-08-31 21:20:36 -07:00
Mike
8c87f2f53b fix: ensure default manager is correctly replaced and ordered 2024-06-23 08:59:33 -07:00
Mike
792fc65003 chore: remove support for Django < 3.2 and Python < 3.8 2024-03-06 10:05:42 -08:00
Mike
d6af6a004a refactor(admin): optimize EAV field handling in admin forms 2024-03-06 09:34:45 -08:00
Mike
93c434bf72 feat(admin): enhance admin integration for dynamic EAV fieldsets
- Implement dynamic EAV fieldset rendering in admin forms, supporting the inclusion of EAV attributes alongside standard model fields.
- Introduce `eav_fieldset_title` and `eav_fieldset_description` to customize the display of EAV fields in the admin.
- Refactor `render_change_form` to dynamically assemble fieldsets, including a dedicated section for EAV attributes.
2024-03-06 09:34:45 -08:00
Christian Clauss
0b683ef3d5 Fix typos with codespell --ignore-words-list=unkown --skip="*.po" -w 2024-01-10 21:06:29 +01:00
Jacob Fredericksen
ee3f5662de fix: use typing.Tuple for annotations 2023-12-06 17:53:36 -05:00
Jacob Fredericksen
289e86e03f fix: use typing.Tuple for annotations 2023-12-06 13:43:02 -05:00
Jacob Fredericksen
08086b00c6 fix: use typing.Tuple for annotations 2023-12-05 11:47:28 -05:00
Jacob Fredericksen
1cdc2c4a41 refactor: cleanup 2023-11-30 13:11:59 -05:00
Jacob Fredericksen
7153bedce0 refactor: split model modules 2023-11-30 13:05:20 -05: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
d45e31520e fix(queryset): apply filter to combine multiple eav filter kwargs 2023-09-08 14:06:52 -07:00
Kira
d1e13cab4a add id translations 2023-06-29 17:14:00 +08: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
Mike
a98c0d2904
Use SplitDateTimeField for date Attribute types (#321)
* fix: use field class SplitDateTimeField for type 'date'
Fixes #261

* refactor: remove import conflict of django.forms

* style: isort imports

* docs: add fix #261 to changelog
2023-02-10 08:35:05 -08:00
954
d6a05a0ccb
chore(locale): update translation of zh_Hans (#318) 2023-02-10 06:33:40 -08: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
954
116103b2a0
chore(models): fill verbose_name to most models. (#314)
* chore(models): fill `verbose_name` to most models.

* [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 08:07:33 -08:00
954
6bc1b19967
chore(locale): provide zh-Hans(Simplified Chinese) translation (#308)
* chore(locale): provide zh-Hans(Simplified Chinese) translation

* chore(locale/models): append `verbose_name` and `verbose_name_plural` for `eav.models`, to support translation.
2023-01-28 06:57:23 -08:00
Ihor Sychevskyi
ac070dba28
update links (#275) 2022-11-16 01:53:47 +02:00
Mikalai Hryb
5760f20f7a fix BaseEntityAdmin 2022-09-01 01:01:43 +02:00
Mike
62184d8ccf docs: resolve docstring error 2022-08-13 10:07:54 -07:00
Mike
0a3a6f6fd7 fix: use typing_extensions 2022-08-12 14:56:47 -07:00
Mike
31e12a0ef9 chore: remove unused EavSlugField 2022-08-12 14:36:49 -07:00
Mike
653ed7fd38 refactor: move generate_slug to logic 2022-08-12 14:23:41 -07:00
Mike
f6afc45613 fix: ensure a proper slug is generated 2022-08-12 14:00:35 -07:00
Mike
e5f9ecb9e9 chore: use Django's SlugField() for Attribute.slug 2022-08-12 13:36:26 -07:00
Mike
8332a39def fix: #187 provide eav value during field cleaning 2022-06-12 21:58:44 -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
fe65a9f542 fix: handle defaults keyword with get_or_create() 2021-10-20 07:08:08 -07:00
Mike
5b9e5f2615 style: explicitly define import path 2021-10-16 10:45:01 -07:00
Mike
065de53ba4 style: run isort 2021-10-16 10:43:20 -07:00