Commit graph

27 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
8c87f2f53b fix: ensure default manager is correctly replaced and ordered 2024-06-23 08:59:33 -07:00
Christian Clauss
0b683ef3d5 Fix typos with codespell --ignore-words-list=unkown --skip="*.po" -w 2024-01-10 21:06:29 +01: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
5b9e5f2615 style: explicitly define import path 2021-10-16 10:45:01 -07:00
Mike
b1badf8dc5 style: run black formatter 2021-10-16 10:43:02 -07:00
Zach Taylor
9a4c8f3ad3 Add instance parameter to config get_attributes 2020-10-22 15:53:34 -05:00
Iwo Herka
99254cd578 Move remaining docstrings to Google-stype format (#10) 2018-07-27 13:23:57 +00:00
Iwo Herka
d9dba5703c Rewrite documentation for modern Sphinx (#5) 2018-07-23 16:27:12 +00:00
Iwo Herka
8db7c39bbf Save M2M relations on form save (#13) 2018-07-13 14:06:21 +00:00
Iwo Herka
dcfd8e4e7e Validate against illegal assignments (#17) 2018-06-21 14:27:04 +02:00
Siegmeyer of Catarina
591e4e11b1 Remove unused imports (#3) 2018-06-14 16:15:30 +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
Siegmeyer of Catarina
9bf3dbfb5d Migrate module docstrings to Google-style format (#10) (#5) 2018-06-03 15:42:16 +02:00
Iwo Herka
a4a3511c56 Add docstring for the EavConfig (#5) 2018-06-01 14:37:18 +02:00
Siegmeyer of Catarina
e5cd77b075 Sort imports (#3)
Make import statements PEP 8 compliant.
2018-05-31 03:21:20 +02:00
Iwo Herka
b99a3c0641 Move license notice to root directory (#3) 2018-05-18 13:37:39 +02:00
Iwo Herka
342fee006a Remove Vim directives 2018-04-06 16:53:32 +02:00
Iwo Herka
841b3b6836 Fix manager detachment 2018-04-06 16:27:18 +02:00
Iwo Herka
7d1aca31b1 Test fixes + run script. 2017-09-05 12:01:20 +02:00
Iwo Herka
47c7e81b7b Proper manager (re)attachement. 2017-09-04 14:35:35 +02:00
Iwo Herka
57252d09d0 Remove default 'objects' manager when appending EntityManager. 2017-09-04 13:06:16 +02:00
Marc Chakiachvili
91d3c47042 Compatibility from django 1.9 - Issue #35 2016-01-15 11:16:10 +01:00
MadEng84
55afd2aab9 bugfix #26 - support for new ContentType-s field related_query_name 2015-02-17 10:29:54 +01:00
David Gelvin
5ccc3f012a Added sites framework 2010-09-30 12:43:26 +03:00
David Gelvin
0264919f88 Reorganized dir 2010-09-27 16:28:52 +03:00