Hello
I have following cut of code:
db.define_table('papers',
Field('printdate','date'),
Field('printout','boolean',default=False),
Field('globnum','integer'),
Field('locnum','integer'),
Field('oncheck','string',default='on',readable=False,writable=False))
conntroller
posts =
I have a series of linked database tables:
'course' which contains several 'units' which contain several
'topics'.
On the 'unit' page, I display the details of the unit, a list of
topics and a link to edit the unit details.
When you click on the edit link, a crud.update form is created, which
se
On Aug 10, 2:34 pm, "Martin.Mulone" wrote:
> All seem to working fine for me, in some titles you have gray
> background and gray titles.
Do you mean the section headers like "SOURCE CODE" and "TAGS"
These are intentionally dark grey on light grey, if this is still not
readable I will see If i can
Jonathan,
Thanks very much for you pointing out the reference keyword, that
solves the problem for self-referencing tables, but do you know of a
solution to my two-tables-referencing-each-other problem? I admit my
simplistic alias example could be solved very elegantly by a self-
referencing table
Hello,
could you please consider this:
http://groups.google.com/group/web2py/msg/b41ce4186a877de7
I might have more comments on that chapter throughout this day.
Regards,
Timmie
On 11 ago, 06:31, selecta wrote:
> On Aug 10, 2:34 pm, "Martin.Mulone" wrote:> All
> seem to working fine for me, in some titles you have gray
> > background and gray titles.
>
> Do you mean the section headers like "SOURCE CODE" and "TAGS"
> These are intentionally dark grey on light grey, if t
i thought that the query caching like:
db(query).select(cache=...)
was not supported in web2py on GAE? did i miss a detail somewhere?
since i thought it was not supported i have not yet tried to use it or
clear it. sorry.
cfh
On Aug 8, 11:51 pm, Jérémie wrote:
> Hello everyone,
>
> First of
hi!
web2py 1.82.1
trying to get working:
=
from gluon.contrib.memcache import MemcacheClient
memcache_servers=['127.0.0.1:11211']
mem=MemcacheClient(request,memcache_servers,debug=1)
=
from gluon.contrib.memcache import MemcacheClient
showa the error "can not find the name MemcacheClien
new feature:
parsing of docstrings strings as examples (searches for any occurrence
of >>>)
> Yes, make more darker and lighter the other.
made the headers a bit darker
You have to be explicit. The rules would be too complex because you
can have multiple rows in the head and they can contain td instead of
th. Therefore web2py cannot understand what you mean.
On Aug 10, 9:06 am, Skiros wrote:
> Hmmm no. Its no ok. The response is repeating TR tag for each
> eleme
It is there:
http://web2py.com/book/default/chapter/13#Extending-Widgets
On Aug 10, 11:11 am, Timmie wrote:
> Hello,
> is it possible to create a plugin / component which expands the
> functionality of plugin_wiki?
>
> If so, then It would be great if this could be added to the Chapter
> 13.
>
>
we could specify line option to change it but why not use regular
stdout redirection?
On Aug 10, 12:28 pm, Jonathan Lundell wrote:
> web2py makes semi-extensive use of the Python logging module, but (near as I
> can tell) it never changes the output away from the default stdout.
>
> Is this true
At one time there was a problem with GAE fething records buth by ID
and other condition at the same time. I thought that was fix and this
is teh first report of a problem.
Can you try, instead of this:
row = db((db.auth_user.id==1) &
(db.auth_user.friends==2)).select().first()
use
row=db.auth
I do not see how you can use crud.create and redirect. Can you post an
example. the redirection must be done by crud itself, not outisde.
On Aug 10, 12:52 pm, rāma wrote:
> I think I have a double submission problem on crud create. I am using
> a redirect in the view instead of the next attribute
Hello,
Following the example on Chapter 3 [1] about Form self-submission, I
get Internal Error after visiting first and introducing the name,
getting the following traceback:
Traceback (most recent call last):
File "/home/zumbi/TCL/SRC_test/web2py/gluon/restricted.py", line
178, in restricted
These two statements are incompatible:
db.unit.course.readable = db.unit.course.writable = False
db.unit.name.requires = [IS_NOT_EMPTY(),
IS_NOT_IN_DB(db(db.unit.course==request.vars.course), db.unit.name)]
because unit.course it not in the form therefore there is no
request.vars.course. You must
in the past limitby only worked up to record 1000.
On Aug 10, 4:12 am, szabba wrote:
> Is db(somequery).select(db.sometable.ALL, limitby=(1000, 10))
> supported on Google App Engine? I couldn't find anything about
> it not being supported in the docs, but I just want to be sure.
oops. typo. IN models/plugin_wiki.py
d='download'
should be
f='download'
I will repost soon.
On Aug 10, 3:01 pm, Hans wrote:
> I'm trying to use this widget on localhost on source version of web2py
> 1.82.1 but running into the error below. other widgets like jqgrid or
> select are working fi
posts = db(db.papers.printout ==
False).select(limitby=(0,16),orderby=db.papers.id,cache=(cache.ram,None))
and
posts = db(db.papers.printout ==
False).select(limitby=(0,16),orderby=db.papers.id,cache=(cache.ram,0))
to force a refresh
On Aug 11, 2:00 am, KMax wrote:
> Hello
> I have following
Can you post an example? This
crud.settings.delete_next
should work.
Massimo
On Aug 11, 3:18 am, davosmith wrote:
> I have a series of linked database tables:
>
> 'course' which contains several 'units' which contain several
> 'topics'.
>
> On the 'unit' page, I display the details of the unit
matt,
are you seeing this on GAE production, or on your development server?
if on development, are you using sqlite? if so, then see
http://code.google.com/p/googleappengine/issues/detail?id=3232 i had
to patch GAE dev server to work properly in this case.
if that is not the case i'm sure it has
It will work if you setup gae memcache and point cache.ram to it. It
is explained in the book in the GAE section
On Aug 11, 7:45 am, howesc wrote:
> i thought that the query caching like:
> db(query).select(cache=...)
> was not supported in web2py on GAE? did i miss a detail somewhere?
>
> sin
is there a traceback?
On Aug 11, 7:51 am, Ozz wrote:
> hi!
>
> web2py 1.82.1
>
> trying to get working:
>
> =
> from gluon.contrib.memcache import MemcacheClient
> memcache_servers=['127.0.0.1:11211']
> mem=MemcacheClient(request,memcache_servers,debug=1)
> =
>
> from gluon.contrib.memca
I just started web2py on Linux, using the web2py.py command and memory used
by the process is already 126K.
What is wrong, how can it be reduced?
--
Frank Church
===
http://devblog.brahmancreations.com
Is there any way to copy a *permalink* to a function?
e.g :
http://semanticsbml.org/doc2py/default/index/gluon/contrib/login_methods/email_auth
2010/8/11 selecta
> new feature:
> parsing of docstrings strings as examples (searches for any occurrence
> of >>>)
>
> > Yes, make more darker and l
Error traceback
Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 178, in restricted
exec ccode in environment
File "C:/web2py/applications/xxx/models/db.py", line 6, in
from gluon.contrib.memcache import MemcacheClient
ImportError: cannot import name Memca
Thats less than a MB. I don't see why you are complaining =P
Typically my web2py instances all run around 75MB, with a max of 150MB
under heavy traffic load.
It also depends on how much your caching or how big your select queries are.
--
Thadeus
On Wed, Aug 11, 2010 at 8:20 AM, Frank Church
i am currently working on that, i will report back when it is done :)
On Aug 11, 3:31 pm, Bruno Rocha wrote:
> Is there any way to copy a *permalink* to a function?
> e.g :http://semanticsbml.org/doc2py/default/index/gluon/contrib/login_meth...
>
> 2010/8/11 selecta
>
> > new feature:
> > parsin
There is the ability to reduce memory usage however. Web2py likes to
call the import_all module when it first loads up. This basically
imports every web2py module so they are loaded into the python
interpreter. That means when your code actually imports anything from
gluon, the web server won't hav
According to http://web2py.com/book/default/docstring/cache
Ram based caching
This is implemented as global (per process, shared by all threads)
dictionary. A mutex-lock mechanism avoid conflicts.
As long as it shared by threads and not process, it look like roulete
with chance of 1/processes.
I
def unitedit():
"""
edit a unit details
"""
unit = db.unit(request.args(0)) or redirect(URL('index'))
crud.settings.delete_next = URL('course', args=unit.course)
form = crud.update(db.unit, unit.id, next=URL('unit',
args=unit.id))
return dict(form=form)
If the user tick
Ah ok ! I did not know that about thead.
Thanks Massimo !
On 11 ago, 09:57, mdipierro wrote:
> You have to be explicit. The rules would be too complex because you
> can have multiple rows in the head and they can contain td instead of
> th. Therefore web2py cannot understand what you mean.
>
On Aug 11, 2010, at 2:48 AM, Oatman wrote:
> Jonathan,
>
> Thanks very much for you pointing out the reference keyword, that
> solves the problem for self-referencing tables, but do you know of a
> solution to my two-tables-referencing-each-other problem? I admit my
> simplistic alias example cou
OS - Ubuntu 10.04 LTS - Lucid Lynx
web2py - Version 1.82.1 (2010-08-04 18:57:33)
pull from https://web2py.googlecode.com/hg/
KeyError: 'routes_logging'
File "/home/aabelyakov/Web2py/web2py.py", line 17, in
import gluon.widget
File "/home/aabelyakov/Web2py/gluon/widget.py", line 28, in
import
On 11 August 2010 15:38, Thadeus Burgess wrote:
> There is the ability to reduce memory usage however. Web2py likes to
> call the import_all module when it first loads up. This basically
> imports every web2py module so they are loaded into the python
> interpreter. That means when your code actu
Look like this should help.
http://web2py.com/book/default/chapter/04?search=session#session
Thank you.
On Aug 11, 2010, at 6:05 AM, Hector Oron wrote:
> Hello,
>
> Following the example on Chapter 3 [1] about Form self-submission, I
> get Internal Error after visiting first and introducing the name,
> getting the following traceback:
What version of web2py are you running?
If you're not runnin
On Aug 11, 2010, at 6:00 AM, mdipierro wrote:
> we could specify line option to change it but why not use regular
> stdout redirection?
I suppose we could, but at least when we start via web2py.py, it's good to see
the startup messages directed to stdout before web2py daemonizes.
The nice thin
We could have a standard web2py logging file such as errors.log
On Aug 11, 10:14 am, Jonathan Lundell wrote:
> On Aug 11, 2010, at 6:00 AM, mdipierro wrote:
>
> > we could specify line option to change it but why not use regular
> > stdout redirection?
>
> I suppose we could, but at least when we
The problem is here:
crud.settings.delete_next = URL('course', args=unit.course)
form = crud.update(db.unit, unit.id,
next=URL('unit',args=unit.id))
the latter next overrides the former.
You can do:
ondelete_next = URL('course', args=unit.course)
form = crud.update(db.unit, unit
Looks typical to me.
Mind you, running web2py.py also loads up the standalone rocket webserver.
--
Thadeus
On Wed, Aug 11, 2010 at 9:59 AM, Frank Church wrote:
>
>
> On 11 August 2010 15:38, Thadeus Burgess wrote:
>>
>> There is the ability to reduce memory usage however. Web2py likes to
>
It has come up. "reference table" does not solve this problem. The
problem can be solved with the Table keyword but I think tables should
not refer to each other. Use a link table of set one of the references
to an int and use a validator to make it a reference.
On Aug 11, 9:56 am, Jonathan Lunde
It is typical. It can be reduced. Somewhere there was a thread about
it.
On Aug 11, 9:59 am, Frank Church wrote:
> On 11 August 2010 15:38, Thadeus Burgess wrote:
>
> > There is the ability to reduce memory usage however. Web2py likes to
> > call the import_all module when it first loads up. Thi
On Aug 11, 2010, at 8:21 AM, mdipierro wrote:
> We could have a standard web2py logging file such as errors.log
I think that would be a good default, but I'd rather have a standard web2py
logging configuration file, web2py/logging.conf or the like. It could point to
errors.log by default, but t
On Aug 11, 2010, at 8:29 AM, mdipierro wrote:
> It has come up. "reference table" does not solve this problem. The
> problem can be solved with the Table keyword but I think tables should
> not refer to each other. Use a link table of set one of the references
> to an int and use a validator to ma
On 11 August 2010 16:31, mdipierro wrote:
> It is typical. It can be reduced. Somewhere there was a thread about
> it.
>
>
Is this the one you are referring to -
http://www.mail-archive.com/web2py@googlegroups.com/msg35056.html?
If web2py is not being run in admin or development mode, will the m
Hello,
Web2py generates an error for:
db.person.importance.requires=[IS_INT_IN_RANGE(1,999),
IS_NOT_IN_DB(db, 'person.importance')]
but not if I change the order of the two validators:
db.person.importance.requires=[IS_NOT_IN_DB(db, 'person.importance'),
IS_INT_IN_RANGE(1,999)]
Traceback:
F
I made it work passing the name of db to plugin_jqgrid in model and to
the controller. In the action "data" find this
table=db[tablename]
and changed with this
db = eval(request.vars.db or "db")
table=db[tablename]
On 8 jul, 07:34, AsmanCom wrote:
> Hi,
>
> in the editable jqgrid plugin from
the module/class/function name in the top now contains a permlink to
itself
e.g.
http://semanticsbml.org/doc2py/default/s/gluon.validators.IS_EQUAL_TO
On Aug 11, 4:35 pm, selecta wrote:
> i am currently working on that, i will report back when it is done :)
>
> On Aug 11, 3:31 pm, Bruno Rocha wr
On Aug 6, 2010, at 9:40 AM, Phyo Arkar wrote:
> i voted this too.
>
> I just dont like the controller named default and i want it different
> on each apps.
>
> On 8/6/10, mr.freeze wrote:
>> Massimo, why not make the default application,controller and function
>> configurable in an external fil
On Aug 8, 2010, at 6:29 PM, Jonathan Lundell wrote:
> On Aug 8, 2010, at 6:15 PM, Andrew Thompson wrote:
>
>> On 8/8/2010 9:10 PM, Jonathan Lundell wrote:
>>> Is it possible that lighttpd is altering the URL enough that it doesn't
>>> match what you've got in routes.py?
>>
>> Perhaps. I've got
A minor suggestion: when an arg default is [] or {}, it would enhance
readability to stick a space in there. Or set it in a monospace font.
(I can't say I'm a big fan of Andale Mono, though.)
Is it possible to run a web2py application in Cheyenne web server?
Hello,
2010/8/11 Jonathan Lundell :
> What version of web2py are you running?
I have checked out later code from repository and looks fine now.
Thanks.
Cheers,
--
Héctor Orón
"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."
-- D
only web2py.py runs import_all as a means to check that all needed
modules are there in order to build the binaries.
If you use the wsgihandler or the cgihandler there is no import_all. I
am not sure what difference it makes in terms of memory
On Aug 11, 10:41 am, Frank Church wrote:
> On 11 Augu
yes because you should try check if the data is in db before checking
if it is an int.
On Aug 11, 10:56 am, ionel wrote:
> Hello,
>
> Web2py generates an error for:
>
> db.person.importance.requires=[IS_INT_IN_RANGE(1,999),
> IS_NOT_IN_DB(db, 'person.importance')]
>
> but not if I change the orde
Sorry I was stupid. You are right. This is a bug.
On Aug 11, 12:04 pm, mdipierro wrote:
> yes because you should try check if the data is in db before checking
> if it is an int.
>
> On Aug 11, 10:56 am, ionel wrote:
>
> > Hello,
>
> > Web2py generates an error for:
>
> > db.person.importance.re
uploading fix to trunk.Please check it.
On Aug 11, 10:56 am, ionel wrote:
> Hello,
>
> Web2py generates an error for:
>
> db.person.importance.requires=[IS_INT_IN_RANGE(1,999),
> IS_NOT_IN_DB(db, 'person.importance')]
>
> but not if I change the order of the two validators:
>
> db.person.importan
should be possible via mod_fastcgi, use instructions for cherokee or
lighttpd
On Aug 11, 9:52 am, luifran wrote:
> Is it possible to run a web2py application in Cheyenne web server?
This is a MAJOR security vulnerability:
http://?db=os.system('rm -r *')
On Aug 11, 11:04 am, Skiros wrote:
> I made it work passing the name of db to plugin_jqgrid in model and to
> the controller. In the action "data" find this
>
> table=db[tablename]
>
> and changed with this
>
> db = eval
Massimo the link is bad...
but is true, that eval sentence open a big door...
I find another way...
On 11 ago, 14:10, mdipierro wrote:
> This is a MAJOR security vulnerability:
>
> http://?db=os.system('rm-r *')
>
> On Aug 11, 11:04 am, Skiros wrote:
>
> > I made it work passing the name o
It's all right now.
Thank you.
i
On Aug 11, 1:09 pm, mdipierro wrote:
> uploading fix to trunk.Please check it.
>
> On Aug 11, 10:56 am, ionel wrote:
>
> > Hello,
>
> > Web2py generates an error for:
>
> > db.person.importance.requires=[IS_INT_IN_RANGE(1,999),
> > IS_NOT_IN_DB(db, 'person.impor
I need to transform this query that works in RDBS to GAE. Both of them
are working i check it, but there are a better way, more simpler?.
RDBS:
count = db((db.posts.published_on.year()==year_full) &
(db.posts.published_on.month()==month)).count()
GAE:
count = len(db(db.posts.id>0).select().find(l
d1=datetime.date(year_full,month,1)
d2=datetime.date(year_full,month,31)
count = db(db.posts.published_on>=d1)
(db.posts.published_on<=d2).count()
On Aug 11, 1:40 pm, "Martin.Mulone" wrote:
> I need to transform this query that works in RDBS to GAE. Both of them
> are working i check it, but the
Not work in GAE but its better than the other, and i think it has a
problem if month is for example 02 (feb), raise an exception.
On Aug 11, 4:27 pm, mdipierro wrote:
> d1=datetime.date(year_full,month,1)
> d2=datetime.date(year_full,month,31)
>
> count = db(db.posts.published_on>=d1)
> (db.posts
Am 11.08.2010 14:58, schrieb mdipierro:
> It is there:
>
> http://web2py.com/book/default/chapter/13#Extending-Widgets
Theres a typo:
This can be done my creating a file "models/plugin_wiki_contact"
Should be
This can be done by creating a file "models/plugin_wiki_contact"
As Bruno Rocha points, a sitemap is very, very importan for SEO. And
other frameworks are adding tools for generating those sitemaps, for
example, Django.
The sitemap framework¶
Django comes with a high-level sitemap-generating framework that makes
creating sitemap XML files easy.
extra
No objection but I think this belongs to a plugin.
On Aug 11, 4:52 pm, puercoespin
wrote:
> As Bruno Rocha points, a sitemap is very, very importan for SEO. And
> other frameworks are adding tools for generating those sitemaps, for
> example, Django.
>
>
> The sitemap framework¶
> Django com
Could you provide a list of features you would like to see?
Massimo
On Aug 11, 4:52 pm, puercoespin
wrote:
> As Bruno Rocha points, a sitemap is very, very importan for SEO. And
> other frameworks are adding tools for generating those sitemaps, for
> example, Django.
>
>
> The sitemap frame
> A minor suggestion: when an arg default is [] or {}, it would enhance
> readability to stick a space in there. Or set it in a monospace font.
> (I can't say I'm a big fan of Andale Mono, though.)
changed both columns to plain monospace font
btw, when playing around with doc2py I noticed that you can access
things like
http://semanticsbml.org/doc2py/default/s/scipy.sparse
and other libs that are installed on that server
however standard libs like sys and os do not work ...
On Aug 12, 12:44 am, selecta wrote:
> > A minor suggestion: w
Just touching base to see if anyone has had a chance to look into this
yet.
On Jul 29, 12:59 am, mdipierro wrote:
> will look into this asap.
>
> On Jul 29, 1:54 am, Alastair Medford
> wrote:
>
> > After wandering around in the source, I think I've found the culprit
> > code.
> > In html.py -> I
There was a problem with this which is now fixed.
This is a very important feature if you plan to develop locally
(sqlite) and deploy on GAE.
Massimo
On Aug 10, 4:18 am, mdipierro wrote:
> Experimentally there is a new feature in trunk.
>
> Field('name','list:string')
> Field('name','list:intege
Changelog:
New and better ticket mechanism (thanks Mariano)
New and better routing system with app level routing (thanks Jonathan)
Integrated GAE appstat and GAE precompilation (thanks Scott) Look into
app.yaml
request.cid, request.ajax, A(cid=request.cid), response.js
New Field types "list:st
What's happening with web2py.com ?
Rodrigo C. Lira
Eng. de Computação 08.2
Universidade de Pernambuco
http://rodrigolira.wordpress.com
Sorry. I was upgrading the web server to 1.83.1 and it was down. It
should be up now.
Massimo
On Aug 11, 5:54 pm, Rodrigo Lira wrote:
> What's happening with web2py.com ?
>
> Rodrigo C. Lira
> Eng. de Computação 08.2
> Universidade de Pernambucohttp://rodrigolira.wordpress.com
On Aug 11, 2010, at 8:21 AM, mdipierro wrote:
> We could have a standard web2py logging file such as errors.log
I think I have a straightforward way of doing it. I'm not sure I can get to it
this week, but it should be straightforward.
In the meantime, I haven't tested it, but I think console l
The online book was updated to include yet new features:
App specific routes (thanks Jonathan)
http://web2py.com/book/default/chapter/04#Application-Specific-URL-Rewrite
The new Field(...,type='list:...') that backports the GAE
StringListProperty and ListProperty to RDBS:
http://web2py.com/b
I just noticed a typo just above:
http://web2py.com/book/default/chapter/13?search=cid
>>which can be accessed by the action via the variables:
>>1. request.env.http_web2py_component_location
>>2. request.env.http_web2py_component_location (should be
>>http_web2py_component_element?)
On Aug 1
this is now fixed in 1.83.1
On Aug 11, 9:57 am, aabelyakov wrote:
> OS - Ubuntu 10.04 LTS - Lucid Lynx
> web2py - Version 1.82.1 (2010-08-04 18:57:33)
> pull fromhttps://web2py.googlecode.com/hg/
>
> KeyError: 'routes_logging'
> File "/home/aabelyakov/Web2py/web2py.py", line 17, in
> import gl
Where is this syntax documented?
db(query1)(query2)
Is this the same as 'db(query1 & query2)' except web2py does the join
and not the database?
On Aug 11, 12:27 pm, mdipierro wrote:
> d1=datetime.date(year_full,month,1)
> d2=datetime.date(year_full,month,31)
>
> count = db(db.posts.published_on
On Aug 11, 2010, at 5:14 PM, Rob wrote:
> Where is this syntax documented?
>
> db(query1)(query2)
>
> Is this the same as 'db(query1 & query2)' except web2py does the join
> and not the database?
It's identical.
db(query) returns a Set instance. And calling a Set instance that already has a
q
Hello, im trying to have the login on my index page, I got the login
form showing up on the index page but the url is not desirable.
I want it to be domain.com/myapp but when I put the login form on the
index page it automatically changes to domain.com/myapp/default/user/
login
Why is it changing
Have you tried this?:
auth.settings.login_url = URL('index',args='login')
On Aug 11, 8:17 pm, thedangler wrote:
> Hello, im trying to have the login on my index page, I got the login
> form showing up on the index page but the url is not desirable.
> I want it to be domain.com/myapp but when I pu
Very nice. I think this is more congruous with web2py's philosophy of
ease of use.
On Aug 11, 11:12 am, Jonathan Lundell wrote:
> On Aug 6, 2010, at 9:40 AM, Phyo Arkar wrote:
>
> > i voted this too.
>
> > I just dont like thecontrollernameddefaultand i want it different
> > on each apps.
>
> >
On Aug 11, 2010, at 6:43 PM, mr.freeze wrote:
> Very nice. I think this is more congruous with web2py's philosophy of
> ease of use.
It seems clean enough, I think.
One thing to keep in mind (I think I've mentioned this somewhere) is that the
default_application setting is effective only after
As second thought, Pickle and put as hidden post element, this should
prevent from overwrite session in case few forms opened in tabs.
On 11 авг, 22:00, KMax wrote:
> Look like this should
> help.http://web2py.com/book/default/chapter/04?search=session#session
>
> Thank you.
Should i worry about this on my setups with sqlite but i do not use gae?
Almost all my setups are sqlite but on apachi fcgi.
Best regards,
jason
- Original message -
> There was a problem with this which is now fixed.
> This is a very important feature if you plan to develop locally
> (sql
88 matches
Mail list logo