<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-12-27 22:03 GMT+01:00 Carlos Catucci <span dir="ltr"><<a href="mailto:carlos.catucci@gmail.com" target="_blank">carlos.catucci@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Secondo il manuale di Django, versione 1.9, </blockquote><div>Provato anche con la 1.10?</div><div>Versione di postgresql?</div><div>Versione di python?</div><div>Versione di psycopg2?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Questo un esempio di inserimento<br>
<br>
Blocks.objects.create(agency_<wbr>id=1,agency_code='C0001',rent_<wbr>sale='1',search_offer='2',<wbr>block_type='appartamento',<wbr>location='pescara',customer_<wbr>price=100000.0,agency_price=<wbr>80000.0,<br>
active='t',deleted='f',<wbr>details= {'block_details': [{"details": {"mp":<br>
"M", "mq": "80:", "qta": "2:"}, "attribute": "camera da letto"},<br>
{"details": {"mp": "M", "mq": "80:", "qta": "2:"}, "attribute":<br>
"camera da letto"}, {"details": {"mp": "M", "qta": "1:"}, "attribute":<br>
"bagno"}, {"details": {"mp": "P", "yn": "Y:"}, "attribute": "posto<br>
auto"}, {"details": {"mp": "M", "yn": "Y:"}, "attribute":<br>
"ascensore"}]})<br>
<br>
Ma se eseguo una query tipo<br>
<br>
Blocks.objects.filter(details_<wbr>_contains={'attribute': 'bagno'})<br></blockquote><div>Hai provato con il path completo?</div><div>Block.objects.filter(details__block_details__0__contains={'attribute': 'bagno'}) </div><div>?</div><div><br></div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>| Raffaele Salmaso<br>| <a href="https://salmaso.org" target="_blank">https://salmaso.org</a><br>| <a href="https://bitbucket.org/rsalmaso" target="_blank">https://bitbucket.org/rsalmaso</a><br>| <a href="https://github.com/rsalmaso" target="_blank">https://github.com/rsalmaso</a><br></div></div></div></div></div></div></div>
</div></div>