[web2py] Re: CMS idea

2011-12-13 Thread Plumo
keep in mind that CSS can import other CSS sheets and define background-image's. And other resources may be loaded dynamically with JavaScript. So will take some effort to work for non-trivial cases.

Re: [web2py] Project Idea

2011-12-13 Thread Michele Comitini
+1 if it works it's a developer's dream! mic 2011/12/12 Massimo Di Pierro : > We could use this > > https://github.com/amoffat/Inspect-Shell/blob/master/inspect_shell.py > > together with a modified shell (from admin/controllers/shell.py) to > give a web based presence to any running python scr

[web2py] How to save the 'current' object to database?

2011-12-13 Thread Constantine Vasil
How to save the 'current' object to database?

[web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread peter
Thanks for your answers. I guess editing the html and replacing the relative URLs with absolute ones is not too bad. The problem I am left with is this: Can one 'call' a URL from web2py as if the URL were called from the users browser?, but capture the html result? I imagine the answer to this que

[web2py] Re: How to save the 'current' object to database?

2011-12-13 Thread Constantine Vasil
or how to serialize it?

[web2py] Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-13 Thread Johann Spies
Please help me to understand the behaviour of the following controller. It receives a name of a table and that table's title-field from a form. def lys_vermiste_titels(): """ tt = title-field tabel = tabelname """ tabel = request.vars.tabel tt = request.vars.tt db[tabe

[web2py] error downloading 1.99.3

2011-12-13 Thread Nik Go
I'm not sure if it's my crappy mobile Internet connection or something else but I couldn't seem to download a good copy of the version 1.99.3. When testing the zip file, I get this error: "error: invalid compressed data to inflate web2py/applications/examples/static/artwork.tar.gz". I already tri

[web2py] matplotlib plugin

2011-12-13 Thread andrej burja
using matplotlib plugin there http://web2py.com/plugins/static/web2py.plugin.matplotlib.w2p i get error RuntimeError: Failed to create /var/www/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data (it is on ubuntu+apache) (how) should i change the

[web2py] Re: Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-13 Thread Anthony
> > 2. My .represent definition has no effect. I get the bare id numbers in > the view. Why? > db[tabel].id.represents should be: db[tabel].id.represent

[web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Anthony
On Tuesday, December 13, 2011 4:15:22 AM UTC-5, peter wrote: > > Thanks for your answers. I guess editing the html and replacing the > relative URLs with absolute ones is not too bad. The problem I am left > with is this: > Can one 'call' a URL from web2py as if the URL were called from the > users

[web2py] Re: Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-13 Thread Cliff
Johann, Does grid work if you comment out that left join? On Dec 13, 5:37 am, Johann Spies wrote: > Please help me to understand the behaviour of the following controller.  It > receives a name of a table and that table's title-field from a form. > > def lys_vermiste_titels(): >     """ >     tt

[web2py] Re: How to save the 'current' object to database?

2011-12-13 Thread Ross Peoples
I don't think you can because "current" is a threaded object. It contains 3 things: request, response, session. You could probably serialize much of the data contained in those three objects, however, this will be difficult because they contain functions. Web2py does a lot of this when it genera

[web2py] Re: web2py 1.99.3 is OUT

2011-12-13 Thread Jim Karsten
Ok, sounds good. I'll convert the code to use hidden argument explained in Chapter 7. Thanks for the explanation, Anthony.

[web2py] Re: migrate passwords from phpBB

2011-12-13 Thread greenguerilla
Hi, I have also been trying to migrate existing user accounts from phpbb to a web2py system. The below solution works well for registering new users, however in order to successfully validate these passwords during the login process I made some changes to the framework itself: I have added into

[web2py] Re: How to save the 'current' object to database?

2011-12-13 Thread Constantine Vasil
It is related to deferred.defer in GAE: https://groups.google.com/forum/#!topic/web2py/Fp7B477Db8c I made it work but I am using 'current' object to get request/response/mail. It works but sometimes does not. It seems deferred library loses the path of web2py sometimes. I am investigating how to

[web2py] Fwd: [PyCon-Organizers] Web2py is Out Pycon2012

2011-12-13 Thread Ovidio Marinho
expalanation for me fault. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro

[web2py] Re: migrate passwords from phpBB

2011-12-13 Thread Anthony
On Tuesday, December 13, 2011 10:50:15 AM UTC-5, greenguerilla wrote: > > > Hi, > > I have also been trying to migrate existing user accounts from phpbb > to a web2py system. > The below solution works well for registering new users, however in > order to successfully validate these passwords durin

[web2py] Re: How to save the 'current' object to database?

2011-12-13 Thread Ross Peoples
I've never used GAE before, but you would normally get the absolute path to web2py using something like this: import os from gluon.settings import global_settings web2py_path = os.path.join(global_settings.applications_parent, request.folder) Hope that helps.

[web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread peter
Here is a simple example of what I mean: If I type http://127.0.0.1:8000/admin/default/site at my browser when I am logged in, I get the installed applications page. However if I do it by calling the test routine below def test(): import urllib url="http://127.0.0.1:8000/admin

[web2py] Re: Fwd: [PyCon-Organizers] Web2py is Out Pycon2012

2011-12-13 Thread Massimo Di Pierro
Hello Ovidio, I understand you and others are not happy with not having a web2py tutorial at Pycon. I am too. Nevertheless, I want to clarify a few things. - The main reason I posted the list of tutorials was to inform you about the excellent tutorials that will be offered. The fact that there wi

[web2py] Re: How to save the 'current' object to database?

2011-12-13 Thread Anthony
Would os.path.abspath(request.folder) work as well? It works on Windows (actually, request.folder itself appears to be the absolute path on Windows). Anthony On Tuesday, December 13, 2011 2:04:09 PM UTC-5, Ross Peoples wrote: > > I've never used GAE before, but you would normally get the absolu

Re: [web2py] error gluon/sqlhtml.py?

2011-12-13 Thread Bruno Rocha
On Wed, Dec 7, 2011 at 12:40 PM, Martin Weissenboeck wrote: > message = error or T('%(nrows)s records found') % dict(nrows=nrows) I think we cannot do the above (unless things have changed) T(..) gives us a LazyT object which cannot be interpolated as a string, because o that we need to interpo

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Jonathan Lundell
On Dec 13, 2011, at 11:09 AM, peter wrote: > Here is a simple example of what I mean: > > If I type > > http://127.0.0.1:8000/admin/default/site > > at my browser when I am logged in, I get the installed applications > page. > > However if I do it by calling the test routine below > > > def

[web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Anthony
On Tuesday, December 13, 2011 2:09:31 PM UTC-5, peter wrote: > > def test(): > import urllib > url="http://127.0.0.1:8000/admin/default/site"; > f = urllib.urlopen(url) > s = f.read() > return s > > I have to login again even though I am logged in on my compu

Re: [web2py] error gluon/sqlhtml.py?

2011-12-13 Thread Anthony
> > message = error or T('%(nrows)s records found') % dict(nrows=nrows) > > > I think we cannot do the above (unless things have changed) > > T(..) gives us a LazyT object which cannot be interpolated as a string, > because o that we need to interpolate the string before passing it to T(..) > > F

[web2py] smartgrid: events and callbacks downstream?

2011-12-13 Thread David Watson
I am using smartgrid to generate some table and form interfaces to my database. Is there a way to use something like the process function with smartgrid to get callbacks? It's not clear to me how I can hook into the downstream click-generated events from the edit form, for instance. I just want to

Re: [web2py] generate multiple form from a query

2011-12-13 Thread Richard Vézina
Thanks for the tips Anthony... Here an other test I made : def bulk_update(): rows = db((db.lotns_lot_number.id == request.args(1))&\ (db.lotns_sample.lot_number_id == db.lotns_lot_number.id)&\ (db[request.args(0)].sample_id == db.lotns_sample.sample_id)).select\ (db[r

Re: [web2py] Re: Fwd: [PyCon-Organizers] Web2py is Out Pycon2012

2011-12-13 Thread Ovidio Marinho
Hello Massimo, Study hard, live intensely studying about Python and web2py and when you're offthe big event, it hurts a lot, I'm sad too, but I will not give up because I know that you've created is the best, I'll study more because I'll try to do a product that is recognized world wide. Very sad,

[web2py] Re: smartgrid: events and callbacks downstream?

2011-12-13 Thread David Watson
This kind of answers my question: http://comments.gmane.org/gmane.comp.python.web2py/72424 but I'll add just to weigh in on Massimo's question re: requirements for this feature and a use case. My scenario is relatively easy to describe: I have a database of various tables representing different o

[web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread peter
So in my example above. How does web2py's admin know I am logged in? Does it do this by accessing a cookie on my computer, if so how does it do that behind the scenes? Could urllib2.urlopen really handle this? Thanks Peter On Dec 13, 7:27 pm, Anthony wrote: > On Tuesday, December 13, 2011 2:09:3

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Jonathan Lundell
On Dec 13, 2011, at 12:28 PM, peter wrote: > So in my example above. How does web2py's admin know I am logged in? > Does it do this by accessing a cookie on my computer, if so how does > it do that behind the scenes? Could urllib2.urlopen really handle > this? Ordinarily it knows you're logged in

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Anthony
On Tuesday, December 13, 2011 3:45:34 PM UTC-5, Jonathan Lundell wrote: > > On Dec 13, 2011, at 12:28 PM, peter wrote: > > > So in my example above. How does web2py's admin know I am logged in? > > Does it do this by accessing a cookie on my computer, if so how does > > it do that behind the scenes

Re: [web2py] generate multiple form from a query

2011-12-13 Thread Anthony
> > What I would like to have that is not actually possible I think is a way > to "detect_record_change" with SQLFORM.factory... > > Do you have any idea how I could achieve that? > You could create a hash of each row and store the hash value in a hidden field. Then on form submission, hash the

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Jonathan Lundell
On Dec 13, 2011, at 12:54 PM, Anthony wrote: > On Tuesday, December 13, 2011 3:45:34 PM UTC-5, Jonathan Lundell wrote: > On Dec 13, 2011, at 12:28 PM, peter wrote: > > So in my example above. How does web2py's admin know I am logged in? > > Does it do this by accessing a cookie on my computer, if

[web2py] Re: error downloading 1.99.3

2011-12-13 Thread kasapo
I downloaded the 1.99.3 source today and unzipped it with no issues. Maybe it was the crappy mobile connection or just some hiccup in the interwebs. I'd try again from another connection or just clear your cache and try downloading again... or use wget On Dec 13, 6:04 am, Nik Go wrote: > I'm not

Re: [web2py] generate multiple form from a query

2011-12-13 Thread Richard Vézina
Hello Anthony, Since my "row" come from a query may I can do something like this (pseudo code) : rows = db((db.lotns_lot_number.id == request.args(1))&\ (db.lotns_sample.lot_number_id == db.lotns_lot_number.id)&\ (db[request.args(0)].sample_id == db.lotns_sample.sample_id)).select

Re: [web2py] generate multiple form from a query

2011-12-13 Thread Anthony
On Tuesday, December 13, 2011 4:33:38 PM UTC-5, Richard wrote: > > Hello Anthony, > > Since my "row" come from a query may I can do something like this (pseudo > code) : > > rows = db((db.lotns_lot_number.id == request.args(1))&\ > (db.lotns_sample.lot_number_id == db.lotns_lot_number.id)&

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Anthony
> > I think it's easier than that, if you're already logged in, which I think > is the case here. The session cookie is already in request.cookies. > It sounded like he wanted to do this with external websites, not necessarily the current app (or even a web2py app).

[web2py] Re: How to save the 'current' object to database?

2011-12-13 Thread Constantine Vasil
Here is how Google described it: http://code.google.com/appengine/articles/deferred.html Handling import path manipulation Some applications, or the frameworks they use, rely on manipulating the Python import path in order to make all the libraries they need available. While this is a perfectly

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Jonathan Lundell
On Dec 13, 2011, at 1:40 PM, Anthony wrote: > I think it's easier than that, if you're already logged in, which I think is > the case here. The session cookie is already in request.cookies. > > It sounded like he wanted to do this with external websites, not necessarily > the current app (or ev

[web2py] Re: How to save the 'current' object to database?

2011-12-13 Thread Constantine Vasil
And here is why GAE loses the path (sometimes) http://code.google.com/p/googleappengine/issues/detail?id=772#c11 All, this is now an officially acknowledged bug. The cause is a "feature" which resets sys.path to a fixed default at the start of each request. Due to where we are in the QA cycle

[web2py] Re: MARKMIN indentation

2011-12-13 Thread Christopher Steel
+1 Markmin rocks

[web2py] Re: How to save the 'current' object to database?

2011-12-13 Thread Constantine Vasil
in deferred I don't have a direct access to *request.** *Usually I use request = current.request, that is why I need an access to 'current'. But this is a no go. So I have to provide the path to web2py for deferred somehow. import os from gluon.settings import global_settings web2py_path = os.p

[web2py] Re: error downloading 1.99.3

2011-12-13 Thread Nik Go
Yeah, probably. I just ignored the file, and it seems to be working. On Wednesday, December 14, 2011, kasapo wrote: > I downloaded the 1.99.3 source today and unzipped it with no issues. > Maybe it was the crappy mobile connection or just some hiccup in the > interwebs. I'd try again from another

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-13 Thread howesc
we are at the edge of my knowledge here, but the things that might be important to you from gae_handler.py: path = os.path.dirname(os.path.abspath(__file__)) sys.path = [path]+[p for p in sys.path if not p==path] from gluon.settings import global_settings global_settings.web2py_runtime_gae =

[web2py] Web2py in pypi outdate.

2011-12-13 Thread nekrox
Hi guys the web2py packages in pypi (http://pypi.python.org/pypi/ web2py) is out date. Already been forgotten for a few months. can anyone update this? Regards!

Re: [web2py] Re: MARKMIN indentation

2011-12-13 Thread Vasile Ermicioi
I am trying to convert a bunch of html files to markmin, but I got strange results I think html to markmin doesn't work well with unicode (utf8 my case) attached are an example and this is my controller to do that def mmtest(): from gluon.html import markmin_serializer #markmin = TAG(html

[web2py] Re: Web2py in pypi outdate.

2011-12-13 Thread pbreit
Probably should make sure that stays up to date but cannot emphasize enough that it is best to use the source with version control.

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread pbreit
Yeah, he's going to need to first script a login so he can grab and store the cookie which he is then going to need to present on each urllib.urlopen(). Being logged in on your browser is not going to help since your browser and your web2py code are totally separate. He could possibly make it

[web2py] Re: error downloading 1.99.3

2011-12-13 Thread Nik Go
P.S. I downloaded using aria2 and wget. Same result. On Wednesday, December 14, 2011, Nik Go wrote: > Yeah, probably. I just ignored the file, and it seems to be working. > > On Wednesday, December 14, 2011, kasapo wrote: > >> I downloaded the 1.99.3 source today and unzipped it with no issues. >

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Jonathan Lundell
On Dec 13, 2011, at 5:22 PM, pbreit wrote: > Yeah, he's going to need to first script a login so he can grab and store the > cookie which he is then going to need to present on each urllib.urlopen(). > > Being logged in on your browser is not going to help since your browser and > your web2py c

[web2py] Re: MARKMIN indentation

2011-12-13 Thread Massimo Di Pierro
Markmin should work well with unicode. The TAG(...) html parser, based on HTMLParser has problems with non- utf8 encodings and non well-formatted html. Massmo On Dec 13, 6:10 pm, Vasile Ermicioi wrote: > I am trying to convert a bunch of html files to markmin, but I got strange > results > I th

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread pbreit
Oh, I see. If the person logs in to a web2py app and then hits a page which is going to do the urlopen that calls the same app, then I suppose you could grab the cookie and send it along. Is that really what id being contemplated? I wonder if a LOAD() would suffice?

Re: [web2py] Re: Rocket vs mod_wsgi

2011-12-13 Thread pbreit
You can get free CDN from CloudFlare.

[web2py] Re: request reset password

2011-12-13 Thread pbreit
How does Web2py work with login emails and case? Seems to me it should be case INsensitive. Best way to do that I suspect is always converting emails to lower upon entry.

[web2py] Re: request reset password

2011-12-13 Thread pbreit
I guess technically the left side of of an email address is supposed to be case sensitive so might break somewhere.

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-13 Thread Constantine Vasil
good - if I go through this - you will get deferred too. ;) I am very close.

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Anthony
On Tuesday, December 13, 2011 8:36:47 PM UTC-5, pbreit wrote: > > Oh, I see. If the person logs in to a web2py app and then hits a page > which is going to do the urlopen that calls the same app, then I suppose > you could grab the cookie and send it along. Is that really what id being > contemp

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-13 Thread Constantine Vasil
Actually the error I get is here: request = current.request AttributeError: 'local' object has no attribute 'request' So there is 'current' but there is not a 'request'

[web2py] Register user - Issue

2011-12-13 Thread VIREN PATEL
Hi all, In register screen if i do not provide password and verify-password still the user does gets registered. Thereafter i am also able to login with the registered user without providing the password How can we make the password field mandatory both in register and login Thanks, Viren

Re: [web2py] Re: Redirecting to a URL, but with changed html

2011-12-13 Thread Jonathan Lundell
On Dec 13, 2011, at 6:20 PM, Anthony wrote: > The original example was for "url of some web page", which I assume is not in > the same app (or necessarily even a web2py app at all). If it's in the same > app, or any web2py app under your control, there should be better ways to > return the outp

[web2py] Re: Register user - Issue

2011-12-13 Thread Anthony
By default, auth.settings.password_min_length = 4, which is passed to the default CRYPT validator for the password field, so a minimum 4-character password should be required. Have you defined a custom auth_user table without specifying a CRYPT validator (or a min_length arg to CRYPT)? You can

Re: [web2py] Re: Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-13 Thread Johann Spies
Thanks Anthony, db[tabel].id.represents > > should be: > > db[tabel].id.represent > > Maybe I am becoming tired. I should have seen that. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-13 Thread Johann Spies
On 13 December 2011 16:05, Cliff wrote: > Johann, > > Does grid work if you comment out that left join? > It is not possible with that query. It is the essence of the query. I do not have a problem with the grid using more general queries. Regards Johann -- Because experiencing your loyal l