Re: [web2py] Re: How to simulate form submission in doctest

2011-03-12 Thread David Bain
Hmm, I'll need to look into this some more. On Sat, Mar 12, 2011 at 3:04 AM, pbreit pbreitenb...@gmail.com wrote: Wow, I'm not sure how or if you are going to be able to run a doctest on a form in a controller. Running it in a web2py shell only returns the form: In [1] : import os In [2]

[web2py] How to simulate form submission in doctest

2011-03-11 Thread David Bain
I'd like to run a doctest that simulates submitting a form, how would that look? Here's my trivial example: def do_nothing(): ''' request.vars.text = 'earafae faefaf afeaf aefafeaef' do_nothing() 'I'm doing nothing' ''' form=FORM('Your name:',

Re: [web2py] Re: Integrating web2py and a CMS

2011-01-15 Thread David Bain
I believe web2py can act as a CAS authentication server. If you CMS does CAS then you're good. Maybe an easier place to start is to figure what CMSes out there can authenticate against CAS. 2011/1/15 Kenneth Lundström kenneth.t.lundst...@gmail.com I was thinking about using web2py as the

Re: [web2py] Re: (OT) Choosing a javascript mvc framework

2011-01-14 Thread David Bain
Angularjs looks interesting. On Tue, Jan 11, 2011 at 11:49 PM, Luther Goh Lu Feng elf...@yahoo.comwrote: Tks for the suggestions. I should be going with angularjs http://misko.hevery.com/2010/07/29/a-radically-different-way-of-building-ajax-apps/ http://angularjs.org/ On Jan 12, 2:12 am,

Re: [web2py] Re: Drupal alternatives in Python or web2py

2011-01-08 Thread David Bain
Let me second the Plone for CMS/Web2py for rapid apps meme. I'm also a regular user of Plone and Plone 4 is excellent. Point of trivia, while Plone latest release has gotten faster, Drupal's latest release has gotten slower. Anyway I've had to dive into web2py because it was the best choice for

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
I like the modified admin approach, it would be simpler, for teaching purposes it would work, it would need to be modified for production style scenarios as it would not be an acceptable risk. On Tue, Jan 4, 2011 at 6:50 AM, mdipierro mdipie...@cs.depaul.edu wrote: This can be done but it would

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
folder. At the moment students get access to each other appdmin controllers. Please help with testing! On Jan 4, 8:28 am, David Bain pigeonfli...@gmail.com wrote: I like the modified admin approach, it would be simpler, for teaching purposes it would work, it would need to be modified

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
, 2011 at 10:54 AM, David Bain pigeonfli...@gmail.com wrote: Thanks Massimo, Checking out trunk now. On Tue, Jan 4, 2011 at 10:49 AM, mdipierro mdipie...@cs.depaul.eduwrote: In trunk. - Deploy the latest admin - edit file applications/admin/models/0.py and set MULTI_USER_MODE = True - Try

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Just a note. There was no option to register. I had to visit localhost:8000/admin/default/user/register On Tue, Jan 4, 2011 at 11:44 AM, David Bain pigeonfli...@gmail.com wrote: Massimo, Nice! It works... so as long as I register first I'm the teacher :). I'm just looking at web2py again

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Okay... I've started hacking the Teaching version of web2py. Hardcoded my own twitter feed. I think it would be nice to offer custom feeds on the admin page: see screenshot below: [image: site.jpg] On Tue, Jan 4, 2011 at 11:47 AM, Bruno Rocha rochacbr...@gmail.com wrote: Thanks! this will ne

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
, Jan 4, 2011 at 11:57 AM, mdipierro mdipie...@cs.depaul.edu wrote: It would be nice to have some documentation. For now even a simple blog post that explains purpose, how to, and shows some screen shots will do. Massimo On Jan 4, 10:44 am, David Bain pigeonfli...@gmail.com wrote: Massimo

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
On Jan 4, 10:44 am, David Bain pigeonfli...@gmail.com wrote: Massimo, Nice! It works... so as long as I register first I'm the teacher :). I'm just looking at web2py again in the last few weeks. I'm very happy to help with documentation of this feature. Just point me in the right

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
VP, No the password is the password that the first user signs up with. On Tue, Jan 4, 2011 at 12:10 PM, VP vtp2...@gmail.com wrote: One more caveat. For security, the first user is the teacher and registration is enabled by default. I haven't tried this, but will soon. One question: Would

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
code in front of the firewall e.g. something hosted on google appengine. Any other thoughts on this? On Tue, Jan 4, 2011 at 12:13 PM, David Bain pigeonfli...@gmail.com wrote: VP, No the password is the password that the first user signs up with. On Tue, Jan 4, 2011 at 12:10 PM, VP vtp2

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Okay the register button is now present :) [image: user login-1.jpg] On Tue, Jan 4, 2011 at 12:17 PM, VP vtp2...@gmail.com wrote: Okay. Thanks. On Jan 4, 11:13 am, David Bain pigeonfli...@gmail.com wrote: VP, No the password is the password that the first user signs up with. On Tue

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
@mdpierro, More flags in 0.py would be good enough (tm) for my use case. On Tue, Jan 4, 2011 at 1:01 PM, mdipierro mdipie...@cs.depaul.edu wrote: On Jan 4, 11:07 am, David Bain pigeonfli...@gmail.com wrote: Possible bug: The teacher account is fine. However I created my first student

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
, other_application).authorized File /home/user/web2pytrunkagain/gluon/fileutils.py, line 278, in get_session raise KeyError KeyError On Tue, Jan 4, 2011 at 1:01 PM, mdipierro mdipie...@cs.depaul.edu wrote: On Jan 4, 11:07 am, David Bain pigeonfli...@gmail.com wrote: Possible bug

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
I didn't get much out of commenting out those lines. In Chrome I got an unresolvable url. On Tue, Jan 4, 2011 at 4:47 PM, mdipierro mdipie...@cs.depaul.edu wrote: I think this is now fixed. On Jan 4, 1:10 pm, David Bain pigeonfli...@gmail.com wrote: When I try to access /admin/appadmin

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
, Jan 4, 2011 at 5:14 PM, mdipierro mdipie...@cs.depaul.edu wrote: never mind. should now be fixed in trunk. On Jan 4, 4:05 pm, David Bain pigeonfli...@gmail.com wrote: I didn't get much out of commenting out those lines. In Chrome I got an unresolvable url. On Tue, Jan 4, 2011 at 4:47 PM

[web2py] How passwords are encrypted/hashed for storage in web2py

2011-01-04 Thread David Bain
I'm not sure how passwords are hashed in web2py. If it uses a token, where is it stored. I'm guessing that it uses something like this: from hashlib import md5 token = 'insecure' tokenizedHash = md5(password + token) print tokenizedHash.hexdigest()

Re: [web2py] Re: How passwords are encrypted/hashed for storage in web2py

2011-01-04 Thread David Bain
to cetrain attacks. Web2py uses hmac+md5 or hmac+sha512. The password can be specified by:  auth.settings.hmac_kay='sha512:mypassword' which is passed to the validator  CRYPT(hmac_key='') Massimo The prefix:  (sha512) specifies the algorithm. On Jan 4, 6:31 pm, David Bain pigeonfli

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
I think janrain might work for me. On Tue, Jan 4, 2011 at 8:06 PM, mdipierro mdipie...@cs.depaul.edu wrote: you are right... You can use janrain. You just need to configure admin/ models/db.py but mind you loose the configuration on web2py upgrade. On Jan 4, 5:23 pm, David Bain pigeonfli

Re: [web2py] Re: How passwords are encrypted/hashed for storage in web2py

2011-01-04 Thread David Bain
is is the literal ascii string your secret key, if you change the hmac_key this will break. from hashlib import md5 import hmac hmac_key = 'your secret key' password = 'insecure' thehash = hmac.new(hmac_key, password).hexdigest() print thehash On Tue, Jan 4, 2011 at 8:13 PM, David Bain pigeonfli

[web2py] Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-03 Thread David Bain
I'm setting up a webserver that supports web2py, each user should have their own web2py instance, hopefully everything will be deployed via mod_wsgi. This my goal: Each user will be able to deploy their apps to their own 'www' folder on the webserver filesystem: ~user/www/ for a user the web2py

Re: [web2py:36265] Re: Wordpress to Python :)

2009-12-01 Thread david bain
Thadeus, So basically it creates a dictionary that represents all the content of a wordpress databse. Is this strictly for migration or more for syncing? I suppose it could be used for both. On Tue, Dec 1, 2009 at 9:53 AM, mdipierro mdipie...@cs.depaul.edu wrote: Could you explain again what is

[web2py:34968] Re: Howto to make your own layouts

2009-11-09 Thread david bain
Massimo, This is very useful. An excellent start to the plugin system. On Mon, Nov 9, 2009 at 11:55 AM, mdipierro mdipie...@cs.depaul.edu wrote: Assuming the 408 layouts in http://web2py.com/layouts are not enough you can use this:

[web2py:33999] Re: Google Groups is Dead

2009-10-28 Thread david bain
software realized in web2py, not immediately at least. 2009/10/28 mdipierro mdipie...@cs.depaul.edu Right now the web2py google group takes negligible maintenance time. We have about 10 managers. Massimo On Oct 27, 11:26 pm, david bain pigeonfli...@gmail.com wrote

[web2py:34000] Re: Google Groups is Dead

2009-10-28 Thread david bain
For the record, I have used both services and have a preference for Coactivate.org. Both of them have a feature where they will email you when there is activity around something that you're interested in, the implementation is different between them. On Wed, Oct 28, 2009 at 5:48 PM, david bain

[web2py:33878] Re: Google Groups is Dead

2009-10-27 Thread david bain
I understand the spam issue with Google Groups, however I wouldn't throw the baby out with the bathwater. I find mailing lists to be very valuable. On Tue, Oct 27, 2009 at 9:50 PM, mengu whalb...@gmail.com wrote: i think a forum would be more helpful and better. On Oct 28, 2:56 am, mdipierro

[web2py:33891] Re: Google Groups is Dead

2009-10-27 Thread david bain
am happy with it. On Oct 27, 9:53 pm, david bain pigeonfli...@gmail.com wrote: I understand the spam issue with Google Groups, however I wouldn't throw the baby out with the bathwater. I find mailing lists to be very valuable. On Tue, Oct 27, 2009 at 9:50 PM, mengu whalb

[web2py:33766] Re: Looking for a simple reservation system

2009-10-26 Thread david bain
Just to extend the feature set, it would be nice if you could 'register' and manage/present the bookings of multiple properties. On Mon, Oct 26, 2009 at 4:38 PM, villas villa...@gmail.com wrote: We have a similar system requirement: accommodation bookings. In this case, each room/property

[web2py:33686] Re: powered by web2py?

2009-10-25 Thread david bain
Couldn't get to surrenderthebooty On Sun, Oct 25, 2009 at 10:19 PM, Thadeus Burgess thade...@thadeusb.comwrote: surrenderthebooty.thadeusb.com is also powered by web2py (when it gets back online haha) -Thadeus On Sun, Oct 25, 2009 at 10:16 PM, Miguel Lopes mig.e.lo...@gmail.comwrote:

[web2py:33550] Re: new site using web2py

2009-10-23 Thread david bain
I like the site. BTW I noticed a Plone favicon for some reason. What were your reasons for chosing web2py over Django? What database are you using on the backend? sqlite, mysql, postgres? On Fri, Oct 23, 2009 at 10:25 PM, JorgeRpo jorgeh...@gmail.com wrote: Cool. Nice work ;) On Oct 23,

[web2py:32240] Re: anti spam, anti porn strategy?

2009-10-05 Thread david bain
implementing a captcha or recaptcha based system should help. On Mon, Oct 5, 2009 at 9:27 AM, Web2py-SuperFan mwkan...@gmail.com wrote: Hi all, I'm implementing a comments and wiki feature on my web2py app.  Is there any best practices or strategies you've used or would recommend on

[web2py:31114] Re: T2 status

2009-09-16 Thread david bain
different by much more powerful. In the manual this is covered in the chapters on Crud, Auth and Service. t3 was built on t2 so it is deprecated to in favor of t4 which is being built and you can find some recent posts about it. Massimo On Sep 15, 4:46 pm, David Bain pigeonfli...@gmail.com wrote

[web2py:31119] Re: T2 status

2009-09-16 Thread david bain
Will this always be the case? Will there be a stable t-something in the future? Or are the t projects proving grounds for technologies that eventually get into core? On Wed, Sep 16, 2009 at 11:06 AM, mdipierro mdipie...@cs.depaul.edu wrote: yes On Sep 16, 10:26 am, david bain pigeonfli

[web2py:31122] Re: T2 status

2009-09-16 Thread david bain
the resources to maintain applications as well as I maintain web2py. Massimo On Sep 16, 11:47 am, david bain pigeonfli...@gmail.com wrote: Will this always be the case? Will there be a stable t-something in the future? Or are the t projects proving grounds for technologies that eventually get

[web2py:31089] T2 status

2009-09-15 Thread David Bain
Hopefully I've done enough RTFMing before asking this question. What's the status of t2? In the t2 tutorial video it was noted that the api was not stable and it might change. Is it stable now? Can I start deploying production stuff on t2? Where's the best source of uptodate documentation? I