Commit graph

73 commits

Author SHA1 Message Date
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
Iwo Herka
4394586afd Fix data validation 2018-06-14 16:15:36 +02:00
Siegmeyer of Catarina
f260060b60 Clean tests a bit (#3) 2018-06-14 16:15:36 +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
Iwo Herka
2b6f470fa7
Add Q-expr rewriter/fix relational algebra (#1)
* Add debug Q-expr print function

* Change old __unicode__ methods to __str__ format

* Move __unicode__ methods to __str__

* Rewrite AND Q-expressions to safe form

* Make Q-expr debug print method use nicer format

* Document rewrite_q_expr function

* Rewrite/improve queries' test

* Document some more code

* Reorganize and document queryset module

* Add more tests for queries

* Use generic relation attribute instead instead of 'eav_values'

* Update docstring

* Fix a typo

* Move up a variable

* Rename a function

* Check if 'in' filter rhs is not a QuerySet

* Add newline to the end of file

* Fix typo; tweak docstring
2018-05-18 13:18:24 +02:00
Iwo Herka
813f349683 Remove lost print 2018-04-06 16:24:34 +02:00
Iwo Herka
17c8d84295 Make tests runnable with Python 3 2018-04-06 13:59:51 +02:00
Iwo Herka
7d1aca31b1 Test fixes + run script. 2017-09-05 12:01:20 +02:00
David Gelvin
8744714574 Reorganized dir 2010-09-27 16:30:16 +03:00
David Gelvin
802d92255d Rewrote tests 2010-09-23 19:40:32 +03:00
David Gelvin
ebf979fa53 Added register / unregister to __init__ 2010-09-23 15:51:59 +03:00
David Gelvin
093a0ef457 Renamed utils to registry 2010-09-23 13:58:11 +03:00
David Gelvin
c7e595fdf9 Renamed app to eav, added version to __init__ 2010-09-23 13:42:30 +03:00
David Gelvin
e5d83e365a Added license to __init__ and fixed nosetests 2010-09-23 13:05:40 +03:00
David Gelvin
a53bc53daa Major refactor 2010-09-22 15:28:19 +03:00
David Gelvin
515cdf07ee Rename models, config attrs, started admin intigration 2010-09-22 11:02:28 +03:00
David Gelvin
5120ab4ac9 Added docs to test 2010-09-17 12:56:52 +03:00
David Gelvin
39e6a21403 Added documentation and tests 2010-09-17 12:50:28 +03:00
David Gelvin
9a5e3574e1 Rewrote filters. Again. 2010-09-17 00:10:38 +03:00
David Gelvin
75bf922020 Merge branch 'master' into dev 2010-09-10 16:21:41 +00:00
ksamuel
0c1f6377c7 Failing tests for filter 2010-09-10 16:02:51 +00:00
David Gelvin
eacd87b156 Updated tests for new null boolean 2010-09-10 15:55:43 +00:00
ksamuel
2dba6275d4 Adding configuration and test for related name in generic relation + fixing bug or some hardcoded name 2010-09-10 13:49:11 +00:00