[web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Paolo
Hi and great job! One thing that I don't like is at line 10 apt-get -y dist-upgrade this was also in the previous version, actually I see this too restrictive, for example I have ubuntu 12.04 and don't want to move to 12.10 Paolo On Wednesday, December 12, 2012 12:06:16 AM UTC+1, Niphlod

[web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Niphlod
mee too, didn't notice in the cut-paste madness. On Wednesday, December 12, 2012 9:57:06 AM UTC+1, Paolo wrote: Hi and great job! One thing that I don't like is at line 10 apt-get -y dist-upgrade this was also in the previous version, actually I see this too restrictive, for example I

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread paolo.vall...@gmail.com
sorry, one more thing, what about checking if you have the permission to install stuff and so on? 2012/12/12 Niphlod niph...@gmail.com mee too, didn't notice in the cut-paste madness. On Wednesday, December 12, 2012 9:57:06 AM UTC+1, Paolo wrote: Hi and great job! One thing that I don't

Re: [web2py] Many asked for it... Kryten is available

2012-12-12 Thread Michele Comitini
Massimo, This is very cool! But after to your google60 post (http://www.masswerk.at/google60/) I landed on this: http://www.masswerk.at/mespeak/ http://www.masswerk.at/termlib/index.html now... would kryten make it on the web? 2012/12/12 Vinicius Assef vinicius...@gmail.com Great! \o/

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Niphlod
meaning checking if the script is run as root ? Il giorno mercoledì 12 dicembre 2012 11:06:42 UTC+1, Paolo ha scritto: sorry, one more thing, what about checking if you have the permission to install stuff and so on? 2012/12/12 Niphlod nip...@gmail.com javascript: mee too, didn't notice

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread paolo.vall...@gmail.com
yeap :) 2012/12/12 Niphlod niph...@gmail.com meaning checking if the script is run as root ? Il giorno mercoledì 12 dicembre 2012 11:06:42 UTC+1, Paolo ha scritto: sorry, one more thing, what about checking if you have the permission to install stuff and so on? 2012/12/12 Niphlod

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Niphlod
Updated. don't have a shell lying around, could you try it ? --

[web2py] Re: Default value for reference type

2012-12-12 Thread Kostas M
Massimo thank you for your response. Unfortunately, I have not the traceback now, since I chose to build a separate table, not referring to db.auth_group. This is a kind of duplication in regards to auth_group, but it makes simple the handling of my lab_members table:

[web2py] online users in web2py

2012-12-12 Thread Hassan Alnatour
Dear ALL, How can i get the online users in my site ? Best Regards, --

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Paolo
I've just tested, you should use with != something like that seems to work if [ $UID != 0 ]; then... Paolo On Wednesday, December 12, 2012 12:48:33 PM UTC+1, Niphlod wrote: Updated. don't have a shell lying around, could you try it ? --

[web2py] Re: need help with groupby in grid

2012-12-12 Thread Mark
Found the answer to display the max value record in each group: db.define_table('test', Field('key'), Field('value')) max = db.test.with_alias('max') query = max.value == None left = max.on((max.key == db.test.key) (max.value db.test.value)) grid = SQLFORM.grid(query,left=left) On Friday,

[web2py] Re: Code changes not honored (by web2py?)

2012-12-12 Thread Massimo Di Pierro
Why do you use __import__(class2) instead of import class2 If you do the latter, does track changes work? On Wednesday, 12 December 2012 01:33:41 UTC-6, Chr_M wrote: Python 2.7.3 Web2py 2.2.1 The situation: In modules directory I have a subdirectory with two files class1.py and

Re: [web2py] Many asked for it... Kryten is available

2012-12-12 Thread Massimo Di Pierro
Very cool indeed. I do not know about kryten but there are nice things we can with those two libraries. On Wednesday, 12 December 2012 04:50:10 UTC-6, Michele Comitini wrote: Massimo, This is very cool! But after to your google60 post (http://www.masswerk.at/google60/) I landed on this:

[web2py] Re: Default value for reference type

2012-12-12 Thread Massimo Di Pierro
Your original problem was that this: Field('lab', db.auth_group, label='Lab Name', represent=lambda id,row: str(row.role)+' Lab', default=db.auth_group(current.auth.user_id) ), Field('member',db.auth_user'), ) should

[web2py] Re: online users in web2py

2012-12-12 Thread Massimo Di Pierro
Big can of worms. How do you define the users online? If you mean the users who currently have a page open on your site, then you must use websockets. Look into this: gluon/contrib/websocket_messaging.py You need to start it (requires tornado) and look into the file. There is an example of JS

Re: [web2py] Re: online users in web2py

2012-12-12 Thread hasan alnator
no i need to know how many users are logged in , am trying to use the auth_event table to track the login and logout events but still i can get it to work like i want, something like this : def online(): online_users = [] for i in db().select(db.auth_event.ALL): get_event =

Re: [web2py] How may I catch this exception class 'psycopg2.IntegrityError'

2012-12-12 Thread Richard Vézina
I am searching a way to avoid this kind of ticket in web2py : class 'psycopg2.IntegrityError' ERREUR: UPDATE ou DELETE sur la table « table2 » viole la contrainte de clé étrangère « table3_field2t3_fkey » de la table « table3 » DETAIL: La clé (id)=(1) est toujours référencée à partir de la table

Re: [web2py] How may I catch this exception class 'psycopg2.IntegrityError'

2012-12-12 Thread Richard Vézina
Not sure the URL will work : https://groups.google.com/forum/?fromgroups=#!topic/web2py/ZSRBsudl7dc Richard On Wed, Dec 12, 2012 at 9:37 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: I am searching a way to avoid this kind of ticket in web2py : class 'psycopg2.IntegrityError'

[web2py] Re: Code changes not honored (by web2py?)

2012-12-12 Thread Chr_M
Because I do not know the name of the module beforehand (it comes from a database). 'import class2' does not work either, I still need to reload() the module. I discovered also that the instantiation of class2 is persistant between requests when I do not reload the modules. I initialize a list

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Richard Vézina
Didn't test it, but I take the SSL creation commands from setup-web2py-ubuntu.sh that ask for location and owner of certificat that I like better and adapt them for the setup-web2py-nginx-uwsgi-ubuntu.sh script in order to make these script more homogen. Here the part I change ln -s

Re: [web2py] Re: online users in web2py

2012-12-12 Thread Anthony
See http://stackoverflow.com/a/12224157/440323. Anthony On Wednesday, December 12, 2012 9:23:42 AM UTC-5, Hassan Alnatour wrote: no i need to know how many users are logged in , am trying to use the auth_event table to track the login and logout events but still i can get it to work like i

Re: [web2py] Re: online users in web2py

2012-12-12 Thread VP
Does auth_event keep track of auto-logout events? If so, you can find out who have not been logged out for the past X minutes. If you relate X to the logout time windows (I think default is 30 minutes), you should be able to do it. --

[web2py] duplicate entry error for update_or_insert

2012-12-12 Thread simon
I get a duplicate entry error on an update_or_insert. First record with category_id=1 is inserted fine. Second record with category_id=2 fails sayingDuplicate entry '0-1' for key 'PRIMARY' Model: web.define_table('category_description', Field('category_id', 'integer',

[web2py] Formstyle=bootstrap visual problem with error flash

2012-12-12 Thread Joe Barnhart
I was trying the formstyle=bootstrap option and starting to like the results. But I noticed that the normal error flash does not work properly with this form style. Instead of sliding down and showing the error beneath the input field with the error, the error string appears to the right of

[web2py] question about web2py VERSION number

2012-12-12 Thread Mandar Vaze
Currently Version 2.2.1 (2012-10-21 16:57:04) stable seems to be available for download. So I assumed that all the fixes that went in 2.2.1 are available to me. But then I came across this : http://code.google.com/p/web2py/source/detail?r=74e0cc2bcec9 Looking at VERSION file here - it looks

Re: [web2py] How may I catch this exception class 'psycopg2.IntegrityError'

2012-12-12 Thread Massimo Di Pierro
Sorry I had missed the context. Now I understand. The point is, you cannot catch this exception and expect things will work. The DB will enforce the reference. Catching the web2py exception does not mean the db will do it. You have two options: 1) ondelete = SET NULL This should work but

[web2py] Re: Code changes not honored (by web2py?)

2012-12-12 Thread Massimo Di Pierro
Instead of tack_changes() try this: from gluon.custom_import import custom_importer as __import__ On Wednesday, 12 December 2012 09:19:06 UTC-6, Chr_M wrote: Because I do not know the name of the module beforehand (it comes from a database). 'import class2' does not work either, I still

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Massimo Di Pierro
Email me a patch of send me a pull request if this works and you feel should be included On Wednesday, 12 December 2012 09:30:24 UTC-6, Richard wrote: Didn't test it, but I take the SSL creation commands from setup-web2py-ubuntu.sh that ask for location and owner of certificat that I like

Re: [web2py] Re: How to fix CRYPT differences between Windows and Linux?

2012-12-12 Thread Jonathan Lundell
On 12 Dec 2012, at 9:29 AM, JoeCodeswell joecodesw...@gmail.com wrote: Dear Massimo, When i tried to db.auth_user.password.validators[0].salt = False Here's what happened. Try this instead: change CRYPT() to CRYPT(salt=False) --

Re: [web2py] How may I catch this exception class 'psycopg2.IntegrityError'

2012-12-12 Thread Richard Vézina
Ok, I understand, but I don't want the record to be deleted, so SET TO NULL not a solution. Now I try what I was trying to avoid : def ondelete_func2(form): count = 0 count += db(db.table3.field2t3 == request.args(1)).count() if count 0: pass else: session.flash

[web2py] Re: duplicate entry error for update_or_insert

2012-12-12 Thread Massimo Di Pierro
wd.update_or_insert(wd.category_id==category.webid, name=category.name, description=category.description) should be wd.update_or_insert(wd.category_id==category.webid, category_id==category.webid,

[web2py] Re: Formstyle=bootstrap visual problem with error flash

2012-12-12 Thread Joe Barnhart
Looks like its not a Javascript problem. (whew, dodged that one!) Poking around, it seems the error classes have been overridden in web2py_bootstrap.css in a bunch of ways. The error_wrapper class was made an inline-block instead of a block, which is what caused the immediate problem. But

[web2py] Re: question about web2py VERSION number

2012-12-12 Thread Massimo Di Pierro
This is my bad. Let me clarify. At this URL http://www.web2py.com/examples/default/download there is always one and only version labeled as stable http://www.web2py.com/examples/static/web2py_src.zip http://www.web2py.com/examples/static/web2py_win.zip

Re: [web2py] How may I catch this exception class 'psycopg2.IntegrityError'

2012-12-12 Thread Massimo Di Pierro
Do not sure crud. It is old, to be deprected, less flexible than SQLFORM. Do this: form = SQLFORM(db.table, record_id) form.process(dbio=False) if form.accepted: if form.deleted: # to be deleted because dbio=False count = db(db.table3.field2t3 == form.record_id).count() if

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Niphlod
@Richard: fixed. Can you test if this is the behaviour that you want ? @Paolo: thanks for the pointer, fixed. @Massimo: I released the script here to test it before sending the patch to you just because of these small hiccups here and there. This could definitely become the default

[web2py] Re: Conflicts when using PAM, Usernames and MULTI_USER

2012-12-12 Thread Jodi Curtis
Hi I thought I'd post a response: change /web2py/applications/models/debug.py @ line 3, replace if DEMO_MODE or MULTI_USER_MODE: with if DEMO_MODE: change /web2py/applications/models/mercurial.py @ line 3, replace if DEMO_MODE or MULTI_USER_MODE: with if DEMO_MODE: @ line 9, insert If not

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Richard Vézina
I am testing it right now, waiting the VM finish to install :) Richard On Wed, Dec 12, 2012 at 12:48 PM, Niphlod niph...@gmail.com wrote: @Richard: fixed. Can you test if this is the behaviour that you want ? @Paolo: thanks for the pointer, fixed. @Massimo: I released the script here to

Re: [web2py] Re: How to fix CRYPT differences between Windows and Linux?

2012-12-12 Thread JoeCodeswell
Jonathan said: Try this instead: change CRYPT() to CRYPT(salt=False) Thanks, Jonathan. I think this is what you mean. Here's what happened. Windows Try --- Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\joecd C:\web2py

[web2py] Re: duplicate entry error for update_or_insert

2012-12-12 Thread simon
I udnerstand. Usually this is not required because the primary key is autoincrement. However here I have a legacy table with migrate disabled and a primary key made up of two fields which are not autoincrement. Would it not be more friendly to use the condition as the default value for the

Re: [web2py] How may I catch this exception class 'psycopg2.IntegrityError'

2012-12-12 Thread Richard Vézina
Thanks Massimo... deletable = True was missing : def create_update(): create update funciton form = SQLFORM(db[request.args(0)], request.args(1), deletable = True) form.process(dbio=False) if form.accepted: if form.deleted: # to be deleted because dbio=False

[web2py] Re: Memory error with numpy large array

2012-12-12 Thread Bill Thayer
I am having the same issue trying to serve large cad files. -Bill On Tuesday, May 17, 2011 3:02:50 AM UTC-5, Kostas M wrote: I tried the same application in a Linux (Ubuntu) machine, after the installation of the latest numpy version (1.6.0). No MemoryError ticket occured in web2py...

[web2py] Re: Memory error with numpy large array

2012-12-12 Thread Bill Thayer
On Wednesday, December 12, 2012 12:15:12 PM UTC-6, Bill Thayer wrote: I am having the same issue trying to serve large cad files. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. Traceback (most recent call last): File

Re: [web2py] Re: How to fix CRYPT differences between Windows and Linux?

2012-12-12 Thread Jonathan Lundell
On 12 Dec 2012, at 10:00 AM, JoeCodeswell joecodesw...@gmail.com wrote: Jonathan said: Try this instead: change CRYPT() to CRYPT(salt=False) Thanks, Jonathan. I think this is what you mean. Here's what happened. Windows Try More like this: In [10]:

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Richard Vézina
502 Bad Gateway Under 12.10 Richard On Wed, Dec 12, 2012 at 12:53 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: I am testing it right now, waiting the VM finish to install :) Richard On Wed, Dec 12, 2012 at 12:48 PM, Niphlod niph...@gmail.com wrote: @Richard: fixed. Can you

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Richard Vézina
Here error log : cat /var/log/nginx/error.log 2012/12/12 13:12:40 [emerg] 17676#0: SSL_CTX_use_certificate_chain_file(/etc/nginx/ssl/web2py.crt) failed (SSL: error:02001002:system library:fopen:No such file or directory error:20074002:BIO routines:FILE_CTRL:system lib error:140DC002:SSL

[web2py] Re: duplicate entry error for update_or_insert

2012-12-12 Thread simon
Just realised this is only an issue with legacy tables where there is a multi-field primary key. Normally you have autoincrement key so do not need to explicitly assign it. Unfortunately with a multi-field primary key you cannot use update_or_insert anyway because for updates it calls

Re: [web2py] Re: How to fix CRYPT differences between Windows and Linux?

2012-12-12 Thread Jonathan Lundell
On 12 Dec 2012, at 10:30 AM, JoeCodeswell joecodesw...@gmail.com wrote: Dear Massimo and Jonathan, In my last post i said I'm still not sure how to change my app instances, however. I thought about it a little bit and my guess is that i should add db.auth_user.password.requires[0].salt

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Richard Vézina
uwsgi doesn't seem to start, I have not log for it in /var/log/uwsgi/ Try to start it like that : /etc/init$ sudo start uwsgi-emperor start: Job failed to start Richard On Wed, Dec 12, 2012 at 1:27 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Here error log : cat

[web2py] Re: online users in web2py

2012-12-12 Thread guruyaya
I'm not sure about this. You think of perfect solutions, when most people will settle for simpler solution, that may not be perfect. I imagine a line in the model, that updates a datetime field, every time a user does something in the website, and then finding out who had his last activity in

[web2py] Return excel file and then redirect to different page

2012-12-12 Thread Jim S
I'm looking for a way to return an Excel sheet to the user and then redirect to a different page all in the same request. Here is what I'm doing now: from reports import movementDetail as rpt letters_file = StringIO.StringIO() returnVal = rpt.process(originationId, fromDate, toDate,

Re: [web2py] Re: online users in web2py

2012-12-12 Thread hasan alnator
*Perfect * import datetime limit = request.now - datetime.timedelta(minutes=30) query = db.auth_event.time_stamp limit query = db.auth_event.description.contains('Logged-') events = db(query).select(db.auth_event.user_id, db.auth_event.description,

[web2py] Re: Return excel file and then redirect to different page

2012-12-12 Thread Niphlod
if an address (response following a request) sends a file as an attachment, there's no way to inject any other behaviour (like a redirect) because the response will effectively end with the last byte of the attachment. I think the only possible way is open an iframe with the src pointing to

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Niphlod
ok, wait a second, I'll try with my VM. the previous traceback is due to the changes done to the certificate generation: I took them for granted but there must be an error somewhere. On Wednesday, December 12, 2012 7:48:54 PM UTC+1, Richard wrote: uwsgi doesn't seem to start, I have not log

[web2py] Re: Return excel file and then redirect to different page

2012-12-12 Thread Massimo Di Pierro
Is it time consuming to generate the spreadsheet? If not just display a link to the action that returns the spreadsheet. You need two actions. One displays the link and one compute the spreadsheet. You may need to pass data (in vars) between the two. On Wednesday, 12 December 2012 13:51:21

[web2py] Store and retrieve dictionary from database

2012-12-12 Thread Andriy
I`m sorry if this is naive question (I`m trying to make my first web application). I have a big dictionary with several levels of nested dictionaries and lists in it. DAL accepts this dictionary if I insert it in a Field of a Table (using sqlite3), but when I try to retrieve it back, I get

[web2py] Re: Database borked??

2012-12-12 Thread David Tucker
I am having a similar problem. I did an insert using crud.create and it went through, but now I get the error described above whenever I do anything related to tht table... I tried this, but my notnull constraint got in the way so I tried:

[web2py] Re: Store and retrieve dictionary from database

2012-12-12 Thread Massimo Di Pierro
Field('data','text',filter_in=(lambda x: pickle.dumps(x)),filter_out=(lambda s: s and pickle.loads(s)),default=None) On Wednesday, December 12, 2012 12:12:33 PM UTC-6, Andriy wrote: I`m sorry if this is naive question (I`m trying to make my first web application). I have a big dictionary

Re: [web2py] Re: How to fix CRYPT differences between Windows and Linux?

2012-12-12 Thread Jonathan Lundell
On 12 Dec 2012, at 11:31 AM, JoeCodeswell joecodesw...@gmail.com wrote: Thanks, Jonathan. Thanks, Massimo. Web2py is a GREAT community. Before we close this thread, I'd like to revisit the reason you were having trouble in the first place. It shouldn't be necessary to use the same (or no)

[web2py] Re: Return excel file and then redirect to different page

2012-12-12 Thread Jim S
Looks like my misunderstanding. I'm coming from a TurboGears environment and thought it allowed me to do what I was asking. But, seems like I'm mistaken. I just went back to the old environment and ran a report and it doesn't forward to a new page like I thought it did after returning the

[web2py] Re: Code changes not honored (by web2py?)

2012-12-12 Thread Chr_M
Tried this at the top of db.py and at the top of my controller to no avail. (I replaced the 'from gluon.custom_import import track_changes; track_changes()' with your code). I guess the persistence of the instantiation is because the interpreter is started once when starting web2py webserver

[web2py] Re: Formstyle=bootstrap visual problem with error flash

2012-12-12 Thread Paolo Caruccio
Yes, there are stylistic reasons. The style is inspired to bootstrap input with error example (validation state paragraph in http://twitter.github.com/bootstrap/base-css.html?#forms). You can revert the original error behaviour by adding a comment to the lines from # 56 to # 73 in

Re: [web2py] Re: online users in web2py

2012-12-12 Thread Alan Etkin
I think I tried the cache approach mentioned by Anthony in Stack Overflow combined with automated client-side requests (for updating a user state). The outcome is a plugin published here (with license AGPLv3): http://code.google.com/p/plugin-whoisonline/ The wiki contains the code for a simple

[web2py] Re: Formstyle=bootstrap visual problem with error flash

2012-12-12 Thread Paolo Caruccio
I would add also that error shouldn't interfere with the comment span of the control, but I discovered a bug: in web2py_bootstrap.css lines #72 and 73 should be: div.controls .help-inline{color:#3A87AD;} div.controls .error_wrapper + .help-inline {margin-left:-9px;} In this way when an

[web2py] Re: Login logout links drop down not working on mobile

2012-12-12 Thread Dave
I am having the same issue. It must be related to touch vs. click recognition, because everything works fine if you're not using a mobile device. On Monday, 8 October 2012 01:03:52 UTC-6, lyn2py wrote: Per the subject line, I can click to drop down the links but I can't click on them.

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-12 Thread Niphlod
fixed in PM. uwsgi wasn't installed on Richard's VM because pip path was reported incorrectly at the first installation (meaning that pip install --upgrade pip worked ok but the next pip install --upgrade pip was not finding pip binary). Fixed that, script is now running ok even in 12.10.

Re: [web2py] Re: Cannot login via web2py mobile admin (V 2.0.6)

2012-12-12 Thread Dave
I also cannot login into a normal app using a mobile (touchscreen) device when using the navbar. I'm using version 2.2.1. Touching any option just closes the login dropdown. Dave On Friday, 5 October 2012 09:24:52 UTC-6, Massimo Di Pierro wrote: This should now be fixed! On Wednesday,

[web2py] Re: online users in web2py

2012-12-12 Thread Derek
There may also be a way to trigger the 'onunload' event, but since that's tied to the specific page you're on, you'll trigger it quite a bit if you don't load everything using ajax. On Wednesday, December 12, 2012 7:19:15 AM UTC-7, Massimo Di Pierro wrote: Big can of worms. How do you define

[web2py] Re: Formstyle=bootstrap visual problem with error flash

2012-12-12 Thread Joe Barnhart
Thanks for the clear explanation Paolo. This makes the errors very obvious again -- something my user base urgently needs! -- Joe B. On Wednesday, December 12, 2012 1:34:39 PM UTC-8, Paolo Caruccio wrote: Yes, there are stylistic reasons. The style is inspired to bootstrap input with error

[web2py] Re: Return excel file and then redirect to different page

2012-12-12 Thread Anthony
You might be able to add a Javascript event handler that triggers a client side redirect as well as a file download (via window.open). Something like this: {{=A('Download Excel file', _href='', _id='download')}} script jQuery(function() { jQuery('#download').click(function(e) {

Re: [web2py] Return excel file and then redirect to different page

2012-12-12 Thread Alec Taylor
Also it might be worth considering export to CSV. On Thu, Dec 13, 2012 at 6:51 AM, Jim S j...@qlf.com wrote: I'm looking for a way to return an Excel sheet to the user and then redirect to a different page all in the same request. Here is what I'm doing now: from reports import

[web2py] Re: Database borked??

2012-12-12 Thread Massimo Di Pierro
Are you using sqlite? This is a strange error and it comes from the database. Perhaps the file got corrupted? On Wednesday, 12 December 2012 14:18:58 UTC-6, David Tucker wrote: I am having a similar problem. I did an insert using crud.create and it went through, but now I get the error

[web2py] Re: Reason(s) why mod_wsgi is not installed be hosting companies?

2012-12-12 Thread Massimo Di Pierro
Mod python has beed deprecated for many years. Technically web2py runs on it but I do not know of anybody who does that. fcgi should work although I only of people who use it with cherokee, not apache. For apache I suggest mod_wsgi or mod_proxy. On Wednesday, 12 December 2012 16:31:57 UTC-6,

[web2py] Re: problem with latest trunk SQLFORM.grid

2012-12-12 Thread Massimo Di Pierro
I believe this is the correct behavior. You are declaring that the Grid urls must contain args=[id] so if it is does not you have no access. your grid is readonly mode so it is always visible (when it properly parse the arguments). I am missing something? On Monday, 10 December 2012

[web2py] Re: onaccept in CRUD

2012-12-12 Thread Massimo Di Pierro
Is this still an open issue? If so can you post your model and the complete action? On Sunday, 9 December 2012 17:02:13 UTC-6, Kenneth wrote: Hi, I converted the problematic row ( row = db(db.assets.asset_id == form.vars.id).update(asset_name = form.request_vars.asset_name_2) ) into

[web2py] Re: Database borked??

2012-12-12 Thread David Tucker
I've narrowed down the problem. I dropped the table then added it again and started removing fields and doing the create. My problem is a field called 'expiration' that I want to set automatically for the user. My model includes 3 tables: tiers, groups, and accounts. Each account references the

[web2py] Re: routest_onerror don't work after deploy

2012-12-12 Thread Massimo Di Pierro
I added a ticket about this until I have time to review it: http://code.google.com/p/web2py/issues/detail?id=1220thanks=1220ts=1355368119 @Jonathan, what do you think? On Sunday, 2 December 2012 09:15:57 UTC-6, Chris wrote: On Friday, September 9, 2011 9:17:12 AM UTC-4, kachna wrote: I made

[web2py] Re: Database borked??

2012-12-12 Thread David Tucker
Finally, I figured out the issue! In order to store a time() from epoch, your db type cannot be 'time' but instead must be 'float' The crud.create form I was generating let the erroneous value thru, and the db wasn't liking it; however, the form within appadmin caught the issue saying it needed

[web2py] Re: Database borked??

2012-12-12 Thread David Tucker
I am using sqlite... I agree it is strange. I can still do operations on other tables just fine, and the creation controller does successfully create the record, but problems occur when trying to read/view it. If the file is corrupted, how would I go about repairing/replacing it? On Wednesday,

[web2py] Re: Database borked??

2012-12-12 Thread Massimo Di Pierro
Good catch. Yet, default values are not validated (for speed reasons) unless they go through a form. On Wednesday, 12 December 2012 21:34:12 UTC-6, David Tucker wrote: Finally, I figured out the issue! In order to store a time() from epoch, your db type cannot be 'time' but instead must be

[web2py] Enhancement idea: Field addition for help information

2012-12-12 Thread Joe Barnhart
I am working on a very form-heavy website that uses not only labels, controls, and comments, it needs extended mouseover help as well. The users comprises people who use the site infrequently, so I need to provide as much explanation for each field as I possibly can. The nice thing about the

Re: [web2py] Re: routest_onerror don't work after deploy

2012-12-12 Thread Jonathan Lundell
On 12 Dec 2012, at 7:09 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I added a ticket about this until I have time to review it: http://code.google.com/p/web2py/issues/detail?id=1220thanks=1220ts=1355368119 @Jonathan, what do you think? What are we really trying to accomplish

Re: [web2py] Re: question about web2py VERSION number

2012-12-12 Thread Mandar Vaze / मंदार वझे
Thanks for the clarification. Do web2py releases typically have more than one release between say 2.X.1 and 2.(X+1).0 ? (like 2.X.2, 2.X.3 etc) -Mandar On Wed, Dec 12, 2012 at 11:12 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: This is my bad. Let me clarify. At this URL

[web2py] Re: Enhancement idea: Field addition for help information

2012-12-12 Thread Anthony
One option is to build it into the comment. The comment can be any arbitrary HTML (which you can build with helpers), so the comment could include the [?] icon with appropriate hover text, followed by the actual comment. Another option is to create a custom

[web2py] Web2py scheduler timeout

2012-12-12 Thread Mike D
Hello, I am using the web2py scheduler to run a task to monitor a directory. Here's some code describing what I'm doing: def get_configured_logger(): logger = logging.getLogger(ss_server) if (len(logger.handlers) == 0): handler =