I set settings.CACHE to use memcached. If the memcached service is offline for any reason, simplest things like creating e FieldSchema fail. As soon as I start the memcached service, things work.
I do not understand exactly how the missing cache backend can affect things. I see this library makes use of cache, but it should be just for performance reason.
Traceback (most recent call last):
File ".\test.py", line 31, in <module>
FieldSchema.objects.create(model_schema = model_schema, name = "test", data_type = 'character')
File "C:\Users\.....\lib\site-packages\django\db\models\manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "C:\Users\.....\lib\site-packages\django\db\models\query.py", line 422, in create
obj.save(force_insert=True, using=self.db)
File "C:\Users\.....\lib\site-packages\dynamic_models\models.py", line 95, in save
self._schema_editor.update_column(model, field)
File "C:\Users\.....\lib\site-packages\dynamic_models\schema.py", line 39, in update_column
self.add_column(model, new_field)
File "C:\Users\.....\lib\site-packages\dynamic_models\schema.py", line 44, in add_column
editor.add_field(model, field)
File "C:\Users\.....\lib\site-packages\sql_server\pyodbc\schema.py", line 635, in add_field
if field.many_to_many and field.remote_field.through._meta.auto_created:
AttributeError: 'NoneType' object has no attribute 'many_to_many'
Hi.
Python 3.8.x
django 2.2.x django_dynamic_models 0.3.0
I set settings.CACHE to use memcached. If the memcached service is offline for any reason, simplest things like creating e FieldSchema fail. As soon as I start the memcached service, things work.
I do not understand exactly how the missing cache backend can affect things. I see this library makes use of cache, but it should be just for performance reason.
Traceback
Thanks for help