You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
Is it possible to use DynaModel as a regular Django Model in a ModelSerializer?
Cause when I do so I have the exception:
"[MyDynaModel] object does not have a "_meta" attribute"
My code:
models.py
class Event(DynaModel):
class Table:
resource_kwargs = {
'endpoint_url': 'http://localhost:8000'}
name = 'Event'
hash_key = 'a'
read = 1
write = 1
class Schema:
a = fields.Decimal()
d = fields.String()
serializers.py
class EventSerializer(serializers.ModelSerializer):
class Meta:
model = Event
fields = ('a', 'd')
The text was updated successfully, but these errors were encountered:
Hi!
Is it possible to use DynaModel as a regular Django Model in a ModelSerializer?
Cause when I do so I have the exception:
"[MyDynaModel] object does not have a "_meta" attribute"
My code:
models.py
serializers.py
The text was updated successfully, but these errors were encountered: