[web2py] Re: GAE 2.5.1 can't create new application

2013-09-04 Thread Massimo Di Pierro
You cannot. GAE has a readonly file system. You need to create run with web2py.py in order to create a new app. On Tuesday, 3 September 2013 13:57:52 UTC-5, Derek wrote: > > I try to create a new simple application on my local GAE instance (I > clicked 'run' in GAE since that's the only one tha

Re: [web2py] readable and writable question

2013-09-04 Thread António Ramos
*Make the fields list variable.* Bingo! Thank you. 2013/9/3 Vinicius Assef > On Tue, Sep 3, 2013 at 2:17 PM, António Ramos > wrote: > > I have to include them in the field list because i have another line of > code > > to detect it > > if aut.has_membership('admin') > > > > show the field an

Re: [web2py] Re: Calling extra script at startup from nginx

2013-09-04 Thread lbd
Hi Niphlod, I had to modify the script by removing: sudo -u This would work if the user I required to run it did not require a sudo password, but I prefer all sudo actions to be authenticated. Thank you again. ed On Tuesday, 3 September 2013 08:01:33 UTC+2, lbd wrote: > > Thank you Niphlod

Re: [web2py] Re: [web2py:6815] Re: PostgreSQL and groupby

2013-09-04 Thread Niphlod
that syntax (orderby positional arguments) should work in any relation db, it's standard t-sql. On Tuesday, September 3, 2013 9:40:52 PM UTC+2, Michele Comitini wrote: > > Given: > > SELECT t1.t1_f1, max(t2.t2_f1) FROM t1 JOIN t2 on t1.id = t2.t1_id GROUP > BY t1.t1_f1 ORDER BY max(t2.t2_f1), t1

Re: [web2py] Basic AUTH and 303 vs 401

2013-09-04 Thread Michele Comitini
You can use a modified call() action: def call_w_auth(): """ exposes services. for example: http:///[app]/default/call/jsonrpc decorate with @services.jsonrpc the functions to expose supports xml, json, xmlrpc, jsonrpc, amfrpc, rss, csv """ auth.settings.allow_basic_

[web2py] redirect root folder site another subfolder (thal not is any app)

2013-09-04 Thread damufo
SO debian, apache2 with wsgy and mod_rewrite load Is posible redirect to subfolder when app is not specified on url? example: http://www.mysite.com/ -> http://www.mysite.com/wordpress/index.php in case http://www.mysite.com/welcome/ (normal work, no redirect anything) I test on /etc/apache2/

[web2py] Re: Add conditional sub-menu

2013-09-04 Thread 黄祥
i found the same difficulty during add conditional sub menu, in my case the conditional is base on session. i've followed cliff hints above using sub_menu = [], it work well as long as the condition is meet (there is a session), but the problem occured when i clear the session. is there any sol

[web2py] VirtualField Error

2013-09-04 Thread hiro
I try to use virtual fields. I have the following in a model: hb.define_table('entity', Field('name', 'string', unique=True), Field('group', 'reference pml_group'), Field('country', 'string'), Field('something','string'), Field('turnover','double'), Field('days','double'), F

[web2py] Grid takes an awful long time to show result.

2013-09-04 Thread Johann Spies
On my development database I have a table with 115831 records and was frustrated that a query to show the information in a grid, took a long time. So I wrote an alternative function not using SQLFORM.grid as a comparison. The alternative function took about 2 seconds to show the result on the

[web2py] Re: Grid takes an awful long time to show result.

2013-09-04 Thread Massimo Di Pierro
Please check with the response.toolbar to see if there is are hidden recursive queries. On Wednesday, 4 September 2013 07:56:12 UTC-5, Johann Spies wrote: > > On my development database I have a table with 115831 records and was > frustrated that a query to show the information in a grid, took a

[web2py] initiating python scraper in web2py

2013-09-04 Thread John Philip
Hi there, I am new to web2py and am trying to initiate a scraper script I have written in python when opening a view in web2py. The script extracts information from our internal intranet site and stores the data in a sqlite database. I have used beautifulsoup for the parsing. Any ideas how I ca

Re: [web2py] redirect root folder site another subfolder (thal not is any app)

2013-09-04 Thread damufo
Hi: this solution, work for me: file: routes.py add: routes_in = ( ('./', '303->http://www.domain.org/folder'), ('.', '303->http://www.domain.org/folder'), ) En 04/09/2013 12:46, dam...@gmail.com escribiu: SO debian, apache2 with wsgy and mod_rewrite load Is posible redirect to subfolder

Re: [web2py] Basic AUTH and 303 vs 401

2013-09-04 Thread Dave S
On Wednesday, September 4, 2013 2:45:15 AM UTC-7, Michele Comitini wrote: > > You can use a modified call() action: > def call_w_auth(): > """ > exposes services. for example: > http:///[app]/default/call/jsonrpc > decorate with @services.jsonrpc the functions to expose > su

[web2py] Re: Email | SMTP | Compose Form with Attachments + Send via SMTP

2013-09-04 Thread PRACHI VAKHARIA
Someone, please help ! . -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.go

Re: [web2py] sqlform.grid query question

2013-09-04 Thread António Ramos
yes , stat is a string with "chech in" or "check out" i also have a timestamp for the check in or check out. I dont want odd /even hours I want to know if the user is checked in I have an RFID app to check in /out outside workers via an rfid tag. when the user checks firstime, the app records "

Re: [web2py] sqlform.grid query question

2013-09-04 Thread António Ramos
If the user checks his rfid tag within 5 minutes of the last check the log does not record "check in" or "check out" but "error" 2013/9/4 António Ramos > yes , stat is a string with "chech in" or "check out" i also have a > timestamp for the check in or check out. > > I dont want odd /even hour

Re: [web2py] sqlform.grid query question

2013-09-04 Thread Richard Vézina
Don't understand what you need exactly... Is stat a string type containing 'check in' or 'check out' and you want just odd number of record or you have an other field with timestamp or something and you want only the odd hours to appear in the grid?? Richard On Wed, Sep 4, 2013 at 12:54 PM, Antó

[web2py] sqlform.grid query question

2013-09-04 Thread António Ramos
hello i need to use the sqlform.grid(query,etc... to show records *my problem* the query is not just like ((db.tab1.stat='check in')|(db.tab1.stat='check out')) i need to query only records that appear with stat='check in' or 'check out' odd times in tab1 and not even times For example ,

Re: [web2py] sqlform.grid query question

2013-09-04 Thread Richard Vézina
Ok, so you need to check against actual time which person are still in... If you really just want the persons/users that are still in a give time, I think you need a group by over user_id... So you could set a limit of 2 records per user and if you have only one and it is a 'check in' stat value y

[web2py] Autocomplete on factory forms status

2013-09-04 Thread greenpoise
I have tried different examples found in the forum but it does not seem to work. Is this feature available? thanks -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an

[web2py] Re: Email | SMTP | Compose Form with Attachments + Send via SMTP

2013-09-04 Thread Niphlod
someone, please hire! ;-) On Wednesday, September 4, 2013 6:06:07 PM UTC+2, PRACHI VAKHARIA wrote: > > > Someone, please help ! > > . > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving em

[web2py] TypeError: %d format: a number is required, not dict

2013-09-04 Thread Annet
In a table definition I have these two fields: Field('startDate', label='Start datum * ', **isdate), Field('endDate', label='Eind datum', **isemptyorisdate), Since I have more of these fields I defined the following dicts isdate = dict(type='date', requires=IS_DATE(format='%d-%m-%Y', error_mess

[web2py] Re: Autocomplete on factory forms status

2013-09-04 Thread Massimo Di Pierro
please post an example that does not work and we will check it. On Wednesday, 4 September 2013 13:09:15 UTC-5, greenpoise wrote: > > I have tried different examples found in the forum but it does not seem to > work. Is this feature available? > > > thanks > -- --- You received this message be

[web2py] Re: Autocomplete on factory forms status

2013-09-04 Thread greenpoise
form=SQLFORM.factory(Field('tile',widget=SQLFORM.widgets.autocomplete(request,db.product.tilename))) if form.process().accepted: response.flash = 'form accepted' session.product = form.vars.product return dict(form=form) On Wednesday, September 4, 2013 11:53

[web2py] Re: Autocomplete on factory forms status

2013-09-04 Thread greenpoise
tried this as well: form=SQLFORM.factory(Field('tile',db.product),widget=SQLFORM.widgets.autocomplete(request,db.product.tilename,id_field=db.product.id)) if form.process().accepted: response.flash = 'form accepted' session.product = form.vars.product None produce an

[web2py] SQLFORM.factory requires explicit uploadfolder

2013-09-04 Thread Alan Etkin
Is this bug or feature? def myaction(): form = SQLFORM.factory(Field("myupload", "upload")) if form.process().accepted: print form.vars return dict(form=form) On submission it produces Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. Traceback (most

[web2py] Re: Email | SMTP | Compose Form with Attachments + Send via SMTP

2013-09-04 Thread Alan Etkin
> > someone, please hire! ;-) > lol (ontopic in my opinion) Prachi, have a look at this recipe www.web2pyslices.com/slice/show/1706/how-to-compose-a-multi-attachment-draftnormal-email-with-imapsmtp The code is released with AGPLv3 license -- --- You received this message because you are su

[web2py] "Say my name" example from the web2py book

2013-09-04 Thread Alexandr Zhorzh
H! i'm trying to run this example from the web2py book: http://web2py.com/books/default/chapter/29/03/overview#Say-my-name but instead of web form from the first.html i have the word "First", like this:

[web2py] Invalid request with special chars in URL

2013-09-04 Thread Wonton
Hello everyone! I've developed a web2py backend which is given me problems with special chars in URLs. I'm a newbie with web2py so maybe I'm missing something very easy, sorry if that is the case ;-). These are the details of my app. - I have no routes.py file. - In controllers/default.py I h

[web2py] Re: "Say my name" example from the web2py book

2013-09-04 Thread Alan Etkin
>H! i'm trying to run this example from the web2py book: >http://web2py.com/books/default/chapter/29/03/overview#Say-my-name >but instead of web form from the first.html i have the word "First", like this: In the view do you have {{form}} or {{=form}}? the first syntax will not render the form

[web2py] Re: TypeError: %d format: a number is required, not dict

2013-09-04 Thread Massimo Di Pierro
which version? On Wednesday, 4 September 2013 13:49:29 UTC-5, Annet wrote: > > In a table definition I have these two fields: > > Field('startDate', label='Start datum * ', **isdate), > Field('endDate', label='Eind datum', **isemptyorisdate), > > Since I have more of these fields I defined the fol

[web2py] Re: SQLFORM.factory requires explicit uploadfolder

2013-09-04 Thread Massimo Di Pierro
No objection. On Wednesday, 4 September 2013 16:27:35 UTC-5, Alan Etkin wrote: > > Is this bug or feature? > > def myaction(): > form = SQLFORM.factory(Field("myupload", "upload")) > if form.process().accepted: > print form.vars > return dict(form=form) > > On submission it pro

[web2py] Re: Invalid request with special chars in URL

2013-09-04 Thread Marcio Andrey Oliveira
Can't you send encoded parameters (say in Bas64 or hexadecimal) and decode them inside the methods? Regards. On Wednesday, September 4, 2013 8:24:26 PM UTC-3, Wonton wrote: > > Hello everyone! > > I've developed a web2py backend which is given me problems with special > chars in URLs. I'm a new

[web2py] Re: "Say my name" example from the web2py book

2013-09-04 Thread Anthony
Also being discussed here: http://stackoverflow.com/a/18623678/440323. Looks like the generic.html view is being called (because it is displaying the function name as a heading on the page). So it's not finding the first.html view. Anthony On Wednesday, September 4, 2013 7:31:01 PM UTC-4, Alan

[web2py] Re: SQLFORM.factory requires explicit uploadfolder

2013-09-04 Thread Anthony
I guess the Field class doesn't have knowledge of the filesystem. When Field() is used inside of define_table(), it figures out the folder location from db._adapter.folder, but there is no db._adapter when using Field() within SQLFORM.factory(). In that case, how will you determine the absolute

[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2013-09-04 Thread Simon Ashley
Download jeditable, Install in the static/js folder. Include in layout.html i.e. *Model* db.define_table('dogs', Field('dog_name','string')) *Controller:* def populate(): db.dogs.truncate() db.fleas.truncate() db.dogs.insert(dog_name='dagwood') db.dogs.insert(dog_name='

[web2py] Re: TypeError: %d format: a number is required, not dict

2013-09-04 Thread Annet
Version 2.5.1-stable+timestamp.2013.06.06.15.39.19 Kind regards, Annet -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups

[web2py] How to pass web2py view python variable into javascript

2013-09-04 Thread sonu kumar
Hi, How to pass view python variable into java script function? Thanks -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com

Re: [web2py] How to pass web2py view python variable into javascript

2013-09-04 Thread Jason (spot) Brower
If your meaning pass the data to the view you can do it like this: def index(): var1= 12345 return dict(var1 = var1) and then in the view in your javascript: var thingy_var = {{=var1}}; But it gets different based on what you want to do. For example you could create a JSON object or need