I searched through earlier posts reg. how to debug.
But it's still not clear what's the best proc for debugging web2py
apps (IDE can vary).
I wish to debug throughpyscripter or komodo.
This link by massimo is not active.
http://groups.google.com/group/web2py/browse_thread/thread/42f9e2560fb93c1d/
I tray to put mentioned examples into controller after my form definition
form['_action'] = URL(index')
form.update(_action=URL('index'))
form.attributes.update(_action=URL('index'))
but it is not happened anything, and if I change my value I just get error
form.update(_action=my_value) - this m
I searched through earlier posts reg. how to debug.
But it's still not clear what's the best proc for debugging web2py
apps (IDE can vary).
I wish to debug through pyscripter or komodo or winpdb.
A link given by massimo in following discussion (very old) is not
active.
http://groups.google.com/gr
> I want to get dubugging setup, and the main options I see are using
> winpdb, pydev, or wingide. But all the examples I see are to debug the
> web2py.py app when it is run and the debugger grabs the process. But I
> am using the cherokee webserver with uWSGI, so how would U use it in
> this way?
On Sat, 6 Aug 2011 10:11:17 -0700 (PDT)
Massimo Di Pierro
wrote:
> create the translation file using admin and email it to me.
I see it works for e.g. 'welcome' app. What about admin itself?
I've tried with:
touch hr-hr.py and then selecting hr-hr from the admin, but I notice that
hr-hr.py is
I am running my apps using Windows noinstall version of web2py.
For debugging using pyscripter, I need to port those apps to source
code version.
1) Apart from the applications folder, what other files/folders do I
need to copy & paste to the source code folder?
2) I have some 3rd party modules k
Christian,
Itried this in the gae sdk development console and replaced args with
a string as request not available and its just a quick test.
I copied the dal.py from trunk and replaced into my copy of last
stable release
I get there traceback listed below
#the code in dev console--
from g
I have now tried the downloady example remotely, on a linux server
with niginx and uswgi. This streams the zip file correctly with both
chrome and IE8.
So the problem is there only when I use the rocket server on windows.
I just tried the rocket server remotely, and streaming is correct.
So I on
> touch hr-hr.py and then selecting hr-hr from the admin, but I notice
that hr-hr.py is significantly smaller (4473b vs. 14460b for it-it.py)
than the rest of the files and hr-hr is missing some strings (e.g.
'web2py upgraded; please restart it'). Why is it so? Is there some FAW
how to contribu
As much as I like backward compatibility, I believe the (web2py) code will
become unmanageable and bloated too. So at some point in time, it is better
to overhaul and not provide backward compatibility.
On Sun, 16 Oct 2011 15:00:34 +0300
Kenneth Lundström
wrote:
> The problem is that a string is added to the file first time the
> application tries to find it in the file. So in your case you havn't
> upgraded web2py when you have used hr-hr file.
Hmmm...
> So I guess instead of touching the h
> The point is that I cannot locate en-en.py file? Sincerely, Gour
Hmmm, me neither. I thought there was always a en-en.py or en.py file
but it seams I thought wrong.
Kenneth
form['_action'] = URL('index')
not
form['_action'] = URL(index')
On Oct 16, 2:23 am, Miroslav Gojic wrote:
> I tray to put mentioned examples into controller after my form definition
>
> form['_action'] = URL(index')
> form.update(_action=URL('index'))
> form.attributes.update(_action=URL('ind
So far this has not been issue. For example we added lots of features
in the last year (scheduler, gird, smartgrid, new admin, new welcome
layout, etc.) but the web2py size has not increased much and stayed
very small, as you can see in this graph:
http://www.ohloh.net/p/web2py
Massimo
On Oct 1
In IE & Mozilla FF, editing files works OK.
In Opera, I can't save with "CTRL+S".
It opens a "save file dialog box".
Need to click on the save icon.
OS: Win7
web2py version : all versions (latest & earlier), noinstall as well as
source code versions
Can it be fixed?
---Vineet
Note, backward compatibility applies to the documented API only -- we still
have the freedom to change the underlying implementation. Lots of code has
been refactored over the past year plus.
On Sunday, October 16, 2011 8:13:27 AM UTC-4, Joseph Jude wrote:
>
> As much as I like backward compatib
On Sunday, October 16, 2011 3:23:01 AM UTC-4, miroslavgojic wrote:
>
> I tray to put mentioned examples into controller after my form definition
>
> form['_action'] = URL(index')
> form.update(_action=URL('index'))
> form.attributes.update(_action=URL('index'))
>
> but it is not happened anything,
On Sunday, October 16, 2011 5:35:18 AM UTC-4, Vineet wrote:
>
> I am running my apps using Windows noinstall version of web2py.
> For debugging using pyscripter, I need to port those apps to source
> code version.
>
> 1) Apart from the applications folder, what other files/folders do I
> need t
is this the line that is failing:
#this fails, unknown key exception
entity_keyid = db.funtest[key]
i meant to comment it out in my example since it fails.
Is your goal simply to make sure the user gets redirected to 'index' after
submitting the form? If that's the case, then you don't have to set a custom
form action at all. If you leave the form action empty, the form will be
submitted back to the action that generated it (which is how web2py for
I looked for these 3 files in the noinstall version folder.
But there is not any file with these names.
Matching filenames are:
1) routes.example.py
2) options_std.py
Are you sure about the filenames?
Because my noinstall version is working perfect, but there are no
files indicated by you.
V
My errors in previews post:
form['_action'] = URL(index') - my error - correct is> ->
form['_action'] = URL('index')
my_value - is mean -> URL('controller') #this can be controller or
index or some value.
>From last Anthony replay I figure out why it can't work from view but
how to resolve this i
My custom form work fine,
After one day I work to make my HTML5 valid on end it only action in
form make error.
And after that I reed all what I can find but not helped me.
And on my previews post I put my actual and next form definition in
controller (people or index is not to much important wher
Hi,
Thx for your answer!
This way I could get rid of the KeyError I mentioned (caused by the
db.self_referenced_table_name syntax) previously and everything seemed fine
but I'm not satisfied by the rendering of such a model.
My example:
db.define_table('div',
Field('name', type='string'),
I looked for these 3 files in the /web2py folder.
But there is no file with these names.
Matching filenames are:
1) routes.example.py
2) options_std.py
Are you sure about the filenames?
Because my noinstall version is working perfect, but there are no
files indicated by you.
Vineet
On Oct 1
Right, you only need to copy those files if you're using them. If you don't
have those files, then you're not using them, so don't worry about it.
On Sunday, October 16, 2011 1:03:19 PM UTC-4, Vineet wrote:
>
> I looked for these 3 files in the /web2py folder.
> But there is no file with these n
Hi,
Thx! Wow, thats a pretty awesome feature! :)
But if I understand you correctly then this "doesn't work" for self
references. I mean "doesn't work" as "in the same way as for foreign list
references". Whereas in the latter case a big multiselect box gets
displayed, only a usual input field (fo
Hi Folks,
Am I getting crazy or request.vars doesn't work anymore? I'm trying to get
all vars from a form but it says
AttributeError: 'function' object has no attribute 'vars'
Anything changed?
Regards,
Tito
--
Linux User #387870
.
_/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)
I see the problem -- setting the '_action' attribute after the form is
created doesn't affect form.custom.begin, which is what you are using.
Instead, try this in the view:
{{=form.custom.begin.replace('action=""', 'action="%s"' % URL()}}
URL() should generate the URL of the current action (tho
Did you accidentally assign a function to the 'request' variable (or define
a function called 'request')? Maybe show some code.
On Sunday, October 16, 2011 1:31:37 PM UTC-4, Tito Garrido wrote:
>
> Hi Folks,
>
> Am I getting crazy or request.vars doesn't work anymore? I'm trying to get
> all var
Yes! That means that I am getting crazy :-)
So there is no way to have a funtion called request and use request.vars,
right? I'm working on a legacy system that has this function...
Thanks!
On Sun, Oct 16, 2011 at 3:50 PM, Anthony wrote:
> Did you accidentally assign a function to the 'request
On Sunday, October 16, 2011 2:00:54 PM UTC-4, Tito Garrido wrote:
>
> Yes! That means that I am getting crazy :-)
>
> So there is no way to have a funtion called request and use request.vars,
> right? I'm working on a legacy system that has this function...
It's not just request.vars that you'd
you can also do:
from mymodule import request as legacy_request
class Worker(threading.Thread):
def run(self):
print self.name, "running..."
while True:
if db(db.temperature).isempty():
print "empty"
else:
print "not empty"
time.sleep(1)
Running the above code causes the ap
Massimo has said that at some point he wants to work on something for Python
3 that may borrow some concepts from Web2py but will be different to take
advantage of Python 3 and the many years of learning from Web2py. But it's
unlikely that he is going to spend energy on "porting Web2py to Python
You should not start threads within actions because they are already
running into threads created by the web sever. The web server monitors
the threads and kills them on timeout.
Moreover you are used the db object in the thread. That is not thread
safe. Every thread should have its own db connec
P.S. What are you trying to accomplish? Web2py has a scheduler which
takes care of running background tasks in parallel.
Massimo
On Oct 16, 3:38 pm, Massimo Di Pierro
wrote:
> You should not start threads within actions because they are already
> running into threads created by the web sever. Th
With empty action field I mean:
and this is not empty action field
I used this line in my view:
{{=form.custom.begin.replace('action=""', 'action="%s"' % URL('index'))}}
and output in source is:
And about validation
on suggested link
it is writhed under point 9 (section 4.10.22.3)
*If action is the empty string, let action be the document's address of the
form document.*
- - Miroslav Gojic - -
On Sun, Oct 16, 2011 at 19:41, Anthony wrote:
> I see the problem -- setting the '_action'
The design is discussed
here: https://groups.google.com/forum/#!topic/web2py/R8N2CRP-ifY
I was hoping to get some feedback on that but never got any :(
yeh..sorry, i worked that out after I sent post. thanks for this
again.
On Oct 16, 4:58 pm, howesc wrote:
> is this the line that is failing:
>
> #this fails, unknown key exception
> entity_keyid = db.funtest[key]
>
> i meant to comment it out in my example since it fails.
After some time and several trays I get solution
in view for custom form I used
{{=XML(form.custom.begin.replace('action=""', 'action="people"'))}}
and it produce code in source:
and my form now work and I have not empty action field
Thanks everybody for help
- - Miroslav Gojic - -
On Sun,
you can simply use:
instead of
{{=XML(form.custom.begin.replace())}}
On Oct 16, 5:05 pm, Miroslav Gojic wrote:
> After some time and several trays I get solution
>
> in view for custom form I used
> {{=XML(form.custom.begin.replace('action=""', 'action="people"'))}}
>
> and it produce c
I was just wondering...
When you select a menu tab from the menu, it doesn't get highlighted.
Highlighting the current menu tab is expected behavior for every menu
system I've ever seen on the web.
What am I missing here? Is there an option I need to enable?
Thanks,
Richard
You can generate a up to date metra.pickle file (and test functionality ) by
running:
./metraschedule/modules/test_metra.py
To run the app on recent versions of Web2py you need to comment out the
db.executesql statements in db.py.
C.
Now that I think about it, this is overkill. It's just a simple form tag (no
custom web2py classes or attributes), so probably just as easy to hand code
the HTML (which will also be more clear).
On Sunday, October 16, 2011 6:05:41 PM UTC-4, miroslavgojic wrote:
>
> After some time and several tr
On Sunday, October 16, 2011 4:54:34 PM UTC-4, miroslavgojic wrote:
>
> And about validation
>
> on suggested link
>
> it is writhed under point 9 (section 4.10.22.3)
>
> *If action is the empty string, let action be the document's address of
> the form document.*
Yes, it's saying you can leave t
Hi there,
Following code works in web2py 1.98.2. That is, to allow registered
users, as well as the system administrator (who always access the
system from localhost), to access data.
@auth.requires(request.client=='127.0.0.1' or auth.is_logged_in())
def secret():
return {"": "some cool stuff
Change teh behaviour with this:
auth.settings.on_failed_authorization = lambda or function
auth.settings.on_failed_authentication = lambda or function
On Mon, Oct 17, 2011 at 2:23 AM, Ray (a.k.a. Iceberg) wrote:
> Hi there,
>
> Following code works in web2py 1.98.2. That is, to allow registered
Thanks for prompt response Bruno. But unfortunately your suggestion
doesn't help in my case, system admin still can not access from
localhost without login.
Regards,
Ray
On Oct 17, 12:41 pm, Bruno Rocha wrote:
> Change teh behaviour with this:
>
> auth.settings.on_failed_authorization = lambda o
Hi , i am developing an online booking system using web2py ...i have
come across a requiremnt where i need to store the clients photo into
the database(< 2MB)...how should i proceed with this...i mean what
should be the field in databasehow i can populate a select image
box so that user/admin
I think it should be, because @auth means authentication, so needs
authenticated user.
In your case I should do differently.
def secret():
if not request.client == '127.0.0.1' or not auth.user:
redirect(URL('default', 'user', args='login'))
return {"": "some cool stuff"}
better
def secret():
conditions = [request.client == '127.0.0.1', auth.user]
if not any(conditions):
redirect(URL('default', 'user', args='login'))
return {"": "some cool stuff"}
http://stackoverflow.com/questions/7767808/unable-to-write-to-appengine-datastore-using-web2pys-dal/7768108#7768108
I've just started using web2py with Google AppEngine for an app of mine. For
some reason, I'm unable to save/retrieve data using the DAL. Here's the code
I'm using:
At the end of
On Mon, Oct 17, 2011 at 03:16, Anthony wrote:
> On Sunday, October 16, 2011 4:54:34 PM UTC-4, miroslavgojic wrote:
>>
>> And about validation
>>
>> on suggested link
>>
>> it is writhed under point 9 (section 4.10.22.3)
>>
>> *If action is the empty string, let action be the document's address of
Thanks for the workaround, I might take that. But I will still argue
that:
1. Does authentication have to mean logged-in, or can it be something
else, such as "accessing from localhost", "accessing via ajax", etc.?
2. if @auth already means authentication, why there is still an
auth.requires_logi
On Mon, Oct 17, 2011 at 03:11, Anthony wrote:
> Now that I think about it, this is overkill. It's just a simple form tag
> (no custom web2py classes or attributes), so probably just as easy to hand
> code the HTML (which will also be more clear).
@From Massimo:
you can simply use:
instead of
On Mon, Oct 17, 2011 at 3:50 AM, Sathvik Ponangi wrote:
> db.files[0] = dict(hash=name, name=name, path=name)
may be you want to replace the above with:
db.files.insert(hash=name, name=name, path=name)
why are you assign it to db.files[0] ?
when you do db.table[index] you fetching rows by id
>
> 2. if @auth already means authentication, why there is still an
> auth.requires_login() which implemented as
> auth.requires(auth.is_logged_in())? Shouldn't this implementation
> imply that auth.requires() does not check is_logged_in()? All in all,
> what is auth.requires()'s semantics?
Wait
Hi,
You beat me to it. I came up with almost exactly the same code myself
over the weekend. Worked a treat. :O)
Paul.
On Oct 15, 2:35 am, Massimo Di Pierro
wrote:
> Say you have
>
> db.define_table('mytable',Field('file','upload'))
>
> step 1: add a blob
>
> db.define_table('mytable',Field('fil
Search the book for 'image' and you will find a lot of references.
Here is an quote from early in the book (
http://web2py.com/book/default/chapter/01?search=image):
"Here are some examples of web2py statements that illustrate its power and
simplicity. The following code:
1.
db.define_table('p
61 matches
Mail list logo