[web2py] Re: Scheduler: plugin cs_plugin_monitor updated to 2.0.1

2014-11-03 Thread Niphlod
as always. I'm not a web designer so usually I can get most of the help on the UX part, but ever contribution is welcome. On Monday, November 3, 2014 12:51:19 AM UTC+1, pn wrote: > > Looks really impressive! Will check out the code tomorrow. Are you looking > for any help besides code-review/com

[web2py] Re: represents function

2014-11-03 Thread Leonel Câmara
You need to use render. db(db.SuperObjectComment.superObjectID == request.get_vars.filter). select().render() This will call the field's represent on the returned rows and get you what you want. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2

[web2py] auth_permission at Unittest

2014-11-03 Thread Pedro Henrique Correa Ferreira
Hello, buddies I'd like to know how can I run a Unittest in a fuction that requires permission. The function is the following: @auth.requires_permission('accessible', URL(request.controller,'pessoa')) def pessoa(): print URL(request.controller,'pessoa') grid = SQLFORM.grid(db.pessoa,

[web2py] SQLFORM.grid want no initial values

2014-11-03 Thread Wayne Tooley
Hi Everyone; I'm new to web2py and love it. I have a simple question that I can't seem to find a simple answer to. I want to use SQLFORM.gid but not to load any values unless searched for. Maybe I'm using the wrong thing but is there a simple way to do this? my code is this: def search_person(

[web2py] Allow form re-submission / suppress disableElement?

2014-11-03 Thread tim . nyborg
I have a form which allows a user to download a CSV, given a batch number, without having to leave the page. However, I'd like to allow form re-submission, since the user might want to run the CSV export several times. Web2py.js disables buttons on form submission, but is there a simple way t

[web2py] Re: duplicate column name error

2014-11-03 Thread Massimo Di Pierro
please deleted everything in databases/* something got corrupted and tries to redefined a column that exists. On Saturday, 1 November 2014 15:07:23 UTC-5, Ramashish Gaurav wrote: > > Hi all, > > I am following the second video tutorial for learning web2py by Mr. > Massimo, where he teaches to ma

[web2py] no basic auth via wget because current.request.env.http_authorization is none

2014-11-03 Thread Falko Delarue
I tried to access web2py via basic auth as described in http://web2py.com/books/default/chapter/29/09/access-control#Access-Control-and-Basic-Authentication since it did not work i tried to track the error down and put some debug print in gluon/tools.py Auth basic() I can see that the basic fun

[web2py] How not display index in controller url?

2014-11-03 Thread Carlos Cesar Caballero Díaz
Hi, I have an app that have (among others) a blog controller, it only has an index function, and I need that index never shows in the controller url call, for example, if I call myapp/blog/test, I need that "test" pass to index as an argument, and I need that behavior only in the blog controlle

[web2py] Re: represents function

2014-11-03 Thread Anthony
More specifically, .render() with no arguments returns a generator that allows you to iterate through all the rows. Alternatively, if you pass an index as the first argument, it will render just that single row. It also takes a "fields" argument, which can be a list of Field objects limiting wh

[web2py] Re: How not display index in controller url?

2014-11-03 Thread Anthony
You can use the parameter-based router. The router takes a "functions" key, which can be a dictionary with a key for each controller containing a list of valid functions within the controller. This allows the router to distinguish args after the default function from other valid functions in th

Re: [web2py] Re: Support for MS Access?

2014-11-03 Thread ksotiris
Can anybody help me with the REGEX_URI ? I use the ruri='DRIVER={Microsoft Access Driver (*.mdb)};SERVER=192.168.1.182;DBQ=c:\\v3.mdb;UID=admin;PWD=' m = self.REGEX_URI.match(ruri) and i would like to get driver=m.group(driver) # => {Microsoft

[web2py] Re: Allow form re-submission / suppress disableElement?

2014-11-03 Thread Anthony
Looks like the JS code disables any submit button inside a form if the button has no "name" attribute, so a workaround would be to give the button a name: BUTTON(icon_text('Export', 'print'), _type='submit', _class='btn', _name= 'export') Perhaps there should be a more elegant way to prevent th

[web2py] Re: no basic auth via wget because current.request.env.http_authorization is none

2014-11-03 Thread Niphlod
how are you trying to access the function (wget, curl, some cmdline script, etc etc etc) ? On Monday, November 3, 2014 2:34:51 PM UTC+1, Falko Delarue wrote: > > I tried to access web2py via basic auth as described in > http://web2py.com/books/default/chapter/29/09/access-control#Access-Control-

[web2py] Re: Support for MS Access?

2014-11-03 Thread Leonel Câmara
ksotiris here's a possible solution REGEX_URI= r'DRIVER=\{(?P[^}]+)\};SERVER=(?P[\d\.]+);DBQ=(?P[^;]+);UID=(?P[^;]+);PWD=(?P.+)' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/

[web2py]

2014-11-03 Thread Anandhakumar Radhakrishnan
Hi every one, I have started my career with python - web2py for Web designing projects. I just want to know, By using this technology is having good future or not, If yes means what I have to do to next step to grow my career.Please help me -- Thanks, Anand -- Resources: - http://web2py.com -

[web2py] Re: duplicate column name error

2014-11-03 Thread Ramashish Gaurav
Thanks for addressing this issue. Actually this is the second time I am coding this reddit clone app and this time I got stuck at the same point again. Do you mean I need to remove all the code in db1.py and re write the code from beginning? On Monday, November 3, 2014 6:41:09 PM UTC+5:30, Ma

[web2py] newbie question about login

2014-11-03 Thread Rodrigo Cesar
Hi all, i'm new to web2py,i was wondering if it's possibly to use the same authentication for various apps,my idea is to write my application modular where each part of the sistem will ne a stand alone aplication. But the user should loggin only once. -- Resources: - http://web2py.com - http:/

[web2py] Re: auth_permission at Unittest

2014-11-03 Thread Pedro Henrique Correa Ferreira
Already tried login_bare too... still not working... Em segunda-feira, 3 de novembro de 2014 10h32min47s UTC-2, Pedro Henrique Correa Ferreira escreveu: > > Hello, buddies > > I'd like to know how can I run a Unittest in a fuction that requires > permission. > > The function is the following:

[web2py] Re: newbie question about login

2014-11-03 Thread Leonel Câmara
Yes that's possible, web2py can work as a Central Authentication Service. http://www.web2py.com/books/default/chapter/29/09/access-control#Central-Authentication-Service -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h

[web2py] Re: represents function

2014-11-03 Thread Alex Glaros
thanks guys, you have no doubt provided the solution, but can you tell me where in controller the lines go? I put Anthony's line in the view: {{for objectComment in objectComments.render():}} and receive error: 'str' object has no attribute 'first_name' then I assume that a "render" phrase

[web2py] Re: represents function

2014-11-03 Thread Alex Glaros
never mind, it works with simple addition of Anthony's line to view. What was causing error was view reference to first_name {{=objectComment.created_by.first_name}} {{=objectComment.created_by.last_name }}: testing: {{=objectComment.created_by}} controller didn't have to be changed def pe

[web2py] Re: represents function

2014-11-03 Thread Anthony
Sorry, you can't have it both ways. Once you convert the created_by field via its represent function, it becomes a string, at which point you can no longer use it for recursive selects. Anyway, why does your code still need the recursive selects now that you have the rendered version of created

[web2py] Re: represents function

2014-11-03 Thread Anthony
Sorry, you can't have it both ways. Once you convert the created_by field via its represent function, it becomes a string, at which point you can no longer use it for recursive selects. Anyway, why does your code still need the recursive selects now that you have the rendered version of created

[web2py] Re: represents function

2014-11-03 Thread Anthony
Sorry, you can't have it both ways. Once you convert the created_by field via its represent function, it becomes a string, at which point you can no longer use it for recursive selects. Anyway, why does your code still need the recursive selects now that you have the rendered version of created

[web2py] Re: represents function

2014-11-03 Thread Anthony
Sorry, you can't have it both ways. Once you convert the created_by field via its represent function, it becomes a string, at which point you can no longer use it for recursive selects. Anyway, why does your code still need the recursive selects now that you have the rendered version of created

[web2py] Re: represents function

2014-11-03 Thread Alex Glaros
the first person to comment gets his name populated down the view as having made all of the comments regardless of who is logged in when commenting so controller below needs to be changed: def person_represent(id, r): row = db((db.auth_user.id==db.SuperObjectComment.created_by)

[web2py] Re: represents function

2014-11-03 Thread Alex Glaros
actually, if I take the ".render()" out from view, the word FIRST in controller works correctly. It's just that the created_by primary-key is displayed in view instead of first and last name -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/we

[web2py] Re: no basic auth via wget because current.request.env.http_authorization is none

2014-11-03 Thread Falko Delarue
wget and the browser http://email:p...@mysite.com On Monday, November 3, 2014 4:24:15 PM UTC+1, Niphlod wrote: > > how are you trying to access the function (wget, curl, some cmdline > script, etc etc etc) ? > > On Monday, November 3, 2014 2:34:51 PM UTC+1, Falko Delarue wrote: >> >> I tried to a

[web2py] Re: represents function

2014-11-03 Thread Anthony
db((db.auth_user.id==db.SuperObjectComment.created_by)).select().first() Your query does not use the id at all but simply joins the two tables, selects all the records, and then takes the first record. In fact, you don't need the join at all -- just select the record from the db.auth_user table

[web2py] Features as Modules

2014-11-03 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All. I need to add new features to my application like a modules; something like purchases module, sales module, etc. The idea is that each new module installed enable the respective option menu. My idea is to create folders within the folder modules such as sales folder; inside are the

[web2py] Re: update_or_insert

2014-11-03 Thread Dave S
On Saturday, November 1, 2014 12:31:38 PM UTC-7, Luis Ramos wrote: > > Anthony, thanks for your response, the only inconvenience that I see is > that the 'update_date' Field will be updated if there's a change in the > whole Row, instead of a particular Cell. How can we specify to update if a

[web2py] Re: represents function

2014-11-03 Thread Alex Glaros
pasted the line in but only primary key displays - not the full name controller def person_represent(id, r): row = db.auth_user(id) return '%s %s %s' % (row.auth_user.first_name, row.auth_user.last_name, row.auth_user.currentPosition) db.SuperObjectComment.created_by.represent = person_r

[web2py] Re: represents function

2014-11-03 Thread Anthony
In that case because there is no join, it would just be row.first_name, not row.auth_user.first_name. Anthony On Monday, November 3, 2014 8:36:54 PM UTC-5, Alex Glaros wrote: > > pasted the line in but only primary key displays - not the full name > > controller > def person_represent(id, r): >

[web2py] Re: update_or_insert

2014-11-03 Thread Anthony
On Saturday, November 1, 2014 3:31:38 PM UTC-4, Luis Ramos wrote: > > Anthony, thanks for your response, the only inconvenience that I see is > that the 'update_date' Field will be updated if there's a change in the > whole Row, instead of a particular Cell. How can we specify to update if a > p

[web2py] Re: represents function

2014-11-03 Thread Alex Glaros
same result as before. Only primary key displays. As though w2p doesn't see the function below def person_represent(id, r): row = db.auth_user(id) return '%s %s %s' % (row.first_name, row.last_name, row.currentPosition) db.SuperObjectComment.created_by.represent = person_represent in the

[web2py] web2py postgres sort by

2014-11-03 Thread Yebach
Hello I have a postgres db with encoding and collation settings CREATE DATABASE algit_osnovna_sola WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' CONNECTION LIMIT = -1; When I use select wit