[web2py] Re: wiki-meta-header, meta-footer, etc.... edit "layout.html"
Got it. Thank you! On Dec 23, 10:16 pm, mdipierro wrote: > edit the default view layout.html as follows > > [...] > left_sidebar_enabled = globals().get('left_sidebar_enabled',true); // > <<< was false > [...] > > {{block header}} > {{=plugin_wiki.embed_page('meta-header') or 'header'}} > {{end}} > > [...] > > > {{block left_sidebar}} > {{=plugin_wiki.embed_page('meta-sidebar') or > 'sidebar'}} > {{end}} > > > [...] > > {{block footer}} > {{=plugin_wiki.embed_page('meta-footer') or 'footer'}} > {{end}} > > [...] > > On Dec 23, 10:04 pm, cadrentes wrote: > > > > > Can you provide some more details on the plugin_wiki layout feature. > > I'm afraid the "appropriate places" are not obvious to me. > > > "meta-header, meta-footer, meta-sidebar are not used by the default > > layout in "welcome/views/layout.html". If you want to use them edit > > "layout.html" using admin (or the shell) and place the following tags > > in the appropriate places:" > > > Thanks!- Hide quoted text - > > - Show quoted text -
[web2py] wiki-meta-header, meta-footer, etc.... edit "layout.html"
Can you provide some more details on the plugin_wiki layout feature. I'm afraid the "appropriate places" are not obvious to me. "meta-header, meta-footer, meta-sidebar are not used by the default layout in "welcome/views/layout.html". If you want to use them edit "layout.html" using admin (or the shell) and place the following tags in the appropriate places:" Thanks!
[web2py] Re: Any web2py/python web developers in Salt Lake City?
Thanks for your response! I'll check out experts4solutions.com. On Nov 30, 7:16 am, DenesL wrote: > You can find people from all over the world in experts4solutions.com, > or post an offer here and choose from the replies. > > On Nov 30, 12:39 am,cadrentes wrote: > > > I've been learning but too slowly to put together the application I > > envision, not my main job...looking for someone who can help. > >
[web2py] Any web2py/python web developers in Salt Lake City?
I've been learning but too slowly to put together the application I envision, not my main job...looking for someone who can help.
[web2py] bar_chart widget in cube2py table data?
Can I use data from a table to build the charts and tables instead of a comma delimited list? If yes, how?
[web2py] Re: plugin_wiki with 1.82.1 "meta" page error
Thanks! That took care of the error. I tested all but the meta-code. The meta-menu works but the other "meta's" are being trumped...for example, the footer remains "Copyright © 2010 - Powered by web2py" instead of being replaced by "meta-footer" when I create the pages. On Aug 5, 4:40 pm, mdipierro wrote: > I posted it now at > > http://web2py.com/examples/static/web2py.plugin.wiki.w2p > > please check it. > > On Aug 5, 5:33 pm, mdipierro wrote: > > > This is fixed in this version of the plugins: > > >http://code.google.com/p/cube2py/ > > > will repost it on web2py.com tomorrow. > > > On Aug 5, 3:46 pm, cadrentes wrote: > > > > I'm running 1.82.1 and installed plugin_wiki. When attempting to > > > create "meta" pages I get the following error: > > > > File "/home/www-data/web2py/applications/welcome/controllers/ > > > plugin_wiki.py", line 70, in page_edit body=request.vars.template > > > and w(slug=request.vars.template).body or '')AttributeError: > > > 'NoneType' object has no attribute 'body' > > > > Any suggestions? > >
[web2py] plugin_wiki with 1.82.1 "meta" page error
I'm running 1.82.1 and installed plugin_wiki. When attempting to create "meta" pages I get the following error: File "/home/www-data/web2py/applications/welcome/controllers/ plugin_wiki.py", line 70, in page_editbody=request.vars.template and w(slug=request.vars.template).body or '')AttributeError: 'NoneType' object has no attribute 'body' Any suggestions?
[web2py] Re: Error on install script?
I don't know the answer but I may have found a clue. When I try to manually install the pwauth line of the script, it's not found in the repository. I copied Massimo's vimeo instructions exactly and got the same error. Oddly, it started working when I screwed with the link (but probably not as intended). On May 9, 8:24 pm, Pepe wrote: > setting up PAM > > Reading package lists... Done > Building dependency tree > Reading state information... Done > E: Couldn't find package pwauth > restarting apage > > * Restarting web server apache2 > * We failed to correctly shutdown apache, so we're now killing all > running apache processes. > This is almost certainly suboptimal, so please make sure your system > is working as you'd expect now! > > apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: > Could not open configuration file /etc/apache2/mods-enabled/ > authnz_external.load: No such file or directory > > on VPS.net ubuntu 8.04 LTS > > any help please!
[web2py:36226] Re: TypeError: slice indices must be integers or None or have an __index__ method
Sure, This is the "cookbook" application lightly modifed to take notes on case followup. I believe I had it running on 1.67. I think this is where it is hanging: def new_sda(): form=SQLFORM(db.sda,fields= ['date','fidname','vetname','status','acctdue_at_513',\ 'filenum','employee','comments']) if form.accepts(request.vars,session): redirect(URL(r=request,f='sdas')) return dict(form=form) Below is all of the code: The Model: import datetime; now=datetime.date.today() db=SQLDB('sqlite://db.db') db.define_table('identify',SQLField('fidname','string')) db.define_table('current_status',SQLField('status','string')) db.define_table('sda', SQLField('fidname',db.identify), SQLField('status',db.current_status), SQLField('employee','string'), SQLField('comments','text'), SQLField('filenum', length=10), SQLField('date','date',default=now), SQLField ('acctdue_at_513','string',default='-00-00'), SQLField('vetname','string')) db.current_status.status.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB (db,'current_status.status')] db.identify.fidname.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB (db,'identify.fidname')] db.sda.filenum.requires=[IS_NOT_EMPTY()] db.sda.comments.requires=IS_NOT_EMPTY() db.sda.fidname.requires=IS_IN_DB (db,'identify.fidname','identify.fidname') db.sda.status.requires=IS_IN_DB (db,'current_status.status','current_status.status') db.sda.employee.requires=IS_NOT_EMPTY() Controller: @auth.requires_login() def sdas(): if not session.counter: session.counter = 1 else: session.counter += 1 records=db(db.sda.fidname==request.vars.fidname)\ .select( orderby=db.sda.filenum | ~db.sda.date) form=SQLFORM(db.sda, fields=['fidname']) return dict(form=form,records=records,counter=session.counter) @auth.requires_login() def show(): id=request.vars.id sdas=db(db.sda.id==id).select() if not len(sdas): redirect(URL(r=request,f='sdas')) return dict(sda=sdas[0]) @auth.requires_login() def new_sda(): form=SQLFORM(db.sda,fields= ['date','fidname','vetname','status','acctdue_at_513',\ 'filenum','employee','comments']) if form.accepts(request.vars,session): redirect(URL(r=request,f='sdas')) return dict(form=form) def new_fiduciary(): form=SQLFORM(db.identify) if form.accepts(request.vars,session): redirect(URL(r=request, f='sdas')) return dict(form=form) @auth.requires_login() def count(): results=db(db.sda.id>1).count() if results < 1: redirect(URL(r=request,f='sdas')) #sdas=db(db.sda.id==id).select() #if not len(sdas): redirect(URL(r=request,f='sdas')) #return dict(results=results, sda=sdas[0]) return dict(results=results) On Nov 30, 9:41 am, mdipierro wrote: > Can you show us a could of lines from the code that cause the error? > What version are you upgrading from? > > On Nov 30, 9:53 am, cadrentes wrote: > > > > > I'm not sure this is the right forum for this discussion, any guidance > > in appreciated. After upgrading to 1.72.3 I get the following error > > in one of my applications: "TypeError: slice indices must be integers > > or None or have an __index__ method" > > > What should I be looking at to fix this. The bug report takes me to > > the "if vars accepts" line. > > > Thanks > > Richard- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36213] TypeError: slice indices must be integers or None or have an __index__ method
I'm not sure this is the right forum for this discussion, any guidance in appreciated. After upgrading to 1.72.3 I get the following error in one of my applications: "TypeError: slice indices must be integers or None or have an __index__ method" What should I be looking at to fix this. The bug report takes me to the "if vars accepts" line. Thanks Richard -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:29609] Re: web2py book, 2nd Ed
It is well worth buying a second time. Thanks Massimo! I'm using web2py at work and it is really wowing the boss! On Aug 26, 3:34 am, mdipierro wrote: > The new web2py book is available on lulu.com > > http://www.lulu.com/content/e-book/web2py/4968879 > > Lots of new stuff with100 more pages (341 pages in total). Covers > Auth, Crud, Services, interaction with Pyjamas, PyAMF, and better > deployment recipes. > > Same price as before ($12.5) and same ID (which means if you bought > the old one you should be able to get the new one for free). > > I am also looking into posting it on scribd (free viewing but no > download) and it will be published printed by Wiley soon. > > Thanks to all those who collaborated by sending corrections. I hope I > acknowledged everybody properly in the introduction. If I forgot you > let me know. > > Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py:19090] Re: Writing a Book
I guess I shouldn't use 'programming'. I suppose 'development' is a better word for putting together a project on web2py. That's what's great about web2py. I can develop an application without being a programmer. But I am expecting to learn what {{pass}} means, eventually, and pick apart the .py files behind the scenes. Learning sql has been very helpful, although not entirely necessary. I want to build applications quickly but I also want to drill down into the platform to become a better user and a programmer. I think wiki's and web-based books are a great way to delve deeper and look forward to seeing what you come up with. The manual is great. No troubles there. On Apr 3, 8:26 am, TheDude wrote: > In response to cadrentes and to elaborate on the project more... > > The book will be made for people who don't have a lot of time on their > hands and would like to get their hands "dirty" with Web2Py as fast as > possible. Most of the book will contain links to resources and guides, > including videos, recipes, plugins, and etc. It will help you migrate > into the Web2Py community easily and understand all of the jargon used > within Web2Py (which isn't a lot). > > The only thing I'd be worried about is what cadrentes said, he doesn't > know much about programming but the web2py book assumes he does. The > thing is, web2py book is about..well learning web2py not programming. > There are many other excellent resources for learning python. In > Massimo's book, it seems like he does teach a bare-bones-minimum > python programming to get you by on what you need. So cadrentes, what > were some of the things that you found troubling in the Web2Py Manual > book? > > Overall, I think I'll be writing a lot of versions of the book online > and keep improving on it, and then eventually publishing it once I > feel the book has matured enough. > > Thanks for all of your help guys. :) > > On Apr 3, 9:53 am, cadrentes wrote: > > > I'm 38. I've been running Linux for a few years but I have no > > programming experience ecxept; copy and past some VBA in Excel, a few > > shell scripts, and a brief attempt at figuring out CakePHP. I've had > > a copy of Massimo's book for about a month and it is great! I've > > already put together a productivity application for my position at > > work. But what really helps someone like me, who has about 20 minutes > > a day to study these things, are working examples and the vimeo's he > > put's out. I find that applying a solution helps my understanding of > > the programming concept, which comes later. > > > One thing I've noticed is that the programming community assumes I > > know much more about programming concepts than I actually do. Having > > examples with links to elaboration would be ideal. > > > On Apr 1, 12:28 pm, TheDude wrote: > > > > (This isn't an April Fool's Joke) > > > > So, I've been writing a book for Web2Py, but recently came towards a > > > new direction...we already have a great in-depth book writeen by > > > Massimo so I was wondering... > > > > Would you guys be interested in a book for web2py like 250 pages long > > > that goes in-depth? Or, a nice little quick start guide :D here's the > > > thing, BOTH will be able to teach you the fundamentals that you'll > > > need to create 80%+ web applications. One will just tell you how to do > > > things, but then link you to the documentation page available on > > > web2py.com for more information. > > > > Examples: > > > (QuickStart) > > > In order to create a table for our database, we'll need to define > > b> our table. > > > code: > > > db.define_table('tablename', > > > SQLField('fieldname','string', notnull=True) > > > SQLField('fieldname2','integer', notnull=True), > > > ) > > > > Let's say we wanted to have a table reference the "tablename" table. > > > db.define_table('table2', > > > SQLField('tablename_id', db.tablename), > > > SQLField('imafield','boolean'), > > > ) > > > > > > the DAL explantion page for all options> > > > > I think the quick-start guide will really help boost the web2py > > > community and get people started on a project. It's similar to the > > > Dojo, but a bit different since it'll go more in-depth than the Dojo > > > but at the same time you don't have to learn everything. :) It will > > > skip things like "What is MVC?" and "Why Web2Py framework" etc. I > > > believe Massimo has already full-filled that information. > > > > The book will be available online (HTML) and PDF as well as a > > > published book. > > > > Please let me know if your thoughts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py:19011] Re: Writing a Book
I'm 38. I've been running Linux for a few years but I have no programming experience ecxept; copy and past some VBA in Excel, a few shell scripts, and a brief attempt at figuring out CakePHP. I've had a copy of Massimo's book for about a month and it is great! I've already put together a productivity application for my position at work. But what really helps someone like me, who has about 20 minutes a day to study these things, are working examples and the vimeo's he put's out. I find that applying a solution helps my understanding of the programming concept, which comes later. One thing I've noticed is that the programming community assumes I know much more about programming concepts than I actually do. Having examples with links to elaboration would be ideal. On Apr 1, 12:28 pm, TheDude wrote: > (This isn't an April Fool's Joke) > > So, I've been writing a book for Web2Py, but recently came towards a > new direction...we already have a great in-depth book writeen by > Massimo so I was wondering... > > Would you guys be interested in a book for web2py like 250 pages long > that goes in-depth? Or, a nice little quick start guide :D here's the > thing, BOTH will be able to teach you the fundamentals that you'll > need to create 80%+ web applications. One will just tell you how to do > things, but then link you to the documentation page available on > web2py.com for more information. > > Examples: > (QuickStart) > In order to create a table for our database, we'll need to define b> our table. > code: > db.define_table('tablename', > SQLField('fieldname','string', notnull=True) > SQLField('fieldname2','integer', notnull=True), > ) > > Let's say we wanted to have a table reference the "tablename" table. > db.define_table('table2', > SQLField('tablename_id', db.tablename), > SQLField('imafield','boolean'), > ) > > the DAL explantion page for all options> > > I think the quick-start guide will really help boost the web2py > community and get people started on a project. It's similar to the > Dojo, but a bit different since it'll go more in-depth than the Dojo > but at the same time you don't have to learn everything. :) It will > skip things like "What is MVC?" and "Why Web2Py framework" etc. I > believe Massimo has already full-filled that information. > > The book will be available online (HTML) and PDF as well as a > published book. > > Please let me know if your thoughts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py:17145] Re: Ubuntu Apache server setup problem
Thanks again. I did open a server at webfaction and I think I'm on the right track. This is a bit of a newbie question but I think the answer might help others. How do I change permissions so that the web2py.py script functions properly? I get the following reslults when starting web2py: Traceback (most recent call last): File "web2py.py", line 21, in start() File "/home/rentes/webapps/apachewsgi/web2py/gluon/widget.py", line 828, in start server.start() File "/home/rentes/webapps/apachewsgi/web2py/gluon/main.py", line 555, in start self.server.start() File "/home/rentes/webapps/apachewsgi/web2py/gluon/wsgiserver.py", line 1383, in start raise socket.error, msg socket.error: (13, 'Permission denied') http://forum.webfaction.com/viewtopic.php?pid=8473 On Feb 22, 9:24 pm, Yarko Tymciurak wrote: > i > > On Feb 22, 8:01 pm, cadrentes wrote: > > > > > Thanks so much for your response. > > > I've followed the instructions but it is unclear to me how to (from > > pg. 52)..."By default, > > web2py runs the web server on 127.0.0.1:8000 but, you can run it on > > any > > available IP address and port..." > > > When I start web2py I get: > > > default applications appear to be installed already > > web2py Enterprise Web Framework > > Created by Massimo Di Pierro, Copyright 2007-2009 > > Version 1.56.3 (2009-02-16 10:07:09) > > Database drivers available: SQLite3 > > ... > > please visit: > > http://127.0.0.1:8000 > > If you start web2py from the command line: > > % python2.5 web2py.py > > you will get these messages (on Linux you would have been asked to > create an admin password). > > % python2.5 web2py.py --help > > will show you options. If you tell web2py which port you want it to > run on, for example: > > % python2.5 web2py.py -p 80 > > then web2py will make a file with startup parameters, and use them > next time on that port - the parameter files look like: > > parameters_8000.py or parameters_80.py. > > Whenever you run web2py this way from the command line, web2py is > using it's built-in webserver (cherrypy). > > Once you create your default parameters, when webpy starts from > Apache, it will read the parameters for the port that it is started > under, and you're all set - you want to create a parameters file so > that you will start up the way you intend under apache. > > For running under apache, you'll want to use mod_wsgi. For example, > instructions for setup on webfaction appear here: > > http://forum.webfaction.com/viewtopic.php?pid=8473 > > Since there are several ways to setup Apache to run mod_wsgi, and > then several ways to configure mod_wsgi, there will be differences in > the setups you. For mod_wsgi, I suggest you read up (http:// > code.google.com/p/modwsgi/ and http://groups.google.com/group/modwsgi > ), then try some existing setup and work from there. With wireshark > (http://www.wireshark.org/) you can filter just http packets; with > that, and Apache logs you can put together what is going on with your > setup, and unravel any problems pretty readily. > > If you're going to run for yourself on Ubunto, you can just run the > built-in cherrypy server; you can play with and sort out your Apache > configuration that you'd want. If you're working on a hosted > location, they are usually very knowledgeable with their setups, and > all you need to know is more-or-less what is going on w/ web2py (logs > and wireshark will help). > > Hope this is helpful. > > Regards, > Yarko > > > > > I've purchased a copy of the manual from lulu and find it very clearly > > written. Thanks for all your work! > > > On Feb 22, 9:37 am, mdipierro wrote: > > > > Welcome. > > > > your Apache is not running web2py. > > > > You need to setup mod_proxy (easy) or mod_wsgi (difficult but better > > > for production). > > > > I suggest you download > > > >http://mdp.cti.depaul.edu/examples/static/web2py_manual_cut.pdf > > > > for deployment instructions. Let us know if you have problems and we > > > will help. > > > > Massimo > > > > On Feb 22, 10:09 am, cadrentes wrote: > > > > > Linux user: 2 yrs > > > > Web2py user: 2 days > > > > > I don't know how to phrase this problem. I'm trying to set up a > > > > server. I get thishttp://65.49.60.137/whenfollowingthe > > > > instructions in the guide instead of the html. > > > > > Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py:16743] Re: Ubuntu Apache server setup problem
Thanks so much for your response. I've followed the instructions but it is unclear to me how to (from pg. 52)..."By default, web2py runs the web server on 127.0.0.1:8000 but, you can run it on any available IP address and port..." When I start web2py I get: default applications appear to be installed already web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2009 Version 1.56.3 (2009-02-16 10:07:09) Database drivers available: SQLite3 ... please visit: http://127.0.0.1:8000 I've purchased a copy of the manual from lulu and find it very clearly written. Thanks for all your work! On Feb 22, 9:37 am, mdipierro wrote: > Welcome. > > your Apache is not running web2py. > > You need to setup mod_proxy (easy) or mod_wsgi (difficult but better > for production). > > I suggest you download > > http://mdp.cti.depaul.edu/examples/static/web2py_manual_cut.pdf > > for deployment instructions. Let us know if you have problems and we > will help. > > Massimo > > On Feb 22, 10:09 am, cadrentes wrote: > > > Linux user: 2 yrs > > Web2py user: 2 days > > > I don't know how to phrase this problem. I'm trying to set up a > > server. I get thishttp://65.49.60.137/whenfollowing the > > instructions in the guide instead of the html. > > > Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py:16692] Ubuntu Apache server setup problem
Linux user: 2 yrs Web2py user: 2 days I don't know how to phrase this problem. I'm trying to set up a server. I get this http://65.49.60.137/ when following the instructions in the guide instead of the html. Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---