Hi,
i have
#DATABASE CONNECTION
conn = sqlite3.connect(‘data/faktura.sqlite’)
c = conn.cursor()
c.execute(‘SELECT * FROM clients’)
print c.fetchone()
and also
self.productsListView = ObjectListView(pnl2, style=wx.LC_REPORT
wx.SUNKEN_BORDER, size=(850,250))
the question is , how to make objeclistview to populate properly the data?
Werner
June 12, 2013, 8:21pm
2
I suggest to look at SQLAlchemy and not get the data directly out of sqlite - gives you more options down the road.
Have a look at:
https://bitbucket.org/driscollis/medialocker/wiki/Home
and the code is:
https://bitbucket.org/driscollis/medialocker/src
Werner
···
On 12/06/2013 21:33, CPU IN THE BRAIN wrote:
Hi,
i have
#DATABASE CONNECTION
conn = sqlite3.connect('data/faktura.sqlite')
c = conn.cursor()
c.execute('SELECT * FROM clients')
print c.fetchone()
and also
self.productsListView = ObjectListView(pnl2, style=wx.LC_REPORT
>wx.SUNKEN_BORDER, size=(850,250))
the question is , how to make objeclistview to populate properly the data?
I don’t like the way SQLAlchemy syntax work.i don’t want ORM.
i need regular SQL syntax.
···
On Wednesday, June 12, 2013 11:21:03 PM UTC+3, werner wrote:
On 12/06/2013 21:33, CPU IN THE BRAIN wrote:
Hi,
i have
#DATABASE CONNECTION
conn = sqlite3.connect('data/faktura.sqlite')
c = conn.cursor()
c.execute('SELECT * FROM clients')
print c.fetchone()
and also
self.productsListView = ObjectListView(pnl2, style=wx.LC_REPORT
wx.SUNKEN_BORDER, size=(850,250))
the question is , how to make objeclistview to populate properly the data?
I suggest to look at SQLAlchemy and not get the data directly out of
sqlite - gives you more options down the road.
Have a look at:
https://bitbucket.org/driscollis/medialocker/wiki/Home
and the code is:
https://bitbucket.org/driscollis/medialocker/src
Werner
Werner
June 13, 2013, 8:12am
4
In which case just replace the SA type code in medialocker and pull the data from your SQL cursor.
Werner
···
On 13/06/2013 10:06, CPU IN THE BRAIN wrote:
I don't like the way SQLAlchemy syntax work.i don't want ORM.
i need regular SQL syntax.
I can’t get No module named mlsrc.controllers.base
···
On Thursday, June 13, 2013 11:12:12 AM UTC+3, werner wrote:
On 13/06/2013 10:06, CPU IN THE BRAIN wrote:
I don’t like the way SQLAlchemy syntax work.i don’t want ORM.
i need regular SQL syntax.
In which case just replace the SA type code in medialocker and pull the
data from your SQL cursor.
Werner
Werner
June 13, 2013, 9:16am
6
If you want to run medialocker you should use “runapp.py” or if you
want to run things from within the source folder you have to run
setup_lib.py ones.
If you just want to look at the code then you need to start looking
at:
mlsrc.libui.olvgroup.initModel
mlsrc.base_app.createOLVEntries
FYI, in MediaLocker the column definitions for ObjectListView are
stored in the database, this allows for user configuration of column
order and size.
If you don’t need that then maybe the recipe in the OLV doc will
help:
Werner
···
On 13/06/2013 10:48, CPU IN THE BRAIN
wrote:
I can’t get No module named mlsrc.controllers.base
http://objectlistview.sourceforge.net/python/recipes.html
How
can I show a list of dictionaries in the ObjectListView?
Here’s how I did it – see attached file.
ListviewExample.py (1.72 KB)
···
On Wednesday, June 12, 2013 12:33:37 PM UTC-7, CPU IN THE BRAIN wrote:
Hi,
i have
#DATABASE CONNECTION
conn = sqlite3.connect(‘data/faktura.sqlite’)
c = conn.cursor()
c.execute(‘SELECT * FROM clients’)
print c.fetchone()
and also
self.productsListView = ObjectListView(pnl2, style=wx.LC_REPORT
wx.SUNKEN_BORDER, size=(850,250))
the question is , how to make objeclistview to populate properly the data?