to reuse model definition in a module, so i use gluon.shell.env .
code in module is like this:
module code start ###
os.chdir(/path/to/web2py/)
from gluon.shell import env
globals().update(env('my_application_name', import_models=True))
while True:
print "count", db(db.myt
Massimo,
> What do you mean by "doesn't work"? You do not see the buttons?
Yes.
> Try this:
>
> def user():
> form=auth()
> form[0][-1][1].append(INPUT(_type="reset",_value="Reset"))
> form[0][-1][1].append(INPUT
> (_type="button",_value="Cancel",_onclick="window.location='%s';"%URL
The jQuery code for confirmation on delete connects the onclick event
of the checkbox with a confirmation dialog, I have never seen this
convention before, in the applications I have seen sofar the
confirmation dialog is triggered by a submit. Is it possible to re-
write the code in web2py_ajax.htm
Massimo,
> yes but you will need to hardcode the URLs instead of using URL(...).
So the URLs in web2py_ajax and the custom controller would read like:
> > response.files.insert(0,URL(r=request,c='static',f='jquery.js'))
response.files.insert(0,'http://files.example.com/js/jquery.js')
> > resp
Does the DAL perform all queries on a transaction basis... that
happens to commit() at the end of a successful request? and on an
error the transaction is rolled back?
-Thadeus
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this gro
I am working my way through setting up my account at Webfaction using
the WebFaction and web2py User Guides and this post:
http://forum.webfaction.com/viewtopic.php?pid=8844#p8844
Since this post is almost a year old, and web2py has evolved rapidly,
I wonder whether the procedure is still accurate
regarding default auth fields, we can use
{{if not auth.is_logged_in():response.write(auth.login())}} as login form, you
will see field names like username, password etc in login form in English, we
want translate field names of login form into other languages, T method is not
the solution obviousl
Hi Mengu,
> so basically, you need to fire up another terminal window to ssh into
> your webfaction account and use kill -SIGTERM 9813. that's what it
> means.
I thought web2py is a long running process but from these
instructions:
from another terminal, kill web2py process according to web2py's
Hi,
I was checking xmlrpc usage[1] at web2py. I have an application names "test". I
created xmlrpctest.py under it and added the below lines:
from gluon.tools import Service
service = Service(globals())
@service.xmlrpc
def add(a,b): return a+b
@service.xmlrpc
def sub(a,b): return a-b
def call
Tnx, it works :)
Best wishes,
On Dec 22, 3:57 pm, mdipierro wrote:
> Hi Jep,
>
> create a file routes.py and in it
>
> routes_onerror=[('*/*','/logging/default/index')]
>
> and the create an app "logging" with a "controllers/default.py" that
> does the following:
>
> from gluon.admin import *
For the record, i changed the import line in the index() function to:
{{{
from gluon.restricted import RestrictedError
}}}
Else the browser gives me an errorpage, that it gets a redirect that
will never complete.
--
You received this message because you are subscribed to the Google Groups
Since that web2py comes with an editor in HTML/Js to develop from
browser, this could make you smile.
Bespin is a Mozilla's project to have a full IDE from browser; it's
free/open source and there is a server built on python so it could be
integrated in web2py.
*
http://ajaxian.com/archives/bes
If I understand the problem, you need to do
db.commit()
On Dec 27, 3:45 am, 王怀玉 wrote:
> to reuse model definition in a module, so i use gluon.shell.env .
> code in module is like this:
> module code start ###
> os.chdir(/path/to/web2py/)
> from gluon.shell import env
> glo
I do not object and I would take a patch to do it if it does not
conflict with the ajax capture of form submission.
On Dec 27, 4:53 am, annet wrote:
> The jQuery code for confirmation on delete connects the onclick event
> of the checkbox with a confirmation dialog, I have never seen this
> conve
yes
On Dec 27, 5:55 am, Thadeus Burgess wrote:
> Does the DAL perform all queries on a transaction basis... that
> happens to commit() at the end of a successful request? and on an
> error the transaction is rolled back?
>
> -Thadeus
--
You received this message because you are subscribed to th
any changes in DAL about GAE transactions?
On Sun, Dec 27, 2009 at 5:35 PM, mdipierro wrote:
> yes
>
> On Dec 27, 5:55 am, Thadeus Burgess wrote:
> > Does the DAL perform all queries on a transaction basis... that
> > happens to commit() at the end of a successful request? and on an
> > error t
Look into the script described here:
http://www.web2pyslices.com/main/slices/take_slice/29
On Dec 27, 6:28 am, annet wrote:
> I am working my way through setting up my account at Webfaction using
> the WebFaction and web2py User Guides and this
> post:http://forum.webfaction.com/viewtopic.php?pi
db.auth_user.password.label=T('The Password')
On Dec 27, 7:14 am, Frank wrote:
> regarding default auth fields, we can use
> {{if not auth.is_logged_in():response.write(auth.login())}} as login form, you
> will see field names like username, password etc in login form in English, we
> want transl
Massimo,
I am a complete novice when it comes to programming in Python.
Maybe one of the group members could provide a patch?
Kind regards,
Annet
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@goog
I guess you can do that with javascript (client side)
On Sun, Dec 27, 2009 at 5:42 PM, annet wrote:
> Massimo,
>
> I am a complete novice when it comes to programming in Python.
> Maybe one of the group members could provide a patch?
>
> Kind regards,
>
> Annet
>
> --
>
> You received this messa
Massimo,
Thanks for the link.
I have another question, in the forum post mentioned above I also
read:
> from another terminal, kill web2py process according to web2py's
> output instructions
> Start your app:
>~/webapps/apachewsgi/apach2/bin/start
To which Mengu added:
> when you start
Is it possible to disable auto_commit() so that it must be explicitly called?
And are the Transactions shared between threads? Or must they be
committed to be seen in other threads?
-Thadeus
On Sun, Dec 27, 2009 at 9:38 AM, Vasile Ermicioi wrote:
> any changes in DAL about GAE transactions?
That delete alert box is all on the javascript side
-Thadeus
On Sun, Dec 27, 2009 at 9:53 AM, Vasile Ermicioi wrote:
> I guess you can do that with javascript (client side)
>
> On Sun, Dec 27, 2009 at 5:42 PM, annet wrote:
>>
>> Massimo,
>>
>> I am a complete novice when it comes to program
> On my Mac Server I used Screen Sharing to start web2py, and run web2py
> as a long running process, that is, I didn't 'kill' it. How does that
> work at WebFaction
> is web2py started everytime there is a request an then stopped?
This happens ONLY if you use cgihandler.py. It does not happen wit
You can commit db.commit() and db.rollback() explicitly. Just do it
when you need.
The concept of cross-thread transaction is not well defined and would
be very unsafe. Perhaps if you tell us what you are tring to achieve
we can suggest a better way.
On Dec 27, 10:29 am, Thadeus Burgess wrote:
You should get some kid of error if the URL were wrong.
Anyway try:
import xmlrpclib
server=xmlrpclib.ServerProxy('http://127.0.0.1:8000/app/xmlrpctest/
call/xmlrpc')
print str(server.add(3,4)+server.sub(3,4))
(assuming the port is 8000).
On Dec 27, 8:59 am, Oguz Yarimtepe wrote:
> Hi,
>
> I
I would like to see people build alternatives to default admin app. I
do not think it is a good idea to replace admin because I like the
fact that it has no dependencies, but more experienced users should be
able to use more powerful alternatives like the one you suggest.
Ideally I would like to ha
Just curious in how it works in web2py. In SQLAlchemy sessions are
thread safe.. so uncommitted transactions are accessible from other
threads.
-Thadeus
On Sun, Dec 27, 2009 at 1:44 PM, mdipierro wrote:
> You can commit db.commit() and db.rollback() explicitly. Just do it
> when you need.
>
Hrm... no BUTTON helper :*(
-Thadeus
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com.
For more opti
A more featureful admin app would be nIce but I support Massimo in
keeping the current one. A point of clarification, Bespin is merely an
editor. Their goal is to eventually create an IDE but it is far from
that at present. Other problems include no IE support and it suffers
from the same highlig
Web2py does have the equivalent of SQLAlchemy sessions.
When a request arrives web2py creates a new database connection object
or pools an existing connection from a connection pool, then it
creates a cursor object. All db IO in the request is done via the
cursor object. This is thread-safe in the
TAG.BUTTON
you can can make any helper you need with TAG.anything
On Dec 27, 2:48 pm, Thadeus Burgess wrote:
> Hrm... no BUTTON helper :*(
>
> -Thadeus
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web..
This thread
http://groups.google.com/group/google-appengine-python/browse_thread/thread/ceebac3397625019#
raises an interesting issue and proposes an interesting solution that
works on GAE.
Executive summary: In GAE you can define computed fields that are
computed now when data is extracted but
It was easy to add it to the current DAL (will work on GAE too)
massimo-di-pierros-macbook:web2py mdipierro$ python web2py.py -S
welcome
>>> db=DAL('sqlite://storage.sqlite')
>>> db.define_table('a',Field('b'),Field('c',compute=lambda r: r['b'].lower()))
>>> db.a.insert(b='HELLO')
>>> for row in d
mdipierro writes:
>
> db.auth_user.password.label=T('The Password')
> >
> --
>
it works, thanks,
Frank
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this
Its the principle of the thing!
I do like my buttons. They are special!
-Thadeus
On Sun, Dec 27, 2009 at 3:51 PM, mdipierro wrote:
> TAG.BUTTON
>
> you can can make any helper you need with TAG.anything
>
> On Dec 27, 2:48 pm, Thadeus Burgess wrote:
>> Hrm... no BUTTON helper :*(
>>
>> -Th
is there any difference with this and our virtualfields?
On 28 Aralık, 00:39, mdipierro wrote:
> It was easy to add it to the current DAL (will work on GAE too)
>
> massimo-di-pierros-macbook:web2py mdipierro$ python web2py.py -S
> welcome>>> db=DAL('sqlite://storage.sqlite')
> >>> db.define_tabl
Yes. The values of virtualfields are not stored in the database. They
are computed every time a record is extracted.
In the above case the values are computed when a record is inserted
and they are stored in the database. In RDBS this is not really a good
idea but you may need it in non relational
i had done as your advice.
no change at all .
you can try it by yourself.
thank you very very much !
在2009-12-27,mdipierro 写道:
>If I understand the problem, you need to do
>
>db.commit()
>
>On Dec 27, 3:45 am, 王怀玉 wrote:
>> to reuse model definition in a module, so i use gluon.shell.env .
>>
How do you insert the row?
The commit goes after you insert the row.
Massimo
On Dec 27, 8:15 pm, 王怀玉 wrote:
> i had done as your advice.
>
> no change at all .
> you can try it by yourself.
>
> thank you very very much !
>
> 在2009-12-27,mdipierro 写道:
>
> >If I understand the problem, you need t
I apologize if this is more of a DB question than a web2py question, but I'm
having trouble with populating a drop down menu in the admin interface. I
have a table (called 'version') with two keys ('name' and 'version') and a
third column 'component_id'. This table records which versions of an
ap
First of all let me congratulate for the clear format of your
question.
This line:
db.report.from_id.requires = IS_IN_DB(db, db.version.id, '%(name)s
%(version)s')# Again, I want a set, not a list.
does not display the cartesian product of name and version but only a
list of name, version
def increment(self, key, value=1):
self.locker.acquire()
try:
if key in self.storage:
value = self.storage[key][1] + value
self.storage[key] = (time.time(), value)
except BaseException, e:
self.locker.release()
43 matches
Mail list logo