Open setushwetank opened 6 years ago
It seems that djongo (or Django itself, which the abstract attribute is coming from) does not allow to embed an abstract model inside another abstract model (ie, max deep <= 2), although there are not such limitations in MongoDB and pymongo
Any way to get over this limitation?
I am facing the same problem, does anyone have a solution?
I am facing the same problem, does anyone have a solution?
I am facing the same problem, does anyone have a solution?
I am facing the same problem, does anyone have a solution?
I am facing the same problem, does anyone have a solution?
still didnt solve it? :(
@nesdis can you help us? Is there a way around this? Thanks.
@nesdis now the django admin is messed up. Is therere any way to fix this? Thanks!
@aryan340 This package is mostly unusable, just use Pymongo. however check your Django version. If it's Django 3+ this might have broke djongo integration.
But then I would lose the django orm support - which is the main reason anyone would want to use django in the first place..
Then why are you using mongoDB? if you must, then why not use database routing, and use mongo for certain parts of ur application.
guys, I really don't understand this but when I change the name of EmbededField in my model (without migrations) I have access to the rest of the instances of that model in admin UI! But when I create an instance with this new name I face this error again
I have a model which has nested embedded documents. While saving from admin UI following error is raised - 'list' object has no attribute '_meta' Model looks like below , while debugging , it was found that 2nd level of nested document is raising exception. If contents of dimensions is moved under shipping , this works fine { "productId": "P1020", "productName": "Product_52956", "shipping": { "dimensions": { "height": 8.2787, "length": 7.3324, "width": 4.6937 }, "weight": 2.2756 } }
Python script
Traceback
Internal Server Error: /admin/CatalogApp/product/add/ Traceback (most recent call last): File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\core\handlers\exception.py", line 35, in inner response = get_response(request) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\core\handlers\base.py", line 158, in _get_response response = self.process_exception_by_middleware(e, request) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\core\handlers\base.py", line 156, in _get_response response = response.render() File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\response.py", line 106, in render self.content = self.rendered_content File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\response.py", line 83, in rendered_content content = template.render(context, self._request) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\backends\django.py", line 61, in render return self.template.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 175, in render return self._render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 167, in _render return self.nodelist.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 943, in render bit = node.render_annotated(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\loader_tags.py", line 155, in render return compiled_parent._render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 167, in _render return self.nodelist.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 943, in render bit = node.render_annotated(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\loader_tags.py", line 155, in render return compiled_parent._render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 167, in _render return self.nodelist.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 943, in render bit = node.render_annotated(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\loader_tags.py", line 67, in render result = block.nodelist.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 943, in render bit = node.render_annotated(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\loader_tags.py", line 67, in render result = block.nodelist.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 943, in render bit = node.render_annotated(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\defaulttags.py", line 211, in render nodelist.append(node.render_annotated(context)) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\loader_tags.py", line 194, in render return template.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 177, in render return self._render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 167, in _render return self.nodelist.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 943, in render bit = node.render_annotated(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\defaulttags.py", line 211, in render nodelist.append(node.render_annotated(context)) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\defaulttags.py", line 211, in render nodelist.append(node.render_annotated(context)) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\defaulttags.py", line 314, in render return nodelist.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 943, in render bit = node.render_annotated(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\defaulttags.py", line 314, in render return nodelist.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 943, in render bit = node.render_annotated(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 910, in render_annotated return self.render(context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 999, in render return render_value_in_context(output, context) File "C:\Users\611834094\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django-2.0.2-py3.6.egg\django\template\base.py", line 978, in render_value_in_context value = str(value) File "C:\Users\611834094\AppData\Roaming\Python\Python36\site-packages\djongo\models\fields.py", line 568, in str return mark_safe(f'