sers being active at the same time. Is
web2py appropriate for this task? If so, can somoeone give me some
pointers on how to set it up?
Thanks
VP
I'm a newbie.
>From the documentation, url mapping is done like this
URL: default/f/a/b
Controller:
def f():
x = request.argument(0) ## a
y = request.argument(1) ## b
Why can we simplify it with this:
def f ( x, y ):
...
such that a and b are automatically assigned to x and y?
well, i should have read this thread before upgrading. Hope to see
1.81.2 soon.
On Jul 16, 8:53 am, "mr.freeze" wrote:
> You can just change line 1401 of tools.py to 'else:' and it should
> work.
>
> On Jul 16, 8:48 am, Narendran wrote:
>
> > Looks like there is no get_user method in default A
I would think the arguments become parameters as mentioned above; and
the variables would become local variables.
automatically.
But therre might be some security problems?
On Jul 16, 11:35 am, Vasile Ermicioi wrote:
> in some cases that would be nice,
>
> but web2py comes with 2 terms : argum
I have a bunch of functions that are not meant to be exposed (via URL)
but rather to be helping out with things (and to be called by
functions defined in controllers). Where do I put these? And how do
I import them into controllers?
I tried to place them in private or modules, but it doesn't see
I think the book needs some work. I'm learning web2py. I like it.
But I feel there are some "mysteries" that have not been explained in
the book. I hope you put a team on the book. Chapter 3 needs to be
thoughtfully expanded.
I saw some usage inconsistencies in examples in Chapter 3, regardin
I'm a newbie, so my questions probably have easy answers, but anyway.
Among a few things, there are two I don't understand and think can be
simplified.
1. this url: app/controller/function/var1/var2
For me at least, most of the time I probably have only one
controller. If there is one control
Wow. Excellent work. And thank you.
This is really nice. Please do more of this.
On Jul 30, 9:35 am, mdipierro wrote:
> http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/
Massimo: when a new version is released, it is the latest in trunk,
right?
Thanks.
On Jul 31, 6:57 am, mdipierro wrote:
> given
>
> db.define_table('person',Field('name'))
> id = db.person.insert(name='john')
>
> You can now do
>
> print db.person(id)
> print db.person(db.person.name=='jo
uild further documentation.
>
> why not support and start an official web2py forum?
>
> 2010/7/30 Jonathan Lundell
>
>
>
> > On Jul 30, 2010, at 7:22 PM, Iceberg wrote:
>
> > > On Jul 31, 1:15 am, Jonathan Lundell wrote:
> > >> On Jul 30, 2010, at 9:19
I have one table called "category", and another table called "post".
When a new post is inserted, I want to increment "count" (an attribute
of category) of the appropriate category.
Unfortunately, I don't know how to access the post object right after
it is inserted to find out which category was
followed the instructions to install it on a ubuntu (10.04) server.
AFter installation, I opened up the link to: welcome/default/index
this is the error:
Internal error
Ticket issued: unrecoverable
==
I couldn't view the ticket on the browser and I have no idea where
that ticket is on the serv
gt; was not storead anywhere.
> Make sure the user who runs web2py has permission to write into the
> web2py/applications" folder. If you run as www-data
>
> cd web2py
> chown -R www-data:www-data applications
>
> Massimo
>
> On Sep 3, 11:43 am, VP wrote:
>
> >
;prototype" mode with sqlite, built-in server
(rocket), or
2. These small images are being streamed simultaneously. I don't know
if this makes a difference, but I'd prefer these images are "static",
not streamed. But I don't know how to do this in web2py.
Any idea?
Thanks.
VP
These images are stored in "upload" (not a blob) and I did not set
authorize!=None.
I am supposing that this has to do with the built-in server streaming
multiple images at the same time?
(I also notice that the problem seems to be worse (slow loading) with
Safari than with Firefox).
Thanks.
To follow up on this...
(1) To recap, I have a dozen of thumbnails of sizes ranging from 5kb
to 15kb on one page (a gallery type of things). Observed occasional
slow rendering of the page, on local server.
(2) I think this slowness has to do with rocket server. After trying
on another server wi
I looked at the youtube video... One comment, the music is very
distracting.
Another comment is that cache.ram (both controller and view)
doesn't seem to improve that much (in this particular case).
Is there a way to compile apps manually (instead of through the admin
interface)?
Thanks.
thank you. I think many of us can use this tip. Many of these tips
should be archived somewhere.
The way I did this is through Apache, by adding
ServerName domain.com
ServerAlias *.domain.com
to the web2py configuration section in site-enabled/000-default
Which one is more preferable? pros and cons?
Thanks.
2, "mr.freeze" wrote:
>
> > from gluon.admin import app_compile
> > errs = app_compile('myapp',request)
> > if errs:
> > response.flash = 'There were errors'
> > else:
> > response.flash = 'Application compiled'
deploying web2py has given me headaches...
(1) can't get admin to work (I think SSL was configured properly)
https:///admin/... gives this Apache error:
[Thu Oct 21 23:14:12 2010] [error] [client 141.225.9.126] Daemon
process called 'web2py' cannot be accessed by this WSGI application: /
h
hi everyone: a little update.
Problem (2) is my mistake, not web2py. It's a logical mistake by
which I redirect to "index" in an infinite loop (so to speak). This
error occurred when the put it a new database (mysql or postgres),
which led me think initially it was a database configuration mistak
thanks. That works, but with a little tweak.
I copied that file to parameters_433.py (as that's the SSL port).
This worked.
Thanks.
On Oct 22, 3:16 pm, cjrh wrote:
> > Where am I supposed to give web2py this password?
>
> Assuming you have SSH or shell access, first run web2py from the
> comma
Can Massimo or someone clarify if this tip will result in web2py
serving static files or Apache serving static files?
Is this a "production" (high-performance) set up? The assumption "one
domain per app" appears to suggest that this is a production set up.
Yet, Massimo mentioned in an early tip s
; In this case you would need the virtual hosts for the different apps.
>
> On Oct 24, 1:18 pm, VP wrote:
>
> > Can Massimo or someone clarify if this tip will result in web2py
> > serving static files or Apache serving static files?
>
> > Is this a "production"
Thank you Massimo. Your script as is didn't work for me (I use debian
lenny). Apache complained about not recognizing virtual hosts and
that there was a duplicate of the wgsi deamon (I suppose only one
deamon should be named web2py). I had to modify it to make it work.
(But still not desirable,
What works is that http://domain1.com will map to app1 as intended.
What doesn't work is that app1/default/f/a/b is not mapped to f/a/b or
vice versa. This is ugly.
Can you show me how to get rid of "app1/default"?
Thanks.
Update:
if the function has no arguments, it works. I.e.
http://domain.com/app/default/f
gets mapped correctly to http://domain.com/f
But if the function has arguments, it did not work for me. I.e
http://domain.com/app/default/g/a/b does not get mapped to
http://domain.com/g/a/b
PS:
I got
Great. It appears to be working as intended now. Thanks.
On Oct 28, 1:53 am, cjrh wrote:
> On Oct 27, 5:43 pm, VP wrote:
>
>
> def insertdog():
> name, owner, age = request.args
>
> I am unconvinced the other way is better.
I haven't tested this, and correct me if I am wrong but this is
equivalent to
name, o
I can't seem to set up multiple processes, multiple threads.
Here's the apache2 setting:
WSGIDaemonProcess web2py user=username group=username \
display-name=%{GROUP} processes=3
threads=10
I have a controller that is computing intensive, taking at least a
minute to
Something like this: http://web2py.com/book/static/
book_images_png/mywiki_show.png">?
http://web2py.com/book/static/book_images_png/mywiki_show.png
(Chapter 3, the wiki app tutorial)
On Oct 30, 7:37 am, Ole Martin Mæland wrote:
> Hi,
>
> I am new to web2py and I am trying to learn via doing.
I'd think either in web2py root or web2py/applications/yourapp.
On Oct 30, 9:28 am, Francisco Costa wrote:
> I really would like to protect a website content with a .htaccess
> password file like this
> onehttp://www.elated.com/articles/password-protecting-your-pages-with-ht...
>
> I just don'
I have this problem that I think is related to threading and web2py.
I have an apache2 standard setup with web2py.
One of the function (in controller) is computing intensive, taking up
to 10+ seconds to execute. When this function is called (i.e.
http://domain/app/func), the app is locked up. O
t access other actions until his session is
> unlocked. You can do this manually in th long running action
> (session._unlock()) assuming it does not save anything in the session.
>
> On Nov 10, 11:54 pm, VP wrote:
>
> > I have this problem that I think is related to thread
Session locking is the problem.
session._unlock(response) seems to fix this.
But i'll consider the background process option (as of now , it's more
convenient for me this way).
Thanks.
ght?
On Nov 11, 12:38 am, mdipierro wrote:
> web2py opens it anyway because it is in the model.
> You can force a release
>
> DAL.close_all_instances(DAL.commit)
>
> at the beginning of your long action. should work
>
> On Nov 11, 12:12 am, VP wrote:
>
> > Didn
>experts4solutions is not a discussion group and will not affect this
mailing list.
I truly hope so. Currently, the book and this mailing list are two
sources for learning about web2py. I hope this new venture is not
diminishing future improvements of both of these.
Have you tried apache bench (ab)?
> ab -kc 100 -t 30 http://example.com
this would bombard your site for 30 seconds with 100 connections.
On Nov 12, 2:01 am, Luther Goh Lu Feng wrote:
>
> Quick question: is there a way to simulate a stress test to find the
> upper limits of performance without
I am wondering if it is feasible and even easy to incorporate
something like RPyC into web2py. Ideally, I would like to have an
app calling a web2py app located in a different server without too
much hassle (web2py taking care of the technical details).
Can we have this feature in web2py? :-)
Unless you have migration set to False, these things should be
automatic.
On Nov 18, 1:53 pm, Lorin Rivers wrote:
> My database is PostgreSQL
>
> I have tables defined in my ../models/db.py
>
> Now I want to add some fields to one of the tables defined there. The table
> has data in it already
I think .NET and web2py are not competitors. They are different ball
games. When things scale large, everything is important. A small
design issue might be magnified. I don't think web2py is proven yet,
in terms of scalability. What web2py needs is at least one real
example to show that it i
Try this.
Let's say the textarea field is "the_text".
if 'the_text' in request.vars:
your_form.vars.type = process(...)
if your_form.accepts(requrest.vars, session):
# do your things
On Nov 30, 10:59 am, hswolff wrote:
> I'm developing an application with web2py that asks a user to submit
sions to be achieved in future releases of
web2py.
On Nov 30, 6:07 pm, Stef Mientki wrote:
> On 30-11-2010 21:08, VP wrote:> I think .NET and web2py are not competitors.
> They are different ball
> > games. When things scale large, everything is important. A small
>
While he's very knowledgeable with web2py, I think John Heenan's
criticisms are unfair. From what I understand, it seems most other
recognizable Python frameworks employ WGSI. So this problem (if
there's a problem), is not unique to web2py. Comparing web2py to
Erlang is curious.
I am a newbie,
somehow onvalidation seems to work on create but not on update/edit.
I have something like this:
def edit_entry():
form = SQLFORM(db.entry, request.args(0))
if form.accepts(request.vars, session, onvalidation=func):
## blah blah
The function "func" apparently is not called at all
latest version. THere are no form errors.
On Dec 1, 11:02 pm, "mr.freeze" wrote:
> Can you verify that there are no form errors? Currently if there are
> any form errors, onvalidation will not run. Also, what version are you
> running?
>
> On Dec 1, 10:53 pm,
I have observed a strange behavior of web2py (recent versions) that I
have no clue what it is.
The behavior is that sometimes when I submit a form, nothing happens.
No errors. Nothing. The fields are cleared. So I would have to fill
in the fields one more time. Another user also experienced the
I'd like to use FORM(...) to create forms with radio boxes, drop-down
options, etc. But I can't find any document on how to do this.
For example, if I'd like a drop-down option for 'red', 'green',
'blue', how do I do this using FORM?
Thanks.
7;,
> 'green', 'blue']) instead of requires=IS_IN_SET(['Non-Fiction',
> 'Fiction', 'Childrens'])
>
> Hope this help!
>
> Richard
>
> On Sat, Dec 4, 2010 at 6:23 PM, VP wrote:
> > I'd like to use FORM(...) to create
I have this simple form. Lately, I've got this very strange problem.
Occasionally, after I filled out the form and submit. (See code
below). The form did not get submitted. Every field is clear.
There're no errors (instead the "else" is entered with the message
"please fill the form".)
I can't
ued when the problem
> appears.
>
> On Dec 4, 9:59 pm, VP wrote:
>
> > I have this simple form. Lately, I've got this very strange problem.
> > Occasionally, after I filled out the form and submit. (See code
> > below). The form did not get submitted. Every fiel
When there's no problem (don't know when it will show up), this is
what is shown:
request.session_id is None
response.session_id is not
what do you meant by "see if they match of a new session is issued
when the problem appears."?
On Dec 6, 6:35 pm, mdipierro wrote:
> Here is some more info about the new DAL
> http://web2py.com/examples/static/new_dal_help.pdf
>
Should class Query have been called class Filter?
just curious.
My understanding is this. The apps that you develop with Web2py does
not have to be GPL, and can be licensed in any way you want. (I am
unsure if this violates GPL's terms or not, but this is what I think
how web2py's licensing permits).
What is GPL is the web2py framework itself. So, as long
While I don't necessarily advocate for changing web2py's license, I
think it's important to clarify the issues surrounding the license so
people are clear.
The question is "can a web2py app be not GPL when the framework is
GPL?". I don't think it's as clear cut as someone might suggest. At
least
I think generally there are 2 things: (a) taxonomy and (b) folksonomy.
Taxonomy is a controlled vocabulary which can only be modified/added
by a group of people with special privilege.
Folksonomy, commonly called "tags", is not centrally controlled.
Anyone who can create content and add new terms
I am happy with what Massimo intends web2py's license to be. I think
a lot of people are too. App developers should not have to worry
about the licensing issues. I think the license should be precise and
concise. Further because it combines two types of licenses into one,
it should not be contr
I do not think that GPL is the determining factor of why Django or
Rails are popular.
It is not clear that GPL scares off potential users. I will go out
on the limp to say that most potential users of web2py will be in the
capacity of app developers, not framework developers. They might be
scare
http://web2py.com/book/default/chapter/07?search=IS_UPLOAD_FILENAME
On Dec 21, 7:02 am, pk wrote:
> hi,
>
> how can i realise this?
>
> thanks
> peter
In my humble opinion, the word "Enterprise" demands a more systematic
approach to dealing with this issue. I think the simplest way is
perhaps has a numbering scheme that is understood by everyone. For
example, increment the third number (e.g. from 1.90.2 to 1.90.3) only
for bug fixes, and increm
I've supported web2py for a long time. But I think it's time to
rethink about PR. Frankly, I think this Flask/Django business is a
distraction. I think Massimo should completely ignore and do not say
anything about Flask or Django.
On Dec 23, 3:44 am, Branko Vukelić wrote:
> Or am I missing something?
>
> In the summary, also no mention of Django or Flask.
>
My comment is not just about that specific thread of discussion, but
about a general PR strategy of web2py. My suggestion to Massimo
still stands. Forget about Fl
I am also satisfied with the release mechanism, but I'm working on
small apps. If something goes wrong it's not the end of the world for
me right now. But I think there are at least 2 reasons why this
issue should be taken seriously. One is that the word "Enterprise"
must be taken seriously (it
I'm using the ajax search found here:
http://web2py.com/book/default/chapter/03?search=ajax+search
This works fine when the search form is embedded on a page like
this: http://mydomain.com/some_controller
but I want to place the search form on a page with other things,
including passing argume
I am having the exact problem as this:
http://groups.google.com/group/web2py/browse_thread/thread/9707f3d66d859893/5785831e673afd2b?lnk=gst&q=ajax+search#5785831e673afd2b
Right now, i'm testing a simple search page, with nothing but the
search form and div to display the result.
http://mydomain.c
as in that thread applies: I cannot tell without
> looking at the code.
> I suspect some {{=URL(...)}} is missing when specifying the action.
>
> On Dec 25, 3:09 am, VP wrote:
>
> > I am having the exact problem as
> > this:http://groups.google.com/group/web2py/browse_thre
of course, layout.html is web2py's base template, unmodified. I think
this is a bug.
2b%3Flnk%3Dgst%26q%3Dajax%2Bsearch%235785831e673afd2b&usg=AFQjCNFTj0Hph4zaLwY0_jVOS6BJwcoj6w
On Dec 25, 1:33 pm, mdipierro wrote:
> please explain more.
>
> On Dec 25, 12:07 pm, VP wrote:
>
> > of course, layout.html is web2py's base template, unmodified. I think
> > this is a bug.
>
>
I have been able to duplicate this error with latest version of web2py
(1.91.4) and the exact wiki app in Chapter 3 of the book.
To recap, if you use the ajax search recipe described in Chapter 3,
you can not have a trailing slash (bug described above). This means
no arguments are can be passed t
I think it's likely that this is the same bug reported by
http://groups.google.com/group/web2py/browse_thread/thread/9707f3d66d859893/5785831e673afd2b?lnk=gst&q=ajax+search#5785831e673afd2b
If true, it's interesting to note that this bug has lived for almost 2
years; possibly more.
7;target');")),
target_div=DIV(_id='target'))
On Dec 26, 11:51 pm, mdipierro wrote:
> It is not a bug. The URL is incomplete
>
> ajax('{{=URL('add_issue_find')}}',['keyword'],'target');")
>
> On
ord',
> _onkeyup="ajax('%s',['keyword'],'target');" %
> URL('bg_find'))),
> target_div=DIV(_id='target'))
>
> On Dec 27, 12:03 am, VP wrote:
>
> > Just plug it in. Doesn't seem to
I just upgraded to 1.91.4 (probably should have waited). I don't know
if this is related to 1.91.4 but I don't recall having this problem
with 1.90.x
Anyway, I have a table with a boolean field. In the model definition
(db.define.), it is set with default=False and writable=False.
With the
For what it's worth, here's my 2 cents:
I think the concern that web2py is a one-man framework and how the
makes enterprises (big guys) adopt web2py is a valid concern.
Although in theory, people can simply fork web2py when Massimo no
longer commits to the project, for whichever reason, from a
bys
I love the fact that if I have a problem with web2py and asked a
question, Massimo will likely answer it. But the perceptual problem
of web2py is a single-person effort is real. Massimo fixes most of
the bugs (it seems so). Massimo is mainly responsible for PR.
Massimo is in charge of experts4so
>>Then maybe a bit of info around massimo being the BDFL (python/linux,
>> benevolent dictator for life) being out there might work. As said before,
>> seems very much like a perception problem rather than something that will be
>> solved via some sort of company or group running things rather th
I think it'll be convenient for multiple users to work on one web2py
installation, if there's a layer on top of the admin app, providing
the following features:
1. The admin app allows user registration.
2. Each user can view/edit only apps that he/she creates.
This is strictly at the (admin) ap
In controller/default.py:
def show_item():
return dict( items = items)
In the view/default/ directory, we have different views. For example:
view/default/show_item.html< default
view/default/show_item.ipad.html < to be called if the user agent
is an iPad
view/default/sh
Questions:
1. Shouldn't app1 or app2 be one of the 5 apps specified in
"applications"?
2. Does this (controllers = ['myctlr', 'ctr']) all apps (app1, app2 in
particular) must have 2 controllers named "myctlr" and "ctr"?
On Jan 3, 8:28 pm, Jonathan Lundell wrote:
> The new URL routing facilit
Thanks.
On Jan 3, 10:33 pm, Bruno Rocha wrote:
> I already do something like this.
>
> if 'iPad' in request.env.http_user_agent:
> response.view = 'default/mobile.html'
> elif ...
> elif...
> else...
>
> 2011/1/4 VP
>
>
>From a practical point of view, I think it's not cost effective to
give one web2py clone to each user. The reason is each web2py clone/
process takes a decent chunk of RAM.
On Jan 3, 10:43 pm, Graham Dumpleton
wrote:
> Use daemon mode of mod_wsgi. Have a daemon process group per user with the
>> One more caveat. For security, the first user is the teacher and
>> registration is enabled by default.
I haven't tried this, but will soon. One question: Would the password
of the first user be the same as the password given to web2py?
Thanks.
Okay. Thanks.
On Jan 4, 11:13 am, David Bain wrote:
> VP,
> No the password is the password that the first user signs up with.
>
> On Tue, Jan 4, 2011 at 12:10 PM, VP wrote:
>
> > >> One more caveat. For security, the first user is the teacher and
> > registrati
Upon thinking about this, I think your solution will address the base
layout, from which each view extends. Right?
What I want is that there are different views for (for instance) each
function
+ Index: view/default/index.html, view/default/index.ipad.html, view/
default/index.mobile.html
+ Sh
While this is intended to simplify the current specifications of
routes.py (I think), what I have seen is more confusing to me. Does
this replace the old routes.py?
Maybe, can you provide examples of typical use cases? For example,
one VPS account, each domain mapping to each app. Anything else
Drupal is a Trojan horse. Don't go there.
On Jan 6, 7:21 pm, Luther Goh Lu Feng wrote:
> Even though it is in php, with the release of Drupal 7, I am tempted
> to give it a spin just to see what's the fuss all about. Drupal seems
> extremely popular, looking at some of the well known organisati
Jacobian made a few bogus statements. One is about imports.
In fact, you don't need to import anything to use Python globals or
primitive data structures. Why? because those primitives structures
are so useful and often used that they are automatically imported for
use.
This is conceptually si
view.
On Jan 7, 2:03 am, cjrh wrote:
> On Jan 7, 9:59 am, VP wrote:
>
> > Drupal is a Trojan horse. Don't go there.
>
> What's the enemy hiding inside? PHP?
app = b.split('/')[1]
routes+=[
('.*:https?://(www\.)?%s:$method /' % a,'%s' % b),
('.*:https?://(www\.)?%s:$method /$anything' % a,'%s/
$anything' % b),
('.*:https?://(.*\.)?%s:$method /static
sorry that was copy&paste mistake. Here it is:
try: config=open('routes.conf','r').read()
except: config=''
def auto_in(apps):
routes=[
('/robots.txt','/welcome/static/robots.txt'),
('/admin$anything','/admin$anything'),
]
for a,b in [x.strip().split() for x in a
very
well.
On Jan 7, 10:48 am, Jonathan Lundell wrote:
> On Jan 7, 2011, at 8:40 AM, Luther Goh Lu Feng wrote:
>
>
>
> > On Jan 7, 6:37 pm, cjrh wrote:
> >> On Jan 7, 10:27 am, VP wrote:
>
> >>> But as you go deeper, trying to add features, it will be s
It is something like this:
example1.com /app1/default
example2.com /app2/default
example3.com /app3/default
On Jan 7, 11:17 am, Jonathan Lundell wrote:
> On Jan 7, 2011, at 12:34 AM, VP wrote:
>
>
>
> > sorry that was copy&paste mistake. Here it is:
>
> Tha
> > On Jan 7, 2011, at 12:14 PM, VP wrote:
>
> >> It is something like this:
>
> >> example1.com /app1/default
> >> example2.com /app2/default
> >> example3.com /app3/default
>
> > In that case:
>
> > routers = dict(
> >
Without actually trying it, but it still seems the cause for memory
leak of (A) and (B) is different. (B) is a case of circular reference,
and as such reference counting garbage collection (cpython) will fail
to work properly.
But (A), which is the leak in web2py, does not seem to related to
circu
We occasionally got an Apache error so the page didn't get displayed.
So I decided to stress test using Apache Bench (ab). It seems the
site suffered failure up to 50-100 concurrent connection.
Apache error log showed this error:
>>Premature end of script headers: wsgihandler.py
After diggi
d party C extension module
> for Python that is not safe for use in sub interpreters.
>
> So, ensure sqlite is up to date. And ensure that you have:
>
> WSGIApplicationGroup %{GLOBAL}
>
> in configuration to force use of main interpreter.
>
> Graham
>
> On Sunday, J
1 - 100 of 334 matches
Mail list logo