Commit graph

59 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
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
Mike
eb21c74a21 Implement django_jsonfield_backport 2021-10-15 17:25:10 -07:00
Mauro
b2c16c05c4 Adding CSV datatype + CSVField (widget, formfield also) + validators + tests 2021-05-10 17:13:42 -03:00
Mauro
49ee47c399 Updating translations from ugettext_lazy to gettext_lazy and deprecating djangotip from python <3.8 2021-04-23 12:19:06 -03:00
~lmn
8ecd0e241b
Merge branch 'master' into json-datatype 2021-04-14 10:40:13 -03:00
Mauro
851ca4cc74 Replaces NullBoolean with Boolean (closes: #56) 2021-04-04 23:57:52 -03:00
Mauro
39e1ff35f7 Adding a JSON Datatype 2021-04-04 23:53:45 -03:00
Daniel Indictor
715dea0626
Merge pull request #59 from wackerservices/feature/model-specific-attributes
New feature: many to many to content type on attribute
2020-11-13 00:41:31 -05:00
Daniel Indictor
71a517d1da
Merge pull request #60 from wackerservices/feature/instance-level-attributes
Add instance parameter to config get_attributes
2020-11-13 00:39:49 -05:00
Zach Taylor
9a4c8f3ad3 Add instance parameter to config get_attributes 2020-10-22 15:53:34 -05: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
Zach Taylor
def1bc5ade Allow attribute_value to be None if enum type 2020-10-19 14:45:29 -05: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
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
99254cd578 Move remaining docstrings to Google-stype format (#10) 2018-07-27 13:23:57 +00:00
Iwo Herka
e0a76f86b2 Rename "enums" attribute on the EnumGroup to "values" (#20) 2018-07-27 12:54:05 +00:00
Iwo Herka
d9dba5703c Rewrite documentation for modern Sphinx (#5) 2018-07-23 16:27:12 +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
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
Siegmeyer of Catarina
9bf3dbfb5d Migrate module docstrings to Google-style format (#10) (#5) 2018-06-03 15:42:16 +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
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
342fee006a Remove Vim directives 2018-04-06 16:53:32 +02:00
Iwo Herka
8131da4389 Fix misc_models test 2018-04-06 14:45:27 +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
Hamdi Sahloul
464a947548 Support attribute per model and attributes ordering 2016-10-14 02:00:55 +09:00
Marc Chakiachvili
1eb6c3cd49 Correct sites error when running 'makemigrations' 2016-01-18 15:03:46 +01:00
Marc Chakiachvili
05866d2f9e Make eav 'timezone' aware :
- changed called from datetime.now to timezone.now
- changed called from datetime(...) to timezone.datetime(...)
- changed forms validator as well
2016-01-15 15:16:28 +01:00
Marc Chakiachvili
91d3c47042 Compatibility from django 1.9 - Issue #35 2016-01-15 11:16:10 +01:00
Filip Novák
16ec66e09d Fix Python 3 syntax error 2015-06-23 13:56:03 +02:00
Bruno Tavares
7d3016cfbc Make doctest skip invalid tests 2013-11-25 23:17:52 +00:00
Bruno Tavares
7f92a4ec20 Trying to avoid doctest 2013-11-25 23:01:34 +00:00
Bruno Tavares
94b4dd762b more fixes to the tests 2013-11-25 22:56:18 +00:00
Bruno Tavares
fdc7886614 in doc test correction ( duplicate key ) 2013-11-25 22:52:18 +00:00
Bruno Tavares
a70b9c5359 Fixed in do test 2013-11-25 22:50:15 +00:00
Bruno Tavares
7a2fd8bfa1 Corrected test 2013-11-25 22:49:02 +00:00
Nic Pottier
2b8eaf9e44 big optimization to save and validate hooks to not cause lots of single db queries 2013-02-19 17:05:30 +02:00
Tim Sutton
c373704c50 Some small typo fixes 2012-04-04 22:57:54 +02:00