Re: [Python] Help me with PG JSON e Django

2016-12-28 Per discussione Carlos Catucci
2016-12-27 22:56 GMT+01:00 Alessandro Dentella : > Posso suggerirti di controllare: > > * cosa hai veramente nel db id | agency_code | search_offer | block_type | location | customer_price | agency_price | details | active | deleted | agency_id | rent_sale 1 | A0001 | 1 |

Re: [Python] Help me with PG JSON e Django

2016-12-27 Per discussione Raffaele Salmaso
On Tue, Dec 27, 2016 at 11:03 PM, Andrea D'Amore wrote: > Non > Blocks.objects.filter(details__block_details__2__attribute='bagno') > ? > Anche, altro modo (senza usare __contains) -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso |

Re: [Python] Help me with PG JSON e Django

2016-12-27 Per discussione Andrea D'Amore
2016-12-27 22:59 GMT+01:00 Raffaele Salmaso : > Hai provato con il path completo? > Block.objects.filter(details__block_details__0__contains={'attribute': > 'bagno'}) > ? Non Blocks.objects.filter(details__block_details__2__attribute='bagno') ? -- Andrea

Re: [Python] Help me with PG JSON e Django

2016-12-27 Per discussione Raffaele Salmaso
2016-12-27 22:03 GMT+01:00 Carlos Catucci : > Secondo il manuale di Django, versione 1.9, Provato anche con la 1.10? Versione di postgresql? Versione di python? Versione di psycopg2? Questo un esempio di inserimento > >

Re: [Python] Help me with PG JSON e Django

2016-12-27 Per discussione Alessandro Dentella
On Tue, Dec 27, 2016 at 10:03:59PM +0100, Carlos Catucci wrote: > Secondo il manuale di Django, versione 1.9, si possono definire, > previa importazione dellì'apposito contrib (from > django.contrib.postgres.fields import JSONField) dei campi json in una > tabella. > Ed in effetti la creazione