[web2py] The Winners! Web2py Application Exhibition Version 3.0
1st Place Prize $100 Brian Cottingham from the U.S. was the First Place Winner. His entry of MobleBlur is a mobile-friendly interface to the Newsblur RSS reading website. A working demo can be viewed at http://mobileblur.spiffyte.ch https://github.com/spiffytech/MobileBlur/tarball/master 2nd Place Prize $50 Phyo Arkar from from Burma is the Second Place Winner, with an entry of HersPOS -- A Web2py + Qooxdoo based restaurant POS http://herspos.appspot.com/HersPOS http://code.google.com/p/herspos/ - I'd like to thank Bruno Rocha and Falko Krause for helping out as judges, and I'd like to thank Massimo for a GREAT Framework! Mr.NetAdmin
[web2py] Winners! Web2py Application Exhibition Version 3.0
The winners of the Web2py Application Exhibition Version 3.0 have been contacted, and I'll announce the winners very soon! Thanks to all who participated! Mr.NetAdmin
[web2py] Last Day for Submissions! -- Web2py Application Exhibition Version 3.0
Hello All, February 15 is the last day for submissions for the Web2py Application Exhibition Version 3.0 so don't delay! For more details, see the pinned message at the top of the news-group. Mr.NetAdmin Mr.NetAdmin@gmail
[web2py] 1 Week Left! Web2py Application Exhibition
There is only ONE week left for submissions. If you plan to submit an application for the Web2py Application Exhibition, please send me an e-mail indicating your interest so I can have an idea of how many submissions to expect. Thanks! Mr.NetAdmn
[web2py] Only 2 Weeks Left! -- Web2py Application Exhibition Version 3.0
There are 2 weeks left for submissions for the Web2py Application Exhibition Version 3.0 For more information, see the pinned message at the top of this group. ( http://groups.google.com/group/web2py/t/466b21110dbd2d32 ) Good Luck! mr.netad...@gmail.com
[web2py] Reminder : Web2py Application Exhibition Version 3.0
Just a reminder : See the pinned message at the top of the web2py- users list for more details. Mr.NetAdmin
[web2py] Web2py Application Exhibition Version 3.0
Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The Web2py Application Exhibition is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than February 15, 2012 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on March 1, 2012, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! 7. Previous winners must wait 365 days before being eligible to win again. Submission must be e-mailed to Mr.NetAdmin @ gmail.com Congratulations go to the most recent winning entries, 1st Place -- PowerTable Plugin by Bruno Rocha 2nd Place -- pyMantis Data-management System by Falko Krause Good luck to all of you! Mr.NetAdmin
[web2py] Web2py Application Exhibition Version 3.0
Web2py Application Exhibition Version 3.0 Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. Watch this list for more details! ( Soon ) Mr.NetAdmin
[web2py] Re: What if Massimo got hit by a Bus?
Massimo is safe... I'm sure he's done the following... From SuperPowers import Invulnerability, BusRadar, BackUpLife On May 26, 9:15 am, Bob Blanchett bob.blanch...@gmail.com wrote: I just read this presentation by by GvR/BDFLhttp://mvdirona.com/jrh/TalksAndPapers/GuidoVanRossum_21_years_of_pyt...on 21 years of Python and wondered for Web2py as some one did for Pythonhttp://www.python.org/search/hypermail/python-1994q2/1040.htmlin 1994. What if the worst happened to Massimo (God Forbid) ? The Technology Selection Risks etc etc.. Yours in no way Gruesomely, Bob
[web2py] Oracle Offers to Buy Web2py! ! !
In an unusual move, Oracle offers to buy Web2py. Ha Ha! April Fool Mr.Netadmin
[web2py] Re: logging time spent in sql statements ?
Maybe you could use a trigger on update, insert or delete, but I'm not sure how to do it for a simple select statment. On Feb 21, 4:26 pm, Stef Mientki stef.mien...@gmail.com wrote: hello, is there a way to log the time-duration of all sql statements ? thanks, Stef Mientki
[web2py] Re: logging time spent in sql statements ?
You could even do something like this... def makesome(): from gluon.contrib.populate import populate import datetime tstart = datetime.datetime.now().second # insert 2500 random records # YOU MAY WANT TO DO THIS ON A TEST TABLE populate(db.yourtable, 2500) tend = datetime.datetime.now().second return dict( totals= str(tend - tstart) ) On Feb 21, 4:26 pm, Stef Mientki stef.mien...@gmail.com wrote: hello, is there a way to log the time-duration of all sql statements ? thanks, Stef Mientki
[web2py] Re: social network idea
On Jan 17, 1:43 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Most social network assue you know who your friends are and allow you to share info with your friends. How about the opposite? Something like a bookmarking app that tells me who my friends should be based on physical distance and recent common bookmarks? It seems to me the main problem to me is that a lot of people are alone they because do not necessarily share interests with their colleagues and family members. Facebook is popular because it allows people to connect with people that they knew and therefore assume had something in common. Until people find out time has passed by and there is not really much to talk about. You can be a scientist and soon find your page polluted with somebody's horoscope. - a bookmarking system likehttp://radbox.me/ - when you bookmark something you tag with fixed categories - a way to sort/organize and rate own bookmarks using mouse drag and drop. - you have a profile and public pages showing your bookmarks only (can be used by a prof to share links with students for example) - Once logged in you can see other users nearby that bookmarked - independently - the same links, and filter then by location, gender, age, bookmark category (could compete with match.com too) - You can then choose to be notified when a given person bookmarks something new (like twitter) - You can check who is following your bookmarks. Massimo That's a very good idea! Mr.Netadmin
[web2py] Web2py Application Exhibition 2.0 Winning Entries
The votes are in for the Web2py Application Exhibition Version 2.0 and the winners are... 1st Place $100 -- PowerTable Plugin by Bruno Rocha 2nd Place $50 -- pyMantis Data-management System by Falko Krause For more information and to see other entries, go to http://w2pexhibition.appspot.com/ Special thanks goes to Martin Mulone for creating and hosting the Voting Application and Massimo for a great framework!
[web2py] Web2py Application Exhibition ( Final Day! )
Hello All, THIS IS THE FINAL DAY! The deadline for submissions for the Web2py Application Exhibition is December 15th 2010 You can start submitting and voting for the entries for the Web2py Application Exhibition Version 2.0 To get started, go to the following link... http://w2pexhibition.appspot.com/ There is a sample application entry by Martin Mulone that will give you an idea of how to use the voting application. Many thanks to Martin Mulone for coding the app to handle submission and voting! Good Luck! Mr.NetAdmin
[web2py] Web2py Application Exhibition ( 2 days left! )
Hello All, We're in the home stretch! The deadline for submissions for the Web2py Application Exhibition is December 15th 2010 You can start submitting and voting for the entries for the Web2py Application Exhibition Version 2.0 To get started, go to the following link... http://w2pexhibition.appspot.com/ There is a sample application entry by Martin Mulone that will give you an idea of how to use the voting application. Many thanks to Martin Mulone for coding the app to handle submission and voting!
[web2py] Web2py Application Exhibition and Samsung Galaxy Tab p1000
Hello All, *IF* I were eligible to win the Web2py Application Exhibition, I'd totally use the winnings as a down-payment on a Samsung Galaxy Tab! The deadline for submissions for the Web2py Application Exhibition is December 15th 2010 You can start submitting and voting for the entries for the Web2py Application Exhibition Version 2.0 To get started, go to the following link... http://w2pexhibition.appspot.com/ There is a sample application entry by Martin Mulone that will give you an idea of how to use the voting application. Many thanks to Martin Mulone for coding the app to handle submission and voting! Good Luck! Mr.NetAdmin
[web2py] Web2py Application Exhibition Deadline
Hello All, The deadline for submissions for the Web2py Application Exhibition is December 15th 2010 You can start submitting and voting for the entries for the Web2py Application Exhibition Version 2.0 To get started, go to the following link... http://w2pexhibition.appspot.com/ There is a sample application entry by Martin Mulone that will give you and idea of how to use the voting application. Many thanks to Martin Mulone for coding the app to handle submission and voting! Good Luck! Mr.NetAdmin
[web2py] Don't miss the December 15th deadline!
December 15th is the last day you can submit your apps for the Web2py Application Exhibition Version 2.0 See the pinned message at the top for more details. Good Luck! Mr.NetAdmin
[web2py] Web2py Application Exhibition ( Version 2.0 ) 4 weeks to go
Just in case you didn't see the pinned message at the top of the group messages, there are 5 weeks to get your apps ready for the Web2py Application Exhibition ( Version 2.0 ) For more details, see the pinned message. Good Luck! Mr.NetAdmin
[web2py] Re: Web2py Application Exhibition ( Version 2.0 )
Rahul, Applications without source code will not be accepted. Maybe in the future we can have a closed source exhibition. Mr.NetAdmin On Nov 14, 11:29 pm, Rahul rahul.dhak...@gmail.com wrote: Hi, Can we submit closed w2p applications without source code? Any specific rules if one does not want to expose the code? Rahul On Nov 12, 5:23 pm, selecta gr...@delarue-berlin.de wrote: How do I submit? Should I just send you (NetAdmin) the code by email? I am working on the project constantly, will you accept updates after the first submission? Or should I wait till the deadline and submit what I got until then? On Nov 11, 9:21 pm, GoldenTiger goldenboy...@gmail.com wrote: I'll be there, actually I am devoting most of my time studyingweb2py. I hope to do a niceapplication. :) On 8 nov, 20:20, Mr admin mr.netad...@gmail.com wrote: Sure! Plugins are just miniature applications right? :-) Mr.NetAdmin On Mon, Nov 8, 2010 at 1:13 PM, mr.freeze nat...@freezable.com wrote: Can we submit be a plugin? On Nov 3, 3:18 pm, NetAdmin mr.netad...@gmail.com wrote: Web2pyApplicationExhibitionVersion2.0 Do you have aWeb2pyapp that you'd like to show the world? If so, you may be interested in theWeb2pyApplicationExhibition. The WAE is a way to... 1. Demonstrate what can be done withWeb2py. 2. Share and learn about usefulweb2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than December 15, 2010 2. Source must be included with your submissions. 3. If theapplicationis written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on December 31, 2010, the winners will be announced on theweb2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy usingWeb2py! 7. Previous winners must wait 365 days before being eligible to win again. Martin Mulone, the winner of the lastExhibitionwith his entry titled Instant Press, has volunteered to help tally your votes using an application he wrote. ( UsingWeb2pyof course! ) Submissions must be mailed to mr.netad...@gmail.com Good Luck! Mr.NetAdmin at gmail.com
[web2py] Re: web2py 1.89.3 is OUT
On the change log screen... beter wizard should be changed to better Admin wizard If it is indeed an Admin wizard Thanks! On Nov 16, 2:23 pm, mdipierro mdipie...@cs.depaul.edu wrote: apologies, there was a build error in 1.89.2
[web2py] Re: Web2py Application Exhibition ( Version 2.0 )
You should wait for the the deadline, then submit by email. Good Luck! Mr.NetAdmin
[web2py] Web2py Application Exhibition ( Version 2.0 ) 5 weeks to go!
Just in case you didn't see the pinned message at the top of the group messages, there are 5 weeks to get your apps ready for the Web2py Application Exhibition ( Version 2.0 ) For more details, see the pinned message. Good Luck! Mr.NetAdmin
[web2py] Re: Web2py Application Exhibition ( Version 2.0 )
I'm not sure what the requirements are, but you could try getting your application listed on http://www.web2py.com/appliances There are many really nice applications listed there. Mr.NetAdmin
[web2py] Re: Web2py Application Exhibition ( Version 2.0 )
Ramjee, Yes the app must be opensource. ( Like Web2py ) Mr.NetAdmin On Nov 5, 3:20 am, Ramjee Ganti gant...@gmail.com wrote: Hi Netadmin, Very nice initiative. Is it mandatory that the project is opensource. I am working on an enterprise analytics application using web2py. However, I am not going to make it opensource. (I might consider making some parts of it opensource later). rAm i Think, i Wait, i Fast -- Siddharthahttp://sodidi.ramjeeganti.com On Thu, Nov 4, 2010 at 2:48 AM, NetAdmin mr.netad...@gmail.com wrote: Web2py Application Exhibition Version 2.0 Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than December 15, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on December 31, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! 7. Previous winners must wait 365 days before being eligible to win again. Martin Mulone, the winner of the last Exhibition with his entry titled Instant Press, has volunteered to help tally your votes using an application he wrote. ( Using Web2py of course! ) Submissions must be mailed to mr.netad...@gmail.com Good Luck! Mr.NetAdmin at gmail.com
[web2py] Web2py Application Exhibition ( Version 2.0 )
Web2py Application Exhibition Version 2.0 Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than December 15, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on December 31, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! 7. Previous winners must wait 365 days before being eligible to win again. Martin Mulone, the winner of the last Exhibition with his entry titled Instant Press, has volunteered to help tally your votes using an application he wrote. ( Using Web2py of course! ) Submissions must be mailed to mr.netad...@gmail.com Good Luck! Mr.NetAdmin at gmail.com
[web2py] Re: Where's Errata Page for Web2py 3rd Edition
Bruno, Here are pictures of the Web2py Manual 3rd Edition. I like it! http://www.setbit.us/IMG_0107.JPG http://www.setbit.us/IMG_0108.JPG http://www.setbit.us/IMG_0109.JPG Mr.NetAdmin On Oct 14, 4:33 pm, Bruno Rocha rochacbr...@gmail.com wrote: I think by now, the book have no option for doing that. (BTW: the source for the app used in book is available on /appliances, so if anybody has a good idea to implement a comment system there) you have to send it directly to the group (one of the editors can correct), or directly to Massimo. What I used to do is every time when I find something to correct I open one draf on my gmail, and note there. after colecting some notes, I correct ( or send to Massimo). @NetAdmin did you buy a printed version, or printed from the pdf? I bought the pdf, and I want a printed version. I dont know if I will print it in my printer, or if I will buy it printed by LuLu. If your copy is from LuLu, can you take a picture? I want to see if it is different or if it is equal to printing by my own. Tks 2010/10/14 NetAdmin mr.netad...@gmail.com That's good, but I like to read my printed edition on the train, and would like to make corrections there. I don't have any corrections at the moment. Thanks! On Oct 14, 4:08 pm, cjrh caleb.hatti...@gmail.com wrote: On Oct 14, 10:53 pm, NetAdmin mr.netad...@gmail.com wrote: I'd like to make notes of any typos / errors in my printed edition. Send me all errors and typos, I'll fix them (almost) immediately in the online book. -- http://rochacbruno.com.br
[web2py] Where's Errata Page for Web2py 3rd Edition
Is there an errata page for Web2py 3rd Edition? I'd like to make notes of any typos / errors in my printed edition. By the way, then new Web2py site looks really nice! Thanks! Mr.NetAdmin
[web2py] Re: how to allow only admin to make changes
You could use function decorators. For example... @auth.requires_login() def browsing(): # browsing happens here @auth.requires_membership('editor-group') def editdb(): # editing happens here Mr.NetAdmin On Oct 14, 9:04 am, Audra Rudys sphin...@gmail.com wrote: I have an app with settings (think drop down list values for one of my tables) that I'd like to allow registered users to add values to but only an administrator to edit/delete. Could I use the application administrator for this purpose? Is there a way to check from a controller function if the Admini is logged in? Or would I have to create a special user account and then check the id of the current user against that one to determine edit privileges? Thanks, Audra
[web2py] Re: Where's Errata Page for Web2py 3rd Edition
That's good, but I like to read my printed edition on the train, and would like to make corrections there. I don't have any corrections at the moment. Thanks! On Oct 14, 4:08 pm, cjrh caleb.hatti...@gmail.com wrote: On Oct 14, 10:53 pm, NetAdmin mr.netad...@gmail.com wrote: I'd like to make notes of any typos / errors in my printed edition. Send me all errors and typos, I'll fix them (almost) immediately in the online book.
[web2py] Re: Where's Errata Page for Web2py 3rd Edition
Bruno, I purchased the paperback version from LULU.com, NOT the .PDF version, but I'd like to make corrections to my printed edition for times I don't have access to the on-line version. I can snap a picture of it and send it to you. Mr.NetAdmin On Oct 14, 4:33 pm, Bruno Rocha rochacbr...@gmail.com wrote: I think by now, the book have no option for doing that. (BTW: the source for the app used in book is available on /appliances, so if anybody has a good idea to implement a comment system there) you have to send it directly to the group (one of the editors can correct), or directly to Massimo. What I used to do is every time when I find something to correct I open one draf on my gmail, and note there. after colecting some notes, I correct ( or send to Massimo). @NetAdmin did you buy a printed version, or printed from the pdf? I bought the pdf, and I want a printed version. I dont know if I will print it in my printer, or if I will buy it printed by LuLu. If your copy is from LuLu, can you take a picture? I want to see if it is different or if it is equal to printing by my own. Tks 2010/10/14 NetAdmin mr.netad...@gmail.com That's good, but I like to read my printed edition on the train, and would like to make corrections there. I don't have any corrections at the moment. Thanks! On Oct 14, 4:08 pm, cjrh caleb.hatti...@gmail.com wrote: On Oct 14, 10:53 pm, NetAdmin mr.netad...@gmail.com wrote: I'd like to make notes of any typos / errors in my printed edition. Send me all errors and typos, I'll fix them (almost) immediately in the online book. -- http://rochacbruno.com.br
[web2py] Re: DateTime Widget
Is this what you're trying to do? This will round the time DOWN to 30 minute intervals. On the hour or 30 minutes past the hour using MySQL time and math functions. select sec_to_time( time_to_sec( '2010-10-11 07:40:00' ) - time_to_sec( '2010-10-11 07:40:00') mod(1800) )as ans; +--+ | ans | +--+ | 07:30:00 | +--+ 1 row in set (0.00 sec) Mr.NetAdmin On Oct 10, 6:21 pm, villas villa...@gmail.com wrote: For a Datetime field... On creating a record I wish to use a default date (say today) and choose only the time (selected from half hour intervals), e.g. 10:30, 14:00, 19:30 etc. On editing a record, I would maintain the date but simply allow the time to be edited. Can anyone make a suggestion to handle that elegantly? Thks, David
[web2py] Re: Automatic delete of a record after x days
# Add a datetime field to your model that saves current datetime db.define_table('mytable', Field('firstn', 'string', length=15), Field('fdate', 'datetime', default=request.now, requires= IS_NOT_EMPTY() ) ) db.tbtime5.firstn.requires=IS_NOT_EMPTY() db.tbtime5.fdate.requires=IS_NOT_EMPTY() # You may want to look at the underlying DATE functions of your database. # This example uses mysql and calculates the age of a record in minutes mysql select firstn, fdate , now(), round( (time_to_sec( now() ) - time_to_sec(fdate) ) / 60, 0) as mins from mytable; +--+-+-+--+ | firstn | fdate | now() | mins | +--+-+-+--+ | kris | 2010-10-08 04:53:27 | 2010-10-08 05:53:24 | 60 | | joe | 2010-10-08 04:55:29 | 2010-10-08 05:53:24 | 58 | | ed | 2010-10-08 04:57:42 | 2010-10-08 05:53:24 | 56 | | greg | 2010-10-08 05:50:35 | 2010-10-08 05:53:24 |3 | | tom | 2010-10-08 05:51:32 | 2010-10-08 05:53:24 |2 | | bob | 2010-10-08 05:53:15 | 2010-10-08 05:53:24 |0 | +--+-+-+--+ 7 rows in set (0.00 sec) Once you've tweaked your code to delete based on minutes, modify it to work based on days. On Oct 7, 1:26 pm, ceriox cer...@gmail.com wrote: Hi all, it is possible delete a record if it is older than 5 days (without user operation)? i have a table with a data field if this field is older than 5 days i wanna delete it and do other stuff without any manual operation
[web2py] Nice Hosting Company Option
I decided to try hosting a Web2py app using the Rackspace Cloud-Server offering and here's what I found. You actually have *root* access which is a BIG PLUS for me! Billing is automatic via credit card payments. My first bill was $10 for one month. This could cost you more, so read the fine-print about bandwidth You can pick from a list of different Linux distributions... Arch, CentOS, Ubuntu, Debian, RedHat, Fedora, Gentoo. They use monthly billing so there are no long-term contracts. Fast initial setup! They have a Data-Center in Chicago. I'm NOT affiliated with rackspace in any way... I just wanted to share my experience with the group. I had no trouble at all getting my Web2py app running! Does anyone else have a hosting company they like? Mr.NetAdmin
[web2py] Re: Nice Hosting Company Option
You're right. After looking through the Slicehost site, I saw this info. -- In October 2008 we were acquired by Rackspace, one of the largest and most respected hosting companies in the world. Slicehost is now a wholly owned subsidiary of Rackspace Hosting Inc -- On Oct 5, 6:05 pm, Thadeus Burgess thade...@thadeusb.com wrote: slicehost is owned by rackspace and uses their same datacenters. If you need a VPS solution instead of a cloud solution. Honestly though, cloud and VPS are the exact same thing, just billed differently. -- Thadeus On Tue, Oct 5, 2010 at 5:26 PM, Bruno Rocha rochacbr...@gmail.com wrote: Do you know if they have reseller plans? Anybody here using webfaction? 2010/10/5 NetAdmin mr.netad...@gmail.com I decided to try hosting a Web2py app using the Rackspace Cloud-Server offering and here's what I found. You actually have *root* access which is a BIG PLUS for me! Billing is automatic via credit card payments. My first bill was $10 for one month. This could cost you more, so read the fine-print about bandwidth You can pick from a list of different Linux distributions... Arch, CentOS, Ubuntu, Debian, RedHat, Fedora, Gentoo. They use monthly billing so there are no long-term contracts. Fast initial setup! They have a Data-Center in Chicago. I'm NOT affiliated with rackspace in any way... I just wanted to share my experience with the group. I had no trouble at all getting my Web2py app running! Does anyone else have a hosting company they like? Mr.NetAdmin -- http://rochacbruno.com.br
[web2py] Re: Nice Hosting Company Option
I did see that Rackspace does offer reseller plans. I've never looked into their reseller plan, so I can't tell you anything about it. Mr.NetAdmin On Oct 5, 5:26 pm, Bruno Rocha rochacbr...@gmail.com wrote: Do you know if they have reseller plans? Anybody here using webfaction? 2010/10/5 NetAdmin mr.netad...@gmail.com I decided to try hosting a Web2py app using the Rackspace Cloud-Server offering and here's what I found. You actually have *root* access which is a BIG PLUS for me! Billing is automatic via credit card payments. My first bill was $10 for one month. This could cost you more, so read the fine-print about bandwidth You can pick from a list of different Linux distributions... Arch, CentOS, Ubuntu, Debian, RedHat, Fedora, Gentoo. They use monthly billing so there are no long-term contracts. Fast initial setup! They have a Data-Center in Chicago. I'm NOT affiliated with rackspace in any way... I just wanted to share my experience with the group. I had no trouble at all getting my Web2py app running! Does anyone else have a hosting company they like? Mr.NetAdmin -- http://rochacbruno.com.br
[web2py] Web2py Book 3rd Edition
Whooo Hooo! I just received the Printed 3rd Edition of the Web2py Manual from LULU.com http://www.lulu.com/product/paperback/web2py-%283rd-edition%29/12199578?productTrackingContext=search_results/search_shelf/center/3 Mr.NetAdmin
[web2py] Model file variable scope
in gluon/tools.py, I'm trying to modify the register() function to save request.vars.get('last_name', None ) to a table defined in db.py as db.define_table('tbextra', SQLField('lastn', 'string', length = 15 ) ) but tools.py does not recognize the db part of db.tbextra.lastn I thought variables in the model files were global. What am I doing wrong? Thanks
[web2py] Re: Model file variable scope
So how can I grab last_name during a register function and save it to an already defined table? Thanks On Aug 17, 4:52 pm, mdipierro mdipie...@cs.depaul.edu wrote: gluon/tools.py is a module and it is imported before your app is executed. The web2py globals variables are not exposed there. On Aug 17, 4:46 pm, NetAdmin mr.netad...@gmail.com wrote: in gluon/tools.py, I'm trying to modify the register() function to save request.vars.get('last_name', None ) to a table defined in db.py as db.define_table('tbextra', SQLField('lastn', 'string', length = 15 ) ) but tools.py does not recognize the db part of db.tbextra.lastn I thought variables in the model files were global. What am I doing wrong? Thanks
[web2py] Re: Model file variable scope
I'll try that thanks. Mr.NetAdmin On Aug 17, 5:11 pm, mdipierro mdipie...@cs.depaul.edu wrote: I am not sure it is a good idea to modify a system library like gluon.tools.py, anyway in class Auth, you should have access to self.environment.request.vars On Aug 17, 4:57 pm, NetAdmin mr.netad...@gmail.com wrote: So how can I grab last_name during a register function and save it to an already defined table? Thanks On Aug 17, 4:52 pm, mdipierro mdipie...@cs.depaul.edu wrote: gluon/tools.py is a module and it is imported before your app is executed. The web2py globals variables are not exposed there. On Aug 17, 4:46 pm, NetAdmin mr.netad...@gmail.com wrote: in gluon/tools.py, I'm trying to modify the register() function to save request.vars.get('last_name', None ) to a table defined in db.py as db.define_table('tbextra', SQLField('lastn', 'string', length = 15 ) ) but tools.py does not recognize the db part of db.tbextra.lastn I thought variables in the model files were global. What am I doing wrong? Thanks
[web2py] Re: Web2Py Book - Controllers?
Look at Chapter 3, Overview ( 2n edition of the manual ) On Aug 16, 8:50 am, David digitalcry...@gmail.com wrote: Where is the part which talks about how controllers work and are used in the web2py book? I see the DAL and Views but nothing on controllers is obvious here. Thanks, David
[web2py] Re: Web2Py Book - Controllers?
I actually purchased a Hard-Copy edition of the Web2py Manual ( 2nd edition ) The online book does NOT seem to have page numbers, but look at the example below. The Controller myconroller.py contains 1 function called isprime() mycontroller.py # # mycontroller.py can contain multiple functions # def isprime( number ) : # # this is the isprime function # for p in range( 2, number ) : if number % p : return False return True Do you have a specific question about controllers? On Aug 16, 10:35 am, David digitalcry...@gmail.com wrote: Ok cool. Where can I find the 2nd Edition of the Web2Py book? I only see the 3rd edition online. On Aug 16, 10:22 am, NetAdmin mr.netad...@gmail.com wrote: Look at Chapter 3, Overview ( 2n edition of the manual ) On Aug 16, 8:50 am, David digitalcry...@gmail.com wrote: Where is the part which talks about how controllers work and are used in the web2py book? I see the DAL and Views but nothing on controllers is obvious here. Thanks, David
[web2py] Re: Web2py Application Exhibition -- The Winners!
Thanks for the offer to donate to the next Web2py Application Exhibition. You can let me now what you plan to offer, and I'll list you and your organization as do donor. If you wish to remain anonymous, let me know. As always, you can contact me via gmail Thanks for the offer. Mr.NetAdmin On Aug 5, 9:13 am, Christopher Steel chris.st...@gmail.com wrote: Our congratulations to Martin Mulone of Entre Rios, Argentina for his winning Web2py application Instant Press! You Rocked it Martin! and to Thadeus Burgess of Austin, Texas for the well deserved win in recognition of his exemplification of the spirit of open-source. In addition a gigantic thank you to Mr.NetAdmin for having the initiative in addition footing the bill for the first mr.netadmin Web2py ApplicationExhibition!, very much appreciated and we hope to see you all at the NovemberExhibitionwhen (if?) it is officially announced. Mr. NetAdmin and other interested parties, our organization is interested in offering up some project prize (dollars?) for the next competition so let us know when the date is on! Also I wondering if the current Web2py has a sort of natural annual process cycle that we could try and fit into in order to maximize participation. Cheers, Christopher Steel On Aug 4, 9:55 am, NetAdmin mr.netad...@gmail.com wrote: Hello Web2py Users! After careful consideration of the entire list of entries... ( actually the only entry ) the winning entry was submitted by Martin Mulone of Entre Rios, Argentina. Martin enjoys music, programming in python, soccer and sailing. His entry, Instant-Press, which is a blogging application, can be found athttp://code.google.com/p/instant-press/ Martin takes home the 1st place prize of $100 dollars. Since there were no entries for second place, I chose give Thadeus Burgess the second-place award of $50 dollars. Why Thadeus? During the submission period, his offer to help judge the competition entries, best exemplified the spirit of open-source. Thadeus Burgess is from Austin, Texas and his interests include Starcraft, paintballing, AI and robotics, and hanging out with friends and family. Thadeus is also a contributor to the Web2py book. Thadeus has websites athttp://thadeusb.com/andhttp://odyssey.ecrater.com/filter.php?sort=date Congratulations to both of them! Rumor has it, that there will be anotherExhibitionin November 2010 Stay tuned for details! Mr.NetAdmin
[web2py] Web2py Application Exhibition -- The Winners!
Hello Web2py Users! After careful consideration of the entire list of entries... ( actually the only entry ) the winning entry was submitted by Martin Mulone of Entre Rios, Argentina. Martin enjoys music, programming in python, soccer and sailing. His entry, Instant-Press, which is a blogging application, can be found at http://code.google.com/p/instant-press/ Martin takes home the 1st place prize of $100 dollars. Since there were no entries for second place, I chose give Thadeus Burgess the second-place award of $50 dollars. Why Thadeus? During the submission period, his offer to help judge the competition entries, best exemplified the spirit of open-source. Thadeus Burgess is from Austin, Texas and his interests include Starcraft, paintballing, AI and robotics, and hanging out with friends and family. Thadeus is also a contributor to the Web2py book. Thadeus has websites at http://thadeusb.com/ and http://odyssey.ecrater.com/filter.php?sort=date Congratulations to both of them! Rumor has it, that there will be another Exhibition in November 2010 Stay tuned for details! Mr.NetAdmin
[web2py] Re: Web2py Application Exhibition -- The Winners!
I did all of the promotion through messages on this group. ( Search for the word Exhibition ) Mr.NetAdmin On Aug 4, 11:44 am, GoldenTiger goldenboy...@gmail.com wrote: Great application InstantPress! What is the website of this competition? I did not know about it On 4 ago, 15:55, NetAdmin mr.netad...@gmail.com wrote: Hello Web2py Users! After careful consideration of the entire list of entries... ( actually the only entry ) the winning entry was submitted by Martin Mulone of Entre Rios, Argentina. Martin enjoys music, programming in python, soccer and sailing. His entry, Instant-Press, which is a blogging application, can be found athttp://code.google.com/p/instant-press/ Martin takes home the 1st place prize of $100 dollars. Since there were no entries for second place, I chose give Thadeus Burgess the second-place award of $50 dollars. Why Thadeus? During the submission period, his offer to help judge the competition entries, best exemplified the spirit of open-source. Thadeus Burgess is from Austin, Texas and his interests include Starcraft, paintballing, AI and robotics, and hanging out with friends and family. Thadeus is also a contributor to the Web2py book. Thadeus has websites athttp://thadeusb.com/andhttp://odyssey.ecrater.com/filter.php?sort=date Congratulations to both of them! Rumor has it, that there will be another Exhibition in November 2010 Stay tuned for details! Mr.NetAdmin
[web2py] Web2py Application Exhibition -- Winners!
Hello All, The winners of the Web2py Application Exhibition have been e-mailed, and I'm waiting for their replies before posting the results. Mr.NetAdmin
[web2py] Last Week for WAE ( Web2py Application Exhibition )
Web2py Application Exhibition Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than July 30, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on August 15, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! Massimo is not affiliated with this exhibition, ( maybe he'll help judge if I can twist his arm ) so, if you have any questions or comments, I can be contacted on this forum or via gmail mr.netadmin
[web2py] Web2py Application Exhibition - 2 weeks left
Web2py Application Exhibition Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than July 30, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on August 15, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! Massimo is not affiliated with this exhibition, ( maybe he'll help judge if I can twist his arm ) so, if you have any questions or comments, I can be contacted on gmail If the google-groups hides my contact info, you can find it at http://bithawk.org Note: My internet access will be down until the 21st of July, so the above link won't be active until then. mr.netadmin
[web2py] Re: local_import
What type of errors or messages do you get? On Jul 2, 11:52 am, Jose jjac...@gmail.com wrote: I have problems with local_import in the latest version of the trunk. Jose
[web2py] Re: Grab the email address during register
Got it! request.vars.get(passfield,None), request.vars.get('email', None) On Jul 1, 6:52 pm, NetAdmin mr.netad...@gmail.com wrote: I can save the unhashed password fromhttp://127.0.0.1:8000/appname/default/user/register with request.vars.get(passfield, None) but how can I save the email address entered during the register function? Thanks!
[web2py] Re: Change submit text in generic submit button
Put something like this in your controller. INPUT( _type = 'submit', _value = 'Save', _style ='width: 100px;' ) On Jun 30, 11:04 am, Giuseppe Luca Scrofani glsdes...@gmail.com wrote: Hi where I have to look to change the default submit string of generic submit button in something else? I'm not interested in localizing the application (it have to remain english) but if it is the only way, how I can do this? Creating a en locales?
[web2py] Web2py Application Exhibition Part 2
Web2py Application Exhibition Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than July 30, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on August 15, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! Massimo is not affiliated with this exhibition, ( maybe he'll help judge if I can twist his arm ) so, if you have any questions or comments, I can be contacted on gmail If the google-groups hides my contact info, you can find it at http://bithawk.org mr.netadadmin
[web2py] Web2py Application Exhibition
Web2py Application Exhibition Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than July 30, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on August 15, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! Massimo is not affiliated with this exhibition, ( maybe he'll help judge if I can twist his arm ) so, if you have any questions or comments, I can be contacted at mr.netad...@gmail.com
[web2py] Re: change the encoding
I'm not sure if you're using Linux, but if so, you may want to try changing this setting in your bash_profile. LC_ALL=en_US.utf8 I hope this helps Mr.netadmin On Jun 25, 6:11 am, Jose jjac...@gmail.com wrote: On 24 jun, 13:27, mdipierro mdipie...@cs.depaul.edu wrote: I do not know if that is possible I need to save files to latin1 instead of utf8 (apparently default). I know I can use iconv, but it gets annoying having to do so. Regards Jose
[web2py] Re: Web2py Application Exhibition
I'm the sole person behind the project right now. I may ask others to help judge if I'm overwhelmed by the amount of submissions. Mr.Netadmin On Jun 25, 10:47 am, Albert Abril albert.ab...@gmail.com wrote: Nice :) Who's behind this challenge? I meant, who wanna judge? pay? etc. Thanks in advance. On Fri, Jun 25, 2010 at 10:28 AM, NetAdmin mr.netad...@gmail.com wrote: Web2py Application Exhibition Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than July 30, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on August 15, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! Massimo is not affiliated with this exhibition, ( maybe he'll help judge if I can twist his arm ) so, if you have any questions or comments, I can be contacted at mr.netad...@gmail.com
[web2py] Re: change the encoding
OK, I use Linux and vi Here are my settings scroll=11 ttyfast fileencoding=utf-8 fileencodings=ucs-bom,utf-8,default,latin1 runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/ share/vim/ vim71,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/ after On Jun 25, 3:43 pm, Jose jjac...@gmail.com wrote: thank Mr.netadmin, I use FreeBSD and my shell is csh. % Echo $ LANG es_ES.ISO8859-1 ISO8859-1 is Latin1, but coding of files created corresponds to utf-8. Jose
[web2py] Re: change the encoding
Oh Sorry, I only use vi as my editor. On Jun 25, 5:24 pm, Jose jjac...@gmail.com wrote: On 25 jun, 18:24, NetAdmin mr.netad...@gmail.com wrote: OK, I use Linux and vi Here are my settings scroll=11 ttyfast fileencoding=utf-8 fileencodings=ucs-bom,utf-8,default,latin1 runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/ share/vim/ vim71,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/ after Okay, but I mean to choose the encoding from web2py web editor.
[web2py] Putting too much logic in a view
I have a table with the following structure. firstname string stboolean I can display the info with a view, but I'd like to check/uncheck certain names using the status check box, then delete the checked names. I feel I'm going about this the WRONG way because most of the logic should be in a controller, and views should mostly only display the data. Here's the view. Thanks in advance! table {{ for r in recs : }} tr {{=TD(r.id)}} {{=TD(r.firstname)}} tdform input type = 'checkbox' name = 'st' {{ if r.st == True: }} checked {{pass}} /form /td /tr {{pass}} table
[web2py] Re: Putting too much logic in a view
I'll give it a try. Thanks! On Jun 6, 7:10 pm, mr.freeze nat...@freezable.com wrote: Something like this? def delete_things(): table = TABLE() recs = db(db.things.id 0).select() for rec in recs: chk = INPUT(_type='checkbox', _name='st_%s' % rec.id) table.append(TR(rec.id,rec.name,chk)) form = FORM(table,INPUT(_type='submit')) if form.accepts(request.vars,session): for k,v in request.vars.items(): if k.startswith('st_'): id = k.split('_')[-1] db(db.things.id == int(id)).delete() return dict(form=form) On Jun 6, 6:39 pm, NetAdmin mr.netad...@gmail.com wrote: I have a table with the following structure. firstname string st boolean I can display the info with a view, but I'd like to check/uncheck certain names using the status check box, then delete the checked names. I feel I'm going about this the WRONG way because most of the logic should be in a controller, and views should mostly only display the data. Here's the view. Thanks in advance! table {{ for r in recs : }} tr {{=TD(r.id)}} {{=TD(r.firstname)}} tdform input type = 'checkbox' name = 'st' {{ if r.st == True: }} checked {{pass}} /form /td /tr {{pass}} table
[web2py] Re: Putting too much logic in a view
Perfect! Thanks so much! One thing I've been thinking about, is putting together a reference database that will help newbies learn from working examples. As I browse the forum, I see people asking things such as How do I populate a drop-down list from a table. Providing a reference database would help give people actual working examples of code that can be viewed and customized to fit specific needs. What does everyone think? Again thanks for the GREAT example Mr. Freeze On Jun 6, 7:10 pm, mr.freeze nat...@freezable.com wrote: Something like this? def delete_things(): table = TABLE() recs = db(db.things.id 0).select() for rec in recs: chk = INPUT(_type='checkbox', _name='st_%s' % rec.id) table.append(TR(rec.id,rec.name,chk)) form = FORM(table,INPUT(_type='submit')) if form.accepts(request.vars,session): for k,v in request.vars.items(): if k.startswith('st_'): id = k.split('_')[-1] db(db.things.id == int(id)).delete() return dict(form=form) On Jun 6, 6:39 pm, NetAdmin mr.netad...@gmail.com wrote: I have a table with the following structure. firstname string st boolean I can display the info with a view, but I'd like to check/uncheck certain names using the status check box, then delete the checked names. I feel I'm going about this the WRONG way because most of the logic should be in a controller, and views should mostly only display the data. Here's the view. Thanks in advance! table {{ for r in recs : }} tr {{=TD(r.id)}} {{=TD(r.firstname)}} tdform input type = 'checkbox' name = 'st' {{ if r.st == True: }} checked {{pass}} /form /td /tr {{pass}} table
[web2py] Re: html text editor selection shift position
I've seen that problem too when using Firefox and Linux. Now I ONLY use a vi to edit files. On Jun 4, 10:45 am, Jean Guy jean...@gmail.com wrote: Hi, I would like to know there is other web2py user that are experimenting a shift in selection highlight in html text editor built in web2py dev environnement? There is a way to fix that easily? I attached a sceenshot... Windows current version OK Linux src current version NOT OK Thanks. Jonhy windows_w2p_editor.png 49KViewDownload linux_w2p_src_editor.png 63KViewDownload
[web2py] welcome.w2p
I just upgraded to web2p version 1.78.3 and there seems to be no welcome.w2p scaffold app. Is this a problem or do I need to create my own? Thanks!
[web2py] Re: welcome.w2p
Sorry I found it. Time for new eye-glasses. On Jun 4, 2:19 pm, NetAdmin mr.netad...@gmail.com wrote: I just upgraded to web2p version 1.78.3 and there seems to be no welcome.w2p scaffold app. Is this a problem or do I need to create my own? Thanks!
[web2py] Decimal vs Float and Documentation
1. What is the best field choice for currency calculations? I can't find any documentation on the DECIMAL field-type even though I saw Field('totalsale', 'decimal(10,2)'), while browsing google/groups. 2. Where should I look for the very latest documentation? I defined a field as DOUBLE, but during an an edit using SQLFORM, 40.00 shows as 40.0 3. How can I display 2 decimal places using SQLFORM? I'll switch from sqlite to MySQL if needed. Thanks!
[web2py] Re: Decimal vs Float and Documentation
In which file do I declare the class? Thanks to everyone for their answers. On Jun 1, 3:10 pm, mdipierro mdipie...@cs.depaul.edu wrote: There is no need to use SQLCustomType in this case. Decimal is supported by web2py type='decimal(n,m)' if the underliying database supports it. The problem is representation of the number. Try this: class IS_MYDECIMAL(IS_DECIMAL_IN_RANGE): def formatter(self,value): return '%.2f' % value and use the db.table.field.requires=IS_MYDECIMAL(0,100) On Jun 1, 2:24 pm, Michal Jursa mic...@jursa.cz wrote: Hi, decimal is not directly supported as it is not supported in some db engines, but you can use SQLCustomType. Example here: http://www.web2py.com/examples/static/epydoc/web2py.gluon.sql.SQLCust... Michal NetAdmin wrote: 1. What is the best field choice for currency calculations? I can't find any documentation on the DECIMAL field-type even though I saw Field('totalsale', 'decimal(10,2)'), while browsing google/groups. 2. Where should I look for the very latest documentation? I defined a field as DOUBLE, but during an an edit using SQLFORM, 40.00 shows as 40.0 3. How can I display 2 decimal places using SQLFORM? I'll switch from sqlite to MySQL if needed. Thanks!
[web2py] Re: Image upload
Here's some code form = SQLFORM(db.tbbooks, 4, upload=URL(r=request,f='download') ) Note... you can store images as BLOBS inside the database OR on the filesystem. On Jun 1, 1:51 pm, Aaron Crowe aaron.h.cr...@gmail.com wrote: I'm just getting started with web2py and I'm looking for a way for the user to upload an image and have it stored in the database. Any suggestions or links to relevant code would be appreciated.
[web2py] Re: Image upload
Here's another link http://web2py.com/book/default/section/7/2?search=upload On Jun 1, 1:51 pm, Aaron Crowe aaron.h.cr...@gmail.com wrote: I'm just getting started with web2py and I'm looking for a way for the user to upload an image and have it stored in the database. Any suggestions or links to relevant code would be appreciated.
[web2py] Re: uniqueness Constraint
Try something like this. db.define_table('companies', Field('name', length=512, default='', unique=True), Field('oncontract', 'boolean', default=False) ) db.person.name.requires = [IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'person.name')] On May 31, 7:30 am, Neveen Adel nevo.a...@gmail.com wrote: Hello, How can i add uniqueness constraint to SQLField ? Thanks in Advance
[web2py] How do I get session.flash to show multiple rows?
How do I get session.flash to show multiple rows? The would be nice for a quick popup help message. Thanks!
[web2py] Re: How do I get session.flash to show multiple rows?
And of course it work perfectly! Thanks! I love Web2py! On May 30, 9:29 am, mdipierro mdipie...@cs.depaul.edu wrote: response.flash=TABLE(TR(first row),TR(second row)) On May 30, 8:30 am, NetAdmin mr.netad...@gmail.com wrote: How do I get session.flash to show multiple rows? The would be nice for a quick popup help message. Thanks!
[web2py] Non-Breaking Space Helper
It would be nice to have a non-breaking space html-helper that uses the following syntax... NBSP(), or NBSP(5) Any Takers?
[web2py] Re: Non-Breaking Space Helper
Thank worked! == controller = def NBSP(n=1) : # # produce non-breaking spaces # return XML('nbsp;' * n) = view === if form.accepts(request.vars, session): response.flash = TABLE(TR(' '),TR(' '),TR(' '), TR( NBSP(15) , 'Center', NBSP(15) ) , TR(' '), TR(' '), TR(' ') ) Thanks On May 30, 12:10 pm, mdipierro mdipie...@cs.depaul.edu wrote: I'd rather avoid to pollute the name space too much. You can do def NBSP(n=1): return XML('nbsp;'*n) On May 30, 11:32 am, NetAdmin mr.netad...@gmail.com wrote: It would be nice to have a non-breaking space html-helper that uses the following syntax... NBSP(), or NBSP(5) Any Takers?
[web2py] Re: Non-Breaking Space Helper
Your solution is much cleaner! Looks like I better start learning CSS and jQuery! Thanks Again! On May 30, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: response.flash = DIV('Center This',_style='padding: 100px 50px 100px 50px;') On May 30, 1:12 pm, Mr admin mr.netad...@gmail.com wrote: Here's an example if what I'm trying to do with NBSP() -- Make a BIG eye-catching response.flash without using the dashes.. See attached file. if form.accepts(request.vars, session): response.flash = TABLE(TR(' '),TR(' '),TR(' '), TR(' Center This ') , TR(' '), TR(' '), TR(' ') ) On Sun, May 30, 2010 at 12:10 PM, mdipierro mdipie...@cs.depaul.edu wrote: I'd rather avoid to pollute the name space too much. You can do def NBSP(n=1): return XML('nbsp;'*n) On May 30, 11:32 am, NetAdmin mr.netad...@gmail.com wrote: It would be nice to have a non-breaking space html-helper that uses the following syntax... NBSP(), or NBSP(5) Any Takers? center2.png 2KViewDownload
[web2py] Re: A quick question for everyone - generating a random code 'onvalidation'
Instead of codes = db().select(db.products.code) # Grabs all the existing codes how about something like, # generate random code code = generatecode() # look to see if a matching code is in the table select stored_code from table where stored_code =code # if no code is returned... then the code is unique Sorry but I didn't have time to convert pseudocode to web2py syntax On May 26, 2:44 pm, scausten scaus...@googlemail.com wrote: I'm adding files content to my database with the following code being called onvalidation when the form is submitted. It really simply generates a 6-digit alphanumeric code as an identifier for the file: codes = db().select(db.products.code) # Grabs all the existing codes from the database while not form.vars.code: code = .join([random.sample(string.ascii_lowercase +string.digits, 1)[0] for i in range(6)]) # Creates a code if not code in codes: # If its unique... form.vars.code = code # ...add it into the form vars It works fine at the moment, but I'm hoping to have several hundred thousand files potentially, and I'm worried that the database call to pull all existing codes will become a serious bottleneck. The code needs to be random and not sequential. Does anyone have any ideas on how I can do this more elegantly?
[web2py] Re: A quick question for everyone - generating a random code 'onvalidation'
Sort of like this mysql select id from tbbooks where id = 8; Empty set (0.00 sec) mysql select id from tbbooks where id = 1; ++ | id | ++ | 1 | ++ 1 row in set (0.00 sec) On May 26, 2:44 pm, scausten scaus...@googlemail.com wrote: I'm adding files content to my database with the following code being called onvalidation when the form is submitted. It really simply generates a 6-digit alphanumeric code as an identifier for the file: codes = db().select(db.products.code) # Grabs all the existing codes from the database while not form.vars.code: code = .join([random.sample(string.ascii_lowercase +string.digits, 1)[0] for i in range(6)]) # Creates a code if not code in codes: # If its unique... form.vars.code = code # ...add it into the form vars It works fine at the moment, but I'm hoping to have several hundred thousand files potentially, and I'm worried that the database call to pull all existing codes will become a serious bottleneck. The code needs to be random and not sequential. Does anyone have any ideas on how I can do this more elegantly?
[web2py] display a stored .jpg during a record list or update
I'm a bit confused. During an edit or listing of all books, how can I display the .jpg file that is stored in the field named coverblob ? I can only see the blob field contents when using appadmin. Thanks! == db.py == db.define_table( 'tbbooks' , SQLField('booktitle' , 'string', length=20), SQLField('cover', 'upload', uploadfield='coverblob'), SQLField('coverblob', 'blob') ) default.py == def index(): # # select all books # recs = db().select(db.tbbooks.ALL,orderby=db.tbbooks.booktitle) return dict ( recs = recs ) def editrec(): # # edit record 1 # form = SQLFORM( db.tbbooks, 1 ) # if form.accepts(request.vars, session): response.flash = 'Done!' # return dict ( form = form ) def insrec(): # # insert a new record # form = SQLFORM( db.tbbooks ) # if form.accepts(request.vars, session): response.flash = 'Done!' # return dict ( form = form ) ==
[web2py] Re: display a stored .jpg during a record list or update
Whoa! SQLHTML? I didn't even know that existed! Thanks for the tip! On May 24, 3:37 pm, mdipierro mdipie...@cs.depaul.edu wrote: If you are looking for a preview of the uploaded images when editing a record you can to do form = SQLHTML(,upload=URL(r=request,f='download')) On May 24, 10:52 am, NetAdmin mr.netad...@gmail.com wrote: I'm a bit confused. During an edit or listing of all books, how can I display the .jpg file that is stored in the field named coverblob ? I can only see the blob field contents when using appadmin. Thanks! == db.py == db.define_table( 'tbbooks' , SQLField('booktitle' , 'string', length=20), SQLField('cover', 'upload', uploadfield='coverblob'), SQLField('coverblob', 'blob') ) default.py == def index(): # # select all books # recs = db().select(db.tbbooks.ALL,orderby=db.tbbooks.booktitle) return dict ( recs = recs ) def editrec(): # # edit record 1 # form = SQLFORM( db.tbbooks, 1 ) # if form.accepts(request.vars, session): response.flash = 'Done!' # return dict ( form = form ) def insrec(): # # insert a new record # form = SQLFORM( db.tbbooks ) # if form.accepts(request.vars, session): response.flash = 'Done!' # return dict ( form = form ) ==
[web2py] Re: display a stored .jpg during a record list or update
There IS NO SQLHTML :-) I figure Massimo meant SQLFORM ... and the follow code works! Thanks! Thanks! Thanks! def editrec(): # # edit record 1 # # form = SQLFORM( db.tbbooks, 1 ) form = SQLFORM(db.tbbooks,1, upload=URL(r=request,f='download') ) return dict ( form = form ) On May 24, 3:53 pm, NetAdmin mr.netad...@gmail.com wrote: Whoa! SQLHTML? I didn't even know that existed! Thanks for the tip! On May 24, 3:37 pm, mdipierro mdipie...@cs.depaul.edu wrote: If you are looking for a preview of the uploaded images when editing a record you can to do form = SQLHTML(,upload=URL(r=request,f='download')) On May 24, 10:52 am, NetAdmin mr.netad...@gmail.com wrote: I'm a bit confused. During an edit or listing of all books, how can I display the .jpg file that is stored in the field named coverblob ? I can only see the blob field contents when using appadmin. Thanks! == db.py == db.define_table( 'tbbooks' , SQLField('booktitle' , 'string', length=20), SQLField('cover', 'upload', uploadfield='coverblob'), SQLField('coverblob', 'blob') ) default.py == def index(): # # select all books # recs = db().select(db.tbbooks.ALL,orderby=db.tbbooks.booktitle) return dict ( recs = recs ) def editrec(): # # edit record 1 # form = SQLFORM( db.tbbooks, 1 ) # if form.accepts(request.vars, session): response.flash = 'Done!' # return dict ( form = form ) def insrec(): # # insert a new record # form = SQLFORM( db.tbbooks ) # if form.accepts(request.vars, session): response.flash = 'Done!' # return dict ( form = form ) ==
[web2py] Re: How to change field name without losing data?
Yes I think so. On Jan 31, 12:24 pm, weheh richard_gor...@verizon.net wrote: But of course. I'm getting so used to working exclusively in web2py I forgot I knew MySQL ;^) Should I assume that if I change a field in my model, too, so that it corresponds to this new field name that the two will become one? -- 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:25976] Re: web2py via shell account
I'm talking about the cron from Linux. Sterling On Jul 8, 12:51 pm, mdipierro mdipie...@cs.depaul.edu wrote: you talking about web2py cron or unix cron? On Jul 8, 12:07 pm, AchipA attila.cs...@gmail.com wrote: Actually, cron has a keyword for that. Specify the time of the task as @reboot and itt will be run only once, right after booting. On Jul 8, 4:47 pm, Mr admin mr.netad...@gmail.com wrote: You can use CRON entry like this to try and run web2py every 15 minuses # cron entry to run web2py every 15 minutes 0,15,30,45 * * * * /root/runweb2py.sh Here are the contents of the shell script. #!/bin/bash # # runweb2py.sh # cd /home/web2py python web2py.py -i 192.168.0.200 -p 8000 -a MyPassWord On Wed, Jul 8, 2009 at 9:15 AM, Jonathan Lundell jlund...@pobox.com wrote: On Jul 8, 2009, at 5:13 AM, Mr admin wrote: One thing you can do is, login to the box using ssh, edit your models, views and controllers without using the admin interface at all. I'm not particularly concerned about the admin interface; I'm happy to develop locally (OS X in my case) and deploy updates via ssh. On Jul 8, 2009, at 5:21 AM, NetAdmin wrote: As for running after a reboot, you could use cron to try and start web2py hourly. If it's running, it should give an error message that says Address already in use I don't like that this would put me off the air for an hour (or whatever interval). On the other hand, reboots are rare, so maybe it's not such a problem. I was vaguely thinking along the lines of having a cgi script that would be invoked by a request to web2py if web2py weren't running. But I haven't really thought out the implications of that. There's another problem, that Apache runs as a global user on the host. I use a PHP-only wrapper script for a couple of applications, such as WordPress http://pragmatos.net. So perhaps a wrapped PHP script to do the startup? Regardless, it'd be nice to have a recipe or three for running web2py via login account. --~--~-~--~~~---~--~~ 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:25977] Re: Waht is cron for?
I was talking about using Linux cron. I've never used the web2py cron. Sterling On Jul 8, 12:59 pm, Jason Brower encomp...@gmail.com wrote: I know what it does in linux. But what is it for in Web2py and why do I need it? Regards, Jason --~--~-~--~~~---~--~~ 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:25829] Re: How to create a JavaScript confirmation popup?
YES! YES! YES! That worked GREAT! I spent HOURS trying to get that correct! Thanks So Much! Sterling On Jul 6, 4:07 pm, Speedbird ju...@techfuel.net wrote: onclick=confirmation('{{=r.id}}'); Then just accept the parameter in your JS function and handle it there, something like function confirmation(recno) { ... -- Julio On Jul 6, 1:57 pm, NetAdmin mr.netad...@gmail.com wrote: Hello All, I'm trying to display records in a table, that has a button at the end of each row, that calls a JavaScript popup to confirm the delete. I'm stuck and would appreciate any help anyone can offer. Some of the code is attached. Thanks! Sterling head script type=text/javascript !-- function confirmation() { var answer = confirm(Delete Record?) // how can I pass the record ID from python to javascript? // I tried something like ... recno = {{=r.id}} recno = '48' if (answer){ // delete the specified record number alert(Deleting Record Number# + recno ) window.location = http://IP-ADDRESS:8000/appname/ controller/delete/ + recno; } else{ alert(The record was NOT deleted) }} //-- /script /head {{# tboffice.id tboffice.fdesc tboffice.fprice }} table {{ for r in recs: }} {{ price = '%.2f' % r.fprice }} {{ rec_id = '%04i ' % r.id }} {{ d = r.fdesc }} tr td {{=rec_id}} /td td {{=r.fdesc}} /td td align=right {{=price}} /td td {{=LI(A(Delete, _href=URL(r=request , f=delete/+str(rec_id) ))) }} /td td form input type=button onClick=confirmation() value=Delete /form /td /tr {{pass}} /table --~--~-~--~~~---~--~~ 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:25824] How to create a JavaScript confirmation popup?
Hello All, I'm trying to display records in a table, that has a button at the end of each row, that calls a JavaScript popup to confirm the delete. I'm stuck and would appreciate any help anyone can offer. Some of the code is attached. Thanks! Sterling head script type=text/javascript !-- function confirmation() { var answer = confirm(Delete Record?) // how can I pass the record ID from python to javascript? // I tried something like ... recno = {{=r.id}} recno = '48' if (answer){ // delete the specified record number alert(Deleting Record Number# + recno ) window.location = http://IP-ADDRESS:8000/appname/ controller/delete/ + recno; } else{ alert(The record was NOT deleted) } } //-- /script /head {{# tboffice.id tboffice.fdesc tboffice.fprice }} table {{ for r in recs: }} {{ price = '%.2f' % r.fprice }} {{ rec_id = '%04i ' % r.id }} {{ d = r.fdesc }} tr td {{=rec_id}} /td td {{=r.fdesc}} /td td align=right {{=price}} /td td {{=LI(A(Delete, _href=URL(r=request , f=delete/+str(rec_id) ))) }} /td td form input type=button onClick=confirmation() value=Delete /form /td /tr {{pass}} /table --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---