On May 4, 1:26 pm, canna wrote:
> so how would you share functions between controllers easily? without
> passing global objects to the functions all the time?
Functions in a module should really only have access to identifiers
and namespaces within that module; hence passing "db" as an argument.
On May 6, 7:37 am, Anthony wrote:
> I am brand new to web application development, and I'm looking for a
> good web framework to learn in order to build a new web application
> (sort of a personal task/project management system).
>
> Any insights and advice would be much appreciated. Thanks.
I kn
On May 6, 5:18 pm, Álvaro Justen [Turicas]
wrote:
> So, please, each of you, prioritize your list and show me the top 3
> features you like.
batteries, migration, python-in-templates.
On May 10, 3:15 am, mdipierro wrote:
> What is your impression on web2py on windows?
> Is there any issue that is windows specific?
I use it on Windows. There don't seem to be any platform-specific
issues, and I think it is because python's cross-platform support is
good.
On May 10, 11:09 pm, mdipierro wrote:
> For now let's concentrate on one of them for now. If you have
> developed software in web2py that you use internally in your company
> but you cannot release it open source, would you let us know? Can you
> tell us what is the software for? Could you provide
On May 11, 10:58 am, vihang wrote:
> I am trying to understand the possible performance setback if I try to
> open multiple db connections. Is there some mechanism in web2py which
> would optimizes the number of open connections to the database?
What do your measurements say so far?
On May 11, 11:40 am, Adi wrote:
> Radbox (http://radbox.me) is a video bookmarking service. Its still a
> very young product, but I believe its pretty good at what it does.
Cool!
On May 12, 4:25 am, Miguel Lopes wrote:
Alternatively, instead of this:
> result_list.append(a_str)
>
> # Now you can return the list
> return result_list
one could yield the values:
yield(a_str)
and then whatever other code uses function "check()" can still it
On May 12, 6:11 am, Richard wrote:
> The book was a huge improvement but there is certainly more to be
> done. Unfortunately this kind of work is not fun so happens slowly.
I am happy to volunteer help for documentation. I enjoy improving
documentation.
> Would it be worth migrating useful cont
On May 13, 10:06 am, Benigno wrote:
> We have made an app with web2py to present data from a home-automated
> home as a web service. There is a certain hardware at the home that
> sends all the information that transverses the bus into our server,
> and from there on, we process and present the da
On May 13, 2:24 pm, annet wrote:
> I know web2py can connect to multiple databases, and I wonder whether
> it would be possible to have two db.py files: db1.py and db2.py, where
> db1.py connects to the database containing the first type of data and
> db2.py connects to the company's database. db2
On May 14, 9:24 am, annet wrote:
> Thank you very much for your extensive reply, it's very helpful, at
> least I now have an idea of how to approach this problem.
If you come up with a better way, please share!
On May 14, 10:05 am, Benigno wrote:
> Is there any simpler way or any example of this or something similar
> anywhere that I could use as an example?.
The presence of the "Session ID" in the "response" object is all
handled by web2py. On the client side, whatever tool you're using to
make the HT
On Jun 20, 8:07 am, Binh wrote:
> 4. Controllers don't seem to have a clean way to implement before and
> after filters. Maybe web2py needs to incorporate the idea of
> inheritance controllers like Rails.
Unless I misunderstand some other subtlety, this is exactly what
decorators are for.
On Jun 21, 9:59 am, Stefan Scholl wrote:
> There are (3 month old) comments on those
> pages who address this, but nothing got changed.
I fixed a couple recently. If you send me links, I can try to get a
few more?
> Is there any repository with the source to the book?
The online book is it, AF
On Jun 21, 10:44 pm, Giuseppe Luca Scrofani
wrote:
> But now my question is, I read in
> manual the included wsgi server in web2py it is not intended for
> production use due to lack of configurability. But this for a small
> site make sense?
It depends :)
I run an intranet app serving some tens
On May 1, 1:36 pm, Iceberg wrote:
> please visit:
> http://127.0.0.1:8000
and
> The console output is as usual. But we only get "400 Bad Request"
> fromhttp://localhost:8000
http://mwolk.com/blog/localhost-not-working-but-127001-does/
On Aug 24, 9:00 pm, John Heenan wrote:
> Can't we at least have an acknowledgement that it is not necessary for
> web2py to use a thread per request model and that web2py could instead
> use an event model?
Acknowledged.
On Sep 14, 11:27 pm, NetAdmin wrote:
> I just received the Printed 3rd Edition of the Web2py Manual from
> LULU.com
Your post inspired me to order a copy. Thanks.
On Sep 16, 7:11 am, mdipierro wrote:
> http://web2py.com/AlterEgo/default/show/271
In general, the arguments put forward by critics of web2py are almost
entirely vacuous. The most that can be said of them, I think, is
that as criticism towards web2py increases, that can be taken as an
indicatio
On Sep 16, 1:31 pm, Narendran wrote:
> What does the community
> think of having a stackexchange page for web2py?
Good idea. The StackOverflow model is the future of technical Q&A
forums. I joined and added some good and bad questions.We need
59 more users to join in support.
On Sep 17, 5:00 pm, bally boy wrote:
> I am at this url:-http://127.0.0.1/
There's no place like home :)
Hi
With my editor cap on, I am working my way through the documentation.
The section on lambda, in the python language section of the book,
makes me uncomfortable. It says this:
***
The existence of lambda allows re-factoring an existing function in
terms of a different set of arguments. cache.r
Could I take a crack at editing it? I won't change the book online
directly, I'll mail you the modified markup text directly, to check
with you.
Ok?
On Sep 19, 10:09 pm, mdipierro wrote:
> You are right.
>
> On Sep 19, 2:14 pm, cjrh wrote:
>
>
>
> > Hi
On Sep 19, 10:37 pm, mdipierro wrote:
> You can edit the book online. Just register, than let me know when
> done and I will make you editor.
You have already made me an editor, and I have already made numerous
smaller fixes. This one would have been slightly larger than the
others, which is wh
On Sep 21, 11:01 pm, mdipierro wrote:
> I also also discovered users can vte for Pypi packages. I did not know
> that.
Nor did I. Might be new.
On Sep 22, 11:47 am, ron_m wrote:
> No, I think you are possibly looking at the meaning of record_id in a
> different way than intended.
Documentation edited to be explicit here.
On Sep 22, 7:33 pm, "Martin.Mulone" wrote:
> Tellme what you think
Looks good on Opera 10.61.
The main page:
http://www.web2py.com/
Says, "Runs on Windows, Mac, Unix/Linux, Google App Engine, Amazon
EC2, and almost any web hosting via Python 2.4/2.5/2.6, or Java with
Jython."
The PyPI page, here:
http://pypi.python.org/pypi/web2py/1.85.3
Says, "Platform: CPython/Jython 2.4,2.5,2.6,2.7
Hi
Imagine you have a row of thumbnails in a page, and when the guest
clicks on an image, a popup-like window is opened with a larger
version of the image shown; what is the best or easiest method to do
this in web2py, and does anyone perhaps have experience with one of
the jQuery plugins listed
On Sep 25, 10:23 am, annet wrote:
> compute=lambda r: str(r['selector']) + ' ' + str(r['property'])
>
> is syntactically incorrect. What is the correct syntax?
The syntax of that command, on its own, is correct. Perhaps you can
try dumping the contents of the argument to see whether it contains
Hi Massimo
Is it possible for you to set something up so that I can be notified
by email whenever a visitor to the web2py book leaves a User Comment?
Frequently, these comments point out errors in the documentation. I
would like to fix errors faster, but I don't get around to check the
all commen
Zone Title
{{if 0:}}
{{for zone in zones:}}
{{=zone.code}}: {{=B(zone.description)}}
{{pass}}
{{pass}}
Change the zero ("0") to a one ("1") when you want the code back in.
On Oct 5, 8:50 am, dederocks wrote:
> Hello,
> I wish it were easier to write comments in views.
> Right
On Oct 5, 2:21 pm, Steve Romanow wrote:
> Look for instances of "weigth"
I found only one instance, which I fixed.
web2py on pypy 1.3 appears to work:
1. http://pypy.org/download/pypy-1.3-linux.tar.bz2
2. In a terminal, extract & run "bin/pypy web2py"
It seems to take a long time to start up, and it seems to take a while
to load up the welcome page for the first time too; these are probably
signs of the JIT
On Oct 7, 11:35 pm, mdipierro wrote:
> yes but it has a memory leak because some files are not closed by
> default. It can be fixed.
Yes, of course. I expect that the same problem remains as reported
in the original post. It is just that I didn't see such errors in my
small tests last night.
On Oct 9, 11:35 am, andrej burja wrote:
> hi
>
> in the section about crud
[snip]
Fixed, thanks.
On Oct 11, 4:38 am, mdipierro wrote:
> This all happened in less than 2 months:
Yes, ofc.
OpenSolaris was the first to go. The future of MySQL is looking
suspicious. OpenOffice has already become "Libre Office" as published
by the "Document Foundation":
http://www.documentfoundation.org/downl
On Oct 11, 5:30 am, VP wrote:
> 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.
If your images are stored in 'upload' fields, then they are ind
On Oct 14, 10:53 pm, NetAdmin wrote:
> I'd like to make notes of any typos / errors in my printed edition.
Send me all errors and typos, I'll fix them (almost) immediately in
the online book.
On Oct 14, 10:03 pm, shaun wrote:
> My host does not support the requirements for djanjo so I wondering if
> they will support web2py
The minimum you need is something like Python (pref. 2.5+)
and .htaccess. Apache must have support for FastCGI. There are many
deployment recipes for specific ho
On Oct 15, 1:38 am, DJ wrote:
> Hello web2py people,
>
> I was in a discussion recently telling my friend how great Web2Py was
> for programmer productivity with all the inbuilt features (server,
> CRUD, auth). We were wondering if there was anything similar in Java?
> Quick google search brought
On Oct 15, 2:06 am, Bruno Rocha wrote:
> I tought Python was the language with more web frameworks, but Java wins.
hehe
On Oct 15, 3:17 am, mdipierro wrote:
> I would have sworn this was in the book. Shame on me.
It is now.
On Oct 18, 1:26 pm, David Marko wrote:
> PyScripter seems to be alive again and releasing new
> versions.http://code.google.com/p/pyscripter/
I've been using PyScripter ever since it was a demo app for the Python-
for-Delphi integration components. The best Python editor on Windows,
even though
On Oct 19, 2:37 am, DenesL wrote:
> Looks good. Thanks.
> Any tips on using it with web2py?.
Not much. Edit your files. You get code-completion and method
argument "intellisense" for Python built-ins as well as your own code
in the same file. As you edit, refresh your browser and the changes
On Oct 18, 5:09 pm, "Martin.Mulone" wrote:
> After almost 3 month of heavy development, i think its mature enough
> to move to beta phase. Well for me was a proof of concept, of what can
> i do in web2py, i have to thank to massimo and the community to
> answered my littles questions.
It's very g
On Oct 19, 2:26 pm, DenesL wrote:
> Have you used it to debug a running web2py app?.
No. I tend to use print statements and look at what comes out in the
shell window.
Hi
I have a different layout.html file for each of several different
users, but I need to select and use the right one, depending on on the
user. What is best practice for doing that?Which bit of what must
be substituted where?
On Oct 21, 3:15 pm, mdipierro wrote:
> cp views/plugin_layouts/layouts/.html views/layout.html
Perhaps I am missing something, but surely if views/layout.html is
replaced, it is replaced for all users? I want to show different
users some pages that are generated using a different layout.html
fi
On Oct 21, 4:05 pm, annet wrote:
> if auth.has_membership(group_id=user_x):
> response.view='user_x_view.html'
> if auth.has_membership(group_id=user_y):
> response.view='user_y_view.html'
Ok, but then would do you just keep copies of your view files around,
save only for the line that sp
On Oct 21, 12:56 pm, Bernardo wrote:
> How can I make a files.update_record(processedfile=...???) in order to
> have a valid downloadable file?
http://web2py.com/book/default/chapter/06#Manual-Uploads
On Oct 21, 5:17 pm, annet wrote:
> {{if user_x:}}
> {{extend 'user_x_view.html'}}
> {{elif user_y:}}
> {{extend 'user_y_view.html'}}
> {{else:}}
> {{extend 'user_z_view.html'}}
> {{pass}}
Excellent, yes! I think that is what I want. I'll need to keep the
filename in a variable though.
On Oct 21, 10:03 pm, mdipierro wrote:
> Not sure this works. Does it?
>
> {{extend variable}} works as long as you do not bytecode compile.
I'll give it a try in the next few days and keep you posted.
Interesting comment about bytecode compiling.
On Oct 21, 10:59 pm, pierreth wrote:
> Hello,
>
> Is it possible to add the comment "#...@pydevcodeanalysisignore" in
> future versions of web2py to all the controllers and all the models of
> new applications created by the web2py admin?
You can do it yourself. Something like (untested)
for ro
On Oct 21, 9:30 pm, Yannick wrote:
> In the Memcached section of chapter 11 it said.
Fixed, thanks.
On Oct 22, 11:28 am, Omri wrote:
> Should I write a very general function that basically exposes the
> database to the client side?
Yes
> Should a write many small functions, each
> wrapping a database call (perhaps sometimes also doing some
> calculations in the background)?
No
> Should I opt
On Oct 22, 9:11 am, annet wrote:
> I logged in several times as different users, and it SEEMS to work,
> but only as long as you don't byte compile the application. I don't
> know whether there is a solution for that problem.
Thanks very much for testing this. What I might do is make the if
stat
On Oct 22, 8:21 pm, Jonathan Lundell wrote:
> Thanks, John. I was asking in part because it appears that routes_in might be
> broken for FastCGI and other interfaces that don't provide PATH_INFO. I have
> a patch, but no good way to test it (I don't have a FastCGI environment
> available myself
On Oct 22, 10:06 pm, cjrh wrote:
> routes_in=(('/web2py/(?P.*)','/\g'),)
I should have mentioned that web2py is in a subfolder (called
"web2py") from the document root.
On Oct 22, 9:20 pm, Thadeus Burgess wrote:
> I think we just need one more stage of logo submissions and then voting
> (voting can only happen after the submission deadline), then there is a
> voting deadline.
How is it you all have time to spend on this? Is your employer
hiring? :)
> Where am I supposed to give web2py this password?
Assuming you have SSH or shell access, first run web2py from the
command line directly:
$ ./web2py
It will ask you for a password. After you do that and hit enter, you
can terminate the process. If the parameters file contains 8000 in
the fil
On Oct 22, 10:25 pm, Jonathan Lundell wrote:
> On Oct 22, 2010, at 1:06 PM, cjrh wrote:
>
>
>
> > On Oct 22, 8:21 pm, Jonathan Lundell wrote:
> >> Thanks, John. I was asking in part because it appears that routes_in might
> >> be broken for FastCGI and
On Oct 22, 11:49 pm, Jonathan Lundell wrote:
> Just a reminder: a change to routes.py won't be noticed until you restart
> web2py (or explicitly do a reload).
Yes, I touch the web2py.fcgi file so that Apache restarts the
process. So I assume that the web2py process was restarted. I'd
need to
On Oct 23, 4:43 am, José Luna Venezuela wrote:
> Hi i whant to know what hosting provider offer suport for web2py or i
> need to have a vps if i whant to make a web page?
You can use any (Linux) host that provides:
1) SSH access
2) FastCGI & .htaccess
Many, many hosts provide these. If these t
At the risk of asking a stupid question:
I have a table of links. There is a bit of data associated with each
link. I want to have that bit of data available in the controller
function that is being referred-to in the link, but I don't want to
pass anything to do with that data via the URL.T
On Oct 24, 1:56 am, cjrh wrote:
> My tests below doesn't seem to permanently update the session object
> inside setnum(), even though request.args does contain the number sent
> by ajax.
Ok, I figured out that the $.ajax() call doesn't send a cookie, so the
session object in
On Oct 24, 2:20 am, Branko Vukelic wrote:
> How is the data 'associated' with the link?
Say I have a table of 10 items. In each row, there is a link to the
same URL. However, I want to access row-specific data in the target
controller function, without supplying that data through the URL
itsel
As a side-issue from another post I made recently, it seems to be the
case that when javascript $.ajax() method is executed, and it points
to a controller function, a different session is used in that target
controller function than the original one. This could be because the
session cookie is not
On Oct 24, 10:32 am, Luther Goh Lu Feng wrote:
> I am wondering what are the issues to be considered when deciding where to
> generate a form. Is it better to do so in the controller or in the view?
I am a beginner at web apps, but my feeling is that since forms are
concerned with specific variab
On Oct 24, 11:13 am, cjrh wrote:
> As a side-issue from another post I made recently, it seems to be the
> case that when javascript $.ajax() method is executed, and it points
> to a controller function, a different session is used in that target
> controller function than the origina
On Oct 24, 1:56 am, cjrh wrote:
> Would I have to use javascript?
>
> My tests below doesn't seem to permanently update the session object
> inside setnum(), even though request.args does contain the number sent
> by ajax. Inside showme(), the session value is default onc
On Oct 24, 3:23 pm, Branko Vukelic wrote:
> It might help if you could show us the table. I'm still not sure I
> understand what you're trying to do.
There are three ways (that I know of) to get data to be available in
successive controller functions:
1) Pass it on the URL as arguments
2) Write
On Oct 24, 3:20 pm, Branko Vukelic wrote:
> I just had to smile at this. :) Happened to me so many times before I
> finally learned the lesson.
I am still paying school fees :)
On Oct 24, 4:29 pm, Branko Vukelic wrote:
> Since
> you say the data is already in the table on the page, there's no point
> in trying to hide it, especially since POST isn't really hiding
> anything if someone really wants to get ahold of request data.
The datum in my case is a room rate that a
On Oct 24, 4:43 pm, cjrh wrote:
> So as I said, looks like the safest is for me to simply calculate the
> rate again.
On the server-side, I mean. Dunno if that was clear.
On Oct 24, 4:43 pm, Luther Goh Lu Feng wrote:
> So this will be considered an acceptable violation of DRY?
There is no DRY violation.
On Oct 24, 5:03 pm, Branko Vukelic wrote:
> * Calculated values are shown, and a form with hidden fields and a
> submit button labeled 'Confirm' is shown
The hidden fields still show in the page source though. A smart user
could submit his own set of data if he can see what field id's are
being
On Oct 24, 9:41 pm, Branko Vukelic wrote:
> Oh, so ok, I get what you're trying to do now. Don't pass charge
> amount around. Charge amount should be one-way. You NEVER, under ANY
> circumstances, using ANY technology, expect that amount to come from
> client side.
Yes, I guess that should have b
On Oct 24, 9:48 pm, Brian M wrote:
> How about include all the calculated values in your form and add in an
> additional field that's a HMAC keyed hash of the others using a key
> that only you know? When the user submits, make sure the rest of the
> field values still combine & hash the same way
On Oct 25, 1:42 am, ae wrote:
> Every so often, I have to restart web2py because no threads will
> respond.
Are you working on Windows? Do you send debugging output to the cmd
shell window, and then restore that window to inspect your output?
It could be that that shell window is locking your a
On Oct 25, 4:26 am, Brian M wrote:
> It may not be a
> concern for your app, but it is something to consider.
You raise some very interesting points. I am probably not going to
design anything for these kinds of situations right now, simply due to
lack of time, but I'll certainly keep it in mind
On Oct 25, 9:24 pm, Luther Goh Lu Feng wrote:
> What happens here is that the component that is acquired by LOAD upon form
> submission is still the old set of rows. I spent quite some time figuring it
> out
> unfortunately. Perhaps this point could be highlighted in the book.
I am willing to im
On Oct 26, 4:06 am, "Jonathan Z." wrote:
> Has anyone tried integrating celery with web2py?
Celery looks interesting. If you take a shot at integration, I would
be interested to hear about your experiences on doing that.
On Oct 27, 5:43 pm, VP wrote:
> I saw this marriage between web2py and Flask (a strange one, I'll give
> you that)... but I'm thinking web2py might be able to improve its
> syntax/convention as follows.
>
> Here's Flask:
>
> @app.route('/insertdog///')
> def insertdog(name,owner,age):
> # oth
On Oct 27, 5:43 pm, VP wrote:
> @app.route('/insertdog///')
> def insertdog(name,owner,age):
> # other things
For fun, I tried an experiment with decorators. Hold onto your
seats:
# Simulation of the request object
class R(object):
pass
request = R()
request.args=['caleb', 100]
# A v
On Oct 28, 9:53 am, cjrh wrote:
> On Oct 27, 5:43 pm, VP wrote:
>
> > @app.route('/insertdog///')
> > def insertdog(name,owner,age):
> > # other things
>
> For fun, I tried an experiment with decorators. Hold onto your
> seats:
Naturally, this
On Oct 28, 11:02 am, Vinicius Assef wrote:
> Massimo, I think it can be a good feature, mainly for beginners. But
> only if I don't need to implement my own request object.
No, you don't need to make your own request object, I just included it
here to test my idea in an interpreter window, and th
On Oct 28, 10:39 am, cjrh wrote:
> On Oct 28, 9:53 am, cjrh wrote:
> @validator('/controller_action//')
> def controller_action():
> return f.first_name, f.age
Sorry, this should be:
@validator('/controller_action//')
def controller_action():
ret
On Oct 29, 4:09 pm, baloan wrote:
> 3. In the documentation the archive table is defined like
>
> db.define_table('mytable_history',
> Field('current_record',db.mytable),
> db.mytable)
>
> while in the current version it is defined like
>
> db.define_table('mytable_arcvhive',
> Field('cur
Hi
My new printed copy of the third edition of the book arrived a few
days ago (took almost 2 months to find me!).
Comments:
- It's my first Lulu purchase. The quality is as good as or even
better than expected.
- The new dark default theme for web2py does not reproduce well in the
book. The
Some of the data I return from web2py is unicode. By default, the
text that is return is converted to str:
"Table d'h\u00f4te"
As you can see, the unicode has been escaped. This happens because
simplejson.dumps always returns str. To solve this, I had to do
this:
import gluon.contrib.si
On Nov 1, 11:45 am, cjrh wrote:
> Some of the data I return from web2py is unicode.
Apologies, I meant to specify: using response.json()
On Nov 1, 11:45 am, cjrh wrote:
> import gluon.contrib.simplejson as simplejson
> return unicode(simplejson.dumps(make_result_list(msg_out, rows,
> success)), 'unicode-escape')
This is bad advice, because 'unicode-escape' will clobber all things
that have b
On Nov 5, 8:27 pm, mdipierro wrote:
> plugins = PluginManager
>
> should be
>
> plugins = PluginManager()
Fixed in the book.
Just checked now using Opera 10.61: the code editor doesn't load
properly. It seems all squashed over to the right, or something like
that.
On Nov 8, 6:11 pm, mdipierro wrote:
> You can try it here:
>
> http://web2py.com/demo_admin/default/site
>
> I think Branko did an excellent job!
On Nov 9, 8:38 am, Markandeya wrote:
> Dear Friends at Web2Py,
> i need some resources, books ebooks, tutorials, etc. on how to design
> a database driven web application that will help me with web2py
> development. Any advice will be appreciated.
http://web2py.com/book
Is there a recipe somewhere showing how the binary win version of
web2py is produced? I would like to make my own custom zip for
easier in-house distribution, and using different version of python,
for example.
On Nov 9, 12:16 am, mdipierro wrote:
> This is not the first image I have seen this this format (thin and
> long) but I am not sure I understand what it is intended for.
Beauty. DeviantArt has a great many like this for Photoshop
tutorials, for example.
I would like to make a custom binary distro zip of web2py, using a
different version of python (2.6 or 2.7) and incorporating PIL.
Are there any recipes somewhere showing how to setup the toolchain? I
already know about the file setup_exe.py in the web2py folder, I
reckon that will feature promin
1 - 100 of 328 matches
Mail list logo