[web2py] REF: Finding if a date is between two date fields

2014-02-05 Thread Teddy Nyambe
I would like to find out how to achieve this comparison: row = db(db.mytable.start_date today db.mytable.end_date).select() I am getting this error: Traceback (most recent call last): File /Users/teddyl/PycharmProjects/website/web2py/gluon/contrib/shell.py, line 234, in run exec

[web2py] Dynamic IS_IN_SET

2014-02-05 Thread Johann Spies
I am trying to build a survey_app for researchers in were I work. In the past they gave me a Word document with the survey and I had to build a long form in web2py. Now I want them to build their own survey using this app. In the original way of doing this the survey was one long form and in

[web2py] Adding checkboxes to sqlform.factory and form validation based on another table

2014-02-05 Thread Apple Mason
If we have these simple models: db.define_table('person', Field('name', 'string')) db.define_table('common_allergies', Field('name', 'string')) The common_allergies is a table full of common allergies that people may have like 'peanuts' or 'bee stings'. This table is pre-populated by the

[web2py] Re: how to keep request when redirecting

2014-02-05 Thread Tim Richardson
redirect starts a new request. I suppose your redirect URL can contain args and vars based on what comes in (see docs on the URL function), and then it would be up to the redirected controller to process them. In other words, you pass state in the URL. Your controller or view could use these

[web2py] Re: Adding checkboxes to sqlform.factory and form validation based on another table

2014-02-05 Thread Apple Mason
I forgot to highlight code samples in my last post. Sorry about that. If we have these simple models: db.define_table('person', Field('name', 'string')) db.define_table('common_allergies', Field('name', 'string')) The common_allergies is a table full of common allergies that people may

Re: [web2py] REF: Finding if a date is between two date fields

2014-02-05 Thread Johann Spies
Try query = db.mytable.start_date today db.mytable.end_date today row = db(query).select() This works for me: surveylist = [(x.id, x.name) for x in db( (db.survey.startdate = today) (db.survey.enddate = today)).select(db.survey.id,

[web2py] heads up if you localized your app and upgrade to version 2.8.2+

2014-02-05 Thread step
Just a heads up to those who localized their apps and upgrade to a recent web2py version - I noticed this change in upgrading from 2.6.4 to 2.8.2. A number of error messages in file gluon/validators.py have changed by capitalizing the error message, e.g., 'value not in database' became 'Value

Re: [web2py] error postgresql with table new :S

2014-02-05 Thread Johann Spies
On 5 February 2014 06:35, Luis Díaz diazluis2...@gmail.com wrote: ProgrammingError: permiso denegado a la relación denuncia Error snapshot class 'psycopg2.ProgrammingError'(permiso denegado a la relación denuncia )-- Who is the owner of the database in Postgresql? And of table

[web2py] Re: sqlform.grid and links

2014-02-05 Thread Tim Richardson
auth_user is a table, not a database; is info a table as well, in the same database? What do you want to happen? Do you want to display a value from the info table, or do you want user to view/edit a record in the info table via clicking on a link? There is smartgrid which adds some

[web2py] web2py mail

2014-02-05 Thread Jayadevan M
When I try to execute the email program, I get this error - web2py - WARNING - Mail.send failure:[Errno 111] Connection refused I think iptables on the machine where web2py is running is blocking the request. Which port should I open to let this through? The code works on my m/c, which does not

[web2py] Re: web2py mail

2014-02-05 Thread Jayadevan M
Yes. I stopped iptables and the program worked. Kindly let me know which port I should open. On Wednesday, February 5, 2014 4:17:28 PM UTC+5:30, Jayadevan M wrote: When I try to execute the email program, I get this error - web2py - WARNING - Mail.send failure:[Errno 111] Connection refused

Re: [web2py] heads up if you localized your app and upgrade to version 2.8.2+

2014-02-05 Thread Kiran Subbaraman
Will making the translator (T) use the messages in a case-insensitive manner eliminate the need to do this? I am not sure what needs to be done here exactly, but am guessing it goes in here https://github.com/web2py/web2py/blob/7bc603f38053ec80cbce9f25c4413aae550c7b4f/gluon/languages.py, with

[web2py] Re: web2py mail

2014-02-05 Thread Jayadevan M
Answer was 587. iptables -A OUTPUT -p tcp -m tcp --dport 587 -j ACCEPT On Wednesday, February 5, 2014 4:26:38 PM UTC+5:30, Jayadevan M wrote: Yes. I stopped iptables and the program worked. Kindly let me know which port I should open. On Wednesday, February 5, 2014 4:17:28 PM UTC+5:30,

Re: [web2py] Re: login_next and next var

2014-02-05 Thread Annet
Hi Jonathan, Thanks for your reply. It's a URL; it's just %-escaped because it's in a query string (vars). You're right, redirect(request.vars._next) does work. Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] IS_IN_SET() value instead of key

2014-02-05 Thread Annet
In a table definition I have the following field and requirement: Field('groupStatusID', type='integer', requires=IS_IN_SET([(1, 'Pending'), (2, 'Accepted'), (3, 'Blocked')])) In a view I have: {{=r.grp_membership.groupStatusID}} Which displays a 1, 2 or 3. I wonder whether it is possible to

[web2py] sessions2trash.py

2014-02-05 Thread Jayadevan M
I have set the sessions2trash script in my web2py.ini (for uwsgi) like this - cron = 0 0 -1 -1 -1 python /var/www/web2py/web2py.py -Q -S myapp -M -R scripts/sessions2trash.py -A -o -v My uwsgi.log says [uwsgi-cron] command python /var/www/web2py/web2py.py -Q -S myapp -M -R

[web2py] One big app vs. cooperating apps: thoughts? advice?

2014-02-05 Thread Cliff Kachinske
I want a web site something like this: Home page mostly devoted to marketing. Menu at the top of the home page has links to, for example, a demo, my blog, other marketing stuff and a login link. By logging in the user will get access to live applications. The menu will change to reflect the

[web2py] Re: sessions2trash.py

2014-02-05 Thread Niphlod
if you start it outside uwsgi, you'll see the verbose output (given you're passing -v as an option) On Wednesday, February 5, 2014 2:26:04 PM UTC+1, Jayadevan M wrote: I have set the sessions2trash script in my web2py.ini (for uwsgi) like this - cron = 0 0 -1 -1 -1 python

[web2py] Re: sessions2trash.py

2014-02-05 Thread Jayadevan M
I did that and straced the process. Output says - strace -p 19227 Process 19227 attached - interrupt to quit select(0, NULL, NULL, NULL, {37, 995138}) = 0 (Timeout) gettimeofday({1391609487, 826517}, NULL) = 0 stat(/etc/localtime, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

[web2py] Masking User Input

2014-02-05 Thread Greg Vaughan
Hi everyone, Building a series of telemarketing and sales forms for a friends company to use. Looking to utilise an input mask such as the one mentioned in this post. https://groups.google.com/forum/#!searchin/web2py/form$20input$20mask$20jquery/web2py/zRt9whk6y68/3jqiiRII9QYJ and wanted

[web2py] How to upload file to copy.com?

2014-02-05 Thread Tiana A. Ralijaona
Hi everyone, Is there a way for a web2py app to upload a file to www.copy.com (a file hosting provider) instead of uploading it to the server local file system ? Thanks in advance, Tiana R. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] emacs and web2py

2014-02-05 Thread François-Xavier Bois
Hi, I would like to announce that web-mode.el, an emacs major mode for editing web templates, is now compatible with web2py templates. web-mode.el is available on http://web-mode.org Cheers fxbois -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] How can you put computed fields in select statements and specifically groupby ?

2014-02-05 Thread artdijk
Consider the following query rows = db(db.table).select(x,y groupby = x) If x and y are table fields this obviously works. Now consider group = x/100 rows = db(db.table).select(group,y, groupby = group) This also works nicely and will group into groups for each x with a value of x divided

[web2py] Upload file to copy.com

2014-02-05 Thread Tiana A. Ralijaona
Hi everyone, Is there a way for a web2py app, instead of uploading a file to the server local file system, to upload a file to a www.copy.com account? Thanks in advance, Tiana R. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] How-to: read-only resource for a few controllers, load once, read many

2014-02-05 Thread r . ryogesh
Hi, I am using web2py v2.8.2. My command line to launch web2py is python web2py -i 0.0.0.0 . I am using python 2.7.5 I have a fair sized dataset, takes about 10sec to load from the datafiles and perform some calc for lookup. Code is something like this: lookup_data = fn_datalookup(filespath)

[web2py] Installing web2py

2014-02-05 Thread Rahul Choudhary
I am using a Chromebook which can run only web based applications. How can i use web2py for development? I cannot download and install. I am a student and I want to learn web development. Is there any way I can use web2py or any other framework? -- Resources: - http://web2py.com -

[web2py] DAL Function in select

2014-02-05 Thread artdijk
How can we make this to work: group = math.floor(x/25) rows = db(table).select(group, y, groupby = group) The above throws an exeption: funtion has no attribute type. Ultimately we would like to group on a numeric value that is in a range. e.g. group the records for x 0 and 500 and for x 500

[web2py] [Errno 21] Is a directory error while implementing Multiupload

2014-02-05 Thread Pawan Gupta
Hi I am a newbie to web2py and I'm just learning. I am trying to implement Multiupload in my code as suggested on this thread https://groups.google.com/forum/#!topic/web2py/XpnUb2_MaRc I am getting an error *[Errno 21] is a directory* while specifying the upload directory in my db.py model. I

Re: [web2py] IS_IN_SET() value instead of key

2014-02-05 Thread Richard Vézina
What happen if you do this : IS_IN_SET([('Pending', 1), ('Accepted', 2), ('Blocked', 3)])) ?? Richard On Wed, Feb 5, 2014 at 8:10 AM, Annet anneve...@googlemail.com wrote: In a table definition I have the following field and requirement: Field('groupStatusID', type='integer',

Re: [web2py] Installing web2py

2014-02-05 Thread Richard Vézina
You may try this : https://groups.google.com/d/msg/web2py/dEdQh9tQR9g/_0JQM19IznsJ Though I think the web2py instance get delete on day basis... But you can just pack your app and go over the process again the next day... :) Richard On Tue, Feb 4, 2014 at 1:13 PM, Rahul Choudhary

Re: [web2py] Installing web2py

2014-02-05 Thread Nico Zanferrari
You can simply use PythonAnywhere on https://www.pythonanywhere.com , which is also covered in the official documentation ( http://web2py.com/books/default/chapter/29/13/deployment-recipes#Deploying-on-PythonAnywhere ) As they say: PythonAnywhere is a Python development and hosting environment

[web2py] Re: emacs and web2py

2014-02-05 Thread Massimo Di Pierro
This is really nice. Thank you for posting it. On Tuesday, 4 February 2014 15:22:14 UTC-6, François-Xavier Bois wrote: Hi, I would like to announce that web-mode.el, an emacs major mode for editing web templates, is now compatible with web2py templates. web-mode.el is available on

[web2py] Re: How-to: read-only resource for a few controllers, load once, read many

2014-02-05 Thread Massimo Di Pierro
Are you doing any caching? Which OS? On Tuesday, 4 February 2014 19:33:35 UTC-6, r.ry...@gmail.com wrote: Hi, I am using web2py v2.8.2. My command line to launch web2py is python web2py -i 0.0.0.0 . I am using python 2.7.5 I have a fair sized dataset, takes about 10sec to load from the

[web2py] Re: Started web2py - doesn't not offer to run on my local IP

2014-02-05 Thread Massimo Di Pierro
Python does not always detect your addresses. You should be fine if you choose 0.0.0.0. On Tuesday, 4 February 2014 20:54:47 UTC-6, Jim S wrote: See attached screenshot. ipconfig on my machine shows my IPv4 Address as 192.168.125.112. But, web2py doesn't offer this as an IP to use for my

[web2py] Re: One big app vs. cooperating apps: thoughts? advice?

2014-02-05 Thread Massimo Di Pierro
You would make different applications if they are supposed to be deployed individually and independently. Else you make a single app with difference controllers. If paces are to be user reusable, call those controllers plugin_something. On Wednesday, 5 February 2014 07:26:48 UTC-6, Cliff

[web2py] how to make complex dynamic form

2014-02-05 Thread Andrey K
Dear web2py members, I have a question for you. I would like to make a dynamic form which looks like below picture (it is easier to represent my question as a sketch rather than wording). The form suppose to allow user to add tool with 1 or many parameters. Form should consist of: tool name,

Re: [web2py] heads up if you localized your app and upgrade to version 2.8.2+

2014-02-05 Thread step
Maybe it would help in some cases, but I don't think it would work in a general sense. Some languages may rely on case-sensitivity to provide different translations of a sentence. If T() had an option to look up case-insensitively web2py devs would need to know all target languages before they

Re: [web2py] Re: Started web2py - doesn't not offer to run on my local IP

2014-02-05 Thread Jim Steil
Thanks Massimo. Will give it a run tonight. On Wed, Feb 5, 2014 at 8:55 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Python does not always detect your addresses. You should be fine if you choose 0.0.0.0. On Tuesday, 4 February 2014 20:54:47 UTC-6, Jim S wrote: See attached

[web2py] HTML Input (POST) field

2014-02-05 Thread Austin Taylor
This is driving me insane!! I've been trying to create an input field for a user to type in an IP address. I then want to assign their input to a variable, run it through my IP checks and return the result from our SQL database. In a nutshell, how can I assign their input to a variable (I'm

[web2py] Re: One big app vs. cooperating apps: thoughts? advice?

2014-02-05 Thread Cliff Kachinske
Thank you. On Wednesday, February 5, 2014 9:58:21 AM UTC-5, Massimo Di Pierro wrote: You would make different applications if they are supposed to be deployed individually and independently. Else you make a single app with difference controllers. If paces are to be user reusable, call those

[web2py] Use of Upper- and Lower case in table and field definitions

2014-02-05 Thread ArtDijk
LS, We noticed issues with Upper and Lower case field and table defintions. It looks that when we use web2py in combination with postgres all table and field names must be in lowercase. Is it correct that when using postgres and table and field definitions must be in lowercase ? Is this also

[web2py] Re: how to make complex dynamic form

2014-02-05 Thread Cliff Kachinske
JQuery would work for the dynamic form. On form submission you would have to manually validate the fields added by JQuery. It's not difficult, but you must remember to do it. On Wednesday, February 5, 2014 10:11:51 AM UTC-5, Andrey K wrote: Dear web2py members, I have a question for you. I

[web2py] Re: HTML Input (POST) field

2014-02-05 Thread Anthony
Yes, it would be in request.vars (and request.post_vars, assuming a post request). Hard to help further without seeing some code. On Wednesday, February 5, 2014 10:20:35 AM UTC-5, Austin Taylor wrote: This is driving me insane!! I've been trying to create an input field for a user to type in

[web2py] Re: HTML Input (POST) field

2014-02-05 Thread Austin Taylor
Anthony, I've followed this tutorial here: http://www.web2py.com/book/default/chapter/07#FORM my default.py looks like def display_form(): form=FORM('Your name:', INPUT(_name='name', requires=IS_NOT_EMPTY()), INPUT(_type='submit')) if

[web2py] Strange artifact

2014-02-05 Thread horridohobbyist
I'm using SQLFORM.grid with pagination. In Chrome, Firefox, and Safari, the bottom of the grid looks like this: https://lh6.googleusercontent.com/--qxdHiziBMk/UvJeijJxamI/A3g/tO38T6oazHo/s1600/Capture2.PNG But in Internet Explorer 11 (and presumably earlier versions of IE), the bottom

[web2py] Re: Dynamic IS_IN_SET

2014-02-05 Thread Anthony
db.define_table('options', Field('question_id', db.questions), Field('option_number', requires = IS_NOT_EMPTY()), Field('option', requires = IS_NOT_EMPTY()), Field('dont_show_question', 'reference questions',

Re: [web2py] Re: sessions2trash.py

2014-02-05 Thread Ricardo Pedroso
On Wed, Feb 5, 2014 at 2:15 PM, Jayadevan M maymala.jayade...@gmail.comwrote: open(applications/myapp/sessions, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4 getdents(4, /* 2 entries */, 32768) = 48 getdents(4, /* 0 entries */, 32768) = 0 close(4)= 0

[web2py] Re: HTML Input (POST) field

2014-02-05 Thread Austin Taylor
I found what I was looking for. request.vars returns the data in dictionary format. All I had to do was assign a variable to the name of my key in request.vars (example: ip = request.vars['ip'] and it worked. Thank you!! On Wednesday, February 5, 2014 10:20:35 AM UTC-5, Austin Taylor wrote:

[web2py] MySQL not showing tables when using python web2py.py -S appname -M

2014-02-05 Thread Austin Taylor
Hello, I followed the instructions for importing legacy databases and created a db1.py which gave me a nice model, but I'd like to be able to interact with my current database. When I type db the shell returns DAL uri=mysql://*:@127.0.0.1/tablename I run for x in db:

[web2py] Re: how to make complex dynamic form

2014-02-05 Thread Andrey K
Thanks Cliff for your quick answer. I thought I could combine w2p standard options: Field(list:string) and Field(IS_IN_SET([...])) together somehow. Could you please give me example on how to make it with jQuery or a link with relevant examples as I am not really good in jQuery? Also in second

Re: [web2py] Lazy Options plugin

2014-02-05 Thread Richard Vézina
I just fix this issue : https://github.com/BuhtigithuB/sqlabs/blob/patch-1/modules/plugin_lazy_options_widget.py See around 108... Better late then never!! :) Richard On Tue, Sep 18, 2012 at 9:49 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Will need some code! Richard On

[web2py] Re: HTML Input (POST) field

2014-02-05 Thread Anthony
request.vars is a Storage object, so you can also do request.vars.ip. On Wednesday, February 5, 2014 2:20:21 PM UTC-5, Austin Taylor wrote: I found what I was looking for. request.vars returns the data in dictionary format. All I had to do was assign a variable to the name of my key in

[web2py] Trouble Editing Files In Static Folder Less Than 9 Lines

2014-02-05 Thread Thomas Lanier
If I create a new .js file in the static folder, the web based editor will not allow me to edit the file. If I add content to the file with an external editor, I can then edit the file in the web2py editor if there are at least 9 lines in the file. The bug does not seem to be file size

[web2py] Re: MySQL not showing tables when using python web2py.py -S appname -M

2014-02-05 Thread Anthony
When you do for x in db, that will iterate of the Table objects attached to db. The Table objects are just models defined in your model files -- they do not necessarily have to correspond to actual tables in your database. The tables you listed are Auth tables that would be defined via

Re: [web2py] Trouble Editing Files In Static Folder Less Than 9 Lines

2014-02-05 Thread Richard Vézina
Could it be just a refresh issue? I notice that once in a wild the built-in web editor not display all the lines of the file and clicking in the bottom of the editing file space seems to trigger an event that force the editor to display the file content correctly... ? Richard On Wed, Feb 5,

[web2py] sqlite --- postgresql

2014-02-05 Thread Gour
Hello, Do you consider it's safe to work with web2py on localhost machine and use sqlite3 database as storage (which greatly simplifies setup) and then deploy application on the production server by using e.g. PostgreSQL database? Sincerely, Gour -- One must deliver himself with the help of

[web2py] Re: HTML Input (POST) field

2014-02-05 Thread Austin Taylor
Now if I want to run it through a series of functions should I put the functions in the model.py? What would be the best way to do it? On Wednesday, February 5, 2014 2:48:53 PM UTC-5, Anthony wrote: request.vars is a Storage object, so you can also do request.vars.ip. On Wednesday, February

[web2py] Re: MySQL not showing tables when using python web2py.py -S appname -M

2014-02-05 Thread Austin Taylor
Hi Anthony, I created the db1.py (using scripts/extract_mysql_models.py) and placed that in the app/models folder. Should I have done something else? On Wednesday, February 5, 2014 2:53:40 PM UTC-5, Anthony wrote: When you do for x in db, that will iterate of the Table objects attached to

[web2py] Re: MySQL not showing tables when using python web2py.py -S appname -M

2014-02-05 Thread Anthony
How many model files do you have and what is in them? Did you inadvertently redefine the db object in a subsequent model file (that will remove any previously defined models)? Anthony On Wednesday, February 5, 2014 3:35:29 PM UTC-5, Austin Taylor wrote: Hi Anthony, I created the db1.py

[web2py] Re: HTML Input (POST) field

2014-02-05 Thread Anthony
On Wednesday, February 5, 2014 3:32:46 PM UTC-5, Austin Taylor wrote: Now if I want to run it through a series of functions should I put the functions in the model.py? What would be the best way to do it? If the functions are needed in multiple controllers, you can define them in a model

Re: [web2py] Re: emacs and web2py

2014-02-05 Thread Michele Comitini
+1 from a long time emacs user 2014-02-05 Massimo Di Pierro massimo.dipie...@gmail.com: This is really nice. Thank you for posting it. On Tuesday, 4 February 2014 15:22:14 UTC-6, François-Xavier Bois wrote: Hi, I would like to announce that web-mode.el, an emacs major mode for editing

[web2py] Re: how to keep request when redirecting

2014-02-05 Thread Stef Mientki
thanks, I didn't know about components will study that in the near future. For the moment I've replcaed the url with a auto-commit-checkbox, so I'll stay on the same page/controller. cheers, Stef On 05-02-14 10:46, Tim Richardson wrote: redirect starts a new request. I suppose your

Re: [web2py] error postgresql with table new :S

2014-02-05 Thread www.diazluis.com
I thought fast and I resolved .. I have almost no knowledge as to postgresql run a backup dump of my local development version (works perfect) between the server and psql: delete the table manually, Run all the instructions that appeared in the backup that made mention to the table

Re: [web2py] heads up if you localized your app and upgrade to version 2.8.2+

2014-02-05 Thread Tim Richardson
Also note some labels on SQLFORM.grid have changed. 'Add' is now 'Add Record'. The search widget: New is now New Search And is now + And Or is now + Or. The plus sign is a character, not an icon (unlike the Add Record button, which uses an icon for +) On Thursday, 6 February 2014 02:16:30

[web2py] Re: MySQL not showing tables when using python web2py.py -S appname -M

2014-02-05 Thread Austin Taylor
I have my default db.py model file and the db1.py which outlines my sql database. I didn't redfine anything else. All I did was update db.py to reflect the mysql layout. On Wednesday, February 5, 2014 4:09:36 PM UTC-5, Anthony wrote: How many model files do you have and what is in them? Did

[web2py] Re: How can you put computed fields in select statements and specifically groupby ?

2014-02-05 Thread Tim Richardson
If you just want rows back, you can pass raw SQL using dal. I personally haven't done what you are doing, but the DAL parses the query and turns it into sql appropriate for your adapter. grouping happens on the server. I very much doubt this includes translating python functions into the

Re: [web2py] Trouble Editing Files In Static Folder Less Than 9 Lines

2014-02-05 Thread Thomas Lanier
I don't think it is a refresh issue. I have tried clearing the browser cache and that has no affect. I know it sounds crazy, but there is some kind of bug associated with the number of lines in the file. On Wednesday, February 5, 2014 2:54:36 PM UTC-5, Richard wrote: Could it be just a

Re: [web2py] Re: sessions2trash.py

2014-02-05 Thread Niphlod
BTW..you're 10 steps ahead.but you're calling it wrongly :-P the args of the script are -f -- ignores session expiration (deletes either via -x or auth.settings.expiration) -o -- does an execution then exits -s -- sleep (in case -o isn't passed and the script is always alive) -v --

Re: [web2py] Trouble Editing Files In Static Folder Less Than 9 Lines

2014-02-05 Thread Richard Vézina
Can you post screen shot? On Wed, Feb 5, 2014 at 4:31 PM, Thomas Lanier tlan...@gmail.com wrote: I don't think it is a refresh issue. I have tried clearing the browser cache and that has no affect. I know it sounds crazy, but there is some kind of bug associated with the number of lines in

[web2py] Re: How-to: read-only resource for a few controllers, load once, read many

2014-02-05 Thread A36_Marty
Blind leading the blind here as I am new to web2py, but I saw something in the docs that may achieve what you are after: http://web2py.com/book/default/chapter/04#Cron In the crontab ability of web2py, there's a @reboot condition (of web2py, not the machine) -- meaning a script is run whenever

Re: [web2py] Re: how to keep request when redirecting

2014-02-05 Thread Richard Vézina
Passing vars or args with redirect seems a better approach... Something like that # Controller form.process().accepted: ... redirect(URL(..., args=request.args(...), vars=dict(var_name=request.vars.var_name)) Richard On Wed, Feb 5, 2014 at 4:14 PM, Stef Mientki stef.mien...@gmail.com

[web2py] Re: Grid in component edit twice issue

2014-02-05 Thread Jim Karsten
Yes, I am using the packed app as is. I dug into it a bit and the request.cid is getting dropped. I used Firebug to expose the http headers. * Load the component and display the grid http://127.0.0.1:8000/testy/default/component.load GET component.load web2py-component-element c435484472283

[web2py] json error when trying mongo slice

2014-02-05 Thread greaneym
Hi, I am trying out the slice by Alan Etkin that demonstrates the use of the mongodb adapter. Everything works ok, but when I try to enter the description part of the form and the description should be in json format, it returns invalid JSON. Here are two examples of what I entered for the

[web2py] Can I specify a display name in emails sent via auth.settings.mailer?

2014-02-05 Thread User
I would like the from address of automated emails for user registration, retrieve password, etc to have a display name. How can I do this? Currently my mailer is defined similar to: mail = auth.settings.mailer mail.settings.server = 'logging' or 'smtp.gmail.com:587' mail.settings.sender =

[web2py] Re: Strange artifact

2014-02-05 Thread horridohobbyist
Sorry, the artifact appears in SQLFORM.grid, regardless of pagination. Does *anyone* know what's going on?? On Wednesday, 5 February 2014 10:57:30 UTC-5, horridohobbyist wrote: I'm using SQLFORM.grid with pagination. In Chrome, Firefox, and Safari, the bottom of the grid looks like this:

[web2py] linked_tables not show using smartgrid

2014-02-05 Thread 黄祥
hello folks, i'm using the linked_tables in smartgrid, but it is not show up. no errors occured, but the show is not expected. the table is referenced and i'm not using response.models to run and not using modules. check on response toolbar only the header table is loaded the detail table is

Re: [web2py] heads up if you localized your app and upgrade to version 2.8.2+

2014-02-05 Thread Anthony
Perhaps the book should note that messages are not guaranteed to remain the same and recommend that users be explicit about messages if they don't want to risk them changing in their app. Anthony On Wednesday, February 5, 2014 4:40:01 PM UTC-5, Tim Richardson wrote: Also note some labels on

[web2py] Re: MySQL not showing tables when using python web2py.py -S appname -M

2014-02-05 Thread Anthony
Can you show your code? On Wednesday, February 5, 2014 4:44:49 PM UTC-5, Austin Taylor wrote: I have my default db.py model file and the db1.py which outlines my sql database. I didn't redfine anything else. All I did was update db.py to reflect the mysql layout. On Wednesday, February 5,

Re: [web2py] Re: sessions2trash.py

2014-02-05 Thread Jayadevan M
Thanks for the reply. Let me provide more info. May be I missed something very basic. I am replying inline to your/Ricardo's comments. BTW..you're 10 steps ahead.but you're calling it wrongly :-P I guess I am calling it wrongly. Did not get the 10 steps ahead part the args of the

Re: [web2py] Re: Dynamic IS_IN_SET

2014-02-05 Thread Johann Spies
Thanks Anthony. I have decided to move the logic to the controller and sidestep the difficulties of handling it in the model. The workflow separates forms for survey(general particulars), questions, options to questions and extra information linked to questions. The present question in the