I'm not sure what you're getting at here, but if you consider Python is
a very dynamic language. Whenever a module is imported, it is
essentially run in it's own namespace. In the case of your plugin
(driver) system (which I haven't looked at yet), you could have an
SQLDBFactory function tha
Tim
Thanks for your response. I'm still a Python newbie, especially with
some of the more esoteric stuff.
With the plugin demo I have code in sql.py outside any class that
appears to only run the once (when sql.py is imported I assume) and,
as you suggest, it loads details of the available db-pl
The problem is that first start is a very relative term depending on
how you run web2py, it's not the same for standalone/cherrypy, CGI,
MOD_WSGI, parallel versions of these, etc. This means that your
startup code could be executed in a whole lot of places, not always
where you want it. You also h
I think you're confusing things see below
achipa wrote:
> The problem is that first start is a very relative term depending on
> how you run web2py, it's not the same for standalone/cherrypy, CGI,
> MOD_WSGI, parallel versions of these, etc.
Correct...sorta. We really have three categories h
OK, so I've looked at it. I like it. Achipa is right that you'll have
to protect drivers[] and known_plugins{} (possibly others) during
load-time. I think you should just use a lock-type rather than cache.ram().
Cool, while web2py already supports many large databases, this will
certainly c
One itsy-bitsy note about the persistence of WSGI/FCGI/standalone -
out of these, only the standalone has serious persistence. WSGI and
FCGI can (and will) get restarted on the web server's whim (some
webservers come with a predefined number of requests after which they
restart the process, just i
hey bill, try this:
# in models/0.py:
def mod_import(name):
mod = __import__(name)
for part in name.split('.')[1:]:
mod = getattr(mod,part)
return mod
config = mod_import('applications.
%s.modules.config'%request.application)
# in modules/config.py
import datetime
boottime = datetim
Hi pals,
Don't know whether this is a web2py problem or a GAE problem, anyway I
still post it here and hope to get some kindly hints.
I started my GAE experience just today. I managed to upload web2py
1.55.2 and its welcome application and later one of my homebrew "no-db-
required" application,
Yes, but WSGI/FCGI web-servers always have several new processes ready
for requests rather than having to wait for a process to start as soon
as a request is received.
Be careful about the multiple processes thing. Separate processes can
import the same module and not be sharing data or code
Hey,
> Did I miss something? Do you guys encounter same problem when playing
> with GAE? Does your application successfully insert hundreds of
> records during one request? Any feedback will be highly appreciated!
On GAE, writes are very expensive because each record is actually
written to disk,
I tried that last night which fixed the cosmetic issue of it always
posting the update message to the top div; however, it still only
updates the first record. At least now it says it updates the first
record in the correct div though. ;) I am fundamentally
misunderstanding how the submit button
Hello,
I'm using web2py and find it very nice.
However, I would like to request a feature: it would be very useful if
the tickets that are generated when an error happens would not only
have the call stack and the exception that occured, but also the
request.vars parameters (or even the whole req
I think I may have figured out a way to do it. Let me play around
with it a bit and I will get back to you. Thanks for all your help.
-Jason
On Jan 27, 9:00 am, jlegler wrote:
> I tried that last night which fixed the cosmetic issue of it always
> posting the update message to the top div; ho
I am skeptical about initialization code being initialized by the app
because it may take time and web server may kill it.
My approach is to create an initialization script in private and run
it with
web2py -S app -M -R private/script.py
On Jan 27, 10:24 am, Timothy Farrell wrote:
> Yes, but W
Yes. Good point. Will look into it.
Massimo
On Jan 27, 11:16 am, Tamas wrote:
> Hello,
>
> I'm using web2py and find it very nice.
> However, I would like to request a feature: it would be very useful if
> the tickets that are generated when an error happens would not only
> have the call stack
When I shut down my network connection it finally detects that there
was not possible to check for updates, but when I enable my connexion
again, somehow it checks again for updates, and seems to block any
subsequent request to the server
I am sorry if I am wrong, it is my first time using this f
I didn't think we were talking on the app level.
mdipierro wrote:
> I am skeptical about initialization code being initialized by the app
> because it may take time and web server may kill it.
>
> My approach is to create an initialization script in private and run
> it with
>
> web2py -S app -M
Thank you for your comments. Which version are you using?
Massimo
On Jan 27, 10:05 am, hofmanndavid wrote:
> When I shut down my network connection it finally detects that there
> was not possible to check for updates, but when I enable my connexion
> again, somehow it checks again for updates,
I oppose any initialization that is not at the app level. It would
introduces hidden dependencies in the apps.
Massimo
On Jan 27, 12:01 pm, Timothy Farrell wrote:
> I didn't think we were talking on the app level.
>
>
>
> mdipierro wrote:
> > I am skeptical about initialization code being initi
Massimo and Julius,
Thanks for your replies, using the new generic.html pointed me in the
right direction to solve the problem.
Best regards,
Annet.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Fram
I think you're misunderstanding. We're talking about the database
driver code that Bill coded together. This has nothing to do with any
particular app. Rather how and when sql.py starts up.
mdipierro wrote:
> I oppose any initialization that is not at the app level. It would
> introduces hid
well, I just downloaded the latest for windows from this link
http://mdp.cti.depaul.edu/examples/default/download
1.55.2 i think
I have python 2.6.1 installed
On Jan 27, 3:01 pm, mdipierro wrote:
> Thank you for your comments. Which version are you using?
>
> Massimo
>
> On Jan 27, 10:05 am, ho
Yea, I got it. What I did was set up the form to generate unique ids
for every form element being rendered and then in the controller class
I take the number off of variable names so that the SQLFORM doesn't
complain about the form being modified. I am sure there is a more
elegant way to do it;
My original question was about app-level configuration - I maybe
confused things by my post #3. The plugin stuff is really a separate
tho' related thread.
Re Massimo's post re "web2py -S app -M -R private/script.py"
How does this work if you have an instance of web2py with several
active appli
You should be using python 2.5 since 2.6 is not supported although it
should work fine.
I believe what is happening is not that web server is blocking. But
your admin session is locked until web2py can verify the current
version.
Is this when you have no network connection?
Massimo
On Jan 27,
Right now you can run the script manually once for each app.
Massimo
On Jan 27, 12:52 pm, billf wrote:
> My original question was about app-level configuration - I maybe
> confused things by my post #3. The plugin stuff is really a separate
> tho' related thread.
>
> Re Massimo's post re "web
Just a thought - we could hook an application level startup script (or
controller function) into cron. As cron already takes care of cgi/
fastcgi/wsgi/cherrypy, timings and some threading peculiarities it
shouldn't be too hard to integrate. How do you feel about that ?
-1 * * * * * web2py *applic
achipa
sorry that just sailed over my head. how would that work? what could
it do?
Bill
On Jan 27, 7:47 pm, achipa wrote:
> Just a thought - we could hook an application level startup script (or
> controller function) into cron. As cron already takes care of cgi/
> fastcgi/wsgi/cherrypy, timin
I guessing this didn't push anyone's buttons but I thought I'd bring
it to the top of the queue just one more time in case someone could
respond :-) Apologies if this is a breach of forum etiquette.
On Jan 27, 6:52 am, billf wrote:
> 1. The idea of bundling Mail, Auth and Crud in tools.py seems
Hi,
first of all, thank you for web2py. It allowed me to build a simple,
clean webapp without having to read tons of documentation or to think
too much about design/code organization very quickly. I love the
straight-forward, browser-based dev approach, although the admin UI
would probably benefi
yes, why not
On Jan 27, 1:47 pm, achipa wrote:
> Just a thought - we could hook an application level startup script (or
> controller function) into cron. As cron already takes care of cgi/
> fastcgi/wsgi/cherrypy, timings and some threading peculiarities it
> shouldn't be too hard to integrate.
Hi all,
Still a noob here and I have not found any complete examples of using
MSSQL.
I have purchased and downloaded the PDF manual but no help.
I am on a Mac (but use Linux also). I get an error:
NameError: global name 'pyodbc' is not defined
and have installed pyodbc using easy_instal
We have internal cron functionality since not so long ago, which
allows us to schedule execution of 3rd party scripts, web2py
environment wrapped scripts (this is "web2py -S app -M -R private/
script.py" ) and controller functions. Each app has it's own cron
settings (check applications/cron/cront
This sounds like a good solution - I will have a play with it. Being
a bit lazy, what would be the setting for a "run once, straightaway"
entry in the crontab?
On Jan 27, 10:44 pm, achipa wrote:
> We have internal cron functionality since not so long ago, which
> allows us to schedule execution
thanks Massimo - that works.
Previously I had tried db.sales.on(db.sales.name==db.item.name)
(db.user.name=='bob') but it caused an error.
Do you know in what cases this form is allowed?
Baron
On Jan 27, 5:23 pm, mdipierro wrote:
> this should work
>
> db().select(db.item.name,db.sales.price,l
I noticed that the admin error log shows a list of all files in the
errors folder. This is a problem if the errors folder contains other
files such as .svn. (I added the errors folder to my repository
because without it the admin interface throws an error.)
Could this error list be restricted to f
Err, just noted above :) Put the following line in applications/myapp/
cron/crontab
-1 * * * * web2py *applications/myapp/private/script.py
if your startup script is a regular python script OR
-1 * * * * web2py *mycontroller/myfunc
if you want to execute a controller function. The -1 is a clue
Try starting a regular python console and type in
import pyodbc
If this gives an error, there's something wrong with your pyodbc
install (=not a web2py issue). Did easy_install give any errors ? Do
you perchance have multiple versions of python installed ?
On Jan 27, 11:06 pm, kgingeri wrote:
Sorry, I should have mentioned that the normal import works fine in
Python (see ver below).
No errors on easy_install-ing - or when I did the manual install -
'python setup.py install' from the untar'd archive directory.
...here's my /usr/bin results:
$ ls /usr/bin/python*
/usr/bin/python
...on a little further investigation, I found...
KarlsMacBook:~ kgingeri$ l /Library/Python/
total 0
drwxrwxr-x 4 root admin 136 2 Sep 17:17 2.3
drwxrwxr-x 4 root admin 136 2 Sep 17:16 2.5
KarlsMacBook:~ kgingeri$ find /Library/Python/2.3/site-packages/ -name
\*odbc\* -print
KarlsMacBoo
On Jan 27, 12:52 am, billf wrote:
> 1. The idea of bundling Mail, Auth and Crud in tools.py seems
> shortsighted.
remember the purpose of web2py is to bring users up to speed as fast
as possible and make the follow good practice. By providing CRUD with
rola based access control out of the box we
You can do what you ask but please wait one week when web2py 1.56
comes out. It will include new modules Auth and Crud. Once documented
they do what you want and much better than T2.
Massimo
On Jan 27, 3:01 pm, hcvst wrote:
> Hi,
>
> first of all, thank you for web2py. It allowed me to build a
Hi all,
I'm newbie in web2py.
I have several HTML pages, some with multiple form inside one page.
But the basic design are :
1. There is no server side HTML generated.
On client side, only HTML + JS/AJAX .
2. Client only passing GET/POST via form-submit or AJAX or URL to server
3. Server only pa
db(a) is a set
db(a)(b) is a subset
db(a)(b)(c) is a subset of the subset etc.
db(a)(b)(c).select(left=table.on(d)) is a join
notice that table.on(d) is not a set, but a condition (that is why it
is on the right hand side, not the left hand side).
a,b,c,d etc can be expressions like (q1)&(q2)
It should be.
Will fix it.
Massimo
On Jan 27, 5:17 pm, Baron wrote:
> I noticed that the admin error log shows a list of all files in the
> errors folder. This is a problem if the errors folder contains other
> files such as .svn. (I added the errors folder to my repository
> because without i
I am still waiting for a copy of the lastest patch. The one you send
me was rejected because not build against latest commit.
Massimo
On Jan 27, 5:55 pm, achipa wrote:
> Err, just noted above :) Put the following line in applications/myapp/
> cron/crontab
>
> -1 * * * * web2py *applications/mya
Welcome to this wonderful world of Web2Py...
I installed T2 over the week-end through the Administrative console.
>From there I "Upload the application" the T2 tar file and I rename it
as "plugin_t2" and it works fine.
Hope this helped.
Cheers,
Yannick P
On Jan 26, 10:04 am, Yarko Tymciurak
This is a bit too general.
You can make an action like
def mycallback():
# do something with request.vars
# compute r, a response
return response.json(r)
In order to tell you how to propery use validators depends on how you
want the action retrun error messages.
Massimo
On Jan
Bad news:
- Once again, in 2009, PyCon has rejected the web2py talk and web2py
tutorial.
Good news:
- I have been invited to join a panel discussion with Guido van
Rossum on ORM & GAE
- PyCon 2009 registration is based on web2py and T2. It opened
today!!!
https://us.pycon.org/2009/register
Bill.
I like your approach here (despite the fact that this is nothing to do
with the talk on plugins as I define them).
I am trying to understand how extensive is the work you have done
here.
Do you feel this is good enough that it can replace the current
sql.py?
If not, what is missing?
If yes
Hmm ... sorry about that.
Thank you very much for your idea.
But my idea is to use the framework as much as possible, including the
form validation.
This would be decreasing my work load.
Let's get into details a little bit.
I have some table defined in web2py model, including some requirements
Thank you for your reply, Massimo. I look forward to 1.56
Thanks,
HC
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubs
My intention is that all the functionality in the sql.py on which the
code was based (only 3 or 4 days ago) is in the demo version (new
sql.py + plugins). Unfortunately, I can't say hand-on-heart that it
could go into trunk without further testing. Hopefully, if the new
sql.py works for one plug
53 matches
Mail list logo