Hi Massimo!
Yes, the problem still persists, it is not possible to import a
package or module from a subdirectory in the controller folder, even
when I placed an "__init__.py file in almost every folder
I still use Web2py for one domain, its just that my boss was not too
happy with the problems
I think the python path in web2py files stould be:
/usr/bin/env python
instead of /usr/bin/python
I make a patch for 796 revision of devel version which correcting it.
You can found it here: http://spof.pl/~virhilo/python_path.patch
Greets
--~--~-~--~~~---~--~~
Yo
Massimo,
> auth.settings.login_url=URL(r=request, c='crudtool', f='index')
>
> after logout it goes to login_url, same with failed requires_login.
The cause of the problem laid elsewhere:
Since I customized the registration process I did not define:
def user(): return dict(form=auth())
ins
Voltron, I do that all the time so something else is wrong. Can you
email be the relevant parts of the app (the imported controller and
the one being imported)?
I do not believe your scaling problem was with the web2py wsgiserver.
If I remember you had more than 100 requests per second on a singl
On Fri, May 15, 2009 at 2:23 AM, Voltron wrote:
> .
>
> I still use Web2py for one domain, its just that my boss was not too
> happy with the problems we had deploying the web2py applications
> (CherryPY server not scaling, FCGI). We are using a PHP framework for
> those domains( 3) instead
>
yep, i told about it:
http://groups.google.com/group/web2py/browse_thread/thread/71bb1897b47c153f/749923b3c7e7d791?q=#749923b3c7e7d791
On 15 Maj, 10:22, virhilo wrote:
> I think the python path in web2py files stould be:
> /usr/bin/env python
> instead of /usr/bin/python
>
> I make a patch for
There is some good discussion (pros/cons) here:
http://en.wikipedia.org/wiki/Env
On Fri, May 15, 2009 at 8:09 AM, Kacper Krupa wrote:
>
> yep, i told about it:
>
> http://groups.google.com/group/web2py/browse_thread/thread/71bb1897b47c153f/749923b3c7e7d791?q=#749923b3c7e7d791
>
>
> On 15 Maj, 10
... the real question is: to what extent does this matter when you are
running:
$ python2.6 web2py.py -a 'hello'
Will any of the headers in these scripts matter at all?
On Fri, May 15, 2009 at 8:34 AM, Yarko Tymciurak wrote:
> There is some good discussion (pros/cons) here:
> http://en.wikiped
put another way, does it make more sense (perhaps) to remove the
"shebang" from the front of the scripts altogether?
On Fri, May 15, 2009 at 8:37 AM, Yarko Tymciurak wrote:
> ... the real question is: to what extent does this matter when you are
> running:
> $ python2.6 web2py.py -a 'hello
On May 15, 1:51 am, weheh wrote:
> Iceberg mentions:
>
> On May 7, 10:12 am, Iceberg wrote:
>
> > So the following trick might be worth looking at. I build another
> > web2py.exe by py2exe, to hide the web2py.exe 's console when running.
> > In this way, it runs almost like a background servic
I am working on a custom crud function.
In my model I have got the following table:
db.define_table('adres',
SQLField('bedrijf', db.bedrijf, default='', notnull=True),
SQLField('adressoort', length=30, default='Vestigingsadres',
notnull=True),
SQLField('straat', length=42, default=''
before form=crud.create():
db.adres.bedrijf.default = auth.user.bedrijf
On 15 Maj, 16:08, annet wrote:
> I am working on a custom crud function.
>
> In my model I have got the following table:
>
> db.define_table('adres',
> SQLField('bedrijf', db.bedrijf, default='', notnull=True),
> SQL
@mgbelisle
Nice solvers.
@Massimo
web2py is (correctly IMO) building request.vars.field as a list from
the three INPUTs, so for consistency I would expect form.vars.field to
be an exact copy after accepts. There is nothing in the w3.org specs
against the use of equally named INPUT controls outsid
I defined a custom user table and created a few users. Then, I created
two groups: core and site, made the users members of these groups and
assigned permissions to the groups. Doing this raised the following
questions:
Is it possible to combine decorators? e.g. executing a function
requires logi
Kacper,
Thanks for your reply, it solved the issue of: onvalidation=lambda
form: form.vars.bedrijf=auth.user.bedrijf returning an error.
What about the other issues?
Kind regards,
Annet
--~--~-~--~~~---~--~~
You received this message because you are subscribed
On May 15, 8:57 am, mdipierro wrote:
> Voltron, I do that all the time so something else is wrong.
Massimo, what is what you do all the time?
import from the controllers folder or import from modules?.
It seems to me that in web2py's design the controllers folders was not
meant for this, it has
On May 15, 9:52 am, annet wrote:
> I defined a custom user table and created a few users. Then, I created
> two groups: core and site, made the users members of these groups and
> assigned permissions to the groups. Doing this raised the following
> questions:
>
> Is it possible to combine decora
I import modules from the app all the time. I normally put them in
modules/ but it makes no difference if they are in controllers/. I
would not do it this way not nothing technically prevents it if you
have the __init__.py file.
You can define forms in modules and they will be visible everywehere
Forget the patch. This is fixed in trunk.
On May 14, 10:48 am, mdipierro wrote:
> OK. can you send me a patch?
>
> Massimo
>
> On May 14, 10:13 am, Álvaro Justen [Turicas]
> wrote:
>
> > On Thu, May 14, 2009 at 11:49 AM, mdipierro wrote:
> > > YES for
> > > self.settings.submit_button
This is not fixed in trunk. Please check. I hope it did not break
anything else.
On May 14, 11:01 pm, "mgbeli...@gmail.com"
wrote:
> Thanks massimo. At your convenience of course. I will usually give
> different names, but the identical field names helped me out in this
> apphttps://www.lemurs
This is fixed too. Can you please check?
Thanks
Massimo
On May 15, 9:20 am, DenesL wrote:
> @mgbelisle
> Nice solvers.
>
> @Massimo
> web2py is (correctly IMO) building request.vars.field as a list from
> the three INPUTs, so for consistency I would expect form.vars.field to
> be an exact copy
I need different application behaviour between instances running on
appengine and running locally.
e.g., I'm embedding the domain name in emails:
either:
http://127.0.0.1:8000/app
or http://1.latest.domainname.com/app
or http://www.domainname.com/app
where in web2py would you recommend I set "
On Fri, May 15, 2009 at 4:23 AM, Voltron wrote:
> Hi Massimo!
>
> Yes, the problem still persists, it is not possible to import a
> package or module from a subdirectory in the controller folder, even
> when I placed an "__init__.py file in almost every folder
I don't understand why you can't im
Please try trunk. I am using that and it works for me.
On May 15, 10:00 am, annet.verm...@gmail.com wrote:
> Kacper,
>
> Thanks for your reply, it solved the issue of: onvalidation=lambda
> form: form.vars.bedrijf=auth.user.bedrijf returning an error.
>
> What about the other issues?
>
> Kind reg
This is there since 1.61.4
from gluon.settings import settings
if settings.web2py_runtime=='gae:development':
pass
if settings.web2py_runtime=='gae:production'
pass
On May 15, 10:41 am, Carl wrote:
> I need different application behaviour between instances running on
> appengine and runni
I replaced the following validators from the table definition:
db.adres.bedrijf.writable=False
db.adres.bedrijf.readable=False
and changed the bedrijf field definition to read like:
SQLField('bedrijf', db.bedrijf, writable=False, readable=False,
default='', notnull=True),
The adres.bedrijf fi
nailed it! thanks
On May 15, 4:50 pm, mdipierro wrote:
> This is there since 1.61.4
>
> from gluon.settings import settings
> if settings.web2py_runtime=='gae:development':
> pass
> if settings.web2py_runtime=='gae:production'
> pass
>
> On May 15, 10:41 am, Carl wrote:
>
>
>
> > I need d
I think you just had a typo. It works both ways for me.
On May 15, 10:54 am, annet.verm...@gmail.com wrote:
> I replaced the following validators from the table definition:
>
> db.adres.bedrijf.writable=False
> db.adres.bedrijf.readable=False
>
> and changed the bedrijf field definition to read l
I have a form to which I want to customize.
def apply_cms():
response.functionname=T('Application form CMS')
response.image=URL(r=request,c='static',f='media/cms/banner.png')
form=form_factory(SQLField('bedrijfsnaam',label='Bedrijfsnaam
*',requires=IS_NOT_EMPTY()),\
SQLField('kvk
Yes, you right some(most) of that files are never executed, them only
used as modules, but another are executed(web2py.py, fcgihandler.py
etc.) so them should have correct python parth in "shebang".
On 15 Maj, 15:39, Yarko Tymciurak wrote:
> put another way, does it make more sense (perhaps
Hi,
I've written application which creates another thread and do things
inside it. But why i can't use ORM in it? I'm using sqlite3 and i
always get:
ProgrammingError: SQLite objects created in a thread can only be used
in that same thread.The object was created in thread id 28329984 and
this is
Answers in text below
On May 15, 11:04 am, annet wrote:
> I have a form to which I want to customize.
>
> def apply_cms():
> response.functionname=T('Application form CMS')
> response.image=URL(r=request,c='static',f='media/cms/banner.png')
> form=form_factory(SQLField('bedrijfsnaam'
in this thread
http://groups.google.com/group/web2py/browse_thread/thread/cca9cf9e5f9176dd?pli=1,
massimo said :
"data should (should?) be transmitted zipped by the web server.
cherrpypy's wsgiserver cannot do it but apache does it. It is not
clear that there is a real benefit since it takes tim
as I mentioned, see the discussion on http://en.wikipedia.org/wiki/Env
using env can lead to right, or wrong that is, what you intended or
not... It is more convenient perhaps for general development use; more
dangerous perhaps for deployment use
we need to think about this I think...
Looks like I finally got it to work, but it took some help from
knowledgable Windows people. I'll try to decipher what happened and
see if there's anything I can report that'll make it easier for the
next person who comes this way.
--~--~-~--~~~---~--~~
You received
Annet,
I suggest you use Firefox with the Web Developer and Firebug add-ons.
With the first one use: outline - outline tables - table cells, to
visualize how the form is structured.
With Firebug, among many things, you can examine any HTML, CSS, and JS
code, and even make changes for testing purp
Yarko,
I think the link you sent made a good point for the switch. So I
changed it in trunk.
On May 15, 12:25 pm, Yarko Tymciurak wrote:
> as I mentioned, see the discussion onhttp://en.wikipedia.org/wiki/Env
>
> using env can lead to right, or wrong that is, what you intended or
> not...
I hit this one a while back; its a limitation of SQLite.
* You could create a new process to access the DB, but that's probably
not very safe (they really mean the Lite part of the name!)
* You could switch to a DB, like MySQL, which does support concurrent
access
* You could have your thread a
This is a bit can of worms.
Not all database divers are thread safe (in the sense that they allows
you to use the same open connection safely in multiple threads).
sqlite is not thread safe and to prevent problems it blocks access
from a different thread than the one that created the thread. The
wsgiserver does not serve zipped pages but:
- if you download web2py apps they are not zipped in .w2p files before
being served (this is a change)
- it does not matter that wsgiserver does not do it since in
production one should use mod_wsgi and that will do the zipping
- It is still not clear to
please do!
On May 15, 12:45 pm, weheh wrote:
> Looks like I finally got it to work, but it took some help from
> knowledgable Windows people. I'll try to decipher what happened and
> see if there's anything I can report that'll make it easier for the
> next person who comes this way.
--~--~-
I did a fair amount of testing on a couple of systems and the numbers
say that in real life, it's quite a significant gain except for some
very specific cases. I'd say the article you quoted concludes the
same. Even if the latency does not improve for ONE client, the next
one will benefit as the *
usually easy to debug: look into the Event Viewer and post the error
log.
carlo
On 15 Mag, 21:12, mdipierro wrote:
> please do!
>
> On May 15, 12:45 pm, weheh wrote:
>
> > Looks like I finally got it to work, but it took some help from
> > knowledgable Windows people. I'll try to decipher what
Except for the web2py-as-windows as service issue, is there anything
else I fogot to fix?
--~--~-~--~~~---~--~~
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@goog
BTW... you can test the latest at
http://www.web2py.com/examples/static/1.62rc2/web2py_src.zip
http://www.web2py.com/examples/static/1.62rc2/web2py_win.zip
http://www.web2py.com/examples/static/1.62rc2/web2py_osx.zip
On May 15, 3:40 pm, mdipierro wrote:
> Except for the web2py-as-windows as ser
Hi, wengfei.
I had the same error message trying to install psycopg2 using
easy_install. I'm using Ubuntu 8.04.
I tried to install some packages, as libpq-dev recommended by Marek,
but other packages were necessary.
Then I installed psycopg2 using apt-get:
$ sudo apt-get install python-psycopg
On Fri, May 15, 2009 at 4:30 PM, AchipA wrote:
> I did a fair amount of testing on a couple of systems and the numbers
> say that in real life, it's quite a significant gain except for some
> very specific cases. I'd say the article you quoted concludes the
> same. Even if the latency does not im
Hi,
New member to the group. I'm wondering if there is any LIVE site is
powered web2py.
Many Thanks.
zy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send ema
These are some public ones that say it
http://www.appliedstacks.com/NewestFirst/web2py
Most deployments are within intranets.
Massimo
On May 15, 9:10 pm, zeya wrote:
> Hi,
>
> New member to the group. I'm wondering if there is any LIVE site is
> powered web2py.
>
> Many Thanks.
>
> zy
--~--~-
I am curious. From the documentation I read on CRUD it appears to
manage everything about a database but creating the database to begin
with.
A) Is that possible with executesql() ?
B) Was there a reason for not providing a createdb() capability?
Thanks.
--~--~-~--~~~
If you use sqlite
db=SQLDB('sqlite://storage.sqlite')
there is nothing to do, web2py will create it.
If you use GAE
db=GQLDB()
also there is nothing to do.
If you use any of the other database engines, the actual database
cannot be created in SQL but using the specific functions (crea
51 matches
Mail list logo