Hi Guys,
I was able to create simple graph by using highcharts.js
(http://www.highcharts.com/) However since it's javascript it's really
hard to add some data from controller. I found python module for highcharts:
Hi Guys,
Trying to draw some graphs using pygal and below link:
http://www.web2pyslices.com/slice/show/1634/beauty-graphics-and-charts-with-pygal
It works fine, but my view display only graph, without anything else
included in the view e.g. headers, styling etc.
Controller:
def graph():
Hi Guys,
I have a "for" loop which goes thru every row in the table (1000 rows), do
some calculation and update the row. But whole process takes around 2-3 sec
for one row as i'm connecting to few external databases to collect data. So
for 1k rows it takes ages to accoplish all those tasks.
Hi Guys,
I use below controller function:
def my_grid():
query = (db.table.id > 0)
fields=(db.table.id,db.table.field1)
selectable=[('Send IDs to another function', lambda ids: redirect(URL(
'default','new_function',vars=dict(ids=ids]
grid =
Hi Guys,
I try to use pygal to draw some charts and it works fine. I used example
from:
http://www.web2pyslices.com/slice/show/1634/beauty-graphics-and-charts-with-pygal
However i don't know how to display SQL.form and pygal chart in one view.
My code
def form_and_chart():
chart =
Hi Guys,
I need a hint on how to create back button in web2p y form.
def grid1():
links = [lambda row: A(SPAN(_class='icon
magnifier'),'Form1',_class='button btn
btn-default',_title='Form1',_href=URL("default","form1",args=[row.id]))]
query=(db.test.id>0 )
grid =
Works! Thanks.
Is it also possible for SQLFORM.factory?
On Wednesday, 10 June 2015 16:06:47 UTC+2, Anthony wrote:
Try:
db.table1.order.show_if = db.table1.colour.belongs(['red', 'blue'])
Anthony
On Tuesday, June 2, 2015 at 6:09:20 AM UTC-4, kecajk...@gmail.com
javascript: wrote:
Hi,
Anyone?
On Tuesday, 2 June 2015 12:09:20 UTC+2, kecajk...@gmail.com wrote:
Hi,
I'm using show_if to hide a filed of my form under certain conditions.
Per web2py guide, show_if uses simple query, but it doesn't work for
logical oprators like and or.
In below example i would like to
Hi,
I'm using show_if to hide a filed of my form under certain conditions.
Per web2py guide, show_if uses simple query, but it doesn't work for
logical oprators like and or.
In below example i would like to display field order just when colour is
set to blue or red.
db.define_table('table1',
Rich,
Can You have a quick look at this?
Thanks,
On Tuesday, 12 May 2015 17:34:38 UTC+2, kecajk...@gmail.com wrote:
Sure, it's pretty simple:
DB:
db.define_table('ipaddress',
Field('ip', unique=True, length=200,requires=IS_NOT_EMPTY()),
Field('status', length=200, default=Free,
Sure, it's pretty simple:
DB:
db.define_table('ipaddress',
Field('ip', unique=True, length=200,requires=IS_NOT_EMPTY()),
Field('status', length=200, default=Free,
requires=IS_IN_SET(['Free','Used'])),
format = '%(ip)s')
db.define_table('server',
Field('servername', length=200),
Richard,
Let say that I have two IPs in ipaddress table:
10.1.1.1 FREE
10.2.2.2 FREE
I add a server into server table, i put name as server1 and chose IP from
dropdown menu 10.1.1.1.
Then my ipaddress table looks like that
10.1.1.1 USED
10.2.2.2 FREE
But i noticed that i did a typo in
Hi,
What's the difference between what i wrote and what You wrote?
And i believe You didn't get my point. Checking if IP is Free works
correctly. Point is that i want do update the one row in Server table and
change i.e. server name. I click on update button provided by grid, and i
can
Hi All,
I have very basic dtabasae where in one table i have IPs which are used in
second table:
db.define_table('ipaddress',
Field('ip', unique=True, length=200,requires=IS_NOT_EMPTY()),
Field('subnet', length=200, requires=IS_NOT_EMPTY() ),
Field('status', length=200, default=Free,
HI,
I must have skipped _and, it's what i was looking for. But also started
wondering about second example, but it gives me empty results on drop-down.
When i remove ~ it works as expected returning IPs that have been already
assigned.
db.server.ipaddress_id.requires =
Hi Guys,
I have simple database:
db.define_table('ipaddress',
Field('ip', unique=True, length=200),
Field('subnet', length=200),
format = '%(ip)s')
db.define_table('server',
Field('servername', length=200),
Field('port', length=200),
Field('ipaddress_id', 'reference
16 matches
Mail list logo