[web2py] /var/.htaccess and Internal Server Error

2013-04-13 Thread pang
Hello: After a complex migration, I was getting errors, nono of my web2py sites was working: Internal Server Error > > The server encountered an internal error or misconfiguration and was > unable to complete your request. > > Please contact the server administrator, [no address given] and info

[web2py] Re: Machine's IP address

2013-04-13 Thread Annet
Massimo, Thanks for your reply. Nothing changed in web2py in this respect. You can type the address in > yourself if you know you have have it. Perhaps it has changed? I manually configured my Mac's IP address, so it's a fixed IP address. There's a difference in just unzipping web2py and star

[web2py] css-menu

2013-04-13 Thread Martin Weissenboeck
I want to have another for color and backgroundcolor in the menu bar. I have changed bootswatch.css, line 83 #navbar .auth_navbar, #navbar .auth_navbar a {color:*green*;} And in web2py_bootstrap.css, line 40 /* auth navbar - primitive style */ .auth_navbar,.auth_navbar a{color:*red*;} /* inherit

[web2py] Re: DAL best opinions

2013-04-13 Thread lucas
something like in pseudocode: db.define_table('payments', Field('table', length=9, requires=IS_IN_SET('auth_user','firm'), default='auth_user'), Field('uf_id', db.auth_user or db.firms, requires=IS_IN_DB(db, db.auth_user.id or db.firms.id, '%(id)s'),.. . i know this is wrong, but how can i best

[web2py] How to select correct parent record and replace a field in that record with totals of its children

2013-04-13 Thread Alex Glaros
When a user finishes adding a record in the WhatIfVote table, I want this function below to find only the parent WhatIf record to have its field numberOfTentativePartners have its contents replaced with the count of number of WhatIfVote records for that parent. What is the syntax for selecting

[web2py] DAL best opinions

2013-04-13 Thread lucas
ok, i need some opinions on how to do this best and how to implement the best method. consider payments. a table named "firms" that can make payments and multiple logins under auth_user. a second table of auth_user that can make payments and obviously by definition a single login under the sa

[web2py] Re: register/login post processing

2013-04-13 Thread lucas
nice, perfect and working simple and effective. thanx anthony. lucas -- --- 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.

[web2py] Interesting way to find sites powered by web2py (or other frameworks/platforms)

2013-04-13 Thread Anthony
http://www.shodanhq.com/search?q=web2py -- --- 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:

[web2py] Re: register/login post processing

2013-04-13 Thread Anthony
No, if your callback simply returns, then the rest of the Auth.login() function will proceed -- it doesn't do anything with the return value of the callback. If you want to immediately send a response to the browser, you must either call redirect() or raise an HTTP() exception: def check_login(

[web2py] Markmin and spell-checking

2013-04-13 Thread Alan Etkin
Has anyone used any tool for automated spell-checking with long markmin docs like those of the web2py manual? I'm using the Libre Office Writer corrector, but when I save the changes the files do not render correctly, so I guess Writer is using an incompatible file format. Any idea on how to dea

[web2py] Re: register/login post processing

2013-04-13 Thread lucas
how come the following doesn't work? it should just return a simple page. just for testing for now... def check_login(form): return HTML(BODY('%s%s' % (auth.user_id, 'test'))) auth.settings.login_onaccept = check_login auth.settings.register_onaccept = check_login -- --- You received t

Re: [web2py] web2py.com down for me...

2013-04-13 Thread Ovidio Marinho
why? Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com 83 8826 9088 - Oi 83 9336 3782 - Claro Brasil 2013/4/13 Tito Garrido > > > -- > > Linux User #387870 > . > _/_

[web2py] Re: register/login post processing

2013-04-13 Thread Anthony
auth.settings.register_onaccept and auth.settings.login_accept are callback functions (or lists of functions) that are called upon successful registration or login. Each function will be passed the registration or login form object. Anthony On Saturday, April 13, 2013 7:51:50 PM UTC-4, lucas w

[web2py] register/login post processing

2013-04-13 Thread lucas
hello one and all, how can i intercept the register and login functions to add code after each has run? i essentially want to run some checks on the newly logged in user and then redirect them as necessary. thanx in advance. lucas -- --- You received this message because you are subscribe

Re: [web2py] Re: this would be nice for wizard 2.0

2013-04-13 Thread António Ramos
+1000 :) 2013/4/13 Michele Comitini > seems very nice. > +1 > > -- > > --- > 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] Re: help with css

2013-04-13 Thread Alan Etkin
> > Any suggestions for changing this behavior? > No, but, you could force is_mobile in the layout, at least you'll be able to use the menu. There's obviously something wrong with the scaffolding stylesheet. Probably an old 800x600 monitor would also have problems displaying the menu. -- --

[web2py] web2py.com down for me...

2013-04-13 Thread Tito Garrido
-- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- --- 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+

[web2py] help with css

2013-04-13 Thread Massimo Di Pierro
In twitter bootstrap and web2py when the screen is too narrow the menu display as a single button which triggers a drop down. This happens to me every time I give a talk and the menu disappears because the screen gets narrower on a projector. Moreover when the menu is a dropdown, submenus do n

Re: [web2py] Re: upgrading appengine has broken web2py

2013-04-13 Thread Carl Roach
thanks - I'll give them a go. On 13 April 2013 21:51, Christian Foster Howes wrote: > The 2 versions that i have used this week with the latest GAE are: > > Version 2.0.8 (2012-09-07 03:47:51) stable > Version 2.0.9 (2012-09-13 23:51:30) stable > > cfh > > > On 4/12/13 21:13 , Carl Roach wrote:

Re: [web2py] Re: upgrading appengine has broken web2py

2013-04-13 Thread Christian Foster Howes
The 2 versions that i have used this week with the latest GAE are: Version 2.0.8 (2012-09-07 03:47:51) stable Version 2.0.9 (2012-09-13 23:51:30) stable cfh On 4/12/13 21:13 , Carl Roach wrote: What version are you using Christian? On 12 Apr 2013 23:34, "Christian Foster Howes" wrote: i'm n

[web2py] Re: upgrade to 2.4.6 breaks existing code. function replace in psycopg2

2013-04-13 Thread Ricardo Cárdenas
Hi niphlod, here's the code: p = db.my_post g = db.my_group m = db.my_membership query = ((m.my_user == auth.user.id) & (m.my_group == g.id) & (p.groups.contains(g.id))) rows= db(query).select(p.id, p.status, orderby=~p.creation_date,distinct =True) The

Re: [web2py] Re: Python 3 compatibility?

2013-04-13 Thread Massimo Di Pierro
I did not say web3py runs on python 3. But we rewrote code to be python 3 friendly and it is a goal to make it work on python 3. Thanks for your offer of helping. On Saturday, 13 April 2013 13:18:43 UTC-5, samuel bonilla wrote: > > python3 runme.py > > Traceback (most recent call last): > Fil

Re: [web2py] Re: this would be nice for wizard 2.0

2013-04-13 Thread Michele Comitini
seems very nice. +1 -- --- 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.google.com/

[web2py] Re: Where do I change the size of the editor object in admin?

2013-04-13 Thread Niphlod
ok, long version ^__^ there are 2 separate problems: 1. every time the admin page is updated (i.e. new css, new structure, etc) it is possible (and happened already) that your browser has the old version of these assets in cache, so things are working "weirdly". If you trigger the full-reload wi

[web2py] Re: Where do I change the size of the editor object in admin?

2013-04-13 Thread Anthony
Sorry, not sure I understand what you're saying here. What do you mean "different behaviours while accessing the same page" and "lies in the structure of admin"? Anthony On Saturday, April 13, 2013 2:17:23 PM UTC-4, Niphlod wrote: > > whoops, didn't specify that the issue is observing different

[web2py] Re: Two databases with an auth in each

2013-04-13 Thread Anthony
Interesting use case -- I think cases like that have come up before (i.e., where different roles need different types of profiles). May be worth supporting somehow, but not sure about the best approach. For now, you might consider putting all the profile fields in the auth_user table, and just

Re: [web2py] Re: Python 3 compatibility?

2013-04-13 Thread samuel bonilla
python3 runme.py Traceback (most recent call last): File "runme.py", line 2, in from web3py import run File "/home/python/Escritorio/todo/web3py-master/web3py/__init__.py", line 1, in from .wsgi import run File "/home/python/Escritorio/todo/web3py-master/web3py/wsgi.py", line 10, i

[web2py] Re: Where do I change the size of the editor object in admin?

2013-04-13 Thread Niphlod
whoops, didn't specify that the issue is observing different behaviours while accessing the same page (and can happen when upgrading from one web2py version to another that has modified static assets) probably the "scrollbar problem" lies in the structure of admin -- --- You received thi

Re: [web2py] Re: Python 3 compatibility?

2013-04-13 Thread Alan Etkin
> > Nobody helped with it. That shows how much interest there is here about > Python 3.x. Is there any introductory documentation on the web3py project? It could help those wanting to collaborate with the development or other areas. For example, I'm interested in plans to support or developme

[web2py] Re: this would be nice for wizard 2.0

2013-04-13 Thread Stefaan Himpe
+1 -- --- 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.google.com/groups/opt_out.

[web2py] Re: Two databases with an auth in each

2013-04-13 Thread David Ripplinger
Okay, that makes sense. It might not be worth modifying web2py for this behavior when there may be a cleaner way of doing it. I had considered using the inherent roles and permissions, but there are several reasons why this would be awkward for my particular case. The main reason is that I over

[web2py] Re: Python 3 compatibility?

2013-04-13 Thread twangist
Thanks for your prompt replies. I'll check out web3py on github to see how far along you've come, and whether I can contribute. On Friday, April 12, 2013 8:51:23 PM UTC-4, twan...@gmail.com wrote: > > Hi, > I'm interested (very interested) in a Python web framework that works with > Python 3.x (

Re: [web2py] Re: Python 3 compatibility?

2013-04-13 Thread Massimo Di Pierro
Nobody helped with it. That shows how much interest there is here about Python 3.x. On Saturday, 13 April 2013 12:27:04 UTC-5, Alec Taylor wrote: > > Looks like it hasn't been updated for 4 months… > > I will bump up the feature thread of it. > > On Sun, Apr 14, 2013 at 3:11 AM, Massimo Di Pier

Re: [web2py] Re: Python 3 compatibility?

2013-04-13 Thread Alec Taylor
Looks like it hasn't been updated for 4 months… I will bump up the feature thread of it. On Sun, Apr 14, 2013 at 3:11 AM, Massimo Di Pierro wrote: > We will not do the mistake Python made: break backward compatibility and not > make it worthwhile. > > We are already working on web3py. It is on g

[web2py] Re: Two databases with an auth in each

2013-04-13 Thread Anthony
I think the problem is that Auth creates an object called "auth" in the session, and the name of this session object is fixed. So, once someone logs in with one of your Auth instances, the other instance will pull the "auth" object from the session and think they are logged in with that instanc

[web2py] Re: Python 3 compatibility?

2013-04-13 Thread Massimo Di Pierro
We will not do the mistake Python made: break backward compatibility and not make it worthwhile. We are already working on web3py. It is on github. You can already help us port it to python 3.0. yet the which will be worthwile. better internal logic, better helpers, better forms, etc. Once that

[web2py] Re: Where do I change the size of the editor object in admin?

2013-04-13 Thread Anthony
I'm running from trunk and did a ctrl+f5 -- still seeing that extraneous 15-line scrollbar. Anthony On Saturday, April 13, 2013 11:50:20 AM UTC-4, Niphlod wrote: > > this happened before probably because of static asset not being correctly > reloaded. When this happens again, do a ctrl+f5 (or a

[web2py] Two databases with an auth in each

2013-04-13 Thread David Ripplinger
In my project, it makes a lot of sense to have two separate databases: one for the users of the app and another for partners who pay to advertise to those users. The data they manipulate are completely different sets. I have created an auth object (named auth) for the users database (called db)

[web2py] Re: Where do I change the size of the editor object in admin?

2013-04-13 Thread Niphlod
this happened before probably because of static asset not being correctly reloaded. When this happens again, do a ctrl+f5 (or a contrl+r, depending on the availability) to reload both the page and all the static assets. I'd vote for having admin exploiting the response.static_version feature to

[web2py] Re: Where do I change the size of the editor object in admin?

2013-04-13 Thread David Ripplinger
Update: This is weird. I just logged in again and it is reverting to the old behavior. Strange that even in the same version it sometime behaves one way and sometimes another. Oh well. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To u

[web2py] Re: upgrade to 2.4.6 breaks existing code. function replace in psycopg2

2013-04-13 Thread Niphlod
can you post the code that generates the error and the query generated bu the DAL ( i.e. print db(..)._select() with the underscore) ? On Saturday, April 13, 2013 4:28:55 PM UTC+2, Ricardo Cárdenas wrote: > > Just upgraded to 2.4.6-stable+timestamp.2013.04.12.23.32.51. > > Code that worked in

[web2py] Re: Where do I change the size of the editor object in admin?

2013-04-13 Thread David Ripplinger
@Anthony: I observed the same thing with an older version of web2py before upgrading. But after the upgrade, it is a fixed size inner window with a scroll bar that behaves as expected. Are you running a version of web2py older than 2.4.6? If so, you probably won't observe the behavior I'm talki

Re: [web2py] Pyfpdf - How to fit long data descriptions in the table with proper text wrapping in rows/columns

2013-04-13 Thread Lucas D'Avila
Hello Rahul! If you just want to generate reports based on html code, you can use the *we2py-appreport plugin*, please watch this screencast [1] and read this instructions [2], this will show how to write html forms to render and filter your reports. But, if you want to generate sophisticated

[web2py] Re: Where do I change the size of the editor object in admin?

2013-04-13 Thread Anthony
Hmm, when I edit a file, the whole file is visible, but I do see a vertical scrollbar on the right that covers only the first 15 lines. As soon as I click the scrollbar, though, it either disappears or converts to a scrollbar that covers the entire page (depending on the browser). Seems like a

[web2py] upgrade to 2.4.6 breaks existing code. function replace in psycopg2

2013-04-13 Thread Ricardo Cárdenas
Just upgraded to 2.4.6-stable+timestamp.2013.04.12.23.32.51. Code that worked in my prior version (I think trunk 2013.04.02? sorry don't have the exact version on-hand) now breaks. I get the following error: function replace(integer, unknown, unknown) does not exist LINE 1: ...ost.groups AS CH

[web2py] Where do I change the size of the editor object in admin?

2013-04-13 Thread David Ripplinger
In the latest version of webpy (2.4.6), when I use the web-based editor in the admin application, it places the editable code in an html object with fixed size and a scroll bar. I can only see 15 lines of code at a time, which makes it harder to work with the code. I would like to increase the

[web2py] Re: Python 3 compatibility?

2013-04-13 Thread samuel bonilla
I have a proposal called 'web2py +' which is to give support to python 3.x, is the same code but support is for python 3.x, 'web2py plus' is for developers who want to migrate to python 3.x is only a proposal, I have not started work, I want to hear comments about it thanks... El vierne

[web2py] Re: gluon.contrib.stripe not working: No JSON object could be decoded

2013-04-13 Thread David Ripplinger
I thought I'd let other people know what I'm doing for a workaround. Until it comes time for me to purchase a paid account with pythonanywhere, I plan to add a variable to my app called FREE_PA_ACCOUNT and set it to true. Then any time I have code that attempts to do a charge, refund, check, or

[web2py] Re: insert or update on table "auth_event" violates foreign key constraint "auth_event_user_id_fkey

2013-04-13 Thread Annet
Hi Anthony, Switching the operations doesn't solve the problem, after logout(), the decorator prevents the user from being deleted, however, log=None solves the problem. Thanks. Best regards, Annet -- --- You received this message because you are subscribed to the Google Groups "web2py-us

[web2py] Re: Machine's IP address

2013-04-13 Thread Massimo Di Pierro
Nothing changed in web2py in this respect. You can type the address in yourself if you know you have have it. Perhaps it has changed? On Saturday, 13 April 2013 01:28:57 UTC-5, Annet wrote: > > A few weeks ago I upgraded to a web2py version that on start up also > included my Mac's IP address 10

[web2py] Re: gluon.contrib.stripe not working: No JSON object could be decoded

2013-04-13 Thread Alan Etkin
> They tried adding it to the whitelist, but it still had bugs because there were issues with whatever Python API was being used (probably > on the end of both pythonanywhere and stripe) to handle https requests, since the pythonanywhere free user account goes through a > proxy server. In that

[web2py] Re: insert or update on table "auth_event" violates foreign key constraint "auth_event_user_id_fkey

2013-04-13 Thread Anthony
auth.logout() inserts a record in the auth_event table, which includes a reference to the auth_user table. However, you are deleting the auth_user record before the auth_event insert, so the user_id being entered in auth_event no longer exists in auth_user. Try switching the order of operations

[web2py] Re: ZeroMQ in web2py

2013-04-13 Thread Arnon Marcus
Here is an example for an architecture of using ZeroMQ for adding WebSocket support to a non-real-time web-app, without much change to the existing code (server is PHP in this case, but the architectural structure is what's interesting) http://socketo.me/docs/push And here is a more in-depth a

[web2py] insert or update on table "auth_event" violates foreign key constraint "auth_event_user_id_fkey

2013-04-13 Thread Annet
In my application I have a function which allows a user to delete his account: @auth.requires(lambda: auth.has_membership(ADMIN) or auth.has_membership(VIEW)) def deleteAccount(): db(db.auth_user.nodeID==id).delete() auth.logout() redirect(URL('cms','index')) r

[web2py] Re: smartgrid - limit which fields are editable after creation of record

2013-04-13 Thread 黄祥
thank you so much for your hints niphlod, i've test it and work well : db.define_table('test', Field('test'), Field('test_read'), Field('test_write'), format='%(test)s') # not show in new and edit page show_test = request.args(-2) == 'new' or request.args(-3) == 'edit' db.test.tes