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.
+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
How to save the 'current' object to database?
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
or how to serialize it?
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
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
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
>
> 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
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
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
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
Ok, sounds good. I'll convert the code to use hidden argument explained in
Chapter 7. Thanks for the explanation, Anthony.
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
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
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
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
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.
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
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
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
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
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
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
>
> 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
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
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
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,
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
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
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
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
>
> 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
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
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
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
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)&
>
> 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).
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
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
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
+1 Markmin rocks
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
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
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 =
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!
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
Probably should make sure that stays up to date but cannot emphasize enough
that it is best to use the source with version control.
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
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.
>
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
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
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?
You can get free CDN from CloudFlare.
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.
I guess technically the left side of of an email address is supposed to be
case sensitive so might break somewhere.
good - if I go through this - you will get deferred too. ;) I am very close.
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
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'
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
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
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
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)
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
64 matches
Mail list logo