[web2py:27584] Some sugestions to improvements in translation/localization

2009-07-29 Thread Alexandre Andrade
Massimo, I have a few sugestions to improve the localization of app welcome, so it will be easier to international users: 1. Set the labels of registration table : db.auth_user.first_name.label=T("First Name") db.auth_user.last_name.label=T("Last Name") db.auth_user.email.label=T("E

[web2py:27583] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread Yarko Tymciurak
As Massimo pointed out, the philosophy and approach w/in django & web2py is different. You will probably want to step back from the django solution one step - from "here's how it's done in django" to what is being accomplished, and how it's done in django. Then you will more readily get to "how w

[web2py:27582] Re: irc#web2py

2009-07-29 Thread Zoom.Quiet
On Thu, Jul 30, 2009 at 11:23, Massimo Di Pierro wrote: > > Armin (mistuhiko), > > have you joined the web2py IRC because you are a web2py user or for > the only purpose of discouraging new users? > In this latter case, do you think it is an appropriate behavior? > IRC is tooo fast, for people th

[web2py:27581] irc#web2py

2009-07-29 Thread Massimo Di Pierro
Armin (mistuhiko), have you joined the web2py IRC because you are a web2py user or for the only purpose of discouraging new users? In this latter case, do you think it is an appropriate behavior? Massimo --~--~-~--~~~---~--~~ You received this message because y

[web2py:27580] Re: IRC should not be neglected!

2009-07-29 Thread Jason Brower
I agree with the irc channel not in it's full power. But I love it, and when I have been there, I have gotten my questions answered. Bugs shouldn't be recorded there, you are right. But they shouldn't be scattered all over the mail list either, at least in my opinion. Regards, Jason On Wed, 20

[web2py:27579] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread mdipierro
If you build the model, and empty actions which a docstring explaining what the should do, I can help filling the blanks. On Jul 29, 8:37 pm, __future__ wrote: > I would like it to be functionally as similar to the original as > possible (with maybe a couple of enhancements :-) ) > > I think in

[web2py:27578] Re: IRC should not be neglected!

2009-07-29 Thread mdipierro
The problem with IRC is that because of my job I cannot be there often. Moreover even if things gets resolved they are not recorded. Massimo On Jul 29, 8:54 pm, ceej wrote: > The current topic ishttp://www.web2py.com- enterprise python > framework || Latest version 1.65.7 || need to paste code

[web2py:27577] Re: IRC should not be neglected!

2009-07-29 Thread ceej
The current topic is http://www.web2py.com - enterprise python framework || Latest version 1.65.7 || need to paste code use - http://pastie.textmate.org/ || Google Groups - http://groups.google.com/group/web2py || To get someone's attention just type their name into the channel/ room || Don't ask

[web2py:27576] Re: IRC should not be neglected!

2009-07-29 Thread Bottiger
I agree that the IRC channel is neglected. When I did benchmarks to show that the bundled version of flup does not scale for multicore machines and that the prefork version should be used, no one said anything. When I mentioned it here, no one has bothered to do anything about it. And this is stil

[web2py:27575] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread __future__
I would like it to be functionally as similar to the original as possible (with maybe a couple of enhancements :-) ) I think in the building of it, people will really appreciate a lot of the things that web2py does for you in the process.. I personally find seemingly little things like the handli

[web2py:27574] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread mdipierro
This is an excellent idea and you can count on my help. One decision you need to make is how close you want to the "translation" to be to the original. - do you need the same actions? (I assume yes) - can you use joins? (I assume yes, but in this case it will not run on GAE) - do you need the sam

[web2py:27573] IRC should not be neglected!

2009-07-29 Thread __future__
I have seen this come up in some other thread about people not using IRC much in this community. Personally, I think this is kind of tragic since I have seen a lot of good information sharing coming out of IRC since I have been using it (since the early 90's). I might not be able to change the p

[web2py:27572] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread __future__
I should add that I am attempting to respond to my own complaint in other threads about web2py not having enough of these kinds of tutorials around. :) On Jul 29, 7:44 pm, __future__ wrote: > Thank you for the quick reply! > > I think this is starting to click a little more for me.   I have >

[web2py:27571] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread __future__
Thank you for the quick reply! I think this is starting to click a little more for me. I have purchased the book and I have the updated chapters you posted for 6,7,8 that I have been using as a reference. Unfortunately, my mind struggles with abstractions unless presented with a concrete examp

[web2py:27570] Re: Restrict profile updates

2009-07-29 Thread mdipierro
if request.args(0)=='profile': db.auth_user.email.readable=False On Jul 29, 4:12 pm, hcvst wrote: > Hi, > > how do I permit my users to capture their email address during > registration > but disallow them to change it when they are updating their auth() > profile, > please? > > Regards, > HC --

[web2py:27569] Re: Auth: mail validation

2009-07-29 Thread mdipierro
You need to add: auth.settings.registration_requires_verification = False and customize your email message: auth.messages.verify_email = \ 'Click on the link http://...verify_email/%(key)s to verify your email' Massimo On Jul 29, 3:23 pm, David Zejda wrote: > -BEGIN PGP SIGNE

[web2py:27568] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread mdipierro
These are good questions. web2py does not have something like Django managers and you have to achieve the same goal differently. This is because of different in design philosophy. Django has an ORM, web2py has a DAL. In Django a model maps a table into an object so you can override the methods of

[web2py:27567] Re: Allowable Characters in Web2Py URLS

2009-07-29 Thread mdipierro
Everything is allowed is in the query string because this is supposed to be validated by validators. Nether ~ or .. are allowed in the URL path because this is normally used to access a resource (application, controller, function, table, record, file). You can edit routes.py to allow any URL you

[web2py:27566] Industry usage data

2009-07-29 Thread Rich
Hi, I'm evaluating web2py along with a couple of other frameworks as a replacement for our current Zope 2 implementation. Can anyone point me to some data that shows if and where web2py is gaining any traction in industry? Any examples, success stories, etc? How well is web2py being adopted?

[web2py:27565] gluon.contrib.login_methods.CasAuth

2009-07-29 Thread hcvst
Hi, I am just trying to implement CasAuth to plug openID (oID) into auth (). I've got a simple oID server/consumer app using the Janrain Python oID lib. The login_methods.gae example included in the login_methods folder seems to fit (too) well, as all external calls are wrapped nicely in the g

[web2py:27564] Restrict profile updates

2009-07-29 Thread hcvst
Hi, how do I permit my users to capture their email address during registration but disallow them to change it when they are updating their auth() profile, please? Regards, HC --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[web2py:27563] Re: link to on data/select crud

2009-07-29 Thread Tito Garrido
Thanks Fran for your quickly reply! Isn't there an easy way to edit this linkto or add a new column customizing the form variable? Something like you did on: def data(): form = crud() if request.args(0) == 'select': try: form['_class'] = 'flexme' except: p

[web2py:27562] Auth: mail validation

2009-07-29 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I have this code: from gluon.tools import Mail, Auth, Recaptcha mail=Mail() mail.settings.server='mail.mydomain.net:25' mail.settings.sender='ad...@mydomain.net' mail.settings.login=None auth = Auth(globals(), db) auth.define_tables() auth.

[web2py:27561] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread __future__
Looking at my post, I can see where not knowing Django would be an impediment to understanding... :) Let me try again (and please bare with me because I am *not* an expert on Django). Django has these things called Managers: http://docs.djangoproject.com/en/dev/topics/db/managers/ from the Dja

[web2py:27560] Re: link to on data/select crud

2009-07-29 Thread Fran
On Jul 29, 8:59 pm, Fran wrote: > I have to modify the linkto in my app. > I extend the SQLTABLE() class for this & call my modified version by > an extended Crud() class. > You can see this here: http://trac.sahanapy.org/browser/modules/sahana.py Posted too early ;) F --~--~-~--~~-

[web2py:27559] Re: link to on data/select crud

2009-07-29 Thread Fran
On Jul 29, 8:44 pm, Tito Garrido wrote: > Is there a way to change the linkto parameter on data/select ? > It's pointing to data/read I'd like to use data/update I have to modify the linkto in my app. I extend the SQLTABLE() class for this & call my modified version by an extended Crud() class.

[web2py:27558] Re: Allowable Characters in Web2Py URLS

2009-07-29 Thread Bottiger
I don't see how allowing ~ is a bad idea while allowing ../ in the query string is allowed. IE. "index?a=../../etc/passwd" This is at the level where if a tilde isn't secure, then neither should periods, which is of course a bit ridiculous. On Jul 29, 4:25 am, mdipierro wrote: > Sorry allowing

[web2py:27557] Re: Auth. Customisation form created by register()

2009-07-29 Thread Fran
On Jul 29, 8:13 pm, Carl wrote: > for the future: being able to set my own form for register() would be > real nice. at present I can do that only if I want to pull in a remote > authentication system. You can have extra fields on the register() form very easily - the form is simply a SQLFORM of

[web2py:27556] link to on data/select crud

2009-07-29 Thread Tito Garrido
Is there a way to change the linkto parameter on data/select ? It's pointing to data/read I'd like to use data/update Another question regarding this table... is there a way to add a new column there? Thanks! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__

[web2py:27555] Re: Auth. Customisation form created by register()

2009-07-29 Thread Carl
thanks for the reply Fran; and the suggestions. it feels like I'm fighting against the framework on this one so I'm adopting a JIT philosophy for data collection. I'll collect the very basics on registration and then ask for more when users want the additional services. for the future: being abl

[web2py:27554] Re: Crud /data/select customization

2009-07-29 Thread Tito Garrido
Thanks a lot Fran! It works! On Tue, Jul 28, 2009 at 7:06 PM, Fran wrote: > > On Jul 28, 9:27 pm, Tito Garrido wrote: > > I'm using the generic data... is there a way to set it? > > If you're happy for the same class for all tables, then: > def data(): >form = crud() >if request.args(0

[web2py:27553] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread Fran
On Jul 29, 6:51 pm, __future__ wrote: > So can I create a custom filter like the EventQuerySet in the example > and then apply it in the controller?  I assume I will have to use this > anywhere an event might get an update?  Can I use it with crud? I don't quite follow the example (I'm not famil

[web2py:27552] Re: temporary table

2009-07-29 Thread Fran
On Jul 29, 3:14 pm, phneoix wrote: > i hope iam not confusing you guys. No, this is very clear & makes sense. My first thought would be to merge all the lookup tables into 1 & add a 'type' column, but I guess you can't do that? Temporary tables aren't always recommended: http://www.sql-server-

[web2py:27550] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread __future__
In the django example, they create a customer query that limits the range selected to time range defined in the today() function. This gets 'attached' to the model with EventManager and then applied automatically when ever an Event object is saved. It only updates the latest column when all of t

[web2py:27551] Re: Auth. Customisation form created by register()

2009-07-29 Thread Fran
On Jul 29, 5:51 pm, Carl wrote: > I'm using auth for my authentication. > I have two types of users: buyers and students. > Each user type fills in a different (overlapping) set of fields when > they register. > One user type may, at a future point, register as an additional type. > Can I use web

[web2py:27549] Auth. Customisation form created by register()

2009-07-29 Thread Carl
hi, I'm using auth for my authentication. I have two types of users: buyers and students. Each user type fills in a different (overlapping) set of fields when they register. One user type may, at a future point, register as an additional type. Can I use web2py auth to offer differnt registrat

[web2py:27548] Re: typo on web2py.com

2009-07-29 Thread mdipierro
oops, thanks On Jul 29, 10:36 am, Alexey Nezhdanov wrote: > Hello Massimo. > 'role based access control' is linked > tohttp://web2py.com/{=URL(r=request,f='tools',anchor='authorization')}} > I.e. one left { is missing > -- > Sincerely yours > Alexey Nezhdanov --~--~-~--~~---

[web2py:27547] Re: Allowable Characters in Web2Py URLS

2009-07-29 Thread mdipierro
You can still use these URL you just have to remap them using routes.py On Jul 29, 10:34 am, Yarko Tymciurak wrote: > I mean, note the URL: > > On Wed, Jul 29, 2009 at 10:33 AM, Yarko Tymciurak wrote: > > Note:   > > https://code.launchpad.net/~mdipierro/web2py/devel

[web2py:27546] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread mdipierro
There are many ways. If you are using crud, you can do def fix_latest(form): db(db.event.user=auth.user.id).update(latest=False) form.vars.latest=True def index(): db.event.latest.readable=db.event.latest.writable=False form=crud.create(db.event,onvalidation=fix_latest) retur

[web2py:27545] typo on web2py.com

2009-07-29 Thread Alexey Nezhdanov
Hello Massimo. 'role based access control' is linked to http://web2py.com/{=URL(r=request,f='tools',anchor='authorization')}} I.e. one left { is missing -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:27544] Re: Allowable Characters in Web2Py URLS

2009-07-29 Thread Yarko Tymciurak
I mean, note the URL: On Wed, Jul 29, 2009 at 10:33 AM, Yarko Tymciurak wrote: > Note: > https://code.launchpad.net/~mdipierro/web2py/devel > > > On Wed, Jul 29, 2009 at 6:25 AM, mdipierro wrote: > >> >> Sorry allowing ~ is a bad idea. It m

[web2py:27543] Re: Allowable Characters in Web2Py URLS

2009-07-29 Thread Yarko Tymciurak
Note: https://code.launchpad.net/~mdipierro/web2py/devel On Wed, Jul 29, 2009 at 6:25 AM, mdipierro wrote: > > Sorry allowing ~ is a bad idea. It may allow directory traversal > attacks. > > Massimo > > On Jul 29, 2:35 am, Bottiger wrote: > > I was going over Web2Py code, and I noticed that th

[web2py:27542] Re: temporary table

2009-07-29 Thread phneoix
thanks for the replies. sorry for the delay in replying. i am having 8 different lookup tables which contains the master list of all the materials.(endmills, gauging instruments, drills,tooling systems, etc).these contain the material name and respective product id's. there is another table whi

[web2py:27541] Re: Converting a Django Tutorial to web2py

2009-07-29 Thread __future__
Thanks for all of the replies This is a very responsive group! I'm still not clear on how to replicate some of the Django functionality here but at least I think I understand how many-to-many works in web2py. I had seen the tagging example before but something about that method bothers me. It

[web2py:27540] Re: Syntax error

2009-07-29 Thread Johann Spies
Thanks. That was the problem. 2009/7/29 Mladen Milankovic : > > Hi. > > Problem is in line: > db.Field("password", ‘password’,readable=False, label="Password"), > > It's the ‘ which isn't a real apostrophe. ' this is. It looks like it, but > when I copy/pasted your code, syntax highlighting didn

[web2py:27539] Re: Syntax error

2009-07-29 Thread Mladen Milankovic
Hi. Problem is in line: db.Field("password", ‘password’,readable=False, label="Password"), It's the ‘ which isn't a real apostrophe. ' this is. It looks like it, but when I copy/pasted your code, syntax highlighting didn't mark it as a string. Try replacing it. regards mmlado On Wednesday 29

[web2py:27538] Syntax error

2009-07-29 Thread Johann Spies
While working through the tutorial I am trying get the following error message and I cannot see what the problem is: Error traceback Traceback (most recent call last): File "/usr/local/web2py/gluon/restricted.py", line 174, in restricted ccode = compile(code.replace('\r\n', '\n'), layer, '

[web2py:27537] Re: feature request: activate the feature request template

2009-07-29 Thread Sebastian E. Ovide
great.. you need to go to "administer" tab of google code page, then to "issue tracking" sub tab and in the "new issues template" section create a template for "feature request" which has a proper label (for example Type-Enhancement). It needs to be enabled also to people that do not belong to the

[web2py:27536] Re: web2py development and deployment

2009-07-29 Thread Hans
The following trick I used with WingIDE (with other modules)...might work also for your IDE. Instead of import rpdb2; rpdb2.start_embedded_debugger('any_password') use if 0: import rpdb2; rpdb2.start_embedded_debugger('any_password') In production (not using WingIDE) the if will a

[web2py:27535] Re: feature request: activate the feature request template

2009-07-29 Thread mdipierro
OK with me. Is this something I need to setup? Massimo On Jul 29, 6:06 am, "Sebastian E. Ovide" wrote: > Hi Massimo, > > Is it ok for you if we use the google code page to create "feature request" > issues ? > > Users can vote and therefore you would have an extra feedback from the > community.

[web2py:27534] Re: Allowable Characters in Web2Py URLS

2009-07-29 Thread mdipierro
Sorry allowing ~ is a bad idea. It may allow directory traversal attacks. Massimo On Jul 29, 2:35 am, Bottiger wrote: > I was going over Web2Py code, and I noticed that the allowable URLs > are a bit narrow. > > As a reference for URL handling, I am using RFC > 3986:http://tools.ietf.org/html/

[web2py:27533] feature request: activate the feature request template

2009-07-29 Thread Sebastian E. Ovide
Hi Massimo, Is it ok for you if we use the google code page to create "feature request" issues ? Users can vote and therefore you would have an extra feedback from the community. In the same time good ideas would not risk of being forgotten in the mailing list. Thanks -- Sebastian E. Ovide -

[web2py:27532] Allowable Characters in Web2Py URLS

2009-07-29 Thread Bottiger
I was going over Web2Py code, and I noticed that the allowable URLs are a bit narrow. As a reference for URL handling, I am using RFC 3986: http://tools.ietf.org/html/rfc3986 which is has a summary at Wikipedia here: http://en.wikipedia.org/wiki/Percent-encoding The default allowable URLs are ne

[web2py:27531] Re: test_rewrite fails

2009-07-29 Thread Jonathan Lundell
On Jul 28, 2009, at 4:23 PM, mdipierro wrote: > > I did not write that test and I do not recall what it is supposed to > test. > I think the problem is with the test, not with web2py. > Any idea? None. Somebody who understands rewrite.rewrite might like to have a look. > > > On Jul 28, 12:47