Re: [web2py] Re: web2py Complete Reference Manual

2015-04-07 Thread Johann Spies
On 4 April 2015 at 13:57, José Ricardo Borba wrote: > We left summer few weeks ago. It's late? > ;-) > As a South African, I enjoyed your remark! :) Regards Johann -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - http

[web2py] Re: Triggering a one-time migration when schema changes

2015-04-07 Thread pang
El martes, 7 de abril de 2015, 17:53:14 (UTC+2), Niphlod escribió: > > When you need it, set migrate=True, hit appadmin one time to let the > migration happen, then set it to False. > How about using python web2py.py -S your_app -M instead of hitting appadmin? The reason is that I disable the a

[web2py] Re: web2py 2.10.3 si OUT

2015-04-07 Thread Jim S
I too am having this issue with 2.10.3 -Jim On Monday, April 6, 2015 at 12:26:28 AM UTC-5, 黄祥 wrote: > > format record representation is not work in grid (in the drop down select > form field is work, but in the grid table just shown an id). > e.g. > db.define_table('test0', > Field('test0'

[web2py] Re: Please report here upgrading issues to web2py 2.10.2

2015-04-07 Thread Jim S
Just wondering if this is posted in the right place. Should I be reporting this issue elsewhere? -Jim On Monday, April 6, 2015 at 9:53:46 AM UTC-5, Jim S wrote: > > Upgraded to > > 2.10.3-stable+timestamp.2015.04.02.21.42.07 > (Running on nginx/1.4.6, Python 2.7.6) > > ...still having the same

Re: [web2py] Simple routing question

2015-04-07 Thread Jim Steil
That was it, I forgot about the wsgi file update. That was the part I was missing as well that the pythonanywhere folks helped with. And yes, they were pleasant to work with and had the answers. On Tue, Apr 7, 2015 at 11:45 AM, Alex Glaros wrote: > it is working. Pythonanywhere.com folks were

Re: [web2py] Simple routing question

2015-04-07 Thread Ron Chatterjee
May be we can add a tag to this as "how to deploy in python anywhere". On Tuesday, April 7, 2015 at 12:45:57 PM UTC-4, Alex Glaros wrote: > > it is working. Pythonanywhere.com folks were really helpful. > > There was so much trial and error I don't which of the below processes was > responsible

Re: [web2py] request table name

2015-04-07 Thread Anthony
In a model, after all tables have been defined, you could do something like this: from functools import partial def after_insert_event(f, id, table): db.auth_event.insert(time_stamp = request.now, client_ip = request. client, user_id = auth.user_id, origin = '%s/%s'

[web2py] Re: post does not appear in this forum, why ?

2015-04-07 Thread Dave S
On Tuesday, April 7, 2015 at 6:45:44 AM UTC-7, Leonel Câmara wrote: > > Yes, this group is moderated so new members messages have to be approved. > And the moderators are volunteers, AIUI, so sometimes delays happen in popping items off the queue. /dps -- Resources: - http://web2py.com - h

Re: [web2py] Re: button to start function which dynamicly chynges page

2015-04-07 Thread Dave S
On Tuesday, April 7, 2015 at 3:11:51 AM UTC-7, BlueShadow wrote: > > thanks that will give me at least a starting point. Until you wrote I had > no idea what I have to look at. I would be interested in your progress if > you like to share > > I've posted my single-pass ajax sample recently (20s

Re: [web2py] Simple routing question

2015-04-07 Thread Alex Glaros
it is working. Pythonanywhere.com folks were really helpful. There was so much trial and error I don't which of the below processes was responsible for success and what might be inefficient. Put routes.py under web2py main directory: / > home > alexglaros > web2py > routes.pyNOT UNDER YOUR

[web2py] Last version of plugin_wiki?

2015-04-07 Thread Najtsirk
Hi guys, where can I get the latest version of plugin_wiki? Best, K -- 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 because y

Re: [web2py] request table name

2015-04-07 Thread 黄祥
basically i've already create a function for it, either put it on form level or database level, but the problem is i can't get the table name to put it on auth_event table (description field). *e.g. event recorded on form level* def oncreate_event(form): db.auth_event.insert(time_stamp = request.

[web2py] Re: Triggering a one-time migration when schema changes

2015-04-07 Thread Niphlod
don't ever set migrate=True if not on the development server. When you need it, set migrate=True, hit appadmin one time to let the migration happen, then set it to False. No need to waste CPU or I/O if you're in complete control of when migrations need to happen. -- Resources: - http://web2py

Re: [web2py] AppConfig and Storage

2015-04-07 Thread Niphlod
> > > Sorry for late intromission. > > Is all of this documented in the book? If I got right, this can change the > programer’s expectation about when the system parameters will be refreshed. > that's why the scaffolding has reload=True, with a comment to remove that parameter once in product

Re: [web2py] request table name

2015-04-07 Thread Richard Vézina
If it is not in args or vars, I guess you can't have it!! At least from the URL... You better look from backend side for this, postgres log for instance... Richard On Tue, Apr 7, 2015 at 11:12 AM, 黄祥 wrote: > i've already read it before, what i want to achieve is get the table name > for every

Re: [web2py] request table name

2015-04-07 Thread 黄祥
i've already read it before, what i want to achieve is get the table name for every database table interaction and put it on auth_event. already checked in documentation about request but couldn't find it. already checked from response.toolbar() too but still can't find it. ref : http://web2py.c

Re: [web2py] request table name

2015-04-07 Thread Richard Vézina
You may consider this : http://www.web2pyslices.com/slice/show/1618/basic-usage-statistics-log-what-your-users-do I use this for 3 years and it works great... Richard On Tue, Apr 7, 2015 at 10:45 AM, 黄祥 wrote: > hi, > > i want to create a user activity history log, and put it on auth_events. >

[web2py] request table name

2015-04-07 Thread 黄祥
hi, i want to create a user activity history log, and put it on auth_events. in the description i want to have the table name that interacted with (CUD (Create, Update, Delete) ) e.g. when created new record, i want to have something like this in auth_event description = 'Table Product ID 8 is

[web2py] Re: Get All Controller Functions

2015-04-07 Thread Anthony
https://github.com/web2py/web2py/blob/master/applications/admin/controllers/default.py#L1062 On Tuesday, April 7, 2015 at 10:01:19 AM UTC-4, Ruud Schroen wrote: > > What part of the admin creates the list of controllers? I looked in > default.py but i couldn't find it.. :( > > On Monday, March 19

Re: [web2py] AppConfig and Storage

2015-04-07 Thread 黄祥
not yet, already checked in : http://web2py.com/books/default/search/29?search=appconfig.ini if i'm not wrong in another threads, massimo told that the documentation will be updated on summer, hope this thing is included too. best regards, stifan -- Resources: - http://web2py.com - http://web2

[web2py] Re: Am I correct that the | operator has multiple meanings

2015-04-07 Thread Anthony
Yes, the function of the "|" operator depends on the objects to which it is being applied. In the first case, it is applied to two Query objects, so it functions as an "OR" operator (details depend on the database adapter). In the second case, it is applied to two Field objects (a subclass of E

[web2py] Re: Format option in extra_fields

2015-04-07 Thread 黄祥
i think the format already define it on auth.define_tables perhaps you can just do the extra fields, not the format. ref: http://web2py.com/books/default/chapter/29/09/access-control#Customizing-Auth best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Using ajax to call a function that uses LOAD, not working

2015-04-07 Thread 'sasogeek' via web2py-users
default.py @auth.requires_login() def load_home(): loader = """$('#right-side').html("")""" websocket_send('http://127.0.0.1:', loader, 'mykey', 'home%s' % auth.user.id) remove_class1 = "$('#bk').removeClass('active')" #books remove_class2 = "$('#ls').removeClass('active')"

Re: [web2py] w2p_clone broke web2py installation

2015-04-07 Thread Vinicius Assef
> On 7 Apr 2015, at 01:57, Manuele Pesenti wrote: > > Il 05/04/15 21:23, Gary Cowell ha scritto: > why not just clone the latest version from github and eventually choose > a stable tagged version after by doing: > $ git checkout tags/ That’s exactly what I usually do. The problem is: we don’t

Re: [web2py] AppConfig and Storage

2015-04-07 Thread Vinicius Assef
> On 4 Apr 2015, at 15:01, Niphlod wrote: > > if you look at the source code, you'll see that it's just an ini parser by > default. > All that it does is speedup the "settings" part without users knowing > anything about python (think when you finish an app and you deploy it on a > system yo

[web2py] Trouble uploading file - cannot unlink temp file

2015-04-07 Thread Tobias Niekamp
Hello all, I've come across a strange issue on my Linux web2py environment: - In a DB table, I have a field image that is defined like this: Field("image", "upload", autodelete=True, label="Image") - When I try to upload an image via a SQLFORM.grid() / Add New Row / Submit (or Edit R

Re: [web2py] Database

2015-04-07 Thread Richard Vézina
Postgres! On Mon, Apr 6, 2015 at 2:00 PM, Philip Kilner wrote: > Hi Ron, > > On 06/04/15 18:38, Ron Chatterjee wrote: > >> Also, open source product wouldn't be >> as secured as MYSQL since its open source. But I do agree with the rest. >> >> > I don't agree that open source products are inheren

[web2py] Format option in extra_fields

2015-04-07 Thread Carla Raquel
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

[web2py] Triggering a one-time migration when schema changes

2015-04-07 Thread kevin
Our team is maintaining table schemas in db.py and relying on the migration mechanism to update the database schema in all of our server/local environments. We have found, however, that we experience a noticeable performance penalty when migrations are enabled and the schema comparison process

[web2py] Am I correct that the | operator has multiple meanings

2015-04-07 Thread Paul McDonald
For queries the | means or: >>> rows = db((db.person.name=='Alex') | (db.person.id>3)).select() ↖ here it is an or You can sort the records according to multiple fields by concatenating them with a "|": >>> for row in db().select(

[web2py] Re: How to implement Gmail Authentication

2015-04-07 Thread Moiz Nagpurwala
Hello, Still waiting for a working example of OAuth2 with Google. It is very crucial for my application to integrate Google authentication in order to succeed. Hope this great community won't let me down. Thanks and regards. -- Resources: - http://web2py.com - http://web2py.com/book (Documen

[web2py] Re: Get All Controller Functions

2015-04-07 Thread Ruud Schroen
What part of the admin creates the list of controllers? I looked in default.py but i couldn't find it.. :( On Monday, March 19, 2012 at 11:16:45 AM UTC+1, Hassan Alnatour wrote: > > Dear ALL , > > How Can I Get ALL controller functions , as i know i can get the one > am at in the view using req

[web2py] Re: Design flaw in auth.impersonate ?

2015-04-07 Thread Pbop
Presuming the session is cookie based, why not impersonate in incognito mode or in another browser? -- 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

[web2py] Re: post does not appear in this forum, why ?

2015-04-07 Thread Leonel Câmara
Yes, this group is moderated so new members messages have to be approved. -- 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 becaus

[web2py] Re: update table as boolean.

2015-04-07 Thread 黄祥
perhaps you can do it on application form level using onvalidation e.g. def __onvalidation_employee(form): if form.vars.is_auth == 'on': if form.vars.auth_user: row = db(db.auth_user.id == form.vars.auth_user).select().first() form.vars.first_name = row.first_name form.vars.last_name = row.last_na

[web2py] Re: For a beginner

2015-04-07 Thread 黄祥
if you ask flask or web2py in web2py forum, usually, people will answer this is web2py forum, and they will recommend it, but what i see in this forum is the people are quite fair, they gave you comparison, and you choose it yourself. so the point is, if you have a time, just tried both, and ask

[web2py] Re: Adding search and insert in text input

2015-04-07 Thread 黄祥
i think you can use represent on this e.g. *for reference link :* db.employee.bank.represent = lambda bank, field: \ A(bank.bank, _title=T("eBanking"), _target="_blank", _href="%s" % bank.ebanking) if bank else '' *for colored value* db.product.status.represent = lambda status, field: SPAN(prod

Re: [web2py] w2p_clone broke web2py installation

2015-04-07 Thread 黄祥
please check this : http://www.web2pyslices.com/slice/show/1464/setting-up-web2py-in-a-virtual-environment another thing is if i'm not wrong, web2py version in pip is a little bit late than the github n web2py download web page. best regards, stifan -- Resources: - http://web2py.com - http://

[web2py] Re: AppConfig and Storage

2015-04-07 Thread 黄祥
i understood now, thank you so much for detail explaination and reference link, simone. thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repo

[web2py] Re: call a function from form.process()

2015-04-07 Thread 黄祥
a, i understood now, thank you so much for detail explaination, anthony. thanks and best regards, stifan -- 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) ---

Re: [web2py] Re: button to start function which dynamicly chynges page

2015-04-07 Thread Kevin Bethke
thanks that will give me at least a starting point. Until you wrote I had no idea what I have to look at. I would be interested in your progress if you like to share On Mon, Apr 6, 2015 at 8:06 PM, Dave S wrote: > > > On Monday, April 6, 2015 at 3:16:35 AM UTC-7, BlueShadow wrote: >> >> Hi, >> I

[web2py] Re: form.accepts for many buttons

2015-04-07 Thread Dmitry Ermolaev
solved: insert _name='selected' in BUTTON then catch request.vars.get('selected') вторник, 7 апреля 2015 г., 10:26:25 UTC+3 пользователь Dmitry Ermolaev написал: > > how check what button is pressed? > > form = FORM( > DIV(LABEL(T(' as:')), INPUT(_name='numbs', _class='numb'), >

[web2py] MSSQL and Unicode problems

2015-04-07 Thread tim . nyborg
Here's a question for those of you experienced integrating MSSQL and web2py. My web2py apps connect to a legacy SQL Server 2005 database, but I'm running into a problem where any attempts to *insert *unicode data into my nvarchar fields breaks the encoding (Renée -> Renée) It seems the Unicode

[web2py] post does not appear in this forum, why ?

2015-04-07 Thread António Ramos
hello i have a friend that posted a question in this forum for the first time but it is not visible so far. Do you have a queue to authorize posts to be visible in this forum ? Regards António -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

[web2py] form.accepts for many buttons

2015-04-07 Thread Dmitry Ermolaev
how check what button is pressed? form = FORM( DIV(LABEL(T(' as:')), INPUT(_name='numbs', _class='numb'), BUTTON(T(' Team '), _class='btn-primary', _value='team'),' ', BUTTON(T(' Color '), _class='btn-primary', _value='color'),' ',