Commit Graph

20 Commits (f84e7327675be42c334c2540f4d1f1396606b399)

Author SHA1 Message Date
Charlie Denton ca13180a61
Clean up unrequired compat import 2018-01-16 10:54:33 +00:00
Jerome Leclanche 300e9b062e Use field.remote_field instead of field.rel
Deprecated in Django 1.9, removed in 2.0

More information:
- https://docs.djangoproject.com/en/1.11/releases/1.9/#field-rel-changes
2017-08-29 19:41:42 +03:00
Jerome Leclanche fc8cabfa26 Replace use_for_related_fields by Meta.base_manager_name
Deprecated in 1.10, removed in 2.0

More information:
- https://code.djangoproject.com/ticket/14891
- django/django@ed0ff913c6
2017-08-29 19:41:42 +03:00
Diederik van der Boor 4835cd244e Also introduce a new exception type for invalid database IDs 2017-08-01 11:44:21 +02:00
Diederik van der Boor fb8eed78ad Provide a better error message when polymorphic_ctype_id is Null
refs #51, #140, #304
2017-08-01 11:44:21 +02:00
Jerome Leclanche 1e7237986c Specify on_delete argument for all related fields that need it 2017-07-10 09:08:11 +03:00
Jerome Leclanche 298460c4cf Drop support for Django <1.8, Python <2.7 2017-07-10 09:08:11 +03:00
Jerome Leclanche 544f5edef4 Fix accessor replacement consistency on Django 1.11
At this point, we don't know why this line of code is executed, but
we do know it's not consistently executed between Django 1.10 and
Django 1.11 due to the addition of `ForwardOneToOneDescriptor`, a
subclass of `ForwardManyToOneDescriptor`.

Refs. 6628145af7
Refs. kavdev/dj-stripe#524
Refs. django/django@38575b007a
2017-06-07 13:27:50 +03:00
Diederik van der Boor 04f2a62fd4 Revert get_real_concrete_instance_class_id() dry attempt
Caused by f9fffc44c1
2017-01-11 14:17:26 +01:00
Diederik van der Boor f9fffc44c1 Add API documentation to the package! 2017-01-09 16:53:50 +01:00
Diederik van der Boor 4aa3355f5c flake8 fixes 2016-12-19 11:28:41 +01:00
Austin Matsick 4aece2b5d3 #216 Use self._state.db instead of `using` kwarg in model methods.
Thanks to @vdboor for the suggestion.

Also:
- Add missing `using` kwargs in query_translate functions.
- Add a couple unit tests for non-default database functionality.
2016-05-30 18:55:03 -05:00
Austin Matsick 2f11cb6ffd #216 Specify `using` kwarg in get_real_instance method calls. 2016-05-29 14:05:45 -05:00
Austin Matsick 343aa41ec1 #216 Allow ContentType queries to be performed on non-default databases. 2016-05-27 20:35:39 -05:00
Diederik van der Boor 50f21dfa43 Rename manager.py => managers.py for consistency 2015-12-28 17:10:42 +01:00
Diederik van der Boor b7431b2d06 Fix PEP8 block comment issues (E265) 2015-12-28 15:16:42 +01:00
Diederik van der Boor aaf06c71a5 Fix PEP8 whitespace issues
autopep8 -r polymorphic/ example/ -i
--select=E112,E113,E115,E116,E122,E123,E125,E127,E128,E201,E202,E203,E211,E225,E226,E227,E228,E231,E251,E261,E262,E271,E272,E273,E274,E301,E302,E303,E304,E309,E711,E713,W291,W293,W391
--exclude migrations,south_migrations

(line conditiation fixes: E123,E125,E122,E127,E128)
2015-12-28 15:16:29 +01:00
Hugo Osvaldo Barrera c48d4f589b Don't import models and managers in __init__
This is deprecated as of django 1.8, and does not work as of django 1.9.
2015-10-21 22:11:06 -03:00
Bert Constantin 116e2af08b IMPORTANT: import path changed, it's now: "from polymorphic import PolymorphicModel, ..."
- added python2.4 compatibility. Contributed by Charles Leifer. Thanks!
- general reorganization of the code - there is no single polymorphic.py module anymore,
  so d-p now needs to be installed as a regular Django app
- polymorphic.VERSION/get_version added
- version numbering started: V0.5 beta
2010-02-22 16:16:00 +01:00
Bert Constantin 8bdda93e76 Restructured django_polymorphic into a regular add-on application.
This is needed for the management commands, and also seems
to be a generally good idea for future viablity as well.
Also misc documentation updates.
2010-01-29 13:41:19 +01:00