Hello
Just in case this is useful to others, I have added support to import
old PyCon-Tech (django 0.96) models into web2conf (web2py), including:
- "wiki" pages (django_flatpage)
- menu (navbar_navbarentry)
- attendees (auth_user, usermgr_userprofile, gmaps_gaddress)
- activities (propmgr_pr
Try editing the readability logger to specify a logger name instead of just
the root:
https://github.com/buriy/python-readability/blob/master/readability/htmls.py
-logging.getLogger().setLevel(logging.DEBUG)
+logging.getLogger('readability').setLevel(logging.DEBUG)
On Tuesday, March 27, 2
Also, how in the world did you enable debugging? I want to see if the
minthreads and maxthreads settings passed via command string actually work.
On Saturday, April 7, 2012 8:08:51 PM UTC-10, Unyo wrote:
>
> rocket breaks sometimes if you have limited memory, try entering "ulimit
> -s 1024" into
rocket breaks sometimes if you have limited memory, try entering "ulimit -s
1024" into the shell before executing web2py. Not sure why it works, but it
does.
rocket breaks sometimes if you have limited memory, try entering "ulimit -s
1024" into the shell before executing web2py. Not sure why it works, but it
does.
On Tuesday, March 27, 2012 3:33:58 AM UTC-10, Rohan wrote:
>
> any updates?
>
> On Monday, 26 March 2012 20:03:07 UTC+5:30, Rohan wrote:
>
When web2py switched from cherrypy to rocket, now I can't seem to start it
on any resource-constrained VPNs (currently running w/ 96MB RAM).
To me, this is a really big downer since I love web2py's ability to create
prototype applications using nothing but a shell and a browser (using
minimal r
Hi Anthony,
Are you talking about a read-only form or an update form? On an update
> form, it cannot use the alternative representation because the user must
> enter the actual field value, not merely a transformed representation of it
> (web2py has no general way of converting back from repres
I met the same issue, and took the following approach:
- Create a centralized plugin app
For me, this is the following app:
https://github.com/sqlabs/sqlabs/tree/master/modules
- Reference the modules of the app from other apps like:
import applications.sqlabls.modules.plugin_color_widget
In thi
Strange. I had some ajax calls in the registration section already, which I
took out because they didn't seem to do anything. You know ...
response.js='ajax...' I thought I had it working at some point, but then it
stopped working. Hmm... looks like I have some debugging to do. ;-)
On Sunday, A
Hi,
I tried using your new versioning feature in trunk.
I created an app using a mysql database:
db = DAL('mysql://version:version@localhost/version')
When I used the admin function to define a new user
I received the following error:
(1452, u'Cannot add
auth.settings.register_onaccept is a callback executed from the
auth.register() function. But you have created your own register()
function, which does not call auth.register(), hence the callback is never
called. Since you have an entirely custom registration function, you'll
have to call comp
I'm not entirely clear what your callback function or page.ready function
does, but this is how I do it. I have an ajax callback function that
returns a script that clears the timer.
def clear_timer(timer_id):
"""pseudo-code"""
return """
if (...check timer_id valid ...) cle
In the typical 0_db.py file I'm setting
auth.settings.register_onaccept=[complete_login]
I also define complete_login there and it raises an
HTTP(200)
for a redirect.
Now, in my "user" controller I have:
def register():
...
register_form = SQLFORM.factory( db.auth_user, ... )
http://www.madeiracloud.com/
In my view the -N should always be there unless the purpose of running the
script is that of starting a cron process. -N should have worked in reverse.
On Saturday, 7 April 2012 16:30:16 UTC-5, Jonathan Lundell wrote:
>
> On Apr 7, 2012, at 2:03 PM, Cédric Mayer wrote:
>
> Personnaly, I created a
On Apr 7, 2012, at 2:03 PM, Cédric Mayer wrote:
> Personnaly, I created a shortcut (in Windows) in order to test the model of
> my application:
> \web2py.exe -M -S
Shortcuts are good, and perhaps there ought to be a script in the web2py root.
Is -N desirable, btw? I suppose it depends on what
Personnaly, I created a shortcut (in Windows) in order to test the model of
my application:
\web2py.exe -M -S
Le samedi 7 avril 2012 19:04:09 UTC+2, Jonathan Lundell a écrit :
>
> In Chapter 6 (DAL), there are a lot of command-line examples (with >>>
> prompts) (side note: a lot of them aren't
Very useful. Brilliant thanks.
Minor error - line 6951 in DAL is missing an s. Should be archive_name =
'%(tablename)s_archive'
On Friday, 6 April 2012 05:35:38 UTC+1, Massimo Di Pierro wrote:
>
> It stores all previous versions.
>
> On Thursday, 5 April 2012 22:29:46 UTC-5, mart wrote:
>>
>> M
I'm using clienttools.py to put a timer on a page; the timer calls a
controller function (imaginatively called 'tick') every second, which in
turn updates a div on the page via Ajax. So far, so good.
I want the 'tick' controller function to be able to stop/disable the timer
under certain circumsta
I want to float a proposal for plugin infrastructure that I'd love to see
made part of the web2py core. It takes a bit of explanation, so bear with
the long post.
I'm starting to find that the syncing issue is a major one with the
(otherwise great) plugin infrastructure. I have a growing series
In Chapter 6 (DAL), there are a lot of command-line examples (with >>> prompts)
(side note: a lot of them aren't properly formatted). It'd be helpful to
readers if at least once (say at the top of the chapter) the python command
used to get to the prompt were shown. Presumably it involves -S, -M
On Sat, 7 Apr 2012 07:41:16 -0700 (PDT), abasta...@gmail.com said:
> Before constructing the grid, try db.mytable.myfield.readable = False.
Anthony, very neat, and it works: thank you.
--
"You can have everything in life you want if you help enough other people
get what they want" - Zig Ziglar.
Looks like the DAL is using the pymysql driver, which is included in
/gluon/contrib. If you've pulled the DAL out of /gluon and don't have
pymysql, then it won't find the driver.
Anthony
On Saturday, April 7, 2012 11:26:25 AM UTC-4, mert.nuhoglu wrote:
>
> I installed web2py as source and wante
Well I know the major bottle neck in the site is the binary tree. I am
still trying to figure out how to do this the best and most efficient. If
this was a stand alone app in c/c++ this would all be in memory which
wouldn't be such a problem. However how this is implemented it needs to
query throug
>
> Define it as Field('country', 'reference country') instead of
>> Field('country', db.country) -- the latter won't work if db.country hasn't
>> been defined yet.
>>
>
> Should I use 'reference table' instead of db.table in all table
> definitions or just in the definition of tables that refe
>
> I am talking about the second bullet in
> http://web2py.com/books/default/chapter/29/6#Record-representation.
>
>- To set the db.othertable.person.represent attribute for all fields
>referencing this table. This means that SQLTABLE will not show references
>by id but will use th
I installed web2py as source and wanted to use DAL without the rest of the
framework.
But DAL does not connect to mysql:
>>> DAL('mysql://user1:user1@localhost/test_rma')
...
RuntimeError: Failure to connect, tried 5 times:
'NoneType' object has no attribute 'connect'
Whereas MySQLdb can con
For @auth.requires_login() to pass, I think you just need auth.user to
exist (and not be None). If your layout includes auth.navbar(), I think the
auth.user object at least needs to include an "id" attribute as well (i.e.,
auth.user.id should be some integer). So maybe add something like this in
Actually I have only one app. What I am going to do is to import the
initial data into database from some text format files. I need to write a
Python script to read from the source file, and do some operations on the
data, then insert into database. I could do that via pure SQL, but I like
the way
Rightwhat? [changing color to red] Note to self. Never do math before
fully waking up.
Correction: 2 reqs/second/server. (1M/24/60/60/6 servers). Still ok from
web2py prospective.
If all requests hit the database once: 12 reqs/second. It really depends of
what those requests do.
Massimo
I would like to stress once more a design issue. If two apps share the same
table/model there are two cases:
a) the apps are independent (it is possible to distribute them
independently)
b) the apps are dependent (they must be distributed together)
In case a) the model cannot be shared. Each ap
No, I did NOT change anything.
Just before I restarted Apache, I used the same URI string in Python
command line to connect the DB. But I found that I could connect to it, but
the return DB instance does not have the table definition.
On Sat, Apr 7, 2012 at 10:22 PM, Massimo Di Pierro <
massimo.di
Before constructing the grid, try db.mytable.myfield.readable = False.
Anthony
On Saturday, April 7, 2012 6:16:39 AM UTC-4, backseat wrote:
>
> Is it possible to hide columns in a SQLFORM.grid?
>
> I need to retrieve some columns in the query to build some custom links,
> but I don't want those c
Thanks for the req/sec break down, we get most of our traffic in a 5-6 hour
window period.
A code review would be good I am sure there are a lot of areas that could
use some improvements.
--
Regards,
Bruce
On Sat, Apr 7, 2012 at 7:33 AM, Anthony wrote:
> 1M reqs/day is 7 reqs/minute.
>>
>
> No
Another option might
be
http://web2py.com/books/default/chapter/29/6#Using-DAL-without-define-tables.
Note, in that case, the table definitions will include the field names and
types, but not the non-database related web2py-specific attributes, such as
validators, labels, widgets, default valu
>
> 1M reqs/day is 7 reqs/minute.
>
Now we know how Massimo gets so much done -- his days are 2400 hours long.
;-)
Hello Bruce,
The bottle neck is always the database. 1M reqs/day is 7 reqs/minute. It is
not too much but make sure:
static files are not served by web2py
you cache as much as possible
If you need a code review to spot possible problems, let me know.
Massimo
On Saturday, 7 April 2012 08:59:2
Did you change the database password, or something else in the URI string?
If so, and if you did not change anything else, set a fake_migration=True
to rebuild the *.table for the new URI.
On Saturday, 7 April 2012 02:33:32 UTC-5, Ronghui Yu wrote:
>
> Hi, All,
>
> I was running my app locally w
Do not se exec_environment.
create a module (not a model) and in it put something like:
from gluon import *
def define_common_tables(db):
request, response, session, cache, T = current.request,
current.response, current.session, current.cache, current.T
db.define_table('table1',)
Hi,
So now that my site has been developed with web2py I am now looking to
release it this month. However also this month we were hit by a sudden
increase of members 10,650 new in the last 2 weeks which doesn't look to be
slowing down. We are getting around 100,000 - 800,000 ad views a day.
Is th
I am building some .factory forms with list:string types and took me a time
to realize the enter key needed to add new strings. I think that this is
confusing, since the enter key is used in other fields to submit the form.
I guess that changing this behavior would break apps that were built tha
just wanted to share
http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx
To me it looks interesting, is it easy to make something similar to python
Is it possible to hide columns in a SQLFORM.grid?
I need to retrieve some columns in the query to build some custom links,
but I don't want those columns displayed. I've tried setting maxtextlength
for those columns to zero, but they still display.
Thanks.
--
"You can have everything in life you
Hi there,
I think I've found another bug when using GAE + Cloud SQL. (Note this is
assuming you've amended the GoogleSQLAdapter as per another issue)
Assuming the following:
db.define_table('test', Field('image', 'upload'))
def index():
form = SQLFORM.factory(Field('image', 'upload'), _actio
I've been looking that the unit testing page
(http://www.web2py.com/AlterEgo/default/show/260), which is very helpful.
However, most of my controller functions are decorated with
'@auth.requires_login()', and thus if I call them from the test suite,
they fail (issuing a redirect):
File "/home/ka
Hi, All,
I was running my app locally with sqlite on local, but after deployment, I
switched to MySQL and Apache with WSGI. The first time it runs well, but
after Apache restarted, it reports error below:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
Tracebac
46 matches
Mail list logo