I'm using an SQL grid to display values from two distinct tables. This is
what I have:
def manageUsers():
query = (db.Extension.Person == db.auth_user.id )
grid = SQLFORM.grid(query,csv = False,paginate=25,user_signature=True)
return (grid = grid)
The grid shows perfectly fine with both t
I'm having some troubles importing from csv files while using a Postgres
connection, when a table has one or more references to other tables like so:
db.define_table('Extension',
Field('Person',db.auth_user),
Field('Supervisor',db.auth_user),
Field(
Problem solved!Everything is working fine now!
quarta-feira, 18 de Novembro de 2015 às 15:35:32 UTC, Carla Raquel escreveu:
>
> I'm having some troubles importing from csv files while using a Postgres
> connection, when a table has one or more references to other
Hi!
I'm trying to do something like the code below, but it prompts me the
following error : 'SyntaxError: invalid syntax'
auth.settings.extra_fields['auth_user']= [Field('Supervisor', 'reference
auth_user'),
format = '%(db.auth_user.first_name)s
%(db.a
I'm having some troubles making a sum query in appadmin.I want to sum all
the values of field 'Custo' and then group by type of service, much like
you would do in a dal query.I tried db.Chamada.Custo.sum() just to start,
but that doesn't work.It gives me a 'misuse of aggregate: SUM()' error. Any
How can one add an icon before the 'Welcome' message in the navbar,just
like the one next to the 'Profile' in the drop-down? I tried using
something like in
auth.navbar('Welcome',mode='dropdown'), unfortunately to no avail.
Any help would be much appreciated!
--
Resources:
- http://web2py.com
How can I, in the "user" function, customize the forms in a way that when I
click the "Profile" like it shows all the fields pertaining to the profile
and, when I click on "Password" I can see the "old Password", etc?Currently
I have something like:
{{=T( request.args(0).replace('_',' ').capita
I'm having a bit of trouble figuring out how to add info to a bootstrap
table in a panel, through ajax.This's a phone call register system and I
have the following code in the html:
resumoMensal.html
Extensions
the values I want
individually in each of the td of the table. Also will I need to do an ajax
request for each thing I want to calculate(like call duration,types of
services,etc.) or I can do all in one?
quarta-feira, 24 de Junho de 2015 às 11:39:39 UTC+1, Carla Raquel escreveu:
>
>
&
Since I have the values stored inside tables in a db, I am doing the
queries I need and calculating values in the appropriate controllers and I
am showing these values in the view like this:
total_cost["_extra"]["SUM(Call.Cost)"]
Otherwise, how can I do it in javascript on the client side?
qui
I have two dropdown lists like the ones below and I would like to compose
my URL using the month and year as vars, after I click a certain link.How
can I change my current request.vars to the selected values?
Select month:
{{for m in months:}}
{{=m}}
{{pass}}
I'm passing a few variables from the controller(including one of them a
list) to the view and I have a link that is built using those
variables.Below is the controller function:
def indexResumo():
meses =
{'Janeiro':1,'Fevereiro':2,'Março':3,'Abril':4,'Maio':5,'Junho':6,'Julho':7,'Agosto':8
This is how I dealt with my xml files:
doc = xml.dom.minidom.parse("...my_xml.xml")// Here you parse the xml file
for node in doc.getElementsByTagName("recipe")://Here you read in a cycle the
tags which contain numerous attributes each
t=node.getAttribute("name")//Each attribute is st
So, you're saying I should avoid sending vars on the URL and instead use
json?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message
Thanks for your reply Massimo!I have a question though, why do you say JSON
by itself won't help?Wouldn't it solve the problem 1)?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issue
I don't mind at all Leonel! It is always good to learn from more seasoned
coders and put the newfound knowledge into practice.
Anyway, I have a dictionary because when the page loads I want the previous
month to be displayed. Since this code
month = T(request.now.strftime("%B"))
gives me the cu
This piece of code throws me some unicode problems on "Março". I've
searched for a solution but didn't find one.
{{for m in [datetime.date(2000, m, 1).strftime('%B') for m in range(1, 13
)]:}}
{{=m}}
{{pass}}
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http:
I'm using Pylint in sublime but it gives me some errors on web2py specific
variables(request,response,etc.). I've read somewhere that to solve this
you had to do something like:
if 0:
from gluon import *
The problem is, I'm getting the error 'Unable to import gluon'. Do you know
of any fi
Hello,
I'm currently tring to solve a problem regarding a table da references
itself. The default auth_user table has an extra field called 'Supervisor'
that references that same table, since Supervisor is an user(a
specialization of it,to be more specific).I have the following parameters
adde
I guess my code is more messed up than I thought. I'll try and clarify
your points:
*What am I trying to achieve?*
In the db there are people (given by the auth_user table). From those
people there are ones who are hierarchically above them and supervise
them.They are called Supervisors. All
*They should be strings (otherwise how do you store the '+' character)*.
I think in this case they won't be strings since I read the numbers from a
XML and they don't have the '+' character.
*Then you want to get the extensions of all the supervisors? *
Not all the supervisors.I want to get the
*So what? You should future proof the app. Some day there might be
extensions in India or something.*
Actually, the extensions are internal to the company, either phone numbers
or mobile numbers, so your scenario won't ever apply.
*Do you mean the extensions of the persons he supervises?*
That
I'm trying to add(or update in case it isn't alreadythere) some records to
a db in a loop and I want to fill the entries with the sum of the default
db values with some other values, but somehow, when trying to insert,it's
not working. It's something like this:
db.cTable.update_or_insert((db.c
I want to implement a submenu of a submenu within Web2py, but as it is, no
submenu of submenu 'Communications' is showing. Below is my code:
response.menu = []
submenu=[]
submenu2=[]
response.menu += [[(SPAN(_class='glyphicon
glyphicon-wrench',_style='padding:0px
5px;color:black;'),(T('Manag
Well, it seems I had to add db.cTable.cost.*default *to make it work and
retrieve the default value, as db.cTable.cost is a field object. The case
is now closed,then.
quarta-feira, 21 de Outubro de 2015 às 10:36:05 UTC+1, Carla Raquel
escreveu:
>
> I'm trying to add(or update in ca
25 matches
Mail list logo