to
uncover ;)
Chris
On Saturday, March 30, 2013 3:29:48 AM UTC-4, BlueShadow wrote:
Hi,
my admin/design is very slow (over 12 seconds) and my app isn't that big.
9Models,
2 Controllers (1 with 33 functions, 1 with 11),
44 views,
I don't use the language files but all from the welcome app
Hello,
I have a form that looks like this:
{{top_login_form = auth.login(next =
page_currentPath_get(request))}}
{{top_login_form.elements('form')[0]['_class'] = 'login_form'}}
{{=top_login_form.custom.begin}}
Trouble is, auth.login calls SQLFORM and sets
))
}}
{{=top_login_form.custom.begin}}
On Wednesday, February 27, 2013 4:25:16 PM UTC-5, Niphlod wrote:
your own template instead of the standard one defined in
views/default/user.html ?
On Wednesday, February 27, 2013 10:20:26 PM UTC+1, Chris wrote:
Hello,
I
reason, but I'm not sure. Would it be possible to add __delitem__
in, to correspond with __setitem__/__getitem__?
Thanks-Chris
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group, send email to
web2py+unsubscr
That explains it then. I put in a test comment before creating the first
user account.
I'll just purge that account. Thanks!
On Jan 6, 2013 3:28 PM, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
{{=comment.author.first_name}}
is correct but:
1) fails if some records have comment.author
On Thursday, October 22, 2009 3:34:03 AM UTC-4, SergeyPo wrote:
Yes I was running two different applications, and that's what wondered
me - why different apps (actually two different python web2py
processes) affected each other.
The issue may be the (internal) application name you are
Your layout
.../en/about ... seems very logical to me. I would go with that.
As far as translating longer blocks of text such as a blog entry, why not
use a language indicator in your database table for each entry. For example
lang == en
title == 'My title'
blog_entry == my entry
then for
On Thursday, December 13, 2012 12:11:06 AM UTC-5, Jonathan Lundell wrote:
...
What are we really trying to accomplish here? Ordinarily, static requests
a) won't be handled by web2py at all; they'll be intercepted by the server,
and b) they'll be references to resources embedded in a
1.99.7, running from source on Red Hat EL 6
--
Looking at one of my test servers, I've seen some odd names for
web2py-generated error files in the app's .../errors directory.
The typical error file name looks like:
127.0.0.1.2012-12-06.05-16-30.10bd4bdb-ea6d-4c43-a062-0bec4abb43b2
where the 3 segments are (requester's IP address).(request
Tried a few different approaches; the best
was
http://stackoverflow.com/questions/1100343/apache-redirect-from-non-www-to-www
In an Apache config file, e.g. /etc/httpd/conf.d/default.conf for CentOS
users --
##
## with www
VirtualHost *:80
ServerName www.something.com
... lots of
Thanks, that is a really helpful explanation.
--
On Sunday, December 2, 2012 10:20:28 AM UTC-5, dlypka wrote:
One GOTCHA I found with WING IDE is that you must delete all .pyc files
before running, in order to have it correctly
stop on your breakpoints in non-module code, in the case where such .py
source has been subsequently modified
On Friday, September 9, 2011 9:17:12 AM UTC-4, kachna wrote:
I made some investigation and here is results.
1) routes_onerror do not work with static files. It is cased by
lines 488 and 489 in gluon.main
if static_file:
return
On Sunday, December 2, 2012 8:41:49 AM UTC-5, Anthony wrote:
Also, note that your solution will work specifically when using the
generic.json view because that view does not require any of the
response._vars values to be added to response._view_environment (because
the view processes
On Tuesday, April 5, 2011 1:08:54 PM UTC-4, VP wrote:
My question is: in your locking policy above, what's the purpose of
locking at all?
If you don't lock during writes (e.g. when updating the counter), two
writes might happen simultaneously and cause inconsistent results.
There are
=dict(status='200 OK'))
requesting ...test.json creates an error file in my app/err folder
Traceback (most recent call last):
File /Users/chris/dev/hsmaster/web2py_v1.99.7/gluon/main.py, line 508,
in wsgibase
serve_controller(request, response, session)
File /Users/chris
That name is probably a reserved word in the database engine you're using.
Every DBMS has a list of words that are off-limits for use as object
(table, field, index, function etc.) names. GROUP is a pretty common one
because of the GROUP BY operation. Take a look at gluon /
Since my original post, I've found a way to use Wing IDE reliably for
remote servers.
If anyone has need of this, write back and I will post the details.
On Friday, June 8, 2012 11:44:33 AM UTC-4, Chris wrote:
Wing is indeed a great tool. I use it for local-machine debugging all the
time
Thanks, that works really well.
On Saturday, August 27, 2011 2:55:01 PM UTC-4, nils wrote:
Hi Chris,
I do this ssh -i key.pem -L 8000:localhost:8000 root@amazon-Ec2-VPS
I then run on the amazon instance ./web2py -a password
You can then access web2py via http://localhost:8000
I have an Apache-WSGI-web2py configuration that is working well.
Now I would like to add the behavior that requests on the bare domain
(something.com/what/ever) is rewritten to use www
(www.something.com/what/ever). In a generic Apache setup, this is easy
using a rewrite condition + rewrite
The main problem is that the truncation is done silently. In my case, we
were creating new data models with fields like string(1000) and just
recently a team member noted the result in the database was varchar(255).
It violates the principle of least amazement :) that a directive to
create
database. But changing just the
password? Should not change the underlying identity of the database
connection or database object definitions. (In my view of the world.)
What do you think?
Cheers
-- Chris
--
I've found what seems a simple way to let multiple apps share a DB and
create the same table definitions without conflict. Chris, you may find
this useful and also I'd love to hear from the true experts if there are
problems with this approach. (It works for me but maybe there are other
Any further suggestion to what causes the error I'm seeing? Thanks!
I really need to see the models where you set IS_STRONG.
Somehow the value passed to the validator is not a string so the validator
chokes. This can be fixed in IS_STRONG.__call__ by setting value =
str(value) but I would like to understand why it is happening.
Sure, this is the
which web2py version? Do you have a custom auth_user table? Looks like
something wrong with the list of validators for a field containing the
IS_UPPER validator.
This is on 1.99.7 stable. I do have two extra field to the auth_user table,
and use a custom name instead of 'auth_user', but
No, because the layout already includes a head section. The content of
the view gets inserted in the layout.html file at the point of the
{{include}}, which presumably is not in the head.
The layout also include a body section, does this mean that in my custom
view I shouldn't have
Right, you don't need a body tag in the view either. In layout.html, there
should be an {{include}} -- that gets replaced with the entire contents
of the view that extends the layout.
Cool. But is there way to configure the body tag of a specific view page
that extends the 'layout.html'?
Now I have the custom page (e.g. register) appears correctly, however, when
I submit the form nothing happens - the form just clears itself with no
error msg or anything.
My 'register' action in controller is:
def register():
return dict(form=auth.register())
My 'layout.html' is as
{{=form.custom.begin}}
#in between the opening and closing tags put in your normal html code and
make sure the element names corresponds to the column names as defined in
your database. web2py will handle the rest automatically. This is the most
flexible way while still making use of
I've just started with web2py, so this might be obvious but I struggle to
see how it works:
I have a controller action which returns a form:
def register():
return dict(form=auth.register())
I also have a view 'register.html' for this action, which is *self-contained
* as it does NOT use
You're right, this is true throughout web2py.
On Wednesday, January 18, 2012 7:28:50 AM UTC-5, Chris wrote:
Just had a little surprise -- feels like a bug to me but let's hear
from the experts.
Having read in the web2py book that models are executed in name-sort
order, I changed
Opened as issue #820 on 25-May-2012,
see http://code.google.com/p/web2py/issues/detail?id=820
On Wednesday, May 23, 2012 10:03:04 PM UTC-4, Chris wrote:
This seems like a problem in web2py or mod_wsgi -- or else I am confused.
Would appreciate any pointers from the experts.
I'm running
We have had very good experiences with web2py. And now we are moving into
a more locked-down production environment. This raises some new questions
about security. I would like to make a suggestion. If this suggestion
seems valuable then I would work with others to implement it. However an
Wing is indeed a great tool. I use it for local-machine debugging all the
time and it has been a godsend.
Question -- has anyone had luck setting up Wing for remote debugging of
web2py processes on a different machine? I have been able to remotely
debug simple Python scripts, but when I put
Following up on some of the clues others have suggested -- I have this
problem when running web2py version 1.99.7 on Red Hat Enterprise 6.2 (very
similar to CentOS) and mod_wsgi with Apache.
Happy to provide copies of the error tickets if that would help with
troubleshooting -- ?
On
I have had a similar issue. Is there a resolution?
On Wednesday, April 25, 2012 5:29:09 PM UTC-4, Bruce Wade wrote:
Hi I randomly get a EOFError this doesn't always happen and I have no idea
what is causing it.
Traceback (most recent call last):
File
More of a curiosity on my part, but why does web2py promote AddToAny (by
automatically including it with every new application)?
Sure, it's easy enough to remove, but why is it in there in the first place?
This seems like a problem in web2py or mod_wsgi -- or else I am confused.
Would appreciate any pointers from the experts.
I'm running web2py 1.99.7 on a Red Hat (RHEL 6) server using Apache 2.2.15
and mod_wsgi 3.3. This is all running on a small virtual server at Amazon
Web Services.
Since
+= [socket.gethostname()]
#socket.gethostbyname(http_host)]
It looks like that line is just to check for the request is coming from the
externally facing IP. Could that perhaps be wrapped in a try-catch block
and the results cached?
Thanks,
Chris
On Tuesday
a link in markmin, and
is triggering the creating of these invalid links.
Is someone available to help?
Chris May
Hi all,
i'm trying to choose between frameworks for my new project and i'm liking
what I see with web2py but currently flask is the only one i can find that
will do what i need with routing / subdomains.
basically, i'm trying to use the subdomain as the keyword I will run a
database qurey on.
).
On Monday, December 19, 2011 4:46:48 PM UTC-5, Chris wrote:
(The first one is from Python started independently, the second from
Eclipse and the running instance of my app.)
Of course, silly me. Couldn't see the trees for the forest :-) Thank you
Anthony.
Chris
On Thu, Apr 19, 2012 at 1:20 AM, Anthony abasta...@gmail.com wrote:
db.property.property_type.writable = False
Anthony
On Wednesday, April 18, 2012 4:32:02 PM UTC-4, leftcase wrote:
I've put
Thanks for confirming this for me, this did seem to be the most sensible
way to approach the problem :-)
Chris
On Wed, Apr 18, 2012 at 1:04 AM, simon simo...@gmail.com wrote:
You can do this with a single form. At the top of the controller set
readable=false, writable=false for the fields
appears on the
form. Any ideas why?
Thank you,
Chris
On Wed, Apr 18, 2012 at 3:43 PM, Chris Rowson
christopherrow...@gmail.comwrote:
Thanks for confirming this for me, this did seem to be the most sensible
way to approach the problem :-)
Chris
On Wed, Apr 18, 2012 at 1:04 AM, simon simo
in advance,
Chris
Heh, no worries. :-)
I wonder, just out of interest, is there any great performance difference
between searching for records containing region.id 'x' (as below) rather
than returning all rows with region.id 'x' from a junction table?
Chris
On Sat, Apr 14, 2012 at 11:34 PM, villas villa
for a house. I wondered if anyone could give me any
examples?
Thanks in advance!
Chris
' for instance?
I'm not an experienced user of development frameworks like this. Is it
usually this difficult to accomplish this kind of thing? Seems to me it
would be a pretty common requirement?
Thanks in advance, :-)
Chris
On Sat, Apr 14, 2012 at 8:52 PM, villas villa...@gmail.com wrote:
I
Thank you again David,
I shall give it a go.
Chris
On Sat, Apr 14, 2012 at 10:29 PM, villas villa...@gmail.com wrote:
Yes, it would store the ids of the regions between vertical bars,
something like this: |4|7|23|. So say you are looking for the house-types
in China (which is id = 7
I might have missed something. Are you trying to move the viewport to the
element with the id after the hash?
If so, would you be able to use:
document.location.hash = tabs=2;
Does that work?
On Wednesday, March 21, 2012 5:39:08 PM UTC-4, Cliff wrote:
Thanks, Jonathan. I appreciate the
I agree with Wikus. Just by having a web site out in the public means just
that. Don't publish anything that you wouldn't want printed in newspapers
or announced to your grandmother. :)
You may be different, but every one who has asked me to prevent users to
view source code did not care
I'm sorry, Rahul. I may have misunderstood the reason behind your post, as I
have heard similar requests in my time as a front-end developer.
However, seeing that the site in your signature does potentially show sensitive
information, the best thing I can recommend is to not send any more
Interesting. I like the analogy in that StackOverflow post. I've been
watching David's video from his previous talk on the GIL. It seems
like unless a thread gives up the GIL somehow, it would be hard to
have a long-running thread on one request without hanging up other
threads.
Using a separate
Thanks for the suggestions, as well as helping with my somewhat
ambiguous question :). I'll try time.sleep, and moving to tornado, as
a belt-and-suspenders kind of approach. I am using rocket and didn't
realize the GIL was an issue.
Chris
On Mar 2, 7:37 pm, Ricardo Pedroso rmdpedr...@gmail.com
Sent from my Samsung smartphone on ATT
Anthony abasta...@gmail.com wrote:
Lightbox is a client-side Javascript library and doesn't really have
anything to do with web2py -- as long as you set it up properly, it should
work with web2py (or any backend framework). If you show some code,
Noobmusic.com uses lightbox with Google app engine. You probably need to show
us the entire page you are trying to get to work. Your problem is probably
something to do with class names or JavaScript includes.
Sent from my Samsung smartphone on ATT
Anthony abasta...@gmail.com wrote:
One caveat:
While I agree that w3schools is a helpful resource (as I use it as a
regular reference), their examples do not promote best practices, most
notably absent is unobtrusive JavaScript. I had to *unlearn much *of what I
read on there.
For more information and better resources, include
Is there an equivalent of of validate_and_update for update_record?
This is off-topic, but since a fair number of web2py users send e-mail from
their applications, I thought this post from 37Signals might prove helpful
to some.
There were nearly 16 million e-mails sent from 37Signals' eight web
applications in the last seven days. About 99.3% of them were
This might be too late for your application, but I just saw this review of
12 MVC frameworks.
http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/
Quoted from the page:
Specifically, the following four features are very important to me:
UI Bindings - I’m not just
Hello, Frank, Welcome to web2py! I am also relatively new to web
application development.
I threw your code into a new application, and I get very fast responses,
usually in a fraction of a second. I don't know exactly why I have a
dramatic difference in speed, but I do notice one thing that
Just had a little surprise -- feels like a bug to me but let's hear
from the experts.
Having read in the web2py book that models are executed in name-sort
order, I changed the names of my model files to have more explicit
ordering -- from db.py and appconfig.py to 100-db.py and 000-
appconfig.py.
There are indeed a *lot* of PHP tutorials and articles out there. Most of
them are of little value in general, or even misleading readers into bad
practices (as referenced by Christian Heilmann in a recent post on Smashing
It looks a ton better, good job!
On Sat, Jan 14, 2012 at 12:21 PM, Andrew Evans andrew.rusty...@gmail.comwrote:
Hello I think I finished the styling :-)
its not perfect I am sure :-P I think the green at the top of the thread
could be replaced (if only I could find where in the style sheet
I broke the controllers into much smaller sizes. My site does not seem to
be too much of a memory hog at this time. I will probably try to find ways
of making it more efficient in the near future, but have tons of other
stuff to do in the meantime.
On Fri, Jan 13, 2012 at 4:45 PM, howesc
Thanks for all the comments and suggestions. There will be a major content fix
over the weekend. I will fix many dead links and I am adding an additional
200 bands or so. I am also adding more dynamic content over the next couple of
weeks.
Sent from my Samsung smartphone on ATT
Likit
What is the largest advisable file size limit for a controller file using
Google appengine?
Sent from my Samsung smartphone on ATT
I did take a look at that myself. I find it much harder to figure out how to
apply a plugin to my design then to just do it all over myself specific to my
design. If you are beginner it will be a nightmare. You should prabably make
your own with simple form variables using jquery and CSS to
Hello,
(this may be a repost, having some technical trouble)
I was trying to run sessions2trash and getting the following error:
# python web2py.py -S init -R scripts/sessions2trash.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.2 (2011-09-26 06:55:33)
Hello,
I am getting an error when I run the following script in my web2py
directory:
# python web2py.py -S init -R scripts/sessions2trash.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.2 (2011-09-26 06:55:33) stable
Database drivers available: SQLite3,
That did it, not sure why I missed it. Thanks much.
On Jan 11, 3:23 pm, Jonathan Lundell jlund...@pobox.com wrote:
On Jan 11, 2012, at 11:49 AM, Chris wrote:
I am getting an error when I run the following script in my web2py
directory:
# python web2py.py -S init -R scripts
Here's what I've got:
Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)]
on win
32
Type help, copyright, credits or license for more information.
import win32con
win32con
module 'win32con' from
'C:\Python26\lib\site-packages\win32\lib\win32con.pyc'
The mystery gets
(The first one is from Python started independently, the second from
Eclipse and the running instance of my app.)
Curious. I've surprisingly not heard of haml. What would you say are the
benefits over web2py's built-in HTML helpers?
SASS could be quite helpful for us front-end guys, and I notice there are a
couple of python modules out there.
My opinion is that I don't know if it would need to be included
Nice example!
I love how snappy the site navigation is. That is one benefit I expected
from using backbone, with the potential for so much less data being
transferred for view changes over normal page refreshes.
\win32
C:\Python26\Lib\site-packages\win32\lib
C:\Python26\Lib\site-packages\pythonwin
Any ideas?
Thanks!
Chris
I second that!
We are truly blessed to have so many great, patient and
available contributors to the code and the community!
Anthony, do you have the book memorized yet? :D
Thanks for the reminder for feedback! There were several times that Google
Groups was telling me that x number of posts were updated, but showed all
as read.
I noticed that just before I read this post, they just pushed out an update
to the Groups software. Hopefully that'll fix it.
I'm using web2py with nginx, and I've experienced the following error
on redeploying my app:
socket.gethostbynamesocket.gethostbyname(http_host) File /var/
web2py/cow/gluon/main.py, line 396, in wsgibase
socket.gethostbyname(http_host)]
gaierror: [Errno -2] Name or service not
It looks like you're going about it fairly well, but I also had issues with
particular truetype fonts. Those issues went away after I changed which
truetype font I used.
This is the code that works for me:
@font-face {
font-family: myFont;
src:
sorry guys i hit enter to soon, disregard this question
On Sat, Nov 19, 2011 at 6:33 PM, chawk chrshawke...@gmail.com wrote:
db.define_table('discussion',
Field('comment', 'text'))
def comment():
form = SQLFORM(db.discussion, _class='test1')
if form.process().accepted:
Hello,
I'd like to make a login form and have it be accessible in multiple
pages, without having to rewrite the same code in every single
controller action:
login_form = auth.login()
if login_form.accepts(...
Is this possible?
Thanks,
Chris
to do
login_form.accepts(). So, just use auth.login() wherever you need it.
Anthony
On Monday, November 14, 2011 3:58:52 PM UTC-5, Chris wrote:
Hello,
I'd like to make a login form and have it be accessible in multiple
pages, without having to rewrite the same code in every single
In /
{{=top_login_form2.custom.end}}
On Nov 14, 4:24 pm, Chris zuzfrexkg...@spammotel.com wrote:
Cool, thanks guys.
I do have decorators on certain login-only pages, but I want a page
that's visible to both members and guests. The idea is to have a login
form that shows up only under
())
View:
{{=login_form # show it here}}
...
{{=login_form # show it somewhere else}}
Anthony
On Monday, November 14, 2011 4:29:24 PM UTC-5, Chris wrote:
After doing some more digging, it appears that each time you call
auth.login(), you generate a new formkey. The first formkey
other way?
Thanks
--
Chris
I a noob to web2py; so much so I'm not sure if I'm asking the right
question!
I'm trying to change the default behavior of the id field in my table.
Instead of an auto-increment of 1, 2, 3, etc...I need it to auto-increment
11-01, 11-02, 11-03, etc. Even better it would be nice
whether or not a record exists seems
to work, the check to see whether or not the 'nearest' field within
the record is populated doesn't seem to work.
Can anyone tell me what I'm doing wrong please?
Thank you,
Chris
Thank you Massimo :-)
Chris
On Mon, Oct 10, 2011 at 2:55 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
row = db.postcode_cache(postcode=postcode)
if not row:
db.postcode_cache.insert(postcode=postcode,nearset=nearest)
elif not row.nearest: row.update_record(nearset=nearest)
else
on doing that,
but is there any particular reason I shouldn't just use db.executesql
to perform my selects (because I find it easier)?
I also understand that raw SQL queries are database specific but I
don't mind, as I don't intend to move databases.
Chris
still learning
all this stuff :-D
Chris
On Sun, Oct 2, 2011 at 7:38 AM, Chris Rowson
christopherrow...@gmail.com wrote:
Thanks Peter, I'll give that a try.
Chris
On Sep 30, 2011 8:01 PM, Peter Etchells peter.a.etche...@gmail.com
wrote:
results=db(db.data.belongs([p[1] for p in postcodes
=~db.data.download)
return dict(table=rows, message=postcodelist)
On Sat, Oct 8, 2011 at 3:53 PM, Chris Rowson
christopherrow...@gmail.com wrote:
I finally used...
postcodelist=[]
closepostcodes=ukpostcodes.closest_postcodes(session.postcode,
str(session.distance))
for p
Thanks Massimo,
I'm very new at this and found the DAL a bit intimidating. I'm
beginning to get the hang of it now though so I'm sticking with it. I
think I was trying to overthink it before when in actual fact, the
more I try and get my head around it, the more sense it makes.
Chris
On Sat
the servlet's
name to the path but I couldn't get it to work. Any ideas?
Are you using snakefight to generate config files for modjy or
creating by hand?
Chris
://code.google.com/p/pytombo/source/browse/trunk/src/pytombo/chi_io.py
if you want to take a look and see how to use either depending on
availability.
If you are on Linux, e.g. Ubuntu easy_install or apt-get should be an
easy way to install the required dependencies.
Chris
at the moment.
Chris (note my email address has changed, the domain name is now
Actian not Ingres)
On Oct 3, 1:18 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
My experience is that it relays on the java regular expression parser
instead of the python one and that result in difference
Thanks Peter, I'll give that a try.
Chris
On Sep 30, 2011 8:01 PM, Peter Etchells peter.a.etche...@gmail.com
wrote:
results=db(db.data.belongs([p[1] for p in postcodes).select()
101 - 200 of 439 matches
Mail list logo