Ciao, grazie a tutti per i suggerimenti

 

Massimo, ho provato a installare entiterritoriali: l’ho semplicemente
inserito nel mio buildout ma l’installazione mi dice che non può installare
pysqlite

 

error: Setup script exited with error: command 'gcc' failed with exit status
1

An error occured when trying to install pysqlite 2.6.3. Look above this
message for any errors that were output by easy_install.

While:

  Installing instance.

  Getting distribution for 'pysqlite'.

Error: Couldn't install: pysqlite 2.6.3

 

Info sulla mia installazione:

Ubuntu 10.04.1 LTS

Plone 4.0.4

 

 

Prima di buttare fuori l’errore indicato sopra c’era anche questo output:

 

Installing instance.

Getting distribution for 'pysqlite'.

install_dir /home/plone/plone402/eggs/tmphoZFly

In file included from src/module.c:24:

src/connection.h:33:21: error: sqlite3.h: No such file or directory

In file included from src/module.c:24:

src/connection.h:38: error: expected specifier-qualifier-list before
âsqlite3â

In file included from src/module.c:25:

src/statement.h:37: error: expected specifier-qualifier-list before
âsqlite3â

src/module.c: In function âmodule_completeâ:

src/module.c:103: warning: implicit declaration of function
âsqlite3_completeâ

src/module.c: At top level:

src/module.c:269: error: âSQLITE_OKâ undeclared here (not in a function)

src/module.c:270: error: âSQLITE_DENYâ undeclared here (not in a function)

src/module.c:271: error: âSQLITE_IGNOREâ undeclared here (not in a function)

src/module.c:272: error: âSQLITE_CREATE_INDEXâ undeclared here (not in a
function)

src/module.c:273: error: âSQLITE_CREATE_TABLEâ undeclared here (not in a
function)

src/module.c:274: error: âSQLITE_CREATE_TEMP_INDEXâ undeclared here (not in
a function)

src/module.c:275: error: âSQLITE_CREATE_TEMP_TABLEâ undeclared here (not in
a function)

src/module.c:276: error: âSQLITE_CREATE_TEMP_TRIGGERâ undeclared here (not
in a function)

src/module.c:277: error: âSQLITE_CREATE_TEMP_VIEWâ undeclared here (not in a
function)

src/module.c:278: error: âSQLITE_CREATE_TRIGGERâ undeclared here (not in a
function)

src/module.c:279: error: âSQLITE_CREATE_VIEWâ undeclared here (not in a
function)

src/module.c:280: error: âSQLITE_DELETEâ undeclared here (not in a function)

src/module.c:281: error: âSQLITE_DROP_INDEXâ undeclared here (not in a
function)

src/module.c:282: error: âSQLITE_DROP_TABLEâ undeclared here (not in a
function)

src/module.c:283: error: âSQLITE_DROP_TEMP_INDEXâ undeclared here (not in a
function)

src/module.c:284: error: âSQLITE_DROP_TEMP_TABLEâ undeclared here (not in a
function)

src/module.c:285: error: âSQLITE_DROP_TEMP_TRIGGERâ undeclared here (not in
a function)

src/module.c:286: error: âSQLITE_DROP_TEMP_VIEWâ undeclared here (not in a
function)

src/module.c:287: error: âSQLITE_DROP_TRIGGERâ undeclared here (not in a
function)

src/module.c:288: error: âSQLITE_DROP_VIEWâ undeclared here (not in a
function)

src/module.c:289: error: âSQLITE_INSERTâ undeclared here (not in a function)

src/module.c:290: error: âSQLITE_PRAGMAâ undeclared here (not in a function)

src/module.c:291: error: âSQLITE_READâ undeclared here (not in a function)

src/module.c:292: error: âSQLITE_SELECTâ undeclared here (not in a function)

src/module.c:293: error: âSQLITE_TRANSACTIONâ undeclared here (not in a
function)

src/module.c:294: error: âSQLITE_UPDATEâ undeclared here (not in a function)

src/module.c:295: error: âSQLITE_ATTACHâ undeclared here (not in a function)

src/module.c:296: error: âSQLITE_DETACHâ undeclared here (not in a function)

src/module.c: In function âinit_sqliteâ:

src/module.c:426: warning: implicit declaration of function
âsqlite3_libversionâ

src/module.c:426: warning: passing argument 1 of âPyString_FromStringâ makes
pointer from integer without a cast

/usr/include/python2.6/stringobject.h:63: note: expected âconst char *â but
argument is of type âintâ

 

_______________________________________

 

Ing. Paolo Tramontani - Softone s.r.l.
email: [email protected]
          [email protected]
phone: +39 338 9253741
______________________________________

  _____  

Da: [email protected]
[mailto:[email protected]] Per conto di Massimo
Azzolini
Inviato: martedì 10 aprile 2012 12:50
A: La lista degli italiani appassionati di Plone.
Oggetto: Re: [Plone-IT] province-comuni

 

Paolo,

 

forse questo fa al caso tuo:

http://pypi.python.org/pypi/redturtle.entiterritoriali/0.2

é tutto su sqlite, quindi puoi anche modificarti i dati.

volendo, direi che puoi anche estenderlo e spostare tutto su un db serio.

 

ciao

2012/4/10 Paolo Tramontani <[email protected]>

Ciao Plonisti,

 

vi chiedo un suggerimento

 

Dovrei risolvere l’annosa questione di inserire province e comuni
all’interno della mia applicazione in modo che alcuni oggetti (come il
cliente, il contatto, eccetera) possano avere tra i loro dati anche la
provincia e il comune… con la consueta dipendenza per cui scelta una
provincia si determina un sottoinsieme di comuni.

 

Si vorrebbe anche avere una specie di anagrafica di queste province e
comuni, ovvero avere un punto di inserimento e modifica di questi dati.

 

Dal punto di vista del modello dati se fossi in un db relazionale metterei
su due tabelle (province, comuni) e recupererei da lì i dati per popolare le
combo box…

 

Come è meglio fare in Plone?

 

Sarebbe tanto bello mettere su due archetype (provincia folderish + comune
non folderish) buttando dentro un oggetto per ogni provincia e dentro
ciascuno di essi n comuni… e poi mettere un ReferenceField sul cliente… ma
suppongo che non sia una grande idea creare una così grande mole di oggetti…

 

Voi cosa mi suggerite?

 

Grazie

 

_______________________________________

 

Ing. Paolo Tramontani - Softone s.r.l.
email: [email protected]
          [email protected]
phone: +39 <tel:%2B39%20338%209253741>  338 9253741
______________________________________

 


_______________________________________________
Plone-IT mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-plone-it
http://plone-regional-forums.221720.n2.nabble.com/Plone-Italy-f221721.html





 

-- 
Massimo Azzolini - RedTurtle
twitter: @massimoazzolini

skype: massimo_azzolini

e-mail:   [email protected]
website:  <http://www.redturtle.it> http://www.redturtle.it

Phone: +39 0532 1915958
Mobile: +39 328 9508994

 

_______________________________________________
Plone-IT mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-plone-it
http://plone-regional-forums.221720.n2.nabble.com/Plone-Italy-f221721.html

Rispondere a