Re: [web2py] Re: web2py Reference Manual -- a call to arms
Look what i am talking about, in action -> http://www.pyforum.org/pyforum/default/view_topic/507 2010/7/12 Bruno Rocha > PHP manual is great, I always use, the information are easy to find, and > connections with related subjects are simple, one advantage is that it was > written in a way that allows various applications, badges, widgets etc using > your content > > I think that information in the PHP manual is organized much like a forum, > the first post is a detailed explanation, with some examples. < > http://www.php.net/manual/en/language.operators.php > The replies below > are more examples of different scenarios for the same explained function. > > With a good moderation, preventing unnecessary comments for each thread, > PyForum http://www.pyforum.org/ could be a great start, may be, changing > PyForum to accept Markmin, and a good way for publish live demo examples. > > Simply gather a team, and start writing, in this way each person moderates > others. > > > > 2010/7/12 mdipierro > > This issue issue comes up regularly and my answer does not change. >> >> I very much welcome a community effort to have a better documentation. >> It was attempted many times before and many times it has failed. It >> failed because people think it is a technological issue (which wiki do >> we use?) but it is not. The problem is keeping the docs in sync with >> code is a pedantic issue and there is not enough motivation. >> >> The problem with the book is that content is copyrighted and I have an >> agreement with the publisher. I have already lost $600/month in >> revenues from book sales since the book was posted online. This has >> not been bade up by donations. >> >> I am in the process of revising the online book online: >> - add new sections >> - move from markdown to markmin >> - include an automatic markmin to pdf (for download) >> - make it more friendly to users >> >> As far as I am concerned I need help with docstings, examples in >> docstrigns, and more tests. >> >> I will look into the php wiki you refer to. >> >> Massimo >> >> > Massimo, do you think 5M pageviews would be exceeded in any month for >> > the time being? >> > >> > ra3don: I like your idea of a download version. If we pack all into >> > a .w2p then the downloadable reference manual would be implemented. >> > Then you could install it on your local machine and access it later, >> > even if you didn't have an internet connection. Great for coding while >> > traveling! >> > >> > Massimo, is the cube2py wiki ready to take on this task on GAE? If >> > yes, I say we get on with it. We'd need volunteers to setup and >> > administer. >> > >> > Once set up, the first order of business would be to develop (wiki >> > pages, of course) a style guide for the various types of pages in the >> > Reference Manual. The pages I can think of three types of pages off >> > the top of my head: >> > >> > Index pages >> > - organized alphabetically by function >> > - organized alphabetically by parameter/attribute (non-statement) >> > Manual page for web2py function >> > Manual page for web2py parameter/attributes >> > > > > -- > > http://rochacbruno.com.br > -- http://rochacbruno.com.br
Re: [web2py] Re: web2py Reference Manual -- a call to arms
PHP manual is great, I always use, the information are easy to find, and connections with related subjects are simple, one advantage is that it was written in a way that allows various applications, badges, widgets etc using your content I think that information in the PHP manual is organized much like a forum, the first post is a detailed explanation, with some examples. < http://www.php.net/manual/en/language.operators.php > The replies below are more examples of different scenarios for the same explained function. With a good moderation, preventing unnecessary comments for each thread, PyForum http://www.pyforum.org/ could be a great start, may be, changing PyForum to accept Markmin, and a good way for publish live demo examples. Simply gather a team, and start writing, in this way each person moderates others. 2010/7/12 mdipierro > This issue issue comes up regularly and my answer does not change. > > I very much welcome a community effort to have a better documentation. > It was attempted many times before and many times it has failed. It > failed because people think it is a technological issue (which wiki do > we use?) but it is not. The problem is keeping the docs in sync with > code is a pedantic issue and there is not enough motivation. > > The problem with the book is that content is copyrighted and I have an > agreement with the publisher. I have already lost $600/month in > revenues from book sales since the book was posted online. This has > not been bade up by donations. > > I am in the process of revising the online book online: > - add new sections > - move from markdown to markmin > - include an automatic markmin to pdf (for download) > - make it more friendly to users > > As far as I am concerned I need help with docstings, examples in > docstrigns, and more tests. > > I will look into the php wiki you refer to. > > Massimo > > > Massimo, do you think 5M pageviews would be exceeded in any month for > > the time being? > > > > ra3don: I like your idea of a download version. If we pack all into > > a .w2p then the downloadable reference manual would be implemented. > > Then you could install it on your local machine and access it later, > > even if you didn't have an internet connection. Great for coding while > > traveling! > > > > Massimo, is the cube2py wiki ready to take on this task on GAE? If > > yes, I say we get on with it. We'd need volunteers to setup and > > administer. > > > > Once set up, the first order of business would be to develop (wiki > > pages, of course) a style guide for the various types of pages in the > > Reference Manual. The pages I can think of three types of pages off > > the top of my head: > > > > Index pages > > - organized alphabetically by function > > - organized alphabetically by parameter/attribute (non-statement) > > Manual page for web2py function > > Manual page for web2py parameter/attributes > -- http://rochacbruno.com.br
[web2py] Re: web2py Reference Manual -- a call to arms
Massimo, I couldn't agree more. This is not a tech issue. It's an issue of resolve by the community to help build doc. I do not wish to make more work for you. I may be naive, but I hope for the opposite -- to distribute the doc burden more on the community. The existing doc v2 is a major improvement over doc v1. But because it has a tutorial flavor, it is not as suitable for advanced users, IMHO, primarily because it's hard to locate desired information. Rather than overhaul it to be a Reference Manual, I think doc v2 should keep it's current flavor and a separate Reference Manual should be developed by the community. Reference Manual content should be terse -- UNIX man- pages-like. It needs to be heavily cross-linked. The only reason I even bring up the wiki issue is because we do need an infrastructure and it should enable us to do what we want without getting into the way. I prefer a web2py wiki because it will serve the dual purpose of showcasing the technology and providing a convenient way to download a copy of the Reference Manual. Unless the PDF you are planning to output is heavily cross-linked, I don't think it will serve the Reference Manual's purpose of being able to find info quickly.
[web2py] Re: web2py Reference Manual -- a call to arms
This issue issue comes up regularly and my answer does not change. I very much welcome a community effort to have a better documentation. It was attempted many times before and many times it has failed. It failed because people think it is a technological issue (which wiki do we use?) but it is not. The problem is keeping the docs in sync with code is a pedantic issue and there is not enough motivation. The problem with the book is that content is copyrighted and I have an agreement with the publisher. I have already lost $600/month in revenues from book sales since the book was posted online. This has not been bade up by donations. I am in the process of revising the online book online: - add new sections - move from markdown to markmin - include an automatic markmin to pdf (for download) - make it more friendly to users As far as I am concerned I need help with docstings, examples in docstrigns, and more tests. I will look into the php wiki you refer to. Massimo > Massimo, do you think 5M pageviews would be exceeded in any month for > the time being? > > ra3don: I like your idea of a download version. If we pack all into > a .w2p then the downloadable reference manual would be implemented. > Then you could install it on your local machine and access it later, > even if you didn't have an internet connection. Great for coding while > traveling! > > Massimo, is the cube2py wiki ready to take on this task on GAE? If > yes, I say we get on with it. We'd need volunteers to setup and > administer. > > Once set up, the first order of business would be to develop (wiki > pages, of course) a style guide for the various types of pages in the > Reference Manual. The pages I can think of three types of pages off > the top of my head: > > Index pages > - organized alphabetically by function > - organized alphabetically by parameter/attribute (non-statement) > Manual page for web2py function > Manual page for web2py parameter/attributes
[web2py] Re: may be a bug, fail after upgrade
Ignore my previous comments. access_types and public_fields are not web2py variables. They are KPAX specific variables. Are you modifying KPAX? Massimo On 11 Lug, 13:18, mdipierro wrote: > db.users_group.access_types=['no','view','join'] > db.users_group.public_fields=['company','name','description','open'] > > should be > > db.users_group.access_types.requires=IS_IN_SET(['no','view','join']) > db.users_group.public_fields.requires=IS_IN_SET(['company','name','description','open']) > > On 11 Lug, 03:16, Frank wrote: > > > my model for users_group > > > db.define_table('users_group', > > Field('name'), > > Field('description','text',default='No group description'), > > Field('owner',db.auth_user), > > Field('company',db.auth_user), > > Field('open','boolean',default=False), > > Field('created_on','datetime',default=timestamp)) > > > db.users_group.company.requires=IS_IN_DB(db,'auth_user.id','%(company_name)s') > > db.users_group.name.requires=IS_NOT_EMPTY() > > db.users_group.owner.requires=IS_IN_DB(db,'auth_user.id','%(name)s') > > db.users_group.access_types=['no','view','join'] > > db.users_group.public_fields=['company','name','description','open']
[web2py] Re: Editable jqgrid
Thanks Dieter, Enter is about the only key that I have not pressed. This makes the jqgrid useless for my application, I had hoped for an grid you can edit anywhere on the grid and everything is either auto saved or saved when you press a Save key. Then I´ll just have to continue with my selfmade "grid". Kenneth On Jul 12, 2:29 am, AsmanCom wrote: > Hi, > > you have to press enter when you have finished your changes. > > Dieter Asman > > On 11 Jul., 22:45, Kenneth wrote: > > > Hello, > > > I´m trying to make a editable jqgrid or something like a editable > > jqgrid. It doesn´t have to be a jqgrid. > > > I have downloaded the plugin from Eban Software but can´t get it to > > work. If I edit a row in the grid it doesn´t get saved. Same if I go > > tohttp://app.ebansoftware.net/editable_jqgrid/default/show_example > > and try to edit a row, can´t get it to save the change. > > > Has anybody used the Eban Software plugin or something like that. > > > Kenneth
[web2py] Re: web2py Reference Manual -- a call to arms
Massimo, do you think 5M pageviews would be exceeded in any month for the time being? ra3don: I like your idea of a download version. If we pack all into a .w2p then the downloadable reference manual would be implemented. Then you could install it on your local machine and access it later, even if you didn't have an internet connection. Great for coding while traveling! Massimo, is the cube2py wiki ready to take on this task on GAE? If yes, I say we get on with it. We'd need volunteers to setup and administer. Once set up, the first order of business would be to develop (wiki pages, of course) a style guide for the various types of pages in the Reference Manual. The pages I can think of three types of pages off the top of my head: Index pages - organized alphabetically by function - organized alphabetically by parameter/attribute (non-statement) Manual page for web2py function Manual page for web2py parameter/attributes
Re: [web2py] Re: web2py Reference Manual -- a call to arms
What about having the reference manual divided in 9 apps. The limit is by app, and a single account can create 9 apps. One chapter per app. Sent from my iPhone On 11/07/2010, at 18:56, ra3don wrote: > One other thing we might consider, as Kenneth said 5 million monthly > page views, we could cut that by providing a download version of the > reference manual, so that us that frequent it aren't racking up on the > page views. > > On Jul 11, 8:39 am, Kenneth wrote: >> I´m intrested in helping setting up a reference manual, I have never >> done anthing like this before so help is needed, I´m neither so deep >> into web2py yet that I know where to start. >> >> I guess we need to start and agree on three things: >> >> a) type of manual, wiki or "php forum style". I think wiki sounds >> better for this as there are so many contributors, I think we get a >> better manual, easier to read. >> >> b) hosting, I have never used GAE so no idea what it would cost, on >> GAEs page is stated that you get "around 5 million monthly pageviews >> for free". Is this enough? If a CentOS box with Python 2.5 and Apache >> is better then I might be able to offer a hosting environment at least >> to start with. >> >> c) structure of the reference manual, is there somebody how could >> start sketching a structure of the reference manual, I don´t think we >> need a) and b) to start with sketching. >> >> On Jul 11, 1:27 am, weheh wrote: >> >> >> >>> Pepe, that's exactly what I was thinking. I haven't done anything like >>> this myself, so I have no experience. However, my assumption is that >>> should the number of hits get large enough, then whoever sets up the >>> app will have to start paying Google for bandwidth, etc. I have no >>> idea how expensive this would get long term. If Massimo supports the >>> doc, then it would make sense for all of us to chip in to support the >>> site, yes? >> >>> On Jul 10, 6:12 pm, Pepe wrote: >> can cube2py run in google app Engine?? >> if yes: why not run it on GAE to start from?? >> regards! >> Pepe >> On Jul 10, 2:01 pm, weheh wrote: >> > No, I don't think Pyforum is the answer. I am calling for a reference > manual. The existing documentation is slanted a little more towards a > tutorial form. I'm looking for a very dense, concise, and heavily > cross-indexed document/database of web2py statements and their > attributes, along with examples. I don't think a forum format lends > itself to that kind of knowledge base. Consider this group, which acts > as a forum. Many questions have been answered over the years, but the > data are hard to dredge up unless you come up with just the right > query. >> > On Jul 10, 1:47 pm, Bruno Rocha wrote: >> >> http://www.pyforum.org/Pyforum, could be a start! >> >> with little changes and putting it running on Google App Engine. >> >> 2010/7/10 weheh : >> >>> How shall we do the hosting? Who should administer the site? What to >>> call it? Shouldn't it be under web2py.com/reference_manual or some >>> such? >> >>> On Jul 10, 12:26 pm, mdipierro wrote: You can but set >> plugin_wiki_level=1 to disable embedded widgets for security >> On 10 Lug, 10:28, weheh wrote: >> > Why not use cube2py as the > wiki?http://groups.google.com/group/web2py/browse_thread/thread/5b8481c484... >> >> -- >> >> http://rochacbruno.com.br
[web2py] Re: Editable jqgrid
Hi, you have to press enter when you have finished your changes. Dieter Asman On 11 Jul., 22:45, Kenneth wrote: > Hello, > > I´m trying to make a editable jqgrid or something like a editable > jqgrid. It doesn´t have to be a jqgrid. > > I have downloaded the plugin from Eban Software but can´t get it to > work. If I edit a row in the grid it doesn´t get saved. Same if I go > tohttp://app.ebansoftware.net/editable_jqgrid/default/show_example > and try to edit a row, can´t get it to save the change. > > Has anybody used the Eban Software plugin or something like that. > > Kenneth
[web2py] Re: may be a bug, fail after upgrade
after change the db.users_group I get this error in 1.79.2, Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 178, in restricted exec ccode in environment File "C:/web2py/applications/nano/models/db.py", line 269, in db.users_group.access_types.requires=IS_IN_SET(['no','view','join']) File "C:\web2py\gluon\sql.py", line 1609, in __getattr__ return dict.__getitem__(self,key) KeyError: 'access_types' before when I use db.users_group.access_types=['no','view','join'], there are no errors. I learn this from kpax, it sound access_type and public_fields are attirbute of db.field, is it? and still db.auth_event have same problem like I mentioned in last post. thanks, Frank
[web2py] Re: translation data in a database
My advice it keep using the web2py translation but create a database copy and work on it. This may be useful web2py/scripts/sync_languages.py On 11 Lug, 17:16, max wrote: > thanks for the reply. > I have lots of small data tables, where i have the translations. They > are really a lot and I handle 5 langauges simmultaneously. > I have to add new words often and in the database i can add them once > and then it is ok. > but in the texts i have to write them manually and it is harder to > organize them. > max > > On 11 Jul., 14:10, Kenneth wrote: > > > The reason for not using a database is speed, I think. It is much > > faster to read a text file than read the texts from a database. > > > What kind of a problem do you have with the text files? > > > Kenneth > > > On Jul 11, 9:59 am, max wrote: > > > > I am writing a enterprise multi-linugual web application using > > > web2py. > > > I am having a hard time converting the csv files, language files in > > > the text format. > > > Is there any way that I can save the translation data in a database. > > > thanks a lot.
[web2py] Re: translation data in a database
thanks for the reply. I have lots of small data tables, where i have the translations. They are really a lot and I handle 5 langauges simmultaneously. I have to add new words often and in the database i can add them once and then it is ok. but in the texts i have to write them manually and it is harder to organize them. max On 11 Jul., 14:10, Kenneth wrote: > The reason for not using a database is speed, I think. It is much > faster to read a text file than read the texts from a database. > > What kind of a problem do you have with the text files? > > Kenneth > > On Jul 11, 9:59 am, max wrote: > > > I am writing a enterprise multi-linugual web application using > > web2py. > > I am having a hard time converting the csv files, language files in > > the text format. > > Is there any way that I can save the translation data in a database. > > thanks a lot.
[web2py] Re: web2py Reference Manual -- a call to arms
One other thing we might consider, as Kenneth said 5 million monthly page views, we could cut that by providing a download version of the reference manual, so that us that frequent it aren't racking up on the page views. On Jul 11, 8:39 am, Kenneth wrote: > I´m intrested in helping setting up a reference manual, I have never > done anthing like this before so help is needed, I´m neither so deep > into web2py yet that I know where to start. > > I guess we need to start and agree on three things: > > a) type of manual, wiki or "php forum style". I think wiki sounds > better for this as there are so many contributors, I think we get a > better manual, easier to read. > > b) hosting, I have never used GAE so no idea what it would cost, on > GAEs page is stated that you get "around 5 million monthly pageviews > for free". Is this enough? If a CentOS box with Python 2.5 and Apache > is better then I might be able to offer a hosting environment at least > to start with. > > c) structure of the reference manual, is there somebody how could > start sketching a structure of the reference manual, I don´t think we > need a) and b) to start with sketching. > > On Jul 11, 1:27 am, weheh wrote: > > > > > Pepe, that's exactly what I was thinking. I haven't done anything like > > this myself, so I have no experience. However, my assumption is that > > should the number of hits get large enough, then whoever sets up the > > app will have to start paying Google for bandwidth, etc. I have no > > idea how expensive this would get long term. If Massimo supports the > > doc, then it would make sense for all of us to chip in to support the > > site, yes? > > > On Jul 10, 6:12 pm, Pepe wrote: > > > > can cube2py run in google app Engine?? > > > > if yes: why not run it on GAE to start from?? > > > > regards! > > > > Pepe > > > > On Jul 10, 2:01 pm, weheh wrote: > > > > > No, I don't think Pyforum is the answer. I am calling for a reference > > > > manual. The existing documentation is slanted a little more towards a > > > > tutorial form. I'm looking for a very dense, concise, and heavily > > > > cross-indexed document/database of web2py statements and their > > > > attributes, along with examples. I don't think a forum format lends > > > > itself to that kind of knowledge base. Consider this group, which acts > > > > as a forum. Many questions have been answered over the years, but the > > > > data are hard to dredge up unless you come up with just the right > > > > query. > > > > > On Jul 10, 1:47 pm, Bruno Rocha wrote: > > > > > >http://www.pyforum.org/Pyforum, could be a start! > > > > > > with little changes and putting it running on Google App Engine. > > > > > > 2010/7/10 weheh : > > > > > > > How shall we do the hosting? Who should administer the site? What to > > > > > > call it? Shouldn't it be under web2py.com/reference_manual or some > > > > > > such? > > > > > > > On Jul 10, 12:26 pm, mdipierro wrote: > > > > > >> You can but set > > > > > > >> plugin_wiki_level=1 to disable embedded widgets for security > > > > > > >> On 10 Lug, 10:28, weheh wrote: > > > > > > >> > Why not use cube2py as the > > > > > >> > wiki?http://groups.google.com/group/web2py/browse_thread/thread/5b8481c484... > > > > > > -- > > > > > >http://rochacbruno.com.br
[web2py] Editable jqgrid
Hello, I´m trying to make a editable jqgrid or something like a editable jqgrid. It doesn´t have to be a jqgrid. I have downloaded the plugin from Eban Software but can´t get it to work. If I edit a row in the grid it doesn´t get saved. Same if I go to http://app.ebansoftware.net/editable_jqgrid/default/show_example and try to edit a row, can´t get it to save the change. Has anybody used the Eban Software plugin or something like that. Kenneth
[web2py] GAE/Jython
anyone running Web2py with Jython on GAE? just wondering...
[web2py] Re: cube2py
Ok I was wondering if I missed something. Sorry I'm not a good hacker, but I'll try to patch it On 11 juil, 20:21, mdipierro wrote: > On 11 Lug, 09:29, JmiXIII wrote: > > > Hello, > > > I've just tried to import plugin_wiki in my app. > > It seems to work nice and I think it will help me a lot. > > > Yet I've tried Crud via ``create. and list via ``jqgrid... > > * Would it be possible to have a full Crud interface with the jqgrid > > (I've noticed that create, del are set to false in plugin_wiki.py) > > * It seems that order,find,list (20,50,100) selection and other > > actions does not work, I can only see the list. Is it normal ? or > > should I add some code elsewhere ? > > It is in the queue. :-) > If you have a patch that can speed this up, please send it. > > > > > > > Eventually another helpfull idea (for me) would be to incorporate > > directly views from web2py in the wiki. > > > Anyway very good job done ! > > thanks
[web2py] Re: IS_IMAGE() broke?
I just recently added: db.Item.image.requires = IS_IMAGE() The records that existed prior to adding this line does not obey the IS_IMAGE() (ie: they still allow me to upload a PDF). All new records created DO work - they force me to select an image or else they show an error. steps to reproduce (untested) 1) create DB db.define_table('Item', Field('description'), Field('need', 'boolean'), Field('image', 'upload')) 2) add rows to the table 3) add rules: db.Item.category.requires = IS_IN_DB(db, db.Category.id,'%(name)s') db.Item.description.requires = IS_NOT_EMPTY() db.Item.image.requires = IS_IMAGE() 4) go back to the rows you added to the Item table and add non-image files - notice it works Does that help? On Jul 11, 11:42 am, mdipierro wrote: > Please tell us more. When do you get an error? What is the error? > > On 11 Lug, 11:57, Rob wrote: > > > > > This issue only happens for records that were created before I added > > the .requires fields. Error handling on new records works as > > expected... so... is it still a bug? > > > On Jul 11, 9:15 am, Rob wrote: > > > > db.define_table('Category', > > > Field('name')) > > > > db.define_table('Item', > > > Field('category', db.Category), > > > Field('description'), > > > Field('need', 'boolean'), > > > Field('image', 'upload')) > > > > db.Item.category.requires = IS_IN_DB(db, db.Category.id) > > > db.Item.description.requires = IS_NOT_EMPTY() > > > db.Item.image.requires = IS_IMAGE() > > > > def details(): > > > item = request.args(0) > > > form = crud.update(db.Item, item, next=URL(r=request, args=item)) > > > return dict(form=form) > > > > It allows me to upload PDFs and flashes 'record updated'
[web2py] Re: IS_IMAGE() broke?
Please tell us more. When do you get an error? What is the error? On 11 Lug, 11:57, Rob wrote: > This issue only happens for records that were created before I added > the .requires fields. Error handling on new records works as > expected... so... is it still a bug? > > On Jul 11, 9:15 am, Rob wrote: > > > db.define_table('Category', > > Field('name')) > > > db.define_table('Item', > > Field('category', db.Category), > > Field('description'), > > Field('need', 'boolean'), > > Field('image', 'upload')) > > > db.Item.category.requires = IS_IN_DB(db, db.Category.id) > > db.Item.description.requires = IS_NOT_EMPTY() > > db.Item.image.requires = IS_IMAGE() > > > def details(): > > item = request.args(0) > > form = crud.update(db.Item, item, next=URL(r=request, args=item)) > > return dict(form=form) > > > It allows me to upload PDFs and flashes 'record updated'
[web2py] Re: submit many forms
something like this? submit all On 11 Lug, 10:56, Rob wrote: > http://www.9lessons.info/2009/06/submit-multiple-forms-jquery-ajax.html > that might be better? apparently the issue is somewhat painful... > > On Jul 11, 7:02 am, Rick wrote: > > > Hi, > > > Let's say that there are a number of forms on the same page. There > > would be no problem to put a submit button after each of them, but how > > to submit all forms at the same time with one single submit button? > > > Thanks in advance for help!
[web2py] Re: cube2py
On 11 Lug, 09:29, JmiXIII wrote: > Hello, > > I've just tried to import plugin_wiki in my app. > It seems to work nice and I think it will help me a lot. > > Yet I've tried Crud via ``create. and list via ``jqgrid... > * Would it be possible to have a full Crud interface with the jqgrid > (I've noticed that create, del are set to false in plugin_wiki.py) > * It seems that order,find,list (20,50,100) selection and other > actions does not work, I can only see the list. Is it normal ? or > should I add some code elsewhere ? It is in the queue. :-) If you have a patch that can speed this up, please send it. > > Eventually another helpfull idea (for me) would be to incorporate > directly views from web2py in the wiki. > > Anyway very good job done ! > thanks
[web2py] Re: may be a bug, fail after upgrade
db.users_group.access_types=['no','view','join'] db.users_group.public_fields=['company','name','description','open'] should be db.users_group.access_types.requires=IS_IN_SET(['no','view','join']) db.users_group.public_fields.requires=IS_IN_SET(['company','name','description','open']) On 11 Lug, 03:16, Frank wrote: > my model for users_group > > db.define_table('users_group', > Field('name'), > Field('description','text',default='No group description'), > Field('owner',db.auth_user), > Field('company',db.auth_user), > Field('open','boolean',default=False), > Field('created_on','datetime',default=timestamp)) > > db.users_group.company.requires=IS_IN_DB(db,'auth_user.id','%(company_name)s') > db.users_group.name.requires=IS_NOT_EMPTY() > db.users_group.owner.requires=IS_IN_DB(db,'auth_user.id','%(name)s') > db.users_group.access_types=['no','view','join'] > db.users_group.public_fields=['company','name','description','open']
Re: [web2py] Re: web2py performance issue or rather my fault?
I suspect this is the GIL causing troubles with Rocket. I read http://packages.python.org/rocket/usage.html#architecture-considerations It seems that Rocket's people insist on using threading vs forking: this could be a major problem because of CPython's GIL. IMHO such implementation urges a migration to the processing module (http://pypi.python.org/pypi/processing) which comes included with python 2.6. I would investigate where there could be some resource starvation or lock on a per process basis (threads are single process for CPython) when using Rocket. ciao, michele 2010/7/8 mdipierro > I use apache + mod_wsgi and therefore there is no httpserver.log > logging. I will enable it. > > On 8 Lug, 08:15, Iceberg wrote: > > Me too experience similar issue as Rahul did. Issue:> > [sometimes, once > every few hits, it loads signifacantly slower > > > > weirdest thing is when you re-click the link it loads instantly, when > > > > you left it working to load on itself, it is slow.. like 4 to > > > > 8seconds ] > > > > ... or even dozens of seconds. :-/ > > > > My findings, well, not really: > > > > - Both my develop machine (windows xp home edition with latest > ServicePack), and my production machine (a Linux), have such issue > occasionally. Both environments uses web2py's built-in server, rocket or > cherrypy. Both serve no more than 10 people or so. > > > > - I could not find a pattern to reproduce the problem. On my development > laptop, I just got an impression that it is more likely to happen for the > first request after the web2py has been idle for long time due to no > workload. So perhaps it is because the OS had swapped out all memory owned > by web2py, therefore web2py need to "warm up" again. This is not web2py's > fault, I think. > > > > On my Linux production server, similar "pattern" exists (but I am not > sure, did not dig into httpserver.log to confirm that). > > > > Besides, the out-of-response is also likely to happen when user visit my > app's statistics page with 10+ charts showed by flash. Perhaps the sudden > burst of 10+ concurrent requests race each other? > > > > @Massimo: You can check your production server's httpserver.log to see > what is the longest (slowest) response time. If it is small enough, that is > good, otherwise ... oh by the way, do you use web2py's built-in server (now > rocket), or do you use apache-like frontend? That could make difference. > > > > Best regards, > > Iceberg, 2010-Jul-08, 20:50(PM), Thu > > > > --- Original Message --- > > From:mdipierro Sender: > web2py@googlegroups.com > > To: web2py-users > > Date:Thu, 8 Jul 2010 02:23:56 -0700 (PDT) > > Subject: [web2py] Re: web2py performance issue or rather my fault? > > > > --- > > > > > Whatever the problem is it must be resolved. The strange thing is I do > > > not experience this on my production system (~5 hits/day and > > > distinct 1600 visitors/day). > > > > > What could it be? > > > - cron when it runs spikes CPU usage. DO NOT USE. In production run > > > web2py cron in a separate process, not the one that runs the web > > > server. > > > - web2py session lock (the the same user can only access one page at > > > the time unless the lock is released via session._unlock()) > > > - sqlite lock (depending on the query and the complexity of > > > transaction this may take long) > > > - db connection pooling locks (when look up for open connection) > > > - cache locks (it is a global lock, to ensure data integrity) > > > - cache.ram can cause memory leaks if the key depends on variables > > > - problem with web server (Rocket or the apache or mod_wsgi, etc.) > > > > > On 8 Lug, 02:48, Rahul wrote: > > > > Hi All, > > > > I have experienced a similar issue with web2py. Issue: > > > > [sometimes, once every few hits, it loads signifacantly slower > > > > weirdest thing is when you re-click the link it loads instantly, when > > > > you left it working to load on itself, it is slow.. like 4 to > > > > 8seconds ] Earlier I reported this kind of issue in a separate > > > > thread. > > > > > > Some findings > > > > Office Env: > > > > My web2py powered site will be up in production soon and I am > awaiting > > > > for getting in-house feedback. I am testing this on my local system > > > > with the below config > > > > OS: Win xp professional version 2002 with sp2 (old but works fine) > > > > Machine: Intel P4, 2.8 GHz and 1 GB ram. > > > > Web2py version latest (Version 1.79.2 (2010-06-08 22:45:26) ) > > > > I encounter the above said issue every time the system is left idle > > > > for some minutes (Ex: If I start the web2py server and I am using my > > > > web2py application continuously, it works well but if left idle for > > > > some 5 mins or so, it becomes slow as mentioned above) > > > > > > At home tough: > > > > Home Env: > > > > OS: Win xp professional version 2002 with sp2 >
[web2py] Re: Can not send verification email
Solved, or at least hacked well enough for the time being :-) --enable_sendmail did the trick. It needs to be entered in the app launch settings in the GAE Launcher: * stop the app * double-click app in listing * enter --enable_sendmail in the Launcher settings "extra flags" field * restart the app Here's the blog post that put me on the right track: http://blog.docuverse.com/2009/01/30/google-app-engine-launcher-options/ Cheers, Mike On Jul 11, 12:20 pm, MikeEllis wrote: > I just modified my tools.py as follows: > > elif self.settings.server == 'gae': > logging.warn("using gae mail server") > from google.appengine.api import mail > attachments = attachments and > [(a.my_filename,a.my_payload) for a in attachments] > > ## gae mailer chokes on empty attachments or html > extra = dict(html=html, attachments=attachments) > for k in extra.keys(): > if not extra[k]: extra.pop(k) > > result = mail.send_mail(sender=self.settings.sender, > to=to, > subject=subject, body=text, > **extra) > logging.warn("result of mail.send_mail() is > %s"%repr(result)) > > This fixed the exceptions associated with empty attachments and html, > but no mail is being sent when testing under GAE Launcher, apparently > because something else needs to be done to enable it. Here's what's > showing up in the console log: > > WARNING 2010-07-11 15:57:04,413 tools.py:535] using gae mail server > INFO 2010-07-11 15:57:04,416 mail_stub.py:84] MailService.Send > INFO 2010-07-11 15:57:04,416 mail_stub.py:85] From: > myaddr...@gmail.com > INFO 2010-07-11 15:57:04,416 mail_stub.py:88] To: > myaddr...@gmail.com > INFO 2010-07-11 15:57:04,416 mail_stub.py:97] Subject: Email > verification > INFO 2010-07-11 15:57:04,416 mail_stub.py:100] Body: > INFO 2010-07-11 15:57:04,416 mail_stub.py:101] Content-type: > text/plain > INFO 2010-07-11 15:57:04,416 mail_stub.py:102] Data length: > 132 > INFO 2010-07-11 15:57:04,417 mail_stub.py:207] You are not > currently sending out real email. If you have sendmail installed you > can use it by using the server with --enable_sendmail > WARNING 2010-07-11 15:57:04,417 tools.py:545] result of > mail.send_mail() is None > > Since it's the gae server, I'm not sure if the bit about -- > enable_sendmail is relevant, but clearly something is not set up > correctly. Any ideas? > > I'm running GAE SDK 1.3.5 and web2py 1.92 on OS X 10.6.4 > > BTW, I'm wondering if the default registration page should be amended > to allow retrying the email notification when attempting to register > an unverified address that's already in the db. Having to use the > admin interface to delete the address each time while debugging mail > settings is time-consuming. > > Thanks, > Mike > > On Jun 19, 11:12 am, Larry wrote: > > > > > Peter, > > > This code looks good to me. I will adopt the same for now. > > > Larry > > > On Jun 19, 12:37 am, pecos1046 wrote: > > > > Hi Larry: > > > > Looking at your suggestion, I made a code change in tools.py and mail > > > with gae works well. Here my patch - so far so good, I wonder when it > > > will backfire. > > > > elif self.settings.server == 'gae': > > > from google.appengine.api import mail > > > attachments = attachments and > > > [(a.my_filename,a.my_payload) for a in attachments] > > > > if attachments and html: > > > result = > > > mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text, > > > html=html, > > > attachments=attachments) > > > > elif html: > > > result = > > > mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text, > > > html=html) > > > > elif attachments: > > > result = > > > mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text, > > > attachments=attachments) > > > > else: > > > result = > > > mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text) > > > > Thanks again > > > > Peter > > > > On Jun 17, 5:16 am, Larry wrote: > > > > > I was also getting thiserroron my first go at sending mail using > > > > gae. > > > > > I looked at the code in gluon/tools.py for sending gae mail : > > > > > elif self.settings.server == 'gae': > > > > from google.appengine.api import mail > > > > attachments = attachments and [(a.my_filename,a.my_payload) for a > > > > in attachments] > > > > result = mail.send_mail(sender=self.settin
[web2py] Re: IS_IMAGE() broke?
This issue only happens for records that were created before I added the .requires fields. Error handling on new records works as expected... so... is it still a bug? On Jul 11, 9:15 am, Rob wrote: > db.define_table('Category', > Field('name')) > > db.define_table('Item', > Field('category', db.Category), > Field('description'), > Field('need', 'boolean'), > Field('image', 'upload')) > > db.Item.category.requires = IS_IN_DB(db, db.Category.id) > db.Item.description.requires = IS_NOT_EMPTY() > db.Item.image.requires = IS_IMAGE() > > def details(): > item = request.args(0) > form = crud.update(db.Item, item, next=URL(r=request, args=item)) > return dict(form=form) > > It allows me to upload PDFs and flashes 'record updated'
[web2py] Re: Can not send verification email
Solved, or at least hacked well enough for the time being :-) --enable_sendmail did the trick. It needs to be entered in the app settings in the GAE Launcher: * stop the app * double-click app in listing * enter --enable_sendmail in listing Here's the blog post that put me on the right track: http://blog.docuverse.com/2009/01/30/google-app-engine-launcher-options/ Cheers, Mike On Jul 11, 12:20 pm, MikeEllis wrote: > I just modified my tools.py as follows: > > elif self.settings.server == 'gae': > logging.warn("using gae mail server") > from google.appengine.api import mail > attachments = attachments and > [(a.my_filename,a.my_payload) for a in attachments] > > ## gae mailer chokes on empty attachments or html > extra = dict(html=html, attachments=attachments) > for k in extra.keys(): > if not extra[k]: extra.pop(k) > > result = mail.send_mail(sender=self.settings.sender, > to=to, > subject=subject, body=text, > **extra) > logging.warn("result of mail.send_mail() is > %s"%repr(result)) > > This fixed the exceptions associated with empty attachments and html, > but no mail is being sent when testing under GAE Launcher, apparently > because something else needs to be done to enable it. Here's what's > showing up in the console log: > > WARNING 2010-07-11 15:57:04,413 tools.py:535] using gae mail server > INFO 2010-07-11 15:57:04,416 mail_stub.py:84] MailService.Send > INFO 2010-07-11 15:57:04,416 mail_stub.py:85] From: > myaddr...@gmail.com > INFO 2010-07-11 15:57:04,416 mail_stub.py:88] To: > myaddr...@gmail.com > INFO 2010-07-11 15:57:04,416 mail_stub.py:97] Subject: Email > verification > INFO 2010-07-11 15:57:04,416 mail_stub.py:100] Body: > INFO 2010-07-11 15:57:04,416 mail_stub.py:101] Content-type: > text/plain > INFO 2010-07-11 15:57:04,416 mail_stub.py:102] Data length: > 132 > INFO 2010-07-11 15:57:04,417 mail_stub.py:207] You are not > currently sending out real email. If you have sendmail installed you > can use it by using the server with --enable_sendmail > WARNING 2010-07-11 15:57:04,417 tools.py:545] result of > mail.send_mail() is None > > Since it's the gae server, I'm not sure if the bit about -- > enable_sendmail is relevant, but clearly something is not set up > correctly. Any ideas? > > I'm running GAE SDK 1.3.5 and web2py 1.92 on OS X 10.6.4 > > BTW, I'm wondering if the default registration page should be amended > to allow retrying the email notification when attempting to register > an unverified address that's already in the db. Having to use the > admin interface to delete the address each time while debugging mail > settings is time-consuming. > > Thanks, > Mike > > On Jun 19, 11:12 am, Larry wrote: > > > > > Peter, > > > This code looks good to me. I will adopt the same for now. > > > Larry > > > On Jun 19, 12:37 am, pecos1046 wrote: > > > > Hi Larry: > > > > Looking at your suggestion, I made a code change in tools.py and mail > > > with gae works well. Here my patch - so far so good, I wonder when it > > > will backfire. > > > > elif self.settings.server == 'gae': > > > from google.appengine.api import mail > > > attachments = attachments and > > > [(a.my_filename,a.my_payload) for a in attachments] > > > > if attachments and html: > > > result = > > > mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text, > > > html=html, > > > attachments=attachments) > > > > elif html: > > > result = > > > mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text, > > > html=html) > > > > elif attachments: > > > result = > > > mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text, > > > attachments=attachments) > > > > else: > > > result = > > > mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text) > > > > Thanks again > > > > Peter > > > > On Jun 17, 5:16 am, Larry wrote: > > > > > I was also getting thiserroron my first go at sending mail using > > > > gae. > > > > > I looked at the code in gluon/tools.py for sending gae mail : > > > > > elif self.settings.server == 'gae': > > > > from google.appengine.api import mail > > > > attachments = attachments and [(a.my_filename,a.my_payload) for a > > > > in attachments] > > > > result = mail.send_mail(sender=self.settings.sender, to=to, > > > > subjec
[web2py] Re: Can not send verification email
I just modified my tools.py as follows: elif self.settings.server == 'gae': logging.warn("using gae mail server") from google.appengine.api import mail attachments = attachments and [(a.my_filename,a.my_payload) for a in attachments] ## gae mailer chokes on empty attachments or html extra = dict(html=html, attachments=attachments) for k in extra.keys(): if not extra[k]: extra.pop(k) result = mail.send_mail(sender=self.settings.sender, to=to, subject=subject, body=text, **extra) logging.warn("result of mail.send_mail() is %s"%repr(result)) This fixed the exceptions associated with empty attachments and html, but no mail is being sent when testing under GAE Launcher, apparently because something else needs to be done to enable it. Here's what's showing up in the console log: WARNING 2010-07-11 15:57:04,413 tools.py:535] using gae mail server INFO 2010-07-11 15:57:04,416 mail_stub.py:84] MailService.Send INFO 2010-07-11 15:57:04,416 mail_stub.py:85] From: myaddr...@gmail.com INFO 2010-07-11 15:57:04,416 mail_stub.py:88] To: myaddr...@gmail.com INFO 2010-07-11 15:57:04,416 mail_stub.py:97] Subject: Email verification INFO 2010-07-11 15:57:04,416 mail_stub.py:100] Body: INFO 2010-07-11 15:57:04,416 mail_stub.py:101] Content-type: text/plain INFO 2010-07-11 15:57:04,416 mail_stub.py:102] Data length: 132 INFO 2010-07-11 15:57:04,417 mail_stub.py:207] You are not currently sending out real email. If you have sendmail installed you can use it by using the server with --enable_sendmail WARNING 2010-07-11 15:57:04,417 tools.py:545] result of mail.send_mail() is None Since it's the gae server, I'm not sure if the bit about -- enable_sendmail is relevant, but clearly something is not set up correctly. Any ideas? I'm running GAE SDK 1.3.5 and web2py 1.92 on OS X 10.6.4 BTW, I'm wondering if the default registration page should be amended to allow retrying the email notification when attempting to register an unverified address that's already in the db. Having to use the admin interface to delete the address each time while debugging mail settings is time-consuming. Thanks, Mike On Jun 19, 11:12 am, Larry wrote: > Peter, > > This code looks good to me. I will adopt the same for now. > > Larry > > On Jun 19, 12:37 am, pecos1046 wrote: > > > > > Hi Larry: > > > Looking at your suggestion, I made a code change in tools.py and mail > > with gae works well. Here my patch - so far so good, I wonder when it > > will backfire. > > > elif self.settings.server == 'gae': > > from google.appengine.api import mail > > attachments = attachments and > > [(a.my_filename,a.my_payload) for a in attachments] > > > if attachments and html: > > result = > > mail.send_mail(sender=self.settings.sender, to=to, > > subject=subject, body=text, > > html=html, > > attachments=attachments) > > > elif html: > > result = > > mail.send_mail(sender=self.settings.sender, to=to, > > subject=subject, body=text, > > html=html) > > > elif attachments: > > result = > > mail.send_mail(sender=self.settings.sender, to=to, > > subject=subject, body=text, > > attachments=attachments) > > > else: > > result = > > mail.send_mail(sender=self.settings.sender, to=to, > > subject=subject, body=text) > > > Thanks again > > > Peter > > > On Jun 17, 5:16 am, Larry wrote: > > > > I was also getting thiserroron my first go at sending mail using > > > gae. > > > > I looked at the code in gluon/tools.py for sending gae mail : > > > > elif self.settings.server == 'gae': > > > from google.appengine.api import mail > > > attachments = attachments and [(a.my_filename,a.my_payload) for a > > > in attachments] > > > result = mail.send_mail(sender=self.settings.sender, to=to, > > > subject=subject, body=text, html=html, > > > attachments=attachments) > > > > and retried after removing the attachments=attachments from the > > > send_mail and it worked if I send both text and html versions of the > > > message. > > > > I assume gae does not like the attachments value being None. > > > > Larry > > > > On Jun 11, 9:25 pm, mdipierro wrote: > > > > > if you use server='gae' you should use login=None > > > > Not sure if this is the problem anyway. Do you get anyerror? > > > > > On 11 Giu, 10:12, pecos1046 wrote: > > > > > > I use theemailverification option for new user registra
[web2py] IS_IMAGE() broke?
db.define_table('Category', Field('name')) db.define_table('Item', Field('category', db.Category), Field('description'), Field('need', 'boolean'), Field('image', 'upload')) db.Item.category.requires = IS_IN_DB(db, db.Category.id) db.Item.description.requires = IS_NOT_EMPTY() db.Item.image.requires = IS_IMAGE() def details(): item = request.args(0) form = crud.update(db.Item, item, next=URL(r=request, args=item)) return dict(form=form) It allows me to upload PDFs and flashes 'record updated'
[web2py] Re: submit many forms
http://www.9lessons.info/2009/06/submit-multiple-forms-jquery-ajax.html that might be better? apparently the issue is somewhat painful... On Jul 11, 7:02 am, Rick wrote: > Hi, > > Let's say that there are a number of forms on the same page. There > would be no problem to put a submit button after each of them, but how > to submit all forms at the same time with one single submit button? > > Thanks in advance for help!
[web2py] Re: submit many forms
after a quick google search: http://www.codetoad.com/forum/15_24387.asp Looks like it can easily be done with JS. Good luck! On Jul 11, 7:02 am, Rick wrote: > Hi, > > Let's say that there are a number of forms on the same page. There > would be no problem to put a submit button after each of them, but how > to submit all forms at the same time with one single submit button? > > Thanks in advance for help!
[web2py] cube2py
Hello, I've just tried to import plugin_wiki in my app. It seems to work nice and I think it will help me a lot. Yet I've tried Crud via ``create. and list via ``jqgrid... * Would it be possible to have a full Crud interface with the jqgrid (I've noticed that create, del are set to false in plugin_wiki.py) * It seems that order,find,list (20,50,100) selection and other actions does not work, I can only see the list. Is it normal ? or should I add some code elsewhere ? Eventually another helpfull idea (for me) would be to incorporate directly views from web2py in the wiki. Anyway very good job done ! thanks
[web2py] submit many forms
Hi, Let's say that there are a number of forms on the same page. There would be no problem to put a submit button after each of them, but how to submit all forms at the same time with one single submit button? Thanks in advance for help!
[web2py] Re: web2py Reference Manual -- a call to arms
I´m intrested in helping setting up a reference manual, I have never done anthing like this before so help is needed, I´m neither so deep into web2py yet that I know where to start. I guess we need to start and agree on three things: a) type of manual, wiki or "php forum style". I think wiki sounds better for this as there are so many contributors, I think we get a better manual, easier to read. b) hosting, I have never used GAE so no idea what it would cost, on GAEs page is stated that you get "around 5 million monthly pageviews for free". Is this enough? If a CentOS box with Python 2.5 and Apache is better then I might be able to offer a hosting environment at least to start with. c) structure of the reference manual, is there somebody how could start sketching a structure of the reference manual, I don´t think we need a) and b) to start with sketching. On Jul 11, 1:27 am, weheh wrote: > Pepe, that's exactly what I was thinking. I haven't done anything like > this myself, so I have no experience. However, my assumption is that > should the number of hits get large enough, then whoever sets up the > app will have to start paying Google for bandwidth, etc. I have no > idea how expensive this would get long term. If Massimo supports the > doc, then it would make sense for all of us to chip in to support the > site, yes? > > On Jul 10, 6:12 pm, Pepe wrote: > > > can cube2py run in google app Engine?? > > > if yes: why not run it on GAE to start from?? > > > regards! > > > Pepe > > > On Jul 10, 2:01 pm, weheh wrote: > > > > No, I don't think Pyforum is the answer. I am calling for a reference > > > manual. The existing documentation is slanted a little more towards a > > > tutorial form. I'm looking for a very dense, concise, and heavily > > > cross-indexed document/database of web2py statements and their > > > attributes, along with examples. I don't think a forum format lends > > > itself to that kind of knowledge base. Consider this group, which acts > > > as a forum. Many questions have been answered over the years, but the > > > data are hard to dredge up unless you come up with just the right > > > query. > > > > On Jul 10, 1:47 pm, Bruno Rocha wrote: > > > > >http://www.pyforum.org/Pyforum, could be a start! > > > > > with little changes and putting it running on Google App Engine. > > > > > 2010/7/10 weheh : > > > > > > How shall we do the hosting? Who should administer the site? What to > > > > > call it? Shouldn't it be under web2py.com/reference_manual or some > > > > > such? > > > > > > On Jul 10, 12:26 pm, mdipierro wrote: > > > > >> You can but set > > > > > >> plugin_wiki_level=1 to disable embedded widgets for security > > > > > >> On 10 Lug, 10:28, weheh wrote: > > > > > >> > Why not use cube2py as the > > > > >> > wiki?http://groups.google.com/group/web2py/browse_thread/thread/5b8481c484... > > > > > -- > > > > >http://rochacbruno.com.br
Re: [web2py] Re: Customizing Auth to use Username Instead of Email?
Thats works better! with normal form=auth() it append /login argument at every page making request.args(0) fail. thanks alot massimo! On Sun, Jul 11, 2010 at 6:44 AM, mdipierro wrote: > You did not say so before. Forget the action. In views.html: > > {if auth.user:}} > {{=T('Welcome %s',auth.user.first_name)}} > [{{=A(T('logout'),_href=URL(r=request,c='default',f='user/ > logout'))}}] > {{else}} > {{form=auth.login()}} <<< > > {{=form.custom.begin}} > Username: {{=form.custom.widget.username}} > Password: {{=form.custom.widget.password}} > > {{=form.custom.end}} > > {{pass}} > > > > On 10 Lug, 18:37, Phyo Arkar wrote: > > What i am trying to do is include login/logout form in Every view so i am > > putting it in layout.html . Thats why it is confusing. > > Lol , but i finally got it working , Thank you Prof! > > > > i added {{form=auth()}} inside there.. > > > > {if auth.user:}} > >{{=T('Welcome %s',auth.user.first_name)}} > > [{{=A(T('logout'),_href=URL(r=request,c='default',f='user/logout'))}}] > > {{pass}} > > {{form=auth()}} << HERE lol.. > > {{if request.args(0)=='login':}} > > > > > > {{=form.custom.begin}} > > Username: {{=form.custom.widget.username}} > > Password: {{=form.custom.widget.password}} > > > > {{=form.custom.end}} > > > > > > {{else:}} > > {{=form}} > > {{pass}} > > > > But i think it is BAD way ? > > > > On Sat, Jul 10, 2010 at 11:09 PM, mdipierro > wrote: > > > {{if auth.user:}} > > > {{=T('Welcome %s',auth.user.first_name)}} > > > [{{=A(T('logout'),_href=URL(r=request,c='default',f='user/logout'))}}] > > > {{pass}} > > > {{if request.args(0)=='login':}} If this is a login form user custom > > > > > > > > {{=form.custom.begin}} > > > Username: {{=form.custom.widget.username}} > > > Password: {{=form.custom.widget.password}} > > > > > > {{=form.custom.end}} > > > > > > > > {{else:}} use default form for register/profile/etc/etc. > > > {{=form}} > > > {{pass}} >
[web2py] Re: GAE Launcher error trying to import from _ctypes
The thread on the googleappengine site contains posts from a google employee who seems to be responsible for the issue. He doesn't explicitly say so, but I get the impression they *intend* to support 2.6 but, for whatever reason, haven't committed a fix for this particular problem on OS X. On Jul 11, 2:53 am, mdipierro wrote: > I do not understand why don't they check the Python version and report > a wrong version as an error? > > On 10 Lug, 23:32, MikeEllis wrote: > > > > > Solved. GAE doesn't like 2.6 on OS X. Changing to 2.5 via the > > Preferences dialog in Launcher fixed it (but I had to quit and restart > > the Launcher app for it to take effect). More on this issue > > athttp://code.google.com/p/googleappengine/issues/detail?id=985 > > if anyone cares. > > > Cheers, > > Mike > > > On Jul 10, 11:52 pm, MikeEllis wrote: > > > > I'm trying to get started with GAE. Just downloaded GAE SDK 1.3.5 and > > > installed on OS X 10.6.4. > > > > Seems to be working for a trivial hello world example that doesn't use > > > web2py but I can't get any of my web2py apps to run, even a brand new > > > one created with the admin interface. Dies importing from gluon.tools > > > with the following error: > > > > Traceback (most recent call last): > > > File "/Users/mellis/web2py/gluon/restricted.py", line 178, in > > > restricted > > > exec ccode in environment > > > File "/Users/mellis/web2py/applications/hellogae/models/db.py", line > > > 29, in > > > from gluon.tools import * > > > File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/ > > > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ > > > google/appengine/tools/dev_appserver.py", line 1286, in Decorate > > > return func(self, *args, **kwargs) > > > > --- < SNIP > - > > > > File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/ > > > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ > > > google/appengine/tools/dev_appserver.py", line 1789, in > > > LoadModuleRestricted > > > description) > > > File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/ > > > python2.6/ctypes/__init__.py", line 10, in > > > from _ctypes import Union, Structure, Array > > > ImportError: No module named _ctypes > > > > Not sure what's going on. > > > * All apps run fine on localhost under rocket.py > > > * I can open python on the command line and execute the failing import > > > statement without error. > > > > What dumb thing have I overlooked? > > > > Thanks, > > > Mike
[web2py] Re: translation data in a database
The reason for not using a database is speed, I think. It is much faster to read a text file than read the texts from a database. What kind of a problem do you have with the text files? Kenneth On Jul 11, 9:59 am, max wrote: > I am writing a enterprise multi-linugual web application using > web2py. > I am having a hard time converting the csv files, language files in > the text format. > Is there any way that I can save the translation data in a database. > thanks a lot.
[web2py] State of the DAL rewrite
I would like to know the status of the DAL rewrite in respect to NoSQL support. How can I help in the work being done?
[web2py] Re: markmin, t2, t3, cube9 etc. (important update)
Comment below On Jul 10, 9:32 am, mdipierro wrote: > Answers below > > On 9 Lug, 21:42, Scott wrote: > > > I think this should replace the Welcome application and the > > documentation should be integrated into the web2py book. I'm > > impressed with the complete rewrite! I like the way that you get > > web2py-admin-esque functionality without having to use the admin > > directly, and it all works through Google App Engine. It certainly > > makes page creation easier. > > > Out of curiosity, would you need to use a custom routes.py to remove > > (rewrite) "plugin_wiki" from the URL? I'd probably want to hide that > > from casual users. > > > A few suggestions and questions: > > - Consider an internally-hosted chart generator (e.g. jqPlot) in lieu > > of Google Charts API; this will allow the charts to generate behind > > corporate firewalls > > This is a good point. I will do it. > > > - Can the tag cloud be made hyper-linkable? That is to say, clicking > > on a word in the tag cloud might show a list of relevant tagged pages. > > Can be done but right now there is a logic problem. Which pages should > the tags link to? I guess wiki pages with the names of the tags? > > > - What is the future direction of cube2py? It seems that most of the > > functionality coded in the View can be replaced with cube2py and > > markmin. It also replaces some of the code normally located in the > > Controller such as CRUD and jqGrid functionality. If this is the > > case, is it the intent to replace the admin with cube2py? > > It cannot be a replacement. In admin you edit files and code is in > files. With cube2py you edit only the database and code is in the > database. I think they must coexist. I understand that it cannot be a replacement. And this creates a difficulty for beginners (like me...) as it is sometimes hard to see where to put/do what, as there might be different ways to do things. This can become problematic because not all ways are as robust/clean/ efficient/secure... as they should be. Therefore I believe it would be nice and welcome if a few examples/guidelines/explanations regarding this issue would be givenn somewhere... Thanks! > > Thanks! > >
[web2py] Re: may be a bug, fail after upgrade
my model for users_group db.define_table('users_group', Field('name'), Field('description','text',default='No group description'), Field('owner',db.auth_user), Field('company',db.auth_user), Field('open','boolean',default=False), Field('created_on','datetime',default=timestamp)) db.users_group.company.requires=IS_IN_DB(db,'auth_user.id','%(company_name)s') db.users_group.name.requires=IS_NOT_EMPTY() db.users_group.owner.requires=IS_IN_DB(db,'auth_user.id','%(name)s') db.users_group.access_types=['no','view','join'] db.users_group.public_fields=['company','name','description','open']
[web2py] Re: may be a bug, fail after upgrade
I found db.auth_event in admin in my program have same problem in 1.79.2 while not problem in 1.76.4 and got same error message as following. Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 178, in restricted exec ccode in environment File "C:/web2py/applications/nano/views/appadmin.html", line 136, in File "C:\web2py\gluon\globals.py", line 105, in write self.body.write(xmlescape(data)) File "C:\web2py\gluon\html.py", line 104, in xmlescape return data.xml() File "C:\web2py\gluon\html.py", line 547, in xml (fa, co) = self._xml() File "C:\web2py\gluon\html.py", line 538, in _xml self.components]) File "C:\web2py\gluon\html.py", line 104, in xmlescape return data.xml() File "C:\web2py\gluon\html.py", line 547, in xml (fa, co) = self._xml() File "C:\web2py\gluon\html.py", line 538, in _xml self.components]) File "C:\web2py\gluon\html.py", line 104, in xmlescape return data.xml() File "C:\web2py\gluon\html.py", line 547, in xml (fa, co) = self._xml() File "C:\web2py\gluon\html.py", line 538, in _xml self.components]) File "C:\web2py\gluon\html.py", line 104, in xmlescape return data.xml() File "C:\web2py\gluon\html.py", line 547, in xml (fa, co) = self._xml() File "C:\web2py\gluon\html.py", line 538, in _xml self.components]) File "C:\web2py\gluon\html.py", line 104, in xmlescape return data.xml() File "C:\web2py\gluon\html.py", line 547, in xml (fa, co) = self._xml() File "C:\web2py\gluon\html.py", line 538, in _xml self.components]) File "C:\web2py\gluon\html.py", line 104, in xmlescape return data.xml() File "C:\web2py\gluon\sql.py", line 1467, in __getattr__ self.__allocate() File "C:\web2py\gluon\sql.py", line 1462, in __allocate raise Exception, "undefined record" Exception: undefined record Frank
[web2py] Re: crud.update not updating image correctly?
FYI, the problem also appears when using SQLFORM. Your fix works when using crud - slightly modified: form = crud.update(db.Item, item, next=URL(r=request, args=item)) This fix doesn't appear to work for SQLFORM. On Jul 10, 11:46 pm, mdipierro wrote: > form = crud.update(db.Item, item,next=URL(r=request)) > > but this should be considered a bug in sqlhtml.py and I will try fix > it. > > On 10 Lug, 20:06, Rob wrote: > > > > > db: > > db.define_table('Item', > > Field('description'), > > Field('need', 'boolean'), > > Field('image', 'upload')) > > > controller: > > def update(): > > item = request.args(0) > > form = crud.update(db.Item, item) > > return dict(form=form) > > > When I upload a different image, the old image still shows until a > > page refresh happens. What trickery do I need to do it to act > > correctly? > > > Thanks again...
[web2py] translation data in a database
I am writing a enterprise multi-linugual web application using web2py. I am having a hard time converting the csv files, language files in the text format. Is there any way that I can save the translation data in a database. thanks a lot.