django-typed-models icon indicating copy to clipboard operation
django-typed-models copied to clipboard

polymorphic django models using automatic type-field downcasting

Results 20 django-typed-models issues
Sort by recently updated
recently updated
newest added
trafficstars

The reason is that XML serializer class inherits from `base.Serializer` and not `PythonSerializer` which we monkey patch. Solution would be to monkey patch `start_object` method in XML serializer class, however...

Possibly a django 1.4 problem. E.g. ``` class Animal(TypeModel): owner = models.ForeignKey(Owner, related_name="animals") name = models.CharField(max_length=40) class Cat(Animal): def speak(self): return "Meow" class Dog(Animal): def speak(self): return "Woof" cat =...

``` post_save.connect(func, sender=ParentModel) ... ChildModel().save() ``` The signal gets connected to the parent class, and then never gets fired when instances are saved, because they're never saved via the parent...

HI! I've just read the issue here: [https://github.com/craigds/django-typed-models/issues/61](https://github.com/craigds/django-typed-models/issues/61 ) And it seems I am running into the same kind of problem. I would like to achieve the following structure. ```python...

Type stubs for this library would be great so that it doesn't interfere with usage of static type checkers like pyright. Currently, since there's no stub file, static type checkers...

Haven't been able to dig through Admin to find out how to apply the same kind of patching to inline objects as is done in the included ModelAdmin subclass. If...

``` File "/Users/mcosti/dev/django-typed-models/env/bin/activate/lib/python3.9/site-packages/django/apps/registry.py", line 433, in do_pending_operations function(model) File "/Users/mcosti/dev/django-typed-models/env/bin/activate/lib/python3.9/site-packages/django/apps/registry.py", line 411, in apply_next_model self.lazy_model_operation(next_function, *more_models) File "/Users/mcosti/dev/django-typed-models/env/bin/activate/lib/python3.9/site-packages/django/apps/registry.py", line 397, in lazy_model_operation function() File "/Users/mcosti/dev/django-typed-models/env/bin/activate/lib/python3.9/site-packages/django/db/models/fields/related.py", line 373, in resolve_related_class field.do_related_class(related,...

The [Limitations section](https://github.com/craigds/django-typed-models#limitations) of the documentation says "Fields defined on subclasses can only be defined on one subclass, unless the duplicate fields are exactly identical". In `testapp/models.py` there's an [example...

Python 3.10.7 Django==4.1.5 django-typed-models 0.12.0 `recast()` does not work when passing a class and not a string. Here, [base](https://github.com/craigds/django-typed-models/blob/aec094ffc9b741166566eacda3084293b37303c6/typedmodels/models.py#L399) will be `self.__class__` because typed model subclasses also have the `_typedmodels_registry`...