[web2py:24409] Re: Using jQuery UI ThemeRoller with web2py

2009-06-17 Thread Richard
I'm using one of the prepared themes hosted on Google: http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/smoothness/jquery-ui.css and then overrode some of the rules in Bandwidth isn't a problem for me but it should be faster for the user. Richard On Jun 17, 8:48 pm, glimmung wrote:

[web2py:24408] Re: DePaul online course on web programming with Python

2009-06-17 Thread mdipierro
We should offer it in october. Not sure yet. Massimo On Jun 17, 11:39 pm, NeonGoby wrote: > Any idea when the next online course will be offerred.  The webpage > said that information will be posted in mid-April. --~--~-~--~~~---~--~~ You received this message be

[web2py:24407] DePaul online course on web programming with Python

2009-06-17 Thread NeonGoby
Any idea when the next online course will be offerred. The webpage said that information will be posted in mid-April. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this gro

[web2py:24406] Re: web2py 1.64.2 is OUT

2009-06-17 Thread mdipierro
Good point but now it made it into stable. I doubt this will be an issue. On Jun 18, 12:15 am, Markus Gritsch wrote: > On Thu, Jun 18, 2009 at 1:04 AM, mr.freeze wrote: > > >> > New IS_COMPLEX validator, thanks Mr. Freeze > > Well, IS_COMPLEX is not a good name since Python has a complex > datat

[web2py:24405] Re: multiple OR conditions in a query

2009-06-17 Thread mdipierro
query=...somequery... for n in g: query=query|db.contacts.membership.like('%'+n+'%') rows=db(query).select(db.contacts.number) On Jun 18, 12:09 am, Nik Go wrote: > I was trying to do the following: > for n in g[:]: >                 query += ' | ' if bool(query) else '' >                 query

[web2py:24404] Re: auto-menu for development

2009-06-17 Thread mdipierro
lol. If I could I would include it in menu.py. This is a good idea and I will think about including it. On Jun 17, 9:51 pm, "mr.freeze" wrote: > Thought I would share this piece of code I use during development to > automatically build response.menu in menu.py. It makes it easy to > navigate you

[web2py:24403] Re: Auth autologin after register

2009-06-17 Thread mdipierro
This is in 1.64.2 On Jun 17, 9:07 pm, Richard wrote: > Great! Thanks Fran. > > On Jun 18, 12:58 am, mdipierro wrote: > > > Thanks for the patch. I will commit it within a few hours. > > > massimo > > > On Jun 17, 1:37 am, Fran wrote: > > > > On Jun 17, 7:17 am, mdipierro wrote: > > > > > no >

[web2py:24402] Re: Time

2009-06-17 Thread mdipierro
no it does not where the client is. On Jun 17, 9:05 pm, weheh wrote: > Massimo, how does request.now know about time zones? (What if server > is in East Kazakhstan and the user is in Hackensack, New Jersey? What > time zone is request.now?) --~--~-~--~~~---~--~~ Y

[web2py:24401] Re: web2py 1.64.2 is OUT

2009-06-17 Thread Markus Gritsch
On Thu, Jun 18, 2009 at 1:04 AM, mr.freeze wrote: > >> > New IS_COMPLEX validator, thanks Mr. Freeze Well, IS_COMPLEX is not a good name since Python has a complex datatype: e.g. 3+5j and one could assume it is tested for this. Markus --~--~-~--~~~---~--~~ You re

[web2py:24400] Re: new slides

2009-06-17 Thread Markus Gritsch
On Thu, Jun 18, 2009 at 3:59 AM, weheh wrote: > > Is it possible to post the PDF to this group? Or make available from > AlterEgo or somewhere else. I also could not download from Scribd. > Maybe they should have built the site with web2py? ;^) Massimo made them available in Keynote and PowerPoin

[web2py:24399] multiple OR conditions in a query

2009-06-17 Thread Nik Go
I was trying to do the following: for n in g[:]: query += ' | ' if bool(query) else '' query += "(db.contacts.membership.like('%" + n + "%'))" rows=db(query).select(db.contacts.number) but couldn't get it to work so I resorted to executing the query using SQLexecute

[web2py:24398] auto-menu for development

2009-06-17 Thread mr.freeze
Thought I would share this piece of code I use during development to automatically build response.menu in menu.py. It makes it easy to navigate your site while testing. Massimo could probably rewrite this in two lines :) import os from gluon.admin import apath from gluon.myregex import regex_exp

[web2py:24397] Re: Auth autologin after register

2009-06-17 Thread Richard
Great! Thanks Fran. On Jun 18, 12:58 am, mdipierro wrote: > Thanks for the patch. I will commit it within a few hours. > > massimo > > On Jun 17, 1:37 am, Fran wrote: > > > On Jun 17, 7:17 am, mdipierro wrote: > > > > no > > > Shame. > > > I patch this manually in my extended Auth class, but

[web2py:24396] Re: new slides

2009-06-17 Thread bsnipes
Click on More and then Save Document... it looks like the Download / PDF link points back to web2py.com which points back to scribd again. Brian On Jun 17, 4:38 am, carlo wrote: > it is impossible to download from Scribd, it just launches an endless > Loading.. > > carlo > > On 17 Giu, 08:21, m

[web2py:24395] Re: Time

2009-06-17 Thread weheh
Massimo, how does request.now know about time zones? (What if server is in East Kazakhstan and the user is in Hackensack, New Jersey? What time zone is request.now?) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "we

[web2py:24394] Re: new slides

2009-06-17 Thread weheh
Is it possible to post the PDF to this group? Or make available from AlterEgo or somewhere else. I also could not download from Scribd. Maybe they should have built the site with web2py? ;^) --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:24393] Re: universal data representation/encoding

2009-06-17 Thread Iceberg
If so, why do you need T('UTF8-string') after all? You can just simply use "raw" utf8 string, such as: {{= "Bragança"}} or even: Bragança In other words, if you don't need i18n, you don't need to bother T ('...'). Fair enough? On Jun17, 7:38pm, Francisco Gama wrote: > That is not a solut

[web2py:24392] Re: web2py 1.64.2 is OUT

2009-06-17 Thread mr.freeze
It lets you easily set complexity requirements on a field. It will dynamically generate the error message by default based on the requirements you set. The signature is: IS_COMPLEX(self, min=8, max=20, upper=1, lower=1, number=1, special=1, specials=r'~...@#$%^&*()_+-=?<>,.:;{}[

[web2py:24391] Re: web2py 1.64.2 is OUT

2009-06-17 Thread Fran
On Jun 17, 10:26 pm, JorgeR wrote: > what is IS_COMPLEX used for? Passwords primarily, but also potentially usernames. See: http://groups.google.com/group/web2py/browse_thread/thread/12ea6f176beb24a5 F --~--~-~--~~~---~--~~ You received this message because you a

[web2py:24390] Re: web2py 1.64.2 is OUT

2009-06-17 Thread JorgeR
what is IS_COMPLEX used for? On Jun 17, 4:08 pm, mdipierro wrote: > web2py 1.54.2 is OUT > > New IS_COMPLEX validator, thanks Mr. Freeze > Informix support, thanks Christopher and Carsten > Autologin on registration, thanks Fran > Some small fixes. > > Massimo --~--~-~--~~---

[web2py:24389] Re: Web2Py Virtual Machine

2009-06-17 Thread JohnMc
> Do you mean web.py? Yes I did. The importance of '.' Quickest way I know to find it is this at commandline -- aptitude search webpy It should come back 'python-webpy' as the package. JohnMc On Jun 17, 4:03 pm, mdipierro wrote: > I noticed that webpy is in the main python > branch. Surpris

[web2py:24388] web2py 1.64.2 is OUT

2009-06-17 Thread mdipierro
web2py 1.54.2 is OUT New IS_COMPLEX validator, thanks Mr. Freeze Informix support, thanks Christopher and Carsten Autologin on registration, thanks Fran Some small fixes. Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[web2py:24387] Re: forms validation

2009-06-17 Thread mdipierro
Not yet. soon. On Jun 17, 3:53 pm, carlo wrote: > >  {{=INPUT(_name='test',_class='...')}} > > so that I can mix html  with helpers, yes I was aware of this. > > > or (latest trunk) > > {{=form.custom.begin}} > > {{=form.custom.widget.test}} > > {{=form.custom.submit}} > > {{=form.custom.end}} >

[web2py:24386] Re: Web2Py Virtual Machine

2009-06-17 Thread mdipierro
I noticed that webpy is in the main python branch. Surprised me. Do you mean web.py? Can you point me to it? On Jun 17, 2:17 pm, JohnMc wrote: > First an update: > > * Web2py server 1.64.1 on Python 2.5.4. > * Firefox in launcher directed to the server. > * Public domain docs of Web2Py. > > The

[web2py:24385] Re: How to create a cross-tabulation view?

2009-06-17 Thread DenesL
On Jun 16, 11:49 am, samwyse wrote: > I saw your other thread, and it looks very interesting. The downside > from my point of view is that I want to easily add new methods, and > I'm not sure that adding a table per method would be practical. OTOH, Note there is nothing stopping you from using

[web2py:24384] Re: forms validation

2009-06-17 Thread carlo
>  {{=INPUT(_name='test',_class='...')}} so that I can mix html with helpers, yes I was aware of this. > or (latest trunk) > {{=form.custom.begin}} > {{=form.custom.widget.test}} > {{=form.custom.submit}} > {{=form.custom.end}} this is totally new to me: did you document this somewhere? Maybe

[web2py:24383] Re: Web2Py Virtual Machine

2009-06-17 Thread JohnMc
First an update: * Web2py server 1.64.1 on Python 2.5.4. * Firefox in launcher directed to the server. * Public domain docs of Web2Py. The web2py server runs on the 2.5 Python branch upon clicking the launcher. I could not remove the 2.6 branch without breaking half the distro. Life is too short

[web2py:24382] Re: Parsing through and sql-statement

2009-06-17 Thread encompass
GOT IT! Thanks to everyone that helped! I knew I was close... I changed my view to this... {{import random}} {{if len(tags) > 0:}} {{count = 0}} {{for tag in relatedTags.keys():}} {{size=random.randint(1, 4)}}

[web2py:24381] Re: 3D visualizations in the browser with web2py

2009-06-17 Thread mdipierro
I was wrong. I was looking at the wrong thing. Firefox uses 65% and CPU usage goes from 2% to 32%. On Jun 17, 1:15 pm, Joe Barnhart wrote: > I don't get it.  How come your Macbook is no faster than mine, but > yours shows no measurable CPU usage and mine shows 35% user and 10% > system when r

[web2py:24380] Re: 3D visualizations in the browser with web2py

2009-06-17 Thread Joe Barnhart
I don't get it. How come your Macbook is no faster than mine, but yours shows no measurable CPU usage and mine shows 35% user and 10% system when running the 3D demo page?? On Jun 17, 7:59 am, mdipierro wrote: > Not really I have a 2years old 2GHz 13in Macbook. > > On Jun 17, 4:12 am, Kuba Kuch

[web2py:24379] Parsing through and sql-statement

2009-06-17 Thread Jason Brower
I am trying to sort this sql query to give me an output like the following... TagID -Username1 -username2 -username3 TagID2 -Username2 -username3 -username4 This is where I am at now... def status(): current_user_id=auth.user.id tags = db((db.users.id==db.user_tags.user_id) &(db.u

[web2py:24378] Re: Time

2009-06-17 Thread annet
Massimo, I tried request.now and it works. Thanks. Annet. --~--~-~--~~~---~--~~ 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 f

[web2py:24377] Re: http_origin equivalent outside of forms

2009-06-17 Thread mdipierro
This is not possible in general because web2py may be behind a proxy. You can make a guess: '%s://%s:%s % (request.env.request_methd, request.env.http_host, request.env.server_port) and it is not guaranteed that the server defines these variables either. massimo On Jun 17, 12:04 pm, Carl wr

[web2py:24376] Re: Time

2009-06-17 Thread mdipierro
This should work: timetable=db(db.timetable.from_time>=request.now).select (db.timetable.ALL) Did you try it? Let us know. massimo On Jun 17, 12:01 pm, annet wrote: > In a table I have a field in which the user enters a time in the > following format: 19:30 > > In one of my views I want to

[web2py:24375] http_origin equivalent outside of forms

2009-06-17 Thread Carl
I'm building URLs for emails. One email is fired out in response to the user submitting a form. url = '%s%s' % (request.env.http_origin,URL (r=request,c='default',f='confirmgreet', args=base64.b16encode (address))) However, I also need to build an URL when a form is not submitted. In this case,

[web2py:24374] Time

2009-06-17 Thread annet
In a table I have a field in which the user enters a time in the following format: 19:30 In one of my views I want to display records with a time >= the current time. What is the correct syntax to code this? timetable=db(db.timetable.from_time>=request.now.?.select (db.timetable.ALL) Kind

[web2py:24373] Re: Using jQuery UI ThemeRoller with web2py

2009-06-17 Thread mdipierro
In my mind a plugin is a w2p file that (xxx) contains a subset of the following files/folders: models/plugin_xxx.py (it does not have db=SQLDB but assume a "db" object is available) controllers/plugin_xxx/* moduels/plugin_xxx/* static/plugin_xxx/* views/plugin_xxx/*.html views/layout.html (option

[web2py:24372] Re: forms validation

2009-06-17 Thread mdipierro
Yes. You can also do def index(): form=FORM(INPUT(_name='test', requires=IS_NOT_EMPTY())) if form.accepts(request.vars,session=None,formname='test'): response.flash='form accepted' elif form.errors: response.flash='form has errors' else: response.fla

[web2py:24371] Re: current link indication with MENU() helper

2009-06-17 Thread mdipierro
Sorry, this needs to be added to the menu helper. Not there yet Massimo On Jun 17, 10:29 am, blackthorne wrote: > since the MENU() helper has been added to web2py, I haven't make it to > understand how does it indicate if the link is the current link which > is supposed to do as described in th

[web2py:24370] Re: Using jQuery UI ThemeRoller with web2py

2009-06-17 Thread Philip Kilner
Hi Massimo, mdipierro wrote: > I think this is a great idea. > Have seen your comments in earlier threads when you state that you don't want to burden web2py with too much stuff by default, and I can see the logic of that. However, the Theme Roller tool is so useful that I want to have the opti

[web2py:24369] Re: forms validation

2009-06-17 Thread carlo
sorry Massimo to insist upon this but I would like to get it clear. I understand this: if you want to validate one field you have to put that field in the FORM() of the controller, this duplication is the trade off to get validation. So this is the way to preserve validation: Controller: def in

[web2py:24368] current link indication with MENU() helper

2009-06-17 Thread blackthorne
since the MENU() helper has been added to web2py, I haven't make it to understand how does it indicate if the link is the current link which is supposed to do as described in the web2py slides. I made something like: response.menu = [ [T('Intro'), request.function=='index',URL(r=request,

[web2py:24367] Re: Using jQuery UI ThemeRoller with web2py

2009-06-17 Thread mdipierro
I think this is a great idea. Right now a web2py w2p always contain an entire app. It does not have to be that way. A w2p may contain a subset of an up (plugin?) and be unzipped over an existing app to change some, its layout for example. In my view a layout w2p would look like this: views/lay

[web2py:24366] Re: Web2Py Virtual Machine

2009-06-17 Thread mdipierro
I still think the ubunto/debian apt-get mechanism remains unbeaten. Massimo On Jun 17, 5:07 am, samwyse wrote: > Since everyone is suggesting changes, how about using one of these > instead of Ubuntu: SLES 9 SP4, SLES10 SP2, RHEL5 U2, RHEL5 U1, RHEL5, > RHEL4.7, AsianUX 2.0, AsianUX 3.0, and OE

[web2py:24365] Re: forms validation

2009-06-17 Thread mdipierro
in your code, the form that accepts is form=FORM() and it contains no fields. No variable is transferred from request.vars to form.vars. There are no errors because there are no fields. The {{=INPUT()}} is the view get serialized when the form is displayed but it is not used by accept because

[web2py:24364] Re: global logging to file

2009-06-17 Thread mdipierro
Can you email it to me? On Jun 17, 5:30 am, Hans wrote: > I'm glad that its useful also to you Richard. > > Massimo, maybe you want to check if you want it in one of the next > versions. > > On Jun 17, 2:23 am, Richard wrote: > > > this looks useful - thanks! > > > On Jun 16, 3:53 am, Hans > >

[web2py:24363] Re: 3D visualizations in the browser with web2py

2009-06-17 Thread mdipierro
Not really I have a 2years old 2GHz 13in Macbook. On Jun 17, 4:12 am, Kuba Kucharski wrote: > AFAIK Massimo owns a "PRO" one ;) > > -- > Kuba > > On Wed, Jun 17, 2009 at 8:38 AM, Joe  Barnhart wrote: > > > Well, now I'm at home and I'm on MY Macbook.  I'm seeing about 35% > > user CPU usage and

[web2py:24362] Re: Auth autologin after register

2009-06-17 Thread mdipierro
Thanks for the patch. I will commit it within a few hours. massimo On Jun 17, 1:37 am, Fran wrote: > On Jun 17, 7:17 am, mdipierro wrote: > > > no > > Shame. > > I patch this manually in my extended Auth class, but it's extra work > to keep updating my extension to keep in-line with main. > >

[web2py:24361] Re: Using jQuery UI ThemeRoller with web2py

2009-06-17 Thread glimmung
Hi, On Jun 17, 11:48 am, glimmung wrote: > My specific concern is maintainability - I'd like to be able to > approach this in a way that enables me to drop in a new ThemeRoller > theme, or update web2py, with the minimum of fuss. Has anyone any > recommendations as to best practice, or better ye

[web2py:24360] Re: ldap authentication

2009-06-17 Thread Johann Spies
Hallo Fran, Thanks for your reply. Best docs is the source itself: > gluon/contrib/login_methods/ldap_auth.py That wil lhelp. > > > > auth=Auth(globals(),db) > > from gluon.contrib.login_methods.ldap_auth import ldap_auth > > auth.settings.login_methods.append(ldap_auth("ldaps:// > stbldap01.

[web2py:24359] Re: Web2Py Virtual Machine

2009-06-17 Thread carlo
could be great to download this VM and test, I think you made a great work. carlo On 17 Giu, 16:08, JohnMc wrote: > samwyse, > > The primary reason I picked Ubuntu was to avoid any licensing issues. > Offering something like this up to anyone who wants it,  means you > don't have any control ov

[web2py:24358] Re: forms validation

2009-06-17 Thread carlo
thank you for suggestions but.. Fran: agree maybe is not good MVC having requires in a view, but what about having forms in the controller/model ? Do you think that good MVC? Personally I hate throwing html (even helpers) in a controller. But I know this is an old debate.. DenesL: I thought ther

[web2py:24357] Re: Web2Py Virtual Machine

2009-06-17 Thread JohnMc
samwyse, The primary reason I picked Ubuntu was to avoid any licensing issues. Offering something like this up to anyone who wants it, means you don't have any control over its use/deployment. RHEL, OEL & SLES all require licenses. I could do a VM for Fedora or Suse CE. But I don't think either

[web2py:24356] Re: forms validation

2009-06-17 Thread DenesL
carlo, the INPUT in the view is not part of the form, the form has no fields. When form.accepts runs it does not have any field to check against request.vars . You will have to stick to Fran's suggestion. --~--~-~--~~~---~--~~ You received this message because yo

[web2py:24355] Re: Web2Py Virtual Machine

2009-06-17 Thread JohnMc
Fran, thanks for the insight. Horst, I'll see what can be accomplished. On Jun 17, 2:02 am, Horst Herb wrote: > On Wed, Jun 17, 2009 at 4:50 PM, Fran wrote: > > > On Jun 17, 2:40 am, JohnMc wrote: > >> 'apache with mod_wsgi preconfigured'. Ok. A clarification on your last > >> sentence -- 'and

[web2py:24354] Re: auth groups?

2009-06-17 Thread JohnMc
No Ajax required. Just use the jQuery show/hide or trigger functions. Your tricker part is defining the DOM set to act on for each group of fields. On Jun 16, 9:11 pm, Joe Barnhart wrote: > Somewhere there's a description of how to use Ajax to hide/unhide form > variables.  This sounds like a g

[web2py:24353] Re: ldap authentication

2009-06-17 Thread Fran
On Jun 17, 10:02 am, Johann Spies wrote: > I am trying to figure out how to use ldap-authentication. Although the > change-log for the latest web2py indicates improved ldap-functionality > I could not find clear documentation on how to use it. Best docs is the source itself: gluon/contrib/login_

[web2py:24352] Re: forms validation

2009-06-17 Thread Fran
On Jun 17, 11:22 am, carlo wrote: > From the manual there is no reason this should not work, but the form > is accepted even with the empty field. Why? Thank you > controller: > def index(): >     form=FORM() >     if form.accepts(request.vars,session,formname='test'): >         response.flash='f

[web2py:24351] Re: universal data representation/encoding

2009-06-17 Thread Francisco Gama
That is not a solution. Personal Names have no language as well as city names like the one in the example: "Bragança". So T() should allow UTF-8. Massimo, how? On Jun 17, 7:18 am, Iceberg wrote: > On Jun17, 12:16pm, Francisco Gama wrote: > > > ok, this one is solved but there is a situation w

[web2py:24350] Using jQuery UI ThemeRoller with web2py

2009-06-17 Thread glimmung
Hi All, We're just setting to on this task, and I wondered if others had gone this route and could share their experiences. My specific concern is maintainability - I'd like to be able to approach this in a way that enables me to drop in a new ThemeRoller theme, or update web2py, with the minimu

[web2py:24349] Re: global logging to file

2009-06-17 Thread Hans
I'm glad that its useful also to you Richard. Massimo, maybe you want to check if you want it in one of the next versions. On Jun 17, 2:23 am, Richard wrote: > this looks useful - thanks! > > On Jun 16, 3:53 am, Hans > wrote: > > > Important note: do *not* 'import logging' in your controller i

[web2py:24348] forms validation

2009-06-17 Thread carlo
>From the manual there is no reason this should not work, but the form is accepted even with the empty field. Why? Thank you carlo controller: def index(): form=FORM() if form.accepts(request.vars,session,formname='test'): response.flash='form accepted' elif form.errors:

[web2py:24347] Re: Web2Py Virtual Machine

2009-06-17 Thread samwyse
Since everyone is suggesting changes, how about using one of these instead of Ubuntu: SLES 9 SP4, SLES10 SP2, RHEL5 U2, RHEL5 U1, RHEL5, RHEL4.7, AsianUX 2.0, AsianUX 3.0, and OEL 5.1. While everyone I know has Ubuntu on their desks and laptops, those are the only distros that my company will sup

[web2py:24346] Re: new slides

2009-06-17 Thread carlo
it is impossible to download from Scribd, it just launches an endless Loading.. carlo On 17 Giu, 08:21, mdipierro wrote: > sorry. fixed. > > On Jun 17, 1:12 am, "Francois (Jersey)" > > wrote: > > can not access as well, and have an Invalid function. --~--~-~--~~~---

[web2py:24345] Re: 3D visualizations in the browser with web2py

2009-06-17 Thread Kuba Kucharski
AFAIK Massimo owns a "PRO" one ;) -- Kuba On Wed, Jun 17, 2009 at 8:38 AM, Joe Barnhart wrote: > > Well, now I'm at home and I'm on MY Macbook.  I'm seeing about 35% > user CPU usage and another 10-12% system.  This is on a 2.0 GHz Core 2 > Duo Macbook (not pro) with 4G memory.  I tried it u

[web2py:24344] ldap authentication

2009-06-17 Thread Johann Spies
I am trying to figure out how to use ldap-authentication. Although the change-log for the latest web2py indicates improved ldap-functionality I could not find clear documentation on how to use it. Someware I got hold of what I have used in the configuration: auth=Auth(globals(),db) from gluon.co

[web2py:24343] Re: Web2Py Virtual Machine

2009-06-17 Thread Horst Herb
On Wed, Jun 17, 2009 at 4:50 PM, Fran wrote: > > On Jun 17, 2:40 am, JohnMc wrote: >> 'apache with mod_wsgi preconfigured'. Ok. A clarification on your last >> sentence -- 'and perhaps a nice user interface in web2py to add new >> virtual hosts.' Do you mean -- > > I think he means a Web2Py app w