On Sep 23, 5:46 am, Arvind arvind.ran...@gmail.com wrote:
print dir(form) - to get variables/methods
print dir(form.attributes) - dict of attributes (formname, id, etc.)
I might sound really silly. Where do i place the print command ? it
wont work in the controller or in the view.
Web2Py
A really good news!!
Thanks!
2009/9/17, mdipierro mdipie...@cs.depaul.edu:
Sorry.
Usually I am in Italy twice a year. I will try to organize a course
there.
Massimo
On Sep 17, 4:22 am, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
In Italy, economical incomes for IT
Hi,
When I used SQLFORM.factory the field I defined is longer when
displayed. Is this the default? How can I display the actual defined
length? Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
web2py-users
I'm trying to get a remote call from service exposed by web2py in flex 3.
The Turbogears gateway example on PyAmf site shows that you should get a
remote object to make it's methods called(*this address may be wrong, cuz
the PyAmf site is just now unavailable* -
I have the following database and I need to query for the trees
without fruit:
db.define_table('tree')
db.define_table('fruit', Field('tree', db.tree))
Until now I have simply queried for all the trees, then for all fruit,
and removed these tree IDs.
But now I have ~150K trees so it needs to
I updated the patch:
- the commit field is now above the revision information/committed
file list
- if you commit and there are no changes, you get a flash message
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hi, I wonder if anyone can help. The problem I'm experiencing is
beyond the scope of my knowledge. For some reason I started receiving
this error when trying access the front end of my application, and
also using the backend. I don't get it every single time I try to
navigate, but I get it MOST
On Tue, Sep 22, 2009 at 22:54, mdipierro mdipie...@cs.depaul.edu wrote:
http://videolog.uol.com.br/busca.php?parametro=web2pyf=1
Ah, I just forgot to announce here:
I talked in SERPRO - Rio de Janeiro about web2py last week (in a
conferece about Free Software).
The video is available at:
I am trying the same example from the website - do you know if it has
been updated for version 0.6?
As far as I know it has *not* been updated for version 0.6.
when I checked this, it had already been done - perhaps in the build?
I cannot know for sure exactly what you did at your system :)
help(SQLFORM)
Help on class SQLFORM in module gluon.sqlhtml:
class SQLFORM(gluon.html.FORM)
| SQLFORM is used to map a table (and a current record) into an HTML
form
|
| given a SQLTable stored in db.table
|
| generates an insert form::
|
| SQLFORM(db.table)
|
| generates an
What's a IM field?
On Sep 22, 10:13 pm, Robin B robi...@gmail.com wrote:
You can edit app.yaml to dispatch requests to those xmpp handlers
based on prefix (/_ah/*), and let web2py handle everything that's left
(/*)
Or you can rewrite those handlers as web2py controller/functions and
use
Use CSS of jQuery:
script
$(document).ready(function(){
$('#tablename_fieldname1').attr('size','5');
$('#tablename_fieldname2').attr('size','5');
}):
/script
for SQLFORM tablename is 'no_name'
On Sep 23, 2:37 am, ed edbi...@rocketmail.com wrote:
Hi,
When I used SQLFORM.factory the field I
rows = db(~db.tree.id.belongs(db()._select(db.fruit.tree))).select
(db.tree.ALL)
does not work on GAE but should work everywhere else.
On Sep 23, 4:20 am, Richard richar...@gmail.com wrote:
I have the following database and I need to query for the trees
without fruit:
Thanks I will process this asap.
On Sep 22, 11:08 pm, Anthon anthon.van.der.n...@googlemail.com
wrote:
I use mod_wsgi 2.5, mercurial 1.3.1 and Python 2.6.2 on Ubuntu 8.04
After some experimenting with the Mercurial API I was able to get
things to write without any output to sys.stdout
Is it possible the DNS is not configured or not accessible?
On Sep 23, 6:33 am, LB22 latn.bl...@googlemail.com wrote:
Hi, I wonder if anyone can help. The problem I'm experiencing is
beyond the scope of my knowledge. For some reason I started receiving
this error when trying access the front
Hi, thanks for responding.
I've considered this but I don't know why it would suddenly become
inaccessible. It was working fine then suddenly stopped working
properly. And the problem is intermittent too, so it will work on
every other page request, or every third page request, but then not
work
I do not think this something you caused. I cannot completely rule it
out without looking at the code but it is unlikely.
Has anybody else had this problem?
Massimo
On Sep 23, 8:18 am, LB22 latn.bl...@googlemail.com wrote:
Hi, thanks for responding.
I've considered this but I don't know why
I also like to keep the cheet sheet open while I work. IT is a great
QUICK reference, when the searching the Manual takes too long for
simply the names of things.
http://www.web2py.com/examples/static/web2py_cheatsheet.pdf
For custome HTML forms check the Manual page 194 (SQLFORM in HTML).
Here you go. You will need to force it to render with
SQLFORM.widgets.options.widget because IS_IN_SET won't render as a
dropdown when used with other validators. In your model:
db.page_articles.placement.widget = SQLFORM.widgets.options.widget
if request.vars.page and request.vars.placement:
Alternitively, if you really want to be crazy, you could do it just
like in PHP:
http://pastebin.com/d5b147192
In controller, you can get the values you submitted using either
request.vars.get('fieldname', '') OR request.get_vars. If you use
'post' method, replace 'get' with 'post'. Easy eh? Get
What about grouping the actions in individual functions, that way calling
these functions from returned jQuery commands, or from other JavaScript
would make it easier! (also if you needed to support a legacy version of
jQuery for add-on compatibility, you could use it for rebinding much easier.
I actually realized that last night and refactored everything. Can
you check out the latest version and see if it does what you want?
On Sep 23, 11:14 am, Thadeus Burgess thadeus.burg...@gmail.com
wrote:
What about grouping the actions in individual functions, that way calling
these functions
I think I missed your point. Let me take a closer look.
On Sep 23, 11:22 am, mr.freeze nat...@freezable.com wrote:
I actually realized that last night and refactored everything. Can
you check out the latest version and see if it does what you want?
On Sep 23, 11:14 am, Thadeus Burgess
you may want to read through gluon/cache.py to understand how CacheOnDisk
and portalocker work...
On Tue, Sep 22, 2009 at 10:47 PM, Paul paulygr...@gmail.com wrote:
I tried your new streamer method with the same results.
I am very convinced that the issue is with cache.lock opened in the
and the point here: currently, the way code is written, [id] in a URL will
be replaced by the created/modified id or the record EXCEPT if it is
relative, or absolute (e.g. ONLY '/' leading URL paths will have [id] set,
as shown in the manual).
The question of what is safe; what isn't isn't
Yeah, Like put the jQuery commands in their own little function.
So instead of
function page_onready(){
jQuery().click(blahblah);
jQuery().change(blahblah);
}
jQuery().page_onready();
It will become
function my_div__click(){
jQuery.click(blahblah);
}
function my_input__change(){
I get it now. I like the idea but I'm worried it will break multiple
subscriptions. Currently you can do:
d = DIV(clickme,_id=clickme)
event.listen(click,d,alert('hello');)
event.listen(click,d,alert('hello again');)
Wouldn't this create two functions with the same name?
On Sep 23, 11:39 am,
any ideas? anyone?
On Sep 22, 12:48 pm, Jon Romero darks...@gmail.com wrote:
Thanks.
I was looking the examples from the old book (thinking that there
won't be any major changes) but I was wrong.
This is in the old book:
routes_in=(
('140.192.\d+.\d+:.*','/welcome/default/index'),
)
Hello,
How to access the item 'http_referer' the request object. Apparently
it is a key in a dictionary. But when I request [ 'http_referer']
tells me that it is not a valid key.
Jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I don't find it terribly useful to use FORM - using SQLFORM or crud is
generally more useful.
I find, that for SQLFORM i have to specify some database ...which I do
not want to .
My single object spans across multiple tables...
So to create my single object, i need over 10 fields in a form,
SQLFORM.factory is just like SQLFORM however it does not connect to a
database(meaning you don't have to have any physical models)
you use SQLFORM.factory just like db.define_table()
form = SQLFORM.factory(Field('user', requires=IS_IN_DB()),
Field('someotherfieldfromalargerelationship',
as you can see in http://www.web2py.com/examples/simple_examples/hello6,
it is request.env.http_referer (or request.env[http_referer]
You should also be able to see this with a debugger, by inspecting current
context variables (e.g. wingIDE, ipython, windbg, eclipse, etc.)
On Wed, Sep 23,
Thanks, that did it.
On Wed, 2009-09-23 at 06:00 -0700, mdipierro wrote:
form = SQLFORM(...,upload=URL(r=request,f='download'))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this
On 23 sep, 18:06, Yarko Tymciurak yark...@gmail.com wrote:
as you can see inhttp://www.web2py.com/examples/simple_examples/hello6,
it is request.env.http_referer (or request.env[http_referer]
You should also be able to see this with a debugger, by inspecting current
context variables
I get the following error with this code...
SyntaxError: widget cannot determine options of
page_articles.placement - Line 64 of Default.py
---LINE 64 IS LABELED---
def page_creator():
response.title = Page Creator
if len(request.args):
pages =
It works on the model and controller code you posted. Is it different
than what you're using?
On Sep 23, 1:19 pm, Jason Brower encomp...@gmail.com wrote:
I get the following error with this code...
SyntaxError: widget cannot determine options of
page_articles.placement - Line 64 of
Okay :)
I'm not particular good in English but in:
• next is the URL to redirect to after success. If the URL
contains the
substring [id] this will be replaced by the id of the record
currently
created/updated.
is nowhere that the URL must not contain '/' in the first place.
This is
On Wed, Sep 23, 2009 at 1:53 PM, szimszon szims...@gmail.com wrote:
Okay :)
I'm not particular good in English but in:
• next is the URL to redirect to after success. If the URL
contains the
substring [id] this will be replaced by the id of the record
currently
created/updated.
It looks like you took the IS_IN_SET off of page_articles.placement:
db.define_table('page_articles',
Field('page', requires=IS_IN_DB(db,db.page.id,'%(name)s')),
Field('article', requires=IS_IN_DB(db,db.article.id,'%(title)s
- %(author)s')),
Field('placement', 'integer'))
To clarify, the IS_NOT_IN_DB validator is only applied when
request.vars.page and request.vars.placement are present so it needs a
default validator when they are not. It should look like this:
db.define_table('page_articles',
Field('page', requires=IS_IN_DB(db,db.page.id,'%(name)s')),
looks like a string property that validates as an instant messaging
handle.
http://ru.ly/Nb
class IM(object):
An instant messaging handle. Includes both an address and its
protocol.
The protocol value is either a standard IM scheme or a URL
identifying the
IM network for the protocol.
After too much frustration, I made a simple script for installation on
dreamhost, or likely most places (see below). It does not allow the
admin because it is not local (still figuring out how to change that
one--any ideas would be welcome).
run by
cd ~
python web2py.install.py
The code is
Hi,
I got some feedback from webfaction support (where my site is hosted),
and he provided the below. Does anyone understand what is happening?
Thanks in advance.
Please see the support email:
Today I took a closer look at this and noticed your error is with
gaierror after researching this I
I've been looking into building a data warehouse, and I'm not sure it
will make my life easier!
I would like to just come up with my dream schema and run update
scripts on a daily or event-driven basis, but there seem to be a
million concepts related to data warehousing: data marts, dimensions,
Then it should be possible to rewrite the entire example as a web2py
application. Is there specific significance it the URL names ('/_ah/
xmpp/message/chat/') used in the example? Because preserving those
would require roots.
Massimo
On Sep 23, 2:25 pm, Robin B robi...@gmail.com wrote:
looks
Peter this useful.
It would be nice if a volunteer were to collect the most updated
installation scripts for webfaction, dreamhost and other systems and
keep track of the differences. Eventually we could have a setup script
that asks some quesitons to the user and deploys web2py.
We could
As an experiment edit wsgiserver.py and replace
socket.AF_UNSPEC
with
socket.AF_INET
everywhere. This will force it to use IPV4 instead of IPV6. It may be
an IPV6 issue.
Massimo
On Sep 23, 2:32 pm, LB22 latn.bl...@googlemail.com wrote:
Hi,
I got some feedback from webfaction support
linebreaks caused problems. I'm attaching a version that should work
via copy paste here now:
web2py.install.py
--
subdomain=yourDomaiNname.com
## --CHANGE THIS
user=yourUserID
## -- CHANGE THIs
# should be something like web2py.mydomain.com
#where you have set up the
Why don't you email in a post, and attach it - or post it to something like
http://paste.pocoo.org/
(Just email to web2py@googlegroups.com, with a subject line that matches the
post title - e.g. this one is:
Re: [web2py:31559] Re: Almost working on the dreamhost server... $50 to the
person that
Hi,
Sorry, I can't seem to locate that file. In which folder should it be?
On Sep 23, 9:01 pm, mdipierro mdipie...@cs.depaul.edu wrote:
As an experiment edit wsgiserver.py and replace
socket.AF_UNSPEC
with
socket.AF_INET
everywhere. This will force it to use IPV4 instead of IPV6.
On 23 sep, 19:55, mdipierro mdipie...@cs.depaul.edu wrote:
yes. The referring URL is in request.vars.next
I have in the model:
auth.settings.on_failed_authorization = URL(r=request, c='identidad',
f='error')
and in the controller (identidad):
def error():
...
return dict()
and I
should be
request.vars._next
On Sep 23, 3:33 pm, Jose jjac...@gmail.com wrote:
On 23 sep, 19:55, mdipierro mdipie...@cs.depaul.edu wrote:
yes. The referring URL is in request.vars.next
I have in the model:
auth.settings.on_failed_authorization = URL(r=request, c='identidad',
f='error')
gluon/wsgiserver.py (all core files will be found in gluon; all
application level things in applications area)
On Wed, Sep 23, 2009 at 3:27 PM, LB22 latn.bl...@googlemail.com wrote:
Hi,
Sorry, I can't seem to locate that file. In which folder should it be?
On Sep 23, 9:01 pm, mdipierro
Sorry, I just googled and found it's location. I should done that
first. I'll come back shortly with the outcome. Thanks.
On Sep 23, 9:40 pm, Yarko Tymciurak yark...@gmail.com wrote:
gluon/wsgiserver.py (all core files will be found in gluon; all
application level things in applications
Yes,
I believe the url ('/_ah/xmpp/message/chat/') is significant
what about:
app='_ah'
controller='xmpp'
action='message'
then handle the rest as args and call other controller functions?
Robin
On Sep 23, 2:57 pm, mdipierro mdipie...@cs.depaul.edu wrote:
Then it should be possible to
I think switching from AF_UNSPEC to AF_INET helped in that after
attempting several page requests I haven't received any errors yet.
Unfortunately though, I've still got some problems. Every few page
requests, the application seems to just hang. The browser will spend
up to a minute just waiting
I agree. Most of what the rest of the code does should be easy to port
to web2py. But I need to understand how to wrap the handler so that I
can be called from a controller function. We could make a wsgi_adaptor
inside the controller but there has to be a better way.
On Sep 23, 3:57 pm, Robin B
Sorry, I take that back, I just received the error again, please see
below:
Traceback (most recent call last):
File gluon/restricted.py, line 178, in restricted
exec ccode in environment
File /home/lnoir/webapps/latnblack/web2py/applications/admin/models/
access.py, line 15, in module
Hi Richard,
My aim is to focus on Web2py jobs, it incredibly stable MVC, but still
no real examples.
I am on my way to build a new AI system (the back-end in Python (of
course) and the front-end in Web2py) which will probably change the
whole development process.
My point is that an MVC like
Thanks Vidul. I like your thinking.
On Sep 23, 4:50 pm, Vidul Petrov vidul.r...@gmail.com wrote:
Hi Richard,
My aim is to focus on Web2py jobs, it incredibly stable MVC, but still
no real examples.
I am on my way to build a new AI system (the back-end in Python (of
course) and the
Yes it would.
But would you ever place the same event on two different callbacks?
-Thadeus
On Wed, Sep 23, 2009 at 12:18 PM, mr.freeze nat...@freezable.com wrote:
I get it now. I like the idea but I'm worried it will break multiple
subscriptions. Currently you can do:
d =
Not sure if it's a best practice, but you could do a separate client
handler and server handler to get a Please Wait effect:
d = DIV(Click Me,_id=clickme)
event.listen(click, d, jQuery('#clickme').html('Please Wait...');)
event.listen(click,d, handle_it, d)
def handle_it():
return Done!
As a temporary work around I just no longer create a CacheOnDisk
object (by commenting out line cache.py:301 self.disk = CacheOnDisk
(request) ) and this works fine (since I am not using any disk
caching).
I still contend there is some bug here, and most likely its that each
time a controller
If this is the case it is a bug. There should be only one cache file
per application.
That is the point of the cache.
Massimo
On Sep 23, 6:19 pm, Paul paulygr...@gmail.com wrote:
As a temporary work around I just no longer create a CacheOnDisk
object (by commenting out line cache.py:301
On 23 sep, 20:35, mdipierro mdipie...@cs.depaul.edu wrote:
should be
request.vars._next
vars._next is also always None
{{=request.vars}} show Storage {}
Jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
I tried using the web shell interface and found it useful, but quite
buggy, with variables going in and out of scope and an unstable
database connection. Below I have pasted a cleaned up example session:
web2py Shell Version 1.66.2 (2009-08-21 12:13:57)
rows = db(db.test.id == 10).select()
specifically, using python web2py.py --import_models --no-cron --
shell=myapp
Then making an expensive database query to export the database.
On Sep 18, 10:02 am, Richard richar...@gmail.com wrote:
no - from command line.
On Sep 16, 2:37 pm, mdipierro mdipie...@cs.depaul.edu wrote:
You
Tracing through the program execution (using pdb) I found that
compileapp.py:build_environment was called every time a controller was
executed. I don't know if this is the intended design (ie each
controller runs in a fresh environment) or something I am doing/ a bug
is causing a
Yes. It is buggy. I have not got to the bottom of it. Have you tried
it with anything other than sqlite?
Massimo
On Sep 23, 7:59 pm, Richard richar...@gmail.com wrote:
I tried using the web shell interface and found it useful, but quite
buggy, with variables going in and out of scope and an
On Sep 23, 8:18 pm, Paul paulygr...@gmail.com wrote:
Tracing through the program execution (using pdb) I found that
compileapp.py:build_environment was called every time a controller was
executed. I don't know if this is the intended design (ie each
controller runs in a fresh environment)
Please please please, remove the pop-up when you run python web2py.py...
I have to run web2py around 10 times in a given day, and it takes forever to
wait on the message to flash by!
Since I am using web2py at work and at home, I get tired of seeing that
screen! And its a productivity killer at
On Wed, Sep 23, 2009 at 23:37, Thadeus Burgess thade...@thadeusb.com wrote:
Please please please, remove the pop-up when you run python web2py.py...
I don't like that window...so, run:
python web2py.py -a YOUR-PASSWORD
The command 'python web2py.py --help' could help you too. :-)
Use Ctrl-C to
HI,
I have this table, controller, and view. I am trying to list all
persons and their events. I can't seem to get the description field to
display as the events for the person.
When I run this ev=db(db.events.person==db.person.id).select() I
see all the tables and description , yet when I run
That reminds me though, the logo should probably be added to the
splash screen, yes?
On Sep 23, 9:42 pm, Álvaro Justen [Turicas] alvarojus...@gmail.com
wrote:
On Wed, Sep 23, 2009 at 23:37, Thadeus Burgess thade...@thadeusb.com wrote:
Please please please, remove the pop-up when you run
As another try, I ran web2py (1.67.1) with its builtin server as
python web2py.py -p 443 -c /path/to/server.crt -k /path/to/server.key -
a recycle -i 192.168.1.81
When i acess to web2py from a PC thru the LAN, it works fine including
Admin over HTTPS, but issues the following ticket when
Wow, your a scholar and a gentleman. Thanks. And I get it now what
your doing. You can't validate until we have data and that is a the
check for that data. Very fancy!
Regards,
Jason
On Wed, 2009-09-23 at 12:22 -0700, mr.freeze wrote:
To clarify, the IS_NOT_IN_DB validator is only applied
If you port it to web2py, then you don't need to wrap their handler,
unless I am misunderstanding.
All that has to built a web2py controller function that can receive
POST requests at:
/_ah/xmpp/message/chat/
The POST data is this:
* from, the address of the sender of the message
*
Does anyone have any ideas? Or should I just reinstall web2py?
On Sep 23, 10:18 pm, LB22 latn.bl...@googlemail.com wrote:
Sorry, I take that back, I just received the error again, please see
below:
Traceback (most recent call last):
File gluon/restricted.py, line 178, in restricted
OK, so now I'm think again that it's not a web2py related issue. I was
in a console trying to get the latest version of web2py when I
received the same name or service unknown problem:
$ wget http://www.web2py.com/examples/static/web2py_src.zip
--00:43:12--
79 matches
Mail list logo