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
Traceback (most recent call last):
File "D:\CRUV\craver-backend\craver\manage.py", line 22, in
main()
File "D:\CRUV\craver-backend\craver\manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django\core\management_init_.py", line 442, in execute_from_command_line
utility.execute()
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django\core\management_init_.py", line 416, in execute
django.setup()
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django_init_.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django\apps\registry.py", line 116, in populate
app_config.import_models()
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django\apps\config.py", line 269, in import_models
self.models_module = import_module(models_module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rudra\AppData\Local\Programs\Python\Python311\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\CRUV\craver-backend\craver\cart\models.py", line 6, in
class CartCustomization(models.Model):
File "D:\CRUV\craver-backend\craver\cart\models.py", line 14, in CartCustomization
customization_categories = models.ArrayField(model_container = "CartCustomizationCategory")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\CRUV\craver-backend\venv\Lib\site-packages\djongo\models\fields.py", line 276, in init
super().init(model_container, *args, **kwargs)
File "D:\CRUV\craver-backend\venv\Lib\site-packages\djongo\models\fields.py", line 114, in init
self.model_container._meta.abstract = False
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute '_meta'
The text was updated successfully, but these errors were encountered:
Can't Use string reference in model container for defining related models.
Python script
Traceback
Traceback (most recent call last):
File "D:\CRUV\craver-backend\craver\manage.py", line 22, in
main()
File "D:\CRUV\craver-backend\craver\manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django\core\management_init_.py", line 442, in execute_from_command_line
utility.execute()
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django\core\management_init_.py", line 416, in execute
django.setup()
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django_init_.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django\apps\registry.py", line 116, in populate
app_config.import_models()
File "D:\CRUV\craver-backend\venv\Lib\site-packages\django\apps\config.py", line 269, in import_models
self.models_module = import_module(models_module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rudra\AppData\Local\Programs\Python\Python311\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\CRUV\craver-backend\craver\cart\models.py", line 6, in
class CartCustomization(models.Model):
File "D:\CRUV\craver-backend\craver\cart\models.py", line 14, in CartCustomization
customization_categories = models.ArrayField(model_container = "CartCustomizationCategory")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\CRUV\craver-backend\venv\Lib\site-packages\djongo\models\fields.py", line 276, in init
super().init(model_container, *args, **kwargs)
File "D:\CRUV\craver-backend\venv\Lib\site-packages\djongo\models\fields.py", line 114, in init
self.model_container._meta.abstract = False
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute '_meta'
The text was updated successfully, but these errors were encountered: