Personally I would like to hear more about optimizing web2py for a
production environment. This discussion from a few weeks back covered
many interesting points about migrations, compiling, caching, lazy
evaluation, etc:
http://groups.google.com/group/web2py/browse_thread/thread/dc0376039073e5e2
Hi everyone,
I know if I call my app init that will be the default app.
But can I have the same default app with a name choosen my be??
Not welcome or init, perhaps records
thanks
Carlos Aboim
--~--~-~--~~~---~--~~
You received this message because you are subsc
> > Do I need to create a ID column before?
> yes
> > Can I define another table field as id?
> no
May I ask why this is implemented like this?
For instance in geodata, most data base entries have a unique id
refering to the spatial vector objects.
My current data consits of a list of measuremen
Hi,
Just create the file "routes.py" (there is an example file called
"routes.example.py" that can be copied).
Then edit the routes_in like this:
routes_in = (
('/', '/records/default/index'),
)
That's it.
On Sep 8, 12:52 pm, Carlos Aboim wrote:
> Hi everyone,
> I know if I call my app i
Hi all,
I didn't manage to configure Web2py with this web server (each step
was followed and the only result was directory listing, of course when
enabled).
Here is the configuration file:
server.modules = (
"mod_fastcgi",
"mod_rewrite"
)
...
server.document
hi,
I have an upload form that requires some post processing. For small
text files it is fine, but for larger files (~10 lines) I get this
error after waiting a few minutes:
The proxy server received an invalid response from an upstream
server.
The proxy server could not handle the request P
I setup lighttpd by following this tutorial:
http://web2py.googlegroups.com/attach/e96c0ab84d8e474e/tutorial.htm?view=1&part=2
Keep at it - it took some effort to get working but it has definitely
been worth it!
For another project I have to use Apache and am getting all kinds of
errors atm.
Ric
If you take a look at this thread I posted an example of my
configuration that is working great with webfaction.
http://groups.google.com/group/web2py/browse_thread/thread/25d8ee282ed23af2/5f9dfff0b81ebd29?hl=en&lnk=gst&q=webfaction#5f9dfff0b81ebd29
--~--~-~--~~~---~--
On Sep8, 1:58pm, weheh wrote:
> In my example with 2 tables, table1 and table2, and one form, the form
> only populates some of the fields in tables1 and 2. The rest of the
> fields are ignored (to be filled out at a later date once more info
> has been collected). However, these other fields hav
Hi
It worked very smooth
I am planning to upload my app to GAE, with that change whould run on it?
thank you
CA
2009/9/8 Vidul Petrov
>
> Hi,
>
> Just create the file "routes.py" (there is an example file called
> "routes.example.py" that can be copied).
> Then edit the routes_in like this:
>
>
Dear all,
query = (db.blah == blah )
form = db(query)
return dict(form=form)
I am able to get above "form" output in browser with {{ =form }}.
My form has 100 entries. How to output only the first ten entries in
one page and make the rest appear as links ? ( like 11-20, 21-30... )
Li
Hello Massimo,
On doing that I get the following error in that line:
{{db.delivery.student_id=self.id}}
SyntaxError: Object exists and cannot be
redefined: student_id
However, if I do:
{{db.delivery.student_id.requires=IS_IN_SET([self.id])}}
I get a dropdown to choose student Id, with only
Thanks to the web2py app of jpolite provided by mdipierro, I tested
the jpolite in web2py, please help me solve following issues,
a. login problem.
I put {{if not auth.is_logged_in(): response.write(auth.login())}} in
m101, when I try to log in with existing username and password, I
failed. i can
On Sep 8, 9:22 am, Timmie wrote:
> Hi,
> you already got it: I am not a database architect.
>
> > in this respect web2py works the same as Rail Active Records and
> > Django (if I am not mistaken). This makes life much easier.
> > We are working on a new version of the DAL that will be backward
Windows - source build previous version was 1.46 I think. I use
sqlite for everything (that the DAL talks to anyway) but since these
errors run in tandem, It seems that this may be how sessions are
implemented. It's a little weird because I'm not using database-based
sessions but rather file-ba
Hi,
you already got it: I am not a database architect.
> in this respect web2py works the same as Rail Active Records and
> Django (if I am not mistaken). This makes life much easier.
> We are working on a new version of the DAL that will be backward
> compatible and allow more flexibility.
Glad
Hope this helps:
http://www.web2py.com/AlterEgo/default/show/95
On Sep 8, 9:00 am, vvk wrote:
> Dear all,
>
> query = (db.blah == blah )
> form = db(query)
> return dict(form=form)
>
> I am able to get above "form" output in browser with {{ =form }}.
> My form has 100 entries. How to output
The change you suggest is already in trunk.
About the first error. Which database are you using? Which is the
previous version you were using?
On Sep 8, 9:08 am, Timbo wrote:
> Since upgrading to the new version, I'm getting this error about once
> daily:
>
> Traceback (most recent call last):
Iceberg, thanks for the code snip. Looks slick and could be just the
thing Dr. Zen prescribed to reduce clutter.
I still need SQLFORM.factory because I need to collect info that isn't
going directly into any table but is used to derive some table field
entries. As to whether I really need custom
Dear Sir, I'm able to successfully complete my project with the support
you've given in the form. Our professor suggested web2py for our course
projects and with your help, I've started from nowhere to a state of
creating websites with strong security and nice database design. Thanks for
all th
windows, mac, linux. Can you reproduce this error with trunk?
On Sep 8, 9:13 am, mdipierro wrote:
> The change you suggest is already in trunk.
>
> About the first error. Which database are you using? Which is the
> previous version you were using?
>
> On Sep 8, 9:08 am, Timbo wrote:
>
> > Sinc
in this respect web2py works the same as Rail Active Records and
Django (if I am not mistaken). This makes life much easier.
We are working on a new version of the DAL that will be backward
compatible and allow more flexibility.
If you need to access legacy databases the best way is to create a
d
My mistake:
{{db.delivery.student_id.default=self.id}}
You can make it hidden (I think) with
{{db.delivery.student_id.readable=db.delivery.student_id.writable=False}}
On Sep 8, 9:45 am, Julio Monteiro wrote:
> Hello Massimo,
> On doing that I get the following error in that
> line:{{db.del
On Tue, Sep 8, 2009 at 11:10 AM, Carlos Aboim wrote:
>
> Hi everyone,
> Hoping everything all wright with you all.
>
> How do I call a controller function from one link in another
> controller.
>
> I have 2 controllers: obras and clientes.
>
> I need call a function of clientes, from a link in ob
> for field in db.table.fields: db.table[field].label=field
Yes but the information of which labels where explicity set in the
model (different from the field name) is lost.
This code will set all the labels as the field name.
Well, I'll do it somehow, not a problem. I just don't like that an
eas
Hi everyone,
Hoping everything all wright with you all.
How do I call a controller function from one link in another
controller.
I have 2 controllers: obras and clientes.
I need call a function of clientes, from a link in obras controller.
{{=A('Arquivar cliente', _href=URL(r=request, f='clien
Nothing as long as:
1) you do not use joins in queries
2) you do not user OR in queries
3) you do not use LIKE in queries
4) you do not do date/datetime manipulations in queries.
because these functionality are not supported in GAE.
Massimo
On Sep 8, 8:36 am, Carlos Aboim wrote:
> Hi
> It worke
Since upgrading to the new version, I'm getting this error about once
daily:
Traceback (most recent call last):
File "C:\web2py\gluon\main.py", line 405, in wsgibase
SQLDB.close_all_instances(SQLDB.commit)
File "C:\web2py\gluon\sql.py", line 594, in close_all_instances
action(instance
Are you using the built-in web server? apache as a proxy? apache with
mod_wsgi?
Windows, Linux or Mac? Binary r source?
Massimo
On Sep 8, 8:09 am, Richard wrote:
> hi,
>
> I have an upload form that requires some post processing. For small
> text files it is fine, but for larger files (~10
Thanks, Massimo,
Your first hint worked perfectly, however making it hidden didn't work.
Any other possibility for that?
Cheers,
Julio Monteiro
mdipierro wrote:
My mistake:
{{db.delivery.student_id.default=self.id}}
You can make it hidden (I think) with
{{db.delivery.student_id.readab
I have this line on my view to place a login form on the page at all
times if the user is not authenticated:
{{if not auth.is_logged_in(): response.write(auth.login()) }}
{{pass}}
The problem is, if those two lines are on the view, the login does not
work at all, that is, if i enter ema
try
{{db.delivery.exposes=[...list of field names that should be
visible...]}}
ATTENTION. THIS IS A T3 SPECIFIC ISSUE.
Massimo
On Sep 8, 1:38 pm, Julio Monteiro wrote:
> Thanks, Massimo,
> Your first hint worked perfectly, however making it hidden didn't work. Any
> other possibility for tha
Guesshing without looking at the entire code...
The problem may be that you cannot have to login forms in the same
page (one in layout.html and one in yourview.html). You need to add
some checks to prevent it.
Massimo
On Sep 8, 1:45 pm, eddwinston wrote:
> I have this line on my view to place a
Works perfectly Massimo,
I will try and stop bothering you about old code.
Will probably rewrite the code for vanilla web2py and not T3.
Thanks,
Julio Monteiro
mdipierro wrote:
try
{{db.delivery.exposes=[...list of field names that should be
visible...]}}
ATTENTION. THIS IS A T3 SPECIF
Thanks Massimo,
Your suggestion was perfect, It works fine now. I have been battling
with this for over two days. Thanks
Winston
On Sep 8, 10:00 pm, mdipierro wrote:
> Guesshing without looking at the entire code...
> The problem may be that you cannot have to login forms in the same
> page (o
I coded up Graham's suggestion and submitted it to Massimo as a patch.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe
The saga continues ...
Unused table fields have been turned off. That gets rid of most
form.errors. However, some of the fields are not turned off. Those
fields have default values set in the Field definition. However, I'm
getting error messages associated with those fields. Such as:
Field('myi
any ideas or help?
Frank
On 9月8日, 下午10时49分, Frank wrote:
> Thanks to the web2py app ofjpoliteprovided by mdipierro, I tested
> thejpolitein web2py, please help me solve following issues,
> a. login problem.
> I put {{if not auth.is_logged_in(): response.write(auth.login())}} in
> m101, when I t
Hi,
In my setup I have the following:
ServerName mydomain.com
DocumentRoot /home/myaccount/webapps/apachewsgi/web2py/applications
Order allow,deny
Allow from all
I understand this redirect to myapplication, however, enters in
welcome.
As examples I saw, the configuration wo
Hello for everyone.
I'm new at web2py and I'm trying to do some insertion in a table of my
database. But, after the insertion, I need to get the id value of the
new register. So, I'm using the following code:
myID = db.tl.insert(name = tlName, length = tlLength);
But I was always getting as res
try this config
server.modules = (
"mod_rewrite",
"mod_access",
"mod_fastcgi",
"mod_simple_vhost",
"mod_accesslog" )
$HTT
On 8 sep, 21:11, Arvind wrote:
> Hello,
>
> when i openhttp://music/
>
> the URL bar redirects correctly to this URLhttp://music/welcome/default/index
>
In behavior, when you define music, how? I have it as a regex.
_Rule_
Rule Type = Regular Expression
Regular Expression = music
_Handler_
H
What database? Are you using the shell or is the code in a controller?
On Sep 8, 2:56 pm, Bernardo Botelho wrote:
> Hello for everyone.
>
> I'm new at web2py and I'm trying to do some insertion in a table of my
> database. But, after the insertion, I need to get the id value of the
> new registe
Hello,
> Which version ofcherokeehave?
I run Cherokee web server 0.99.24 (Arch Linux), Port 80
> When I upgraded from 0.99.2 to 0.99.20 did not work. I had to change
> the state of some checkbox in the fastcgi configuration.
>
Now this time, i ran the web2py script as http user like this
sudo
OK, that works (except that there's no ) after the default and before
the requires).
Now I'm on to the next problem:
Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 178, in restricted
exec ccode in environment File "C:/web2py/applications/myapp/
controllers/m
Field('myinteger','integer',default=0),requires=IS_NULL_OR
(IS_INT_IN_RANGE(-10,10)))
On Sep 8, 2:48 pm, weheh wrote:
> The saga continues ...
>
> Unused table fields have been turned off. That gets rid of most
> form.errors. However, some of the fields are not turned off. Those
> fields have de
>>> If you need to access legacy databases the best way is to create a
>>> database view for your table.
>> How do I do this?
>> Can you give an example or reference (to your book)?
>
> No because that is something data is database dependent and not done
> within web2py. I am not an expert on thi
Aside to Iceberg, Massimo's requires clause, which includes the
IS_NULL_OR() condition, has made it possible for me eliminate all my
db.table.field.readable=db.table.field.writable=False statements and
still get the forms to get through to the validation stage. As for
whether they will validate co
So I'm afraid I know my answer but I'll check just to see. I'm
running Windows XP, and Python 2.6 and wanted to try Web2py as I just
recently found it. I've been following the instruction document to
set up Apache 2.2 and Web2py together.
Currently, the Apache server starts and my config file i
which db server are you dealing with?
On Tue, Sep 8, 2009 at 4:11 PM, Tim Michelsen
wrote:
>
> >>> If you need to access legacy databases the best way is to create a
> >>> database view for your table.
> >> How do I do this?
> >> Can you give an example or reference (to your book)?
> >
> > No bec
Here you go:
http://web2py-jpolite.googlecode.com/files/web2py.app.jpolite.w2p
This includes the ajax form fix. Let me know if there are any other
outstanding bugs.
On Sep 7, 11:28 pm, mdipierro wrote:
> You can do that or setup a repository somewhere (google code) and I
> will just link it fr
Python 2.6.1 had errors; you need to use at least 2.6.2;
Anyway, web2py has cherrypy built in, so you should be able to serve just by
running (for example):
python2.6 web2py.py -a 'my_admin_password'
python web2py.py -h
will list other command line options (port 8000 is default, for example).
The key error is:
> [Tue Sep 08 16:01:17 2009] [error] [client 192.168.1.1] import
> _socket
You should reinstall your Python installation. This time use latest
version of Python 2.6 available and ensure that you install it for all
users and not just yourself. That should resolve the issue.
cerrypy is fine for development... www.web2py.py I believe uses the builtin
cherrypy.
For handling volumes of requests you may want to go with alternatives.
On Tue, Sep 8, 2009 at 6:06 PM, Chris S wrote:
>
> I'm using 2.6.2 as my actual Python install. I'm guessing the
> mod_wsgi is compiled f
development and testing and there's no setup needed (which is the
real benefit; just run...)
On Tue, Sep 8, 2009 at 6:35 PM, Yarko Tymciurak wrote:
> cerrypy is fine for development... www.web2py.py I believe uses the
> builtin cherrypy.
> For handling volumes of requests you may want t
I often received that error with sqlite when the server was under
heavy load. My fix was to change to postgres.
Richard
On Sep 9, 1:00 am, Timbo wrote:
> Windows - source build previous version was 1.46 I think. I use
> sqlite for everything (that the DAL talks to anyway) but since these
> e
On Sep 9, 12:06 am, mdipierro wrote:
> Are you using the built-in web server? apache as a proxy? apache with
> mod_wsgi?
> Windows, Linux or Mac? Binary r source?
That is a mod_proxy error, so more likely they are using mod_proxy to
CherryPy wsgiserver.
Graham
> Massimo
>
> On Sep 8, 8:09 a
You need to specify the other controller or it will stay in obras:
URL(r=request, c='clientes', f='insert')
On Sep 9, 2:10 am, Carlos Aboim wrote:
> Hi everyone,
> Hoping everything all wright with you all.
>
> How do I call a controller function from one link in another
> controller.
>
> I h
I'm using apache on webfaction, which runs on Linux with mod_wsgi.
On Sep 9, 12:06 am, mdipierro wrote:
> Are you using the built-in web server? apache as a proxy? apache with
> mod_wsgi?
> Windows, Linux or Mac? Binary r source?
>
> Massimo
>
> On Sep 8, 8:09 am, Richard wrote:
>
> > hi,
>
>
assuming you are running this from the shell, are you calling db.commit
()?
On Sep 9, 5:56 am, Bernardo Botelho wrote:
> Hello for everyone.
>
> I'm new at web2py and I'm trying to do some insertion in a table of my
> database. But, after the insertion, I need to get the id value of the
> new r
I'm using 2.6.2 as my actual Python install. I'm guessing the
mod_wsgi is compiled for python 2.6.1. Are you saying finding a new
mod_wsgi would allow me to run with python 2.6.2?
I can look at the cherrypy but every step of the way the instructions
indicate over and over that Apache would be b
All:
Do you all believe it would be advantageous to the project for people
to add their web2py developed sites to an area of "www.web2py.com"?
The reason I ask this question is because I believe our community
would grow if people could see what folks are doing with Web2Py and
the expertise in our
Would you also send me a screenshot, so I can add it AlterEgo?
On Sep 8, 5:43 pm, "mr.freeze" wrote:
> Here you go:http://web2py-jpolite.googlecode.com/files/web2py.app.jpolite.w2p
>
> This includes the ajax form fix. Let me know if there are any other
> outstanding bugs.
>
> On Sep 7, 11:28 pm
hi, mr.freeze and mdipierro,
could you give me your insight on my post Jpolite testing on Web2py?
http://groups.google.com.tw/group/web2py/browse_thread/thread/5c28475deefbaa6f/aac851e084f95e82?lnk=gst&q=jpolite#aac851e084f95e82
copy as following for your convenient,
"Thanks to the web2py app
Hi Jim -
You might have a look at http://www.web2py.com/AlterEgo/default/show/103
(if you're coming from Rails), or
http://www.web2py.com/AlterEgo/default/show/106 (if you're coming from PHP).
If you want, provide a _small_ example in what you know, and someone here
will show an equivalent idiom
Can you post steps to reproduce this? Which python version?
On Sep 8, 4:43 pm, weheh wrote:
> OK, that works (except that there's no ) after the default and before
> the requires).
>
> Now I'm on to the next problem:
>
> Traceback (most recent call last):
> File "C:\web2py\gluon\restricted.py"
I normally used this;
http://www.appliedstacks.com/PoweredBy/web2py
to track sites.
I invite everybody to submit their sites. For now I will just link
this, then we'll find a better solution.
Massimo
On Sep 8, 7:05 pm, cesmiga wrote:
> All:
>
> Do you all believe it would be advantageous to th
I've done some reading and i notice that running from the shell i should
call db.commit. When i did that, it runs correctly.
Thanks you all!
--
Bernardo Botelho Fontes
bernardo.bote...@peta5.com.br
(21) 9629 1621
--~--~-~--~~~---~--~~
You received this message be
On Tue, Sep 8, 2009 at 7:25 PM, Chris S wrote:
>
> "You should reinstall your Python installation. This time use latest
> version of Python 2.6 available and ensure that you install it for
> all
> users and not just yourself. That should resolve the issue. "
>
> Hu, I just downloaded the Python 2
"You should reinstall your Python installation. This time use latest
version of Python 2.6 available and ensure that you install it for
all
users and not just yourself. That should resolve the issue. "
Hu, I just downloaded the Python 2.6.2 install on this machine
yesterday. I can't imagine it's
db.commit is irrelevant to this question (without commit, you will not
persist the data out to the database - e.g., if you exit a shell, the db
won't be updated).
But the return to a db insert still should return the new ID.
Here's what I get from trunk (you should get something similar with your
I was looking at the article in the Web2py manual concerning CRUD. In
Radrails, cakePHP, etc it is placed in one place and it creates the
CRUD code and forms. I am confused about how Web2py addreses. I
looked thru other posts but I grew more confused.
Jim
--~--~-~--~~~-
I will try to do this but it will take time. Meanwhile, one thing I've
noticed is that if I do a redirect to the same forms page that I'm
processing, that any field-level error messages are no longer
displayed. I know that with the flash, in case of redirect, I need to
do a session.flash instead o
My exact setup is described here:
http://forum.webfaction.com/viewtopic.php?pid=8473
On Sep 9, 9:42 am, Graham Dumpleton
wrote:
> On Sep 9, 12:06 am, mdipierro wrote:
>
> > Are you using the built-in web server?apacheas a proxy?apachewith mod_wsgi?
> > Windows, Linux or Mac? Binary r source?
Well I uninstalled, reinstalled and still no go.
I finally uninstalled Python 2.6 and downloaded 2.5.4 and the mod_wsgi
listed in the manual. Didn't change my Apache config files at all and
bingo everything started right up. I get the Apache page with http://
and the Web2py page with https://.
Frank,
I think you will need to create your own login form that has
class='ajaxform1'. That is how jPolite knows to serialize the form
fields and send them back to the server when you hit submit. I'm not
sure on the other issues. I'm going through the code right now so I
will let you know if
I'm working on it.
On Sep 8, 6:05 pm, mdipierro wrote:
> I normally used this;http://www.appliedstacks.com/PoweredBy/web2py
> to track sites.
>
> I invite everybody to submit their sites. For now I will just link
> this, then we'll find a better solution.
>
> Massimo
>
> On Sep 8, 7:05 pm, cesmi
On Sep9, 10:05am, weheh wrote:
> I will try to do this but it will take time. Meanwhile, one thing I've
> noticed is that if I do a redirect to the same forms page that I'm
> processing, that any field-level error messages are no longer
> displayed. I know that with the flash, in case of redirect
thanks for the update, Chris, and for your notes...
On Tue, Sep 8, 2009 at 9:08 PM, Chris S wrote:
>
> Well I uninstalled, reinstalled and still no go.
>
> I finally uninstalled Python 2.6 and downloaded 2.5.4 and the mod_wsgi
> listed in the manual. Didn't change my Apache config files at all
Hello,
Is there any mechanism for formatting the presentation view of
SQLFORMS that are generated from data models?
For example if I want to have one field size to be half the size of
another one? or if I want to have the size of the field descriptive
text on the left of the field larger so that
HI,
I get an error relating to strftime.
I had date fields in my database, but I wanted to enter old date such
as '1776-07-04' so I changed the fields to text and length of 10.
Then I was able to enter any date.
So I don't have any date fields anymore. But when I try to run a
simple elect all rec
It is likely then that you had some third party Python C extension
modules installed somewhere and which were found and which were
actually compiled for and pulling in the older version of Python DLL.
This could occur if you had custom Python module path defined. There
have also been problems some
strftime() is a method of datetime and your dates are now strings.
You can use strptime() to parse from string to date.
On Sep 9, 3:22 pm, jayvandal wrote:
> HI,
> I get an error relating to strftime.
> I had date fields in my database, but I wanted to enter old date such
> as '1776-07-04' so
There are 2 threads in the WebFaction forum at the moment about
getting better support for web2py:
http://forum.webfaction.com/viewtopic.php?id=3184
http://forum.webfaction.com/viewtopic.php?id=3216
I know quite a few of us use WebFaction, so if you think it's a good
idea add your voice to the th
Is it possible to give the label in the IS_IN_DB function more than
one value?
I mean somthing like this:
...requires = IS_IN_DB(db, 'test.id', "%s - %s" % (db.test.col1,
db.test.col2))
I hope you get what I mean.
Thanks.
Best,
Marco
--~--~-~--~~~---~--~~
You r
Hi,
I am posting what i figure from the cherokee config file.
Somehow, its not working with cherokee. i have spent over a week
trying to figure this out.
also, can you please tell me , what exactly do you start from the
web2py directory after having started the cherokee webserver ?
> In behavi
On Sep 9, 3:59 pm, Richard wrote:
> There are 2 threads in the WebFaction forum at the moment about
> getting better support for
> web2py:http://forum.webfaction.com/viewtopic.php?id=3184http://forum.webfaction.com/viewtopic.php?id=3216
>
> I know quite a few of us use WebFaction, so if you th
Hello,
This might have been an already asked question. I did not find
anything (maybe i am blind), on google search.
the default app server that we run as
[/var/web2py]# python web2py.py
How much load can this handle ? Is it good to run on production
servers with high traffic volume, say, somet
88 matches
Mail list logo