[web2py:28397] Re: where for art thou, oh session attribute?

2009-08-11 Thread rb

Thx kindly, Massimo. I'll check the links out... but...

>Once more, the issue is not with web2py. The issue is with your
client. It does not support cookies, hence it does not support
sessions.

Errr... no, that is not the issue that I'm pointing at. If "sessions
remain and do not expire" means that in between accesses the session
global variable is pickled to the disk and then later reconstituted
from the disk or else pickled into cookies and sent to the client,
then I have a problem with this definition. I don't think my data is
necessarily pickle-able.

I guess I misread/misunderstood paragraphs like:

   The option masterapp=None, by default, tells web2py to try to
retrieve an
existing session for the application with name in request.application,
in the
running application.

to imply that there remained a *running process* that kept the session
variable (and hence my data) instantiated in between calls. I'm new to
this web app thing.

So, thx for the clarification. I'll either try to hack the code you
referenced or else I'll just end up using the web2py server as a data
server and keep the business logic in the thick client.

---
Rb


On Aug 11, 10:39 pm, mdipierro  wrote:
> Correction. You must use this 
> client:http://code.activestate.com/recipes/501148/
> not this client:http://fotinakis.com/blog/blog/2008/cookies-xmlrpc-and-ssl/
>
> Massimo
>
> On Aug 12, 12:19 am, mdipierro  wrote:
>
> > Once more, the issue is not with web2py. The issue is with your
> > client. It does not support cookies, hence it does not support
> > sessions.
>
> > If you use this client they should work:
>
> >http://fotinakis.com/blog/blog/2008/cookies-xmlrpc-and-ssl/
>
> > Massimo
>
> > On Aug 11, 7:31 pm, rb  wrote:
>
> > > Well I need more than just cookies. I can't serialize the app
> > > inbetween each call. I need a working process, which has active data
> > > structures (database tables, dictionaires, etc).
>
> > > Is there anyway for an app to talk out through web2py to a client?
>
> > > I had (incorrectly) understood that sessions stick around and remain.
> > > Even if a session object is cookized in between calls doesn't the docs
> > > say that the session stuff remains? The manual says:
>
> > > ===
> > >   4.8 session
> > >  --
> > >            is another instance of the Storage  class. Whatever is
> > > stored into session for example:
>
> > >  session.myvariable="hello"
>
> > > can be retrieved at a later time:
>
> > >   a=session.myvariable
>
> > >   as long as the code is executed within the same session by the same
> > > user
> > >   (provided the user has not deleted session cookies and the session
> > > did not
> > >   expire). Because session is a Storage object, trying to access an
> > > attribute/key
> > >   that has not been set does not raise an exception, it returns None
> > > instead.
> > > ===
>
> > > Thus I can store myvariable into session and retrieve it at a later
> > > time. What the manual _should_ say, if I understand you now, is that
> > > the global variable "session" is pickled between each call into a
> > > cookie and unserialized with each subsequent call. If your protocol,
> > > eg xmlrpc does not use cookies then you can forget about sessions
> > > being used to store info to be retrieved at a later time.
>
> > > Argh! This is upsetting. I was thinking that session (and some
> > > pythonic process) remained running in between calls. Argh.
>
> > > Thx for the link, I'll check it out. (fingers crossed)
>
> > > ===
>
> > > On Aug 11, 4:22 pm, mdipierro  wrote:
>
> > > > This is not a problem with the server but with the client.
> > > > You may try the cookie aware xmlrpc client proposed here:
>
> > > >http://code.activestate.com/recipes/501148/
>
> > > > Or you need to pass an extra key to the function calls and is that to
> > > > retrieve a session.
>
> > > > Massimo
>
> > > > On Aug 11, 6:09 pm, rb  wrote:
>
> > > > > Further, I added a :
>
> > > > > session.hello = "hello, world"
>
> > > > > in order to see if it just didn't want to hold onto MY data. No dice.
> > > > > session.hello is gone on the next call as well.
>
> > > > > ---
>
> > > > > On Aug 11, 3:02 pm, rb  wrote:
>
> > > > > > In my think-client xmlrpc protocol to web2py svr code I am trying to
> > > > > > maintain data in the session global variable but it doesn't seem to
> > > > > > hold it. For example I first start by creating a document-form (tree
> > > > > > of datatables), cached in a data structure, as an attribute of
> > > > > > session. Here's the code:
>
> > > > > > from gluon.tools import Service
>
> > > > > > service = Service(globals())
>
> > > > > > def call():
> > > > > >     return service()
>
> > > > > > @service.xmlrpc
> > > > > > def xrBeginDocFrm( frmName):
> > > > > >     ''' create table records and push xrInitRecord down to all 
> > > > > > tables.
> > > > > > '''
> > > > > >     if session.frmz == None:
> > > > > >         session.frmz = {}
> > > > > >     if not session.frmz.has_k

[web2py:28396] Re: where for art thou, oh session attribute?

2009-08-11 Thread mdipierro

Correction. You must use this client:
http://code.activestate.com/recipes/501148/
not this client:
http://fotinakis.com/blog/blog/2008/cookies-xmlrpc-and-ssl/



Massimo


On Aug 12, 12:19 am, mdipierro  wrote:
> Once more, the issue is not with web2py. The issue is with your
> client. It does not support cookies, hence it does not support
> sessions.
>
> If you use this client they should work:
>
> http://fotinakis.com/blog/blog/2008/cookies-xmlrpc-and-ssl/
>
> Massimo
>
> On Aug 11, 7:31 pm, rb  wrote:
>
> > Well I need more than just cookies. I can't serialize the app
> > inbetween each call. I need a working process, which has active data
> > structures (database tables, dictionaires, etc).
>
> > Is there anyway for an app to talk out through web2py to a client?
>
> > I had (incorrectly) understood that sessions stick around and remain.
> > Even if a session object is cookized in between calls doesn't the docs
> > say that the session stuff remains? The manual says:
>
> > ===
> >   4.8 session
> >  --
> >            is another instance of the Storage  class. Whatever is
> > stored into session for example:
>
> >  session.myvariable="hello"
>
> > can be retrieved at a later time:
>
> >   a=session.myvariable
>
> >   as long as the code is executed within the same session by the same
> > user
> >   (provided the user has not deleted session cookies and the session
> > did not
> >   expire). Because session is a Storage object, trying to access an
> > attribute/key
> >   that has not been set does not raise an exception, it returns None
> > instead.
> > ===
>
> > Thus I can store myvariable into session and retrieve it at a later
> > time. What the manual _should_ say, if I understand you now, is that
> > the global variable "session" is pickled between each call into a
> > cookie and unserialized with each subsequent call. If your protocol,
> > eg xmlrpc does not use cookies then you can forget about sessions
> > being used to store info to be retrieved at a later time.
>
> > Argh! This is upsetting. I was thinking that session (and some
> > pythonic process) remained running in between calls. Argh.
>
> > Thx for the link, I'll check it out. (fingers crossed)
>
> > ===
>
> > On Aug 11, 4:22 pm, mdipierro  wrote:
>
> > > This is not a problem with the server but with the client.
> > > You may try the cookie aware xmlrpc client proposed here:
>
> > >http://code.activestate.com/recipes/501148/
>
> > > Or you need to pass an extra key to the function calls and is that to
> > > retrieve a session.
>
> > > Massimo
>
> > > On Aug 11, 6:09 pm, rb  wrote:
>
> > > > Further, I added a :
>
> > > > session.hello = "hello, world"
>
> > > > in order to see if it just didn't want to hold onto MY data. No dice.
> > > > session.hello is gone on the next call as well.
>
> > > > ---
>
> > > > On Aug 11, 3:02 pm, rb  wrote:
>
> > > > > In my think-client xmlrpc protocol to web2py svr code I am trying to
> > > > > maintain data in the session global variable but it doesn't seem to
> > > > > hold it. For example I first start by creating a document-form (tree
> > > > > of datatables), cached in a data structure, as an attribute of
> > > > > session. Here's the code:
>
> > > > > from gluon.tools import Service
>
> > > > > service = Service(globals())
>
> > > > > def call():
> > > > >     return service()
>
> > > > > @service.xmlrpc
> > > > > def xrBeginDocFrm( frmName):
> > > > >     ''' create table records and push xrInitRecord down to all tables.
> > > > > '''
> > > > >     if session.frmz == None:
> > > > >         session.frmz = {}
> > > > >     if not session.frmz.has_key("frmName"):
> > > > >         session.frmz[frmName] = rna.DocFrm(db, frmName)
>
> > > > > Then later I call the svr to get the table column definitions:
>
> > > > > @service.xmlrpc
> > > > > def xrGetColDefs(frmName, tblInstName):
> > > > >     tblInst = session.frmz[frmName].GetTblInst(tblInstName)
> > > > >     return tblInst.GetColDefs()
>
> > > > > but I find that session does not have a frmz attribute. I can walk the
> > > > > debuger through the svr code so I can see that the functions are
> > > > > getting called, but when I inspect session it contains nothing.
>
> > > > > I thought sessions stick around forever? I thought that session was
> > > > > the place to keep my own attributes that will live on (between xmlrpc
> > > > > calls).
>
> > > > > Help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28395] Re: Steps to move app to wweb site?

2009-08-11 Thread mdipierro

Everything in the web2py folder.

On Aug 12, 12:19 am, jayvandal  wrote:
> I have created a blog from the tutorial and wondered what files are
> need to upload the Blog to the web site. Some web sites have PHP and
> other app loaded on the web site. IWhen I have created a PHP app I
> would create a home page and upload all the PHP files I created .
>
> What do I need with WEB2PY?
> Thanks for all your help
> Jim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28393] Re: Mobile success story

2009-08-11 Thread mdipierro

This is great to know. Can you say which company?

Massimo

On Aug 11, 8:49 pm, "mr.freeze"  wrote:
> I just replaced an asp.net mileage tracker app targeting our
> Blackberry users with a web2py equivalent.  It runs twice as fast and
> was developed in half the time.  Just thought I would share this
> experience for those considering options for mobile development.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28394] Re: Mobile success story

2009-08-11 Thread waTR

This needs to go on the main web-page, under success-stories!



On Aug 11, 10:20 pm, mdipierro  wrote:
> This is great to know. Can you say which company?
>
> Massimo
>
> On Aug 11, 8:49 pm, "mr.freeze"  wrote:
>
> > I just replaced an asp.net mileage tracker app targeting our
> > Blackberry users with a web2py equivalent.  It runs twice as fast and
> > was developed in half the time.  Just thought I would share this
> > experience for those considering options for mobile development.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28392] Steps to move app to wweb site?

2009-08-11 Thread jayvandal

I have created a blog from the tutorial and wondered what files are
need to upload the Blog to the web site. Some web sites have PHP and
other app loaded on the web site. IWhen I have created a PHP app I
would create a home page and upload all the PHP files I created .

What do I need with WEB2PY?
Thanks for all your help
Jim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28391] Re: where for art thou, oh session attribute?

2009-08-11 Thread mdipierro

Once more, the issue is not with web2py. The issue is with your
client. It does not support cookies, hence it does not support
sessions.

If you use this client they should work:

http://fotinakis.com/blog/blog/2008/cookies-xmlrpc-and-ssl/

Massimo








On Aug 11, 7:31 pm, rb  wrote:
> Well I need more than just cookies. I can't serialize the app
> inbetween each call. I need a working process, which has active data
> structures (database tables, dictionaires, etc).
>
> Is there anyway for an app to talk out through web2py to a client?
>
> I had (incorrectly) understood that sessions stick around and remain.
> Even if a session object is cookized in between calls doesn't the docs
> say that the session stuff remains? The manual says:
>
> ===
>   4.8 session
>  --
>            is another instance of the Storage  class. Whatever is
> stored into session for example:
>
>  session.myvariable="hello"
>
> can be retrieved at a later time:
>
>   a=session.myvariable
>
>   as long as the code is executed within the same session by the same
> user
>   (provided the user has not deleted session cookies and the session
> did not
>   expire). Because session is a Storage object, trying to access an
> attribute/key
>   that has not been set does not raise an exception, it returns None
> instead.
> ===
>
> Thus I can store myvariable into session and retrieve it at a later
> time. What the manual _should_ say, if I understand you now, is that
> the global variable "session" is pickled between each call into a
> cookie and unserialized with each subsequent call. If your protocol,
> eg xmlrpc does not use cookies then you can forget about sessions
> being used to store info to be retrieved at a later time.
>
> Argh! This is upsetting. I was thinking that session (and some
> pythonic process) remained running in between calls. Argh.
>
> Thx for the link, I'll check it out. (fingers crossed)
>
> ===
>
> On Aug 11, 4:22 pm, mdipierro  wrote:
>
> > This is not a problem with the server but with the client.
> > You may try the cookie aware xmlrpc client proposed here:
>
> >http://code.activestate.com/recipes/501148/
>
> > Or you need to pass an extra key to the function calls and is that to
> > retrieve a session.
>
> > Massimo
>
> > On Aug 11, 6:09 pm, rb  wrote:
>
> > > Further, I added a :
>
> > > session.hello = "hello, world"
>
> > > in order to see if it just didn't want to hold onto MY data. No dice.
> > > session.hello is gone on the next call as well.
>
> > > ---
>
> > > On Aug 11, 3:02 pm, rb  wrote:
>
> > > > In my think-client xmlrpc protocol to web2py svr code I am trying to
> > > > maintain data in the session global variable but it doesn't seem to
> > > > hold it. For example I first start by creating a document-form (tree
> > > > of datatables), cached in a data structure, as an attribute of
> > > > session. Here's the code:
>
> > > > from gluon.tools import Service
>
> > > > service = Service(globals())
>
> > > > def call():
> > > >     return service()
>
> > > > @service.xmlrpc
> > > > def xrBeginDocFrm( frmName):
> > > >     ''' create table records and push xrInitRecord down to all tables.
> > > > '''
> > > >     if session.frmz == None:
> > > >         session.frmz = {}
> > > >     if not session.frmz.has_key("frmName"):
> > > >         session.frmz[frmName] = rna.DocFrm(db, frmName)
>
> > > > Then later I call the svr to get the table column definitions:
>
> > > > @service.xmlrpc
> > > > def xrGetColDefs(frmName, tblInstName):
> > > >     tblInst = session.frmz[frmName].GetTblInst(tblInstName)
> > > >     return tblInst.GetColDefs()
>
> > > > but I find that session does not have a frmz attribute. I can walk the
> > > > debuger through the svr code so I can see that the functions are
> > > > getting called, but when I inspect session it contains nothing.
>
> > > > I thought sessions stick around forever? I thought that session was
> > > > the place to keep my own attributes that will live on (between xmlrpc
> > > > calls).
>
> > > > Help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread mdipierro

This one?

http://w2popenid.appspot.com/init/default/wiki/main

On Aug 11, 6:55 pm, Richard  wrote:
> I was referring to the stackoverflow like OpenID login app is. Where
> can I find it?
>
> On Aug 11, 10:27 pm, mdipierro  wrote:
>
> > On Aug 11, 6:41 am, Richard  wrote:
>
> > > On Aug 11, 5:17 pm, mdipierro  wrote:
>
> > > > Thank you Richard,
> > > > some comments below.
>
> > > > On Aug 10, 7:21 pm, Richard  wrote:
>
> > > > > hello,
>
> > > > > > You know that currently the main repository is on launchpad.net?
>
> > > > > Currently the Google Code page says "Here you find only the
> > > > > development version ...", while the Launchpad page says "Does not use
> > > > > Launchpad for development."
> > > > > That to me sounds like Google Code is the development repository.
>
> > > > > Also I read in another thread we were migrating to mercurial on Google
> > > > > Code. If not, then perhaps the Google Code page should be closed/
> > > > > edited to avoid confusion.
>
> > > > Yes. I want to migrate to mercurial. Any news on whether Google code
> > > > does (will) support this?
>
> > > it's already supported in Administer -> Source
>
> > > > Meanwhile I do read bug reports on both Launchpad and Google code.
> > > > > > BTW - can you name _one_ feature request that has been "lost"?
>
> > > > > People like Massimo probably read every thread and so would know all
> > > > > of the requests. But if a less active user wants to help out they
> > > > > can't easily find a list of outstanding issues. Here are some threads
> > > > > I remember because I was interested in these features, so there are
> > > > > certainly more:
>
> > > > > - password retrieval has a confirmation email before resetting to
> > > > > prevent abuse
>
> > > > I will look into this.
>
> > > > > - *stackoverflow like OpenID login API
>
> > > > Technically this is an app, not a web2py feature. Users are working on
> > > > this already.
> > > > The functionality exists as an external app. We will see if we need to
> > > > modify web2py in order to get better integration.
>
> > > Is this app in appliances?
>
> > > > > - translation interface for non-admin users
>
> >http://www.web2py.com/appliances/default/show/9
>
> > > > There is already an app for this in appliances. Perhaps it should be
> > > > improved. Let me know.
>
> > > ah just found it:http://www.web2py.com/appliances/default/show/9
> > > I'll check it out.
>
> > > > > - *IPv6 support for login to admin interface
>
> > > > I do not remember this. Can somebody elaborate?
>
> > > It was raised in this 
> > > thread:http://groups.google.com/group/web2py/browse_thread/thread/726da9b5ea...
>
> > > > > - expose uploaded file naming function
>
> > > > This was done. "strore" in sql.py.
>
> > > Great!
>
> > > > > - *logging functionality (problem with builtin logging module)
>
> > > > I though this was solved by a user provided logging module. Can
> > > > somebody resend it to me?
>
> > > > > - *properly remove user, including roles, permissions, and session 
> > > > > cookies
>
> > > > This needs to be done but it complicated since it is not easy to find
> > > > out which sessions are associated to a user. Ideas?
>
> > > > > - *appadmin like CRUD view
>
> > > > I think we need a crud.select similar to t2.select before we do this.
> > > > I look forward to a patch to accomplish this.
>
> > > > > - reserved words problem when migrating between databases (will be 
> > > > > fixed in new DAL?)
>
> > > > Yes. this is a priority.
>
> > > > > - single click upgrade of web2py
>
> > > > Yes. This is a priority.
>
> > > > > (* means Massimo agreed in thread was a good idea)
> > > > > Some of these have probably been addressed by now. With a feature
> > > > > tracker I could easily determine the status.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28389] Mobile success story

2009-08-11 Thread mr.freeze

I just replaced an asp.net mileage tracker app targeting our
Blackberry users with a web2py equivalent.  It runs twice as fast and
was developed in half the time.  Just thought I would share this
experience for those considering options for mobile development.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28388] Re: Help query

2009-08-11 Thread FERNANDO VILLARROEL

Thank you Massimo

--- On Tue, 8/11/09, mdipierro  wrote:

> From: mdipierro 
> Subject: [web2py:28376] Re: Help query
> To: "web2py-users" 
> Date: Tuesday, August 11, 2009, 8:04 PM
> 
> Here is is broken down into pieces:
> 
> a=db.llamados
> b=db.accountcode.with_alias('b')
> c=db.clientes.with_alias('c')
> query =
> (b.id_clientes==clte)&(a.dialstatus=='ANSWER')&
> (a.inicio>=desde)&(a.inicio<=hasta)
> left =
> (b.on(a.id_accountcode==b.id),c.on(b.id_clientes==c.id))
> rows = db(query).select
> (a.destino,a.answeredtime,a.inicio,a.fin,a.valor,left=left,orderby=~a.inicio)
> 
> 
> 
> 
> On Aug 11, 4:54 pm, FERNANDO VILLARROEL 
> wrote:
> > Dear all.
> >
> > How i can doing the following query for web2py:
> >
> >  select
> >        
> a.destino,a.answeredtime,a.inicio,a.fin,a.valor from
> llamados as a
> >  join
> >         accountcode as b on a.id_accountcode=b.id
> >  join
> >         clientes as c on b.id_clientes=c.id
> >
> >  where id_clientes = clte and a.dialstatus='ANSWER'
> and (a.inicio >=
> >
> > desde    and a.inicio <= hasta) order by a.inicio
> DESC
> >
> > I want not use executesql.
> >
> > Fernando
> > 
> 


  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28387] Re: IS_STRONG(max=20)

2009-08-11 Thread mr.freeze

I think my logic was that limiting to 20 would increase the likelyhood
of people remembering their password, thus reducing the number of
passwords sent in email.  Probably not a realistic assumption though.
I have no issue with changing it.

On Aug 11, 6:30 pm, Jonathan Lundell  wrote:
> On Aug 11, 2009, at 4:24 PM, mdipierro wrote:
>
>
>
> > Getting rid would not be backward compatible but we can change it to
> > 32, the default length for a string field. We can even change it to a
> > larger number. I do not have a strong opinion about this since it
> > eventually gets hashed anyway.
>
> How about defaulting it to 0?
>
>
>
>
>
> > On Aug 11, 6:18 pm, Jonathan Lundell  wrote:
> >> It seems strange that IS_STRONG() should impose a max length on a
> >> field, when by default there is no max length. Seems like max=  
> >> belongs
> >> in IS_WEAK(), not IS_STRONG().
>
> >> (And the new manual doesn't mention max=.)
>
> >> How about just getting rid of max= ?- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to 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:28386] Re: where for art thou, oh session attribute?

2009-08-11 Thread rb

Well I need more than just cookies. I can't serialize the app
inbetween each call. I need a working process, which has active data
structures (database tables, dictionaires, etc).

Is there anyway for an app to talk out through web2py to a client?

I had (incorrectly) understood that sessions stick around and remain.
Even if a session object is cookized in between calls doesn't the docs
say that the session stuff remains? The manual says:

===
  4.8 session
 --
   is another instance of the Storage  class. Whatever is
stored into session for example:

 session.myvariable="hello"

can be retrieved at a later time:

  a=session.myvariable

  as long as the code is executed within the same session by the same
user
  (provided the user has not deleted session cookies and the session
did not
  expire). Because session is a Storage object, trying to access an
attribute/key
  that has not been set does not raise an exception, it returns None
instead.
===

Thus I can store myvariable into session and retrieve it at a later
time. What the manual _should_ say, if I understand you now, is that
the global variable "session" is pickled between each call into a
cookie and unserialized with each subsequent call. If your protocol,
eg xmlrpc does not use cookies then you can forget about sessions
being used to store info to be retrieved at a later time.

Argh! This is upsetting. I was thinking that session (and some
pythonic process) remained running in between calls. Argh.

Thx for the link, I'll check it out. (fingers crossed)

===




On Aug 11, 4:22 pm, mdipierro  wrote:
> This is not a problem with the server but with the client.
> You may try the cookie aware xmlrpc client proposed here:
>
> http://code.activestate.com/recipes/501148/
>
> Or you need to pass an extra key to the function calls and is that to
> retrieve a session.
>
> Massimo
>
> On Aug 11, 6:09 pm, rb  wrote:
>
> > Further, I added a :
>
> > session.hello = "hello, world"
>
> > in order to see if it just didn't want to hold onto MY data. No dice.
> > session.hello is gone on the next call as well.
>
> > ---
>
> > On Aug 11, 3:02 pm, rb  wrote:
>
> > > In my think-client xmlrpc protocol to web2py svr code I am trying to
> > > maintain data in the session global variable but it doesn't seem to
> > > hold it. For example I first start by creating a document-form (tree
> > > of datatables), cached in a data structure, as an attribute of
> > > session. Here's the code:
>
> > > from gluon.tools import Service
>
> > > service = Service(globals())
>
> > > def call():
> > >     return service()
>
> > > @service.xmlrpc
> > > def xrBeginDocFrm( frmName):
> > >     ''' create table records and push xrInitRecord down to all tables.
> > > '''
> > >     if session.frmz == None:
> > >         session.frmz = {}
> > >     if not session.frmz.has_key("frmName"):
> > >         session.frmz[frmName] = rna.DocFrm(db, frmName)
>
> > > Then later I call the svr to get the table column definitions:
>
> > > @service.xmlrpc
> > > def xrGetColDefs(frmName, tblInstName):
> > >     tblInst = session.frmz[frmName].GetTblInst(tblInstName)
> > >     return tblInst.GetColDefs()
>
> > > but I find that session does not have a frmz attribute. I can walk the
> > > debuger through the svr code so I can see that the functions are
> > > getting called, but when I inspect session it contains nothing.
>
> > > I thought sessions stick around forever? I thought that session was
> > > the place to keep my own attributes that will live on (between xmlrpc
> > > calls).
>
> > > Help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread Richard

I was referring to the stackoverflow like OpenID login app is. Where
can I find it?


On Aug 11, 10:27 pm, mdipierro  wrote:
> On Aug 11, 6:41 am, Richard  wrote:
>
>
>
> > On Aug 11, 5:17 pm, mdipierro  wrote:
>
> > > Thank you Richard,
> > > some comments below.
>
> > > On Aug 10, 7:21 pm, Richard  wrote:
>
> > > > hello,
>
> > > > > You know that currently the main repository is on launchpad.net?
>
> > > > Currently the Google Code page says "Here you find only the
> > > > development version ...", while the Launchpad page says "Does not use
> > > > Launchpad for development."
> > > > That to me sounds like Google Code is the development repository.
>
> > > > Also I read in another thread we were migrating to mercurial on Google
> > > > Code. If not, then perhaps the Google Code page should be closed/
> > > > edited to avoid confusion.
>
> > > Yes. I want to migrate to mercurial. Any news on whether Google code
> > > does (will) support this?
>
> > it's already supported in Administer -> Source
>
> > > Meanwhile I do read bug reports on both Launchpad and Google code.
> > > > > BTW - can you name _one_ feature request that has been "lost"?
>
> > > > People like Massimo probably read every thread and so would know all
> > > > of the requests. But if a less active user wants to help out they
> > > > can't easily find a list of outstanding issues. Here are some threads
> > > > I remember because I was interested in these features, so there are
> > > > certainly more:
>
> > > > - password retrieval has a confirmation email before resetting to
> > > > prevent abuse
>
> > > I will look into this.
>
> > > > - *stackoverflow like OpenID login API
>
> > > Technically this is an app, not a web2py feature. Users are working on
> > > this already.
> > > The functionality exists as an external app. We will see if we need to
> > > modify web2py in order to get better integration.
>
> > Is this app in appliances?
>
> > > > - translation interface for non-admin users
>
> http://www.web2py.com/appliances/default/show/9
>
> > > There is already an app for this in appliances. Perhaps it should be
> > > improved. Let me know.
>
> > ah just found it:http://www.web2py.com/appliances/default/show/9
> > I'll check it out.
>
> > > > - *IPv6 support for login to admin interface
>
> > > I do not remember this. Can somebody elaborate?
>
> > It was raised in this 
> > thread:http://groups.google.com/group/web2py/browse_thread/thread/726da9b5ea...
>
> > > > - expose uploaded file naming function
>
> > > This was done. "strore" in sql.py.
>
> > Great!
>
> > > > - *logging functionality (problem with builtin logging module)
>
> > > I though this was solved by a user provided logging module. Can
> > > somebody resend it to me?
>
> > > > - *properly remove user, including roles, permissions, and session 
> > > > cookies
>
> > > This needs to be done but it complicated since it is not easy to find
> > > out which sessions are associated to a user. Ideas?
>
> > > > - *appadmin like CRUD view
>
> > > I think we need a crud.select similar to t2.select before we do this.
> > > I look forward to a patch to accomplish this.
>
> > > > - reserved words problem when migrating between databases (will be 
> > > > fixed in new DAL?)
>
> > > Yes. this is a priority.
>
> > > > - single click upgrade of web2py
>
> > > Yes. This is a priority.
>
> > > > (* means Massimo agreed in thread was a good idea)
> > > > Some of these have probably been addressed by now. With a feature
> > > > tracker I could easily determine the status.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28384] Re: IS_STRONG(max=20)

2009-08-11 Thread Jonathan Lundell

On Aug 11, 2009, at 4:24 PM, mdipierro wrote:

>
> Getting rid would not be backward compatible but we can change it to
> 32, the default length for a string field. We can even change it to a
> larger number. I do not have a strong opinion about this since it
> eventually gets hashed anyway.

How about defaulting it to 0?

>
> On Aug 11, 6:18 pm, Jonathan Lundell  wrote:
>> It seems strange that IS_STRONG() should impose a max length on a
>> field, when by default there is no max length. Seems like max=  
>> belongs
>> in IS_WEAK(), not IS_STRONG().
>>
>> (And the new manual doesn't mention max=.)
>>
>> How about just getting rid of max= ?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28383] Re: IS_STRONG(max=20)

2009-08-11 Thread mdipierro

Getting rid would not be backward compatible but we can change it to
32, the default length for a string field. We can even change it to a
larger number. I do not have a strong opinion about this since it
eventually gets hashed anyway.

On Aug 11, 6:18 pm, Jonathan Lundell  wrote:
> It seems strange that IS_STRONG() should impose a max length on a  
> field, when by default there is no max length. Seems like max= belongs  
> in IS_WEAK(), not IS_STRONG().
>
> (And the new manual doesn't mention max=.)
>
> How about just getting rid of max= ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28382] Re: where for art thou, oh session attribute?

2009-08-11 Thread mdipierro

This is not a problem with the server but with the client.
You may try the cookie aware xmlrpc client proposed here:

http://code.activestate.com/recipes/501148/

Or you need to pass an extra key to the function calls and is that to
retrieve a session.

Massimo

On Aug 11, 6:09 pm, rb  wrote:
> Further, I added a :
>
> session.hello = "hello, world"
>
> in order to see if it just didn't want to hold onto MY data. No dice.
> session.hello is gone on the next call as well.
>
> ---
>
> On Aug 11, 3:02 pm, rb  wrote:
>
> > In my think-client xmlrpc protocol to web2py svr code I am trying to
> > maintain data in the session global variable but it doesn't seem to
> > hold it. For example I first start by creating a document-form (tree
> > of datatables), cached in a data structure, as an attribute of
> > session. Here's the code:
>
> > from gluon.tools import Service
>
> > service = Service(globals())
>
> > def call():
> >     return service()
>
> > @service.xmlrpc
> > def xrBeginDocFrm( frmName):
> >     ''' create table records and push xrInitRecord down to all tables.
> > '''
> >     if session.frmz == None:
> >         session.frmz = {}
> >     if not session.frmz.has_key("frmName"):
> >         session.frmz[frmName] = rna.DocFrm(db, frmName)
>
> > Then later I call the svr to get the table column definitions:
>
> > @service.xmlrpc
> > def xrGetColDefs(frmName, tblInstName):
> >     tblInst = session.frmz[frmName].GetTblInst(tblInstName)
> >     return tblInst.GetColDefs()
>
> > but I find that session does not have a frmz attribute. I can walk the
> > debuger through the svr code so I can see that the functions are
> > getting called, but when I inspect session it contains nothing.
>
> > I thought sessions stick around forever? I thought that session was
> > the place to keep my own attributes that will live on (between xmlrpc
> > calls).
>
> > Help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28381] Re: where for art thou, oh session attribute?

2009-08-11 Thread rb

OMG. Then I'm screwed? Is there anyway for Web2py to keep state info
alive? Geez, I must be missing something. Do no web services keep
state info? Are all web services stateless?

Eek!


On Aug 11, 4:06 pm, mdipierro  wrote:
> You cannot use sessions with xmlrpc because the xmlrpc protocol does
> not use cookies to maintain persistence.
>
> On Aug 11, 5:02 pm, rb  wrote:
>
> > In my think-client xmlrpc protocol to web2py svr code I am trying to
> > maintain data in the session global variable but it doesn't seem to
> > hold it. For example I first start by creating a document-form (tree
> > of datatables), cached in a data structure, as an attribute of
> > session. Here's the code:
>
> > from gluon.tools import Service
>
> > service = Service(globals())
>
> > def call():
> >     return service()
>
> > @service.xmlrpc
> > def xrBeginDocFrm( frmName):
> >     ''' create table records and push xrInitRecord down to all tables.
> > '''
> >     if session.frmz == None:
> >         session.frmz = {}
> >     if not session.frmz.has_key("frmName"):
> >         session.frmz[frmName] = rna.DocFrm(db, frmName)
>
> > Then later I call the svr to get the table column definitions:
>
> > @service.xmlrpc
> > def xrGetColDefs(frmName, tblInstName):
> >     tblInst = session.frmz[frmName].GetTblInst(tblInstName)
> >     return tblInst.GetColDefs()
>
> > but I find that session does not have a frmz attribute. I can walk the
> > debuger through the svr code so I can see that the functions are
> > getting called, but when I inspect session it contains nothing.
>
> > I thought sessions stick around forever? I thought that session was
> > the place to keep my own attributes that will live on (between xmlrpc
> > calls).
>
> > Help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28380] IS_STRONG(max=20)

2009-08-11 Thread Jonathan Lundell

It seems strange that IS_STRONG() should impose a max length on a  
field, when by default there is no max length. Seems like max= belongs  
in IS_WEAK(), not IS_STRONG().

(And the new manual doesn't mention max=.)

How about just getting rid of max= ?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28379] Re: images in css

2009-08-11 Thread mdipierro

I never had this problem.
If the css is in : /init/static/filename.css, then url(images/
myimage.jpg) should translate in /init/static/images/myimage.jpg

which browser are you using?

Massimo

On Aug 11, 5:41 pm, "Sebastian E. Ovide" 
wrote:
> Hi All,
>
> I have some images in some css:  background: url(images/myimage.jpg)
> no-repeat;
>
> the css is in : init/static
>
> and the images is in : init/static/images
>
> the image URL is translated 
> tohttp://127.0.0.1:8000/images/myimage.jpginsteadof being relative to
> where the css file is located (the resulting
> URL should behttp://127.0.0.1:8000/init/static/images/myimage.jpg). That
> means that all the templates made by the UI designer must be changed by hand
> adding the full URL.
>
> Is it working as expected ?
>
> Thanks
> --
>
> Sebastian E. Ovide
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28378] Re: where for art thou, oh session attribute?

2009-08-11 Thread rb

Further, I added a :

session.hello = "hello, world"

in order to see if it just didn't want to hold onto MY data. No dice.
session.hello is gone on the next call as well.

---


On Aug 11, 3:02 pm, rb  wrote:
> In my think-client xmlrpc protocol to web2py svr code I am trying to
> maintain data in the session global variable but it doesn't seem to
> hold it. For example I first start by creating a document-form (tree
> of datatables), cached in a data structure, as an attribute of
> session. Here's the code:
>
> from gluon.tools import Service
>
> service = Service(globals())
>
> def call():
>     return service()
>
> @service.xmlrpc
> def xrBeginDocFrm( frmName):
>     ''' create table records and push xrInitRecord down to all tables.
> '''
>     if session.frmz == None:
>         session.frmz = {}
>     if not session.frmz.has_key("frmName"):
>         session.frmz[frmName] = rna.DocFrm(db, frmName)
>
> Then later I call the svr to get the table column definitions:
>
> @service.xmlrpc
> def xrGetColDefs(frmName, tblInstName):
>     tblInst = session.frmz[frmName].GetTblInst(tblInstName)
>     return tblInst.GetColDefs()
>
> but I find that session does not have a frmz attribute. I can walk the
> debuger through the svr code so I can see that the functions are
> getting called, but when I inspect session it contains nothing.
>
> I thought sessions stick around forever? I thought that session was
> the place to keep my own attributes that will live on (between xmlrpc
> calls).
>
> Help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28377] Re: where for art thou, oh session attribute?

2009-08-11 Thread mdipierro

You cannot use sessions with xmlrpc because the xmlrpc protocol does
not use cookies to maintain persistence.

On Aug 11, 5:02 pm, rb  wrote:
> In my think-client xmlrpc protocol to web2py svr code I am trying to
> maintain data in the session global variable but it doesn't seem to
> hold it. For example I first start by creating a document-form (tree
> of datatables), cached in a data structure, as an attribute of
> session. Here's the code:
>
> from gluon.tools import Service
>
> service = Service(globals())
>
> def call():
>     return service()
>
> @service.xmlrpc
> def xrBeginDocFrm( frmName):
>     ''' create table records and push xrInitRecord down to all tables.
> '''
>     if session.frmz == None:
>         session.frmz = {}
>     if not session.frmz.has_key("frmName"):
>         session.frmz[frmName] = rna.DocFrm(db, frmName)
>
> Then later I call the svr to get the table column definitions:
>
> @service.xmlrpc
> def xrGetColDefs(frmName, tblInstName):
>     tblInst = session.frmz[frmName].GetTblInst(tblInstName)
>     return tblInst.GetColDefs()
>
> but I find that session does not have a frmz attribute. I can walk the
> debuger through the svr code so I can see that the functions are
> getting called, but when I inspect session it contains nothing.
>
> I thought sessions stick around forever? I thought that session was
> the place to keep my own attributes that will live on (between xmlrpc
> calls).
>
> Help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28376] Re: Help query

2009-08-11 Thread mdipierro

Here is is broken down into pieces:

a=db.llamados
b=db.accountcode.with_alias('b')
c=db.clientes.with_alias('c')
query = (b.id_clientes==clte)&(a.dialstatus=='ANSWER')&
(a.inicio>=desde)&(a.inicio<=hasta)
left = (b.on(a.id_accountcode==b.id),c.on(b.id_clientes==c.id))
rows = db(query).select
(a.destino,a.answeredtime,a.inicio,a.fin,a.valor,left=left,orderby=~a.inicio)




On Aug 11, 4:54 pm, FERNANDO VILLARROEL  wrote:
> Dear all.
>
> How i can doing the following query for web2py:
>
>  select
>         a.destino,a.answeredtime,a.inicio,a.fin,a.valor from llamados as a
>  join
>         accountcode as b on a.id_accountcode=b.id
>  join
>         clientes as c on b.id_clientes=c.id
>
>  where id_clientes = clte and a.dialstatus='ANSWER' and (a.inicio >=
>
> desde    and a.inicio <= hasta) order by a.inicio DESC
>
> I want not use executesql.
>
> Fernando
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28375] images in css

2009-08-11 Thread Sebastian E. Ovide
Hi All,

I have some images in some css:  background: url(images/myimage.jpg)
no-repeat;

the css is in : init/static

and the images is in : init/static/images

the image URL is translated to
http://127.0.0.1:8000/images/myimage.jpginstead of being relative to
where the css file is located (the resulting
URL should be http://127.0.0.1:8000/init/static/images/myimage.jpg). That
means that all the templates made by the UI designer must be changed by hand
adding the full URL.

Is it working as expected ?

Thanks
-- 

Sebastian E. Ovide

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28374] where for art thou, oh session attribute?

2009-08-11 Thread rb

In my think-client xmlrpc protocol to web2py svr code I am trying to
maintain data in the session global variable but it doesn't seem to
hold it. For example I first start by creating a document-form (tree
of datatables), cached in a data structure, as an attribute of
session. Here's the code:

from gluon.tools import Service

service = Service(globals())

def call():
return service()


@service.xmlrpc
def xrBeginDocFrm( frmName):
''' create table records and push xrInitRecord down to all tables.
'''
if session.frmz == None:
session.frmz = {}
if not session.frmz.has_key("frmName"):
session.frmz[frmName] = rna.DocFrm(db, frmName)

Then later I call the svr to get the table column definitions:

@service.xmlrpc
def xrGetColDefs(frmName, tblInstName):
tblInst = session.frmz[frmName].GetTblInst(tblInstName)
return tblInst.GetColDefs()

but I find that session does not have a frmz attribute. I can walk the
debuger through the svr code so I can see that the functions are
getting called, but when I inspect session it contains nothing.

I thought sessions stick around forever? I thought that session was
the place to keep my own attributes that will live on (between xmlrpc
calls).

Help!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28373] Help query

2009-08-11 Thread FERNANDO VILLARROEL

Dear all.

How i can doing the following query for web2py:

 select
a.destino,a.answeredtime,a.inicio,a.fin,a.valor from llamados as a 
 join 
accountcode as b on a.id_accountcode=b.id 
 join 
clientes as c on b.id_clientes=c.id 

 where id_clientes = clte and a.dialstatus='ANSWER' and (a.inicio >= 

desdeand a.inicio <= hasta) order by a.inicio DESC

I want not use executesql.


Fernando


  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread mdipierro

You can replace URL(...,args=id) with URL(...,vars=dict(id=id)) and
request.args(0) with request.vars.id.

I prefer the more restful syntax but there is no deep reason.

Massimo

On Aug 11, 3:37 pm, __future__  wrote:
> Thanks a lot for that detailed explanation...
>
> Why do we use args instead of request.vars?  Wouldn't using the
> request vars allow using named values in the controller?  It is not
> the biggest thing in the world but whenever I see something like args
> (0), I feel like I am reading perl.  I hate reading perl. :)
>
> __future__
>
> On Aug 11, 9:43 am, mdipierro  wrote:
>
> > >     if db((db.attendance.event==event_id) & 
> > > (db.attendance.user==auth.user.id)).delete():
> > >         return 'Not Attending'
> > >     else:
> > >         db.attendance.insert(event=event_id, user=auth.user.id)
> > >         return 'Attending'
>
> > > This obviously works but looks backwards to me for some reason.  What
> > > am I missing?
>
> > db().delete() returns the number of affected records. If it returns 0
> > then there are no records to delete and it assumes you meant to insert
> > one, not delete one. This is the same as your code. I just removed the
> > explicit check.
>
> > > In the view:
>
> > >     
>
> > > Can you step me through what is going on here.
>
> > This is a bit tricky. Say you have an item.event.id==1. Then it make a
> > button
>
> > ...
>
> > that when clicked sends anajaxrequest to /yourapp/
> > default/'toggle_attendance/1. The /1 implies request.args(0)=1. []
> > means it passes no request.vars. The last argument ofajax(...,'x1')
> > means that the value returned by theajaxfunction goes into the
> > innerHTML of the tag with id=='x1'.
> > So basically when you click the button is calls the server, the server
> > creates or deletes the record and returns the new name for the button.
>
> > > I'm not sure
> > > understand how the helpers work withajax.  I get that you are
> > > creating a 'button' and that it is passing the event.id to the toggle
> > > function.  I guess my confusion is still the confusion about how the
> > > toggle is deciding what to return.  It seems like if it successfully
> > > deletes the attendance record, it returns that there IS an attendance,
> > > and if it inserts an attendance record it returns that is NOT an
> > > attendance.  This is not what actually happens so why am I reading it
> > > this way?  I also don't understand where what is actually returned is
> > > represented in the view.
>
> > Sorry. I had a type "Unattending" instead of "Attending".
>
> > Hope this makes more sense.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28371] Re: About new design

2009-08-11 Thread mdipierro

Thank Mateusz. I will post it soon.

Massimo

On Aug 11, 11:28 am, Jose  wrote:
> Really beautiful.
>
> +100
>
> Jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28370] Re: Ajax problem

2009-08-11 Thread mdipierro

Try this.

$(document).ready(function(){
$('#taxpayer_spouse_name__row').hide();
$('#taxpayer_married').change(function(){
if($('#taxpayer_married').attr('checked'))
$('#taxpayer_spouse_name__row').show();
else $('#taxpayer_spouse_name__row').hide();});
});

then try replace $ with jQuery


On Aug 11, 11:04 am, __Kyo__  wrote:
> I tested the code you gave me and still does not work, I also work
> with the same code that brings up the manual and does not work either.
> What can I do? Apologies for the delay. Thanks in advance
>
> --Model(this code is taken from web2py manual)
> db=SQLDB('sqlite://db.db')
> db.define_table('taxpayer',
>     SQLField('name'),
>     SQLField('married','boolean'),
>     SQLField('spouse_name'))
>
> --Controller (this code is taken from web2py manual)
> def index():
>     form=SQLFORM(db.taxpayer)
>     if form.accepts(request.vars,session):
>         response.flash='record inserted'
>     return dict(form=form)
>
> --View(this code is taken from web2py manual)
> {{extend 'layout.html'}}
> {{=form}}
> 
> $(document).ready(function(){
>     $('#taxpayer_spouse_name__row').hide();
>     $('#taxpayer_married').attr('onchange',
>         "if($('#taxpayer_married').attr('checked'))
>             $('#taxpayer_spouse_name__row').show();
>         else $('#taxpayer_spouse_name__row').hide();");});
>
> 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28369] Re: dropdown list from model references doesn't work

2009-08-11 Thread mdipierro

requires=IS_IN_SET()

validation+dropdown

requires=[IS_IN_SET()]

validation but not dropdown. ;-)



On Aug 11, 11:01 am, Carlos Aboim  wrote:
> Hi everyone
>
> I am using a model like:
>
> http://dpaste.com/hold/78289/
>
>    - the field 'vendedor'
>    - the field 'cliente'
>
> in model 'obras' should show a dropdown menu from IS_IN_SET ('vendedor') and
> from other table reference ('cliente') parameter
> but it doesn't show up no dropdown menus
>
> Any better aproach??
>
> thank you
> Carlos Aboim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread __future__

Thanks a lot for that detailed explanation...

Why do we use args instead of request.vars?  Wouldn't using the
request vars allow using named values in the controller?  It is not
the biggest thing in the world but whenever I see something like args
(0), I feel like I am reading perl.  I hate reading perl. :)

__future__

On Aug 11, 9:43 am, mdipierro  wrote:
> >     if db((db.attendance.event==event_id) & 
> > (db.attendance.user==auth.user.id)).delete():
> >         return 'Not Attending'
> >     else:
> >         db.attendance.insert(event=event_id, user=auth.user.id)
> >         return 'Attending'
>
> > This obviously works but looks backwards to me for some reason.  What
> > am I missing?
>
> db().delete() returns the number of affected records. If it returns 0
> then there are no records to delete and it assumes you meant to insert
> one, not delete one. This is the same as your code. I just removed the
> explicit check.
>
> > In the view:
>
> >     
>
> > Can you step me through what is going on here.
>
> This is a bit tricky. Say you have an item.event.id==1. Then it make a
> button
>
> ...
>
> that when clicked sends anajaxrequest to /yourapp/
> default/'toggle_attendance/1. The /1 implies request.args(0)=1. []
> means it passes no request.vars. The last argument ofajax(...,'x1')
> means that the value returned by theajaxfunction goes into the
> innerHTML of the tag with id=='x1'.
> So basically when you click the button is calls the server, the server
> creates or deletes the record and returns the new name for the button.
>
> > I'm not sure
> > understand how the helpers work withajax.  I get that you are
> > creating a 'button' and that it is passing the event.id to the toggle
> > function.  I guess my confusion is still the confusion about how the
> > toggle is deciding what to return.  It seems like if it successfully
> > deletes the attendance record, it returns that there IS an attendance,
> > and if it inserts an attendance record it returns that is NOT an
> > attendance.  This is not what actually happens so why am I reading it
> > this way?  I also don't understand where what is actually returned is
> > represented in the view.
>
> Sorry. I had a type "Unattending" instead of "Attending".
>
> Hope this makes more sense.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28367] Re: viability test on IBM AS/400 i5 iSeries ...

2009-08-11 Thread DenesL

Both 2.5.4.4 and 2.6.2.2 fail the same no matter where or with what
the file is gunziped.
I opened a report on ActivePython support forum.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28366] def download(): slow

2009-08-11 Thread hcvst

Hi,

I am surprised I didn't find a post on slow downloads, but perhaps
it's only so bad because my internet connection is terribly slow.

def download():
"""
allows downloading of uploaded files
http:///[app]/default/download/[filename]
"""
return response.download(request,db)



I am just building an auction site and have around 10 pictures on a
page - uploaded by users. On refresh all of them reload (line by line,
as in the old days). Can I tell the browser to cache them?

Without looking at the source I tried a cache decorator (in disk-
caching mode), assuming that it might tell the browser, but actually
ended up having to restart apache (mod_wsgi).

Regards,
HC




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28365] Re: Auth based on UUID

2009-08-11 Thread Alex Fanjul

Thanks Vihang, I'm not doing distributed app now, it was only to learn 
more by example.
If you finally get something please share it because it sounds interesting..
regards
alex f

El 06/08/2009 22:39, vihang escribió:
> Hello Alex,
>
> I am in the stage of 'figuring things out'. Frankly, I am as clueless
> as the next person. Just reading up on things and trying to put it
> together. But if I get something working, I would definitely put
> something up, atleast the good practice. Meanwhile I am struggling
> with distributed auth. Too many security implications. If you are
> doing something in this line, we could have a chat, maybe through
> direct email, as it may not be relevant to this group.
>
> Cheers.
> Vihang
>
> On Aug 6, 11:28 pm, Alex Fanjul  wrote:
>
>> Hello Vihang,
>> I'm very curious  and It would be very interesting to know how to build
>> a distributed node app.
>> Any short tutorial? guidelines?
>>
>>   Thanks,
>> Alex F
>>
>> El 04/08/2009 9:30, vihang escribió:
>>
>>  
>>> Hello,
>>>
>>  
>>> I am currently working on an app which is distributed between
>>> different nodes. The issue is that when it comes to app related dbs, I
>>> am managing (somehow) using a seperate UUID column. But the Auth which
>>> comes with web2py does not. any ideas... I want 'building my own auth'
>>> as a last resort.
>>>
>>  
>>> Vihang
>>>
>> --
>> Alejandro Fanjul Fdez.
>> alex.fan...@gmail.comwww.mhproject.org
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28364] Re: Very Strange Bug. Could be a Consequence of Exec

2009-08-11 Thread hcvst

Hi,

sorry for not joining you on #web2py the other day, but as I said in
my mail I am currently busy moving house and had a system GoLive this
weekend. Not sure whether this is still relevant to you but my last
w2popenid commit (http://bitbucket.org/hc/w2popenid) does not include
Web2PyFetcher anymore, as it is  not actually required by GAE. The
Janrain lib works fine. I will try to put another provider together,
otherwise just get rid of the line where openid is told to use
Web2PyFetcher as its default fetcher.

Will try to catch you on IRC... what timezone are you in. It's GTM+2
over here.

HC

On Aug 9, 9:12 am, Bottiger  wrote:
> I have been trying to create anOpenIDversion of Auth.
>
> I stumbled upon a very puzzling behavior that I think may be an
> underlying consequence of using exec. I do not know for sure though
> because the bug is very strange.
>
> First the setup. I am using hcvst'sopenidprovider so I can test
> locally.
>
> However, if I try to use it by using 
> theOpenIDauth:http://127.0.0.1:8000/cas/default/user/login
>
> then the provider address:http://127.0.0.1:8000/provider/openid/id/test
>
> will complain:
>
>   File "C:/Users/admin/Desktop/web2py/applications/provider/
> controllers/openid.py", line 7, in 
>     fromw2popenidimport Web2pyFetcher
> ImportError: cannot import name Web2pyFetcher
>
> Obviously,w2popeniddoes exist, and Web2pyFetcher is in the file but
> web2py chokes! But then I figured out if I restarted the server and
> then first visited:
>
> http://127.0.0.1:8000/provider/openid/id/test
>
> Then it worked just fine!
>
> So I am wondering if anyone can explain this bizarre behavior.
>
> Note: the "cas" application version ofw2popeniddoes not have a
> Web2pyFetcher but the "provider" one does. This does not excuse Web2Py
> though.
>
> Source Code:http://www.codexon.com/temp/bug.zip
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28363] Re: Ironpython

2009-08-11 Thread Yarko Tymciurak
Just to complete this, you can start web2py with no-cron from the command
line:

-N or --no-cron

remember, you can always invoke web2py with -h to see the available options.

- Yarko

On Sat, Aug 8, 2009 at 7:23 PM, holcomb  wrote:

>
> Thanks, Yarko.  I completely forgot about that option.
>
> With that out of the way and another signal import/call in main
> commented out, I'm left with:
>
>ValueError: _getframe is not implemented for non-zero depth
> which is traced back to portaloacker.py's call to the standard library
> logging module
>
> My next direction is to check out some of these threads:
>   http://knowbody.livejournal.com/13271.html
>   http://bugs.python.org/issue5287
>
> http://lists.ironpython.com/pipermail/users-ironpython.com/2008-December/009100.html
>   http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=23527
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28362] Re: viability test on IBM AS/400 i5 iSeries ...

2009-08-11 Thread Yarko Tymciurak
in the past, I have found 7zip to be more tolerant of archives that are
incomplete or with errors (e.g. extracts what it can)...

You might try that.

On Tue, Aug 11, 2009 at 9:56 AM, Timbo  wrote:

>
> I haven't recently.  It's likely that the one you downloaded is not
> the one I tried.
>
> Have you tried unzipping it on a PC?  Does it give the same error?
>
> On Aug 10, 1:53 pm, DenesL  wrote:
> > Thanks, but when I try to unpack ActivePython-2.5.4.4-aix5-
> > powerpc.tar.gz I get:
> > tar: 0511-169 A directory checksum error on media; 1249928580 not
> > equal to 41132
> >
> > Which one did you try?.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28361] About new design

2009-08-11 Thread Jose

Really beautiful.

+100

Jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28360] Re: unexpected database initilization

2009-08-11 Thread Don Lee
Thanks for the help.


On Tue, Aug 11, 2009 at 11:50 AM, mdipierro  wrote:

>
> mind that sqlite does not enforce field types (web2py does). This is a
> problem if you have already inserted records in the previous
> definition and then you changed it. In this case I suggest delete
> everything in the folder databases/.
>
> Massimo
>
> On Aug 11, 10:41 am, Don Lee  wrote:
> > Thanks, that got rid of my problem with a false value for the boolean.
> >
> > 
> > # coding: utf8
> > # define a SQLite database
> > database=SQLDB("sqlite://database.db")
> >
> > # create a vendor table
> > database.define_table('vendor',
> > database.Field('name', 'string', length=64, unique=True),
> > database.Field('alias', 'string', length=16, unique=True),
> > database.Field('url', 'string', length=128, unique=True),
> > database.Field('logo', 'upload'),
> > database.Field('active', 'boolean')
> > )
> >
> > database.vendor.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> > database.vendor.name)]
> > database.vendor.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> > database.vendor.name),IS_NOT_IN_DB(database, database.vendor.alias)]
> > database.vendor.url.requires=[IS_NOT_EMPTY()]
> > database.vendor.logo.requires=[IS_NOT_EMPTY()]
> > database.vendor.active.requires=[IS_NOT_EMPTY()]
> >
> > database.define_table('distro',
> > database.Field('vendor_id', database.vendor),
> > database.Field('name', 'string', length=64, unique=True),
> > database.Field('alias', 'string', length=16, unique=True),
> > database.Field('active', 'boolean')
> > )
> >
> > database.distro.vendor_id.requires=IS_IN_DB(database,database.vendor.id
> > ,'%(name)s')
> > database.distro.name.requires=[IS_NOT_EMPTY()]
> >
> database.distro.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,database.distro.alias)]
> > database.distro.active.requires=[IS_NOT_EMPTY()]
> >
> > database.define_table('release',
> > database.Field('distro_id', database.distro),
> > database.Field('version', 'string', length=16, unique=True),
> > database.Field('alias', 'string', length=16, unique=True),
> > database.Field('active', 'boolean', default=True)
> > )
> >
> > database.release.distro_id.requires=IS_IN_DB(database,database.distro.id
> > ,'%(name)s')
> > database.release.version.requires=[IS_NOT_EMPTY()]
> >
> database.release.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,database.release.alias)]
> > 
> >
> > My the tables are still not being defined as i would expect.
> >
> > 
> >
> > timestamp: 2009-08-10T11:15:24.393714
> > CREATE TABLE vendor(
> > id INTEGER PRIMARY KEY AUTOINCREMENT,
> > name CHAR(32),
> > alias CHAR(32),
> > url CHAR(32),
> > logo CHAR(32),
> > active CHAR(32)
> > );
> > success!
> > timestamp: 2009-08-10T11:15:24.411343
> > CREATE TABLE distro(
> > id INTEGER PRIMARY KEY AUTOINCREMENT,
> > vendor_id CHAR(32),
> > name CHAR(32),
> > alias CHAR(32),
> > active CHAR(32)
> > );
> > success!
> > timestamp: 2009-08-10T11:15:24.423518
> > CREATE TABLE release(
> > id INTEGER PRIMARY KEY AUTOINCREMENT,
> > distro_id CHAR(32),
> > version CHAR(32),
> > alias CHAR(32),
> > active CHAR(32)
> > );
> > success!
> > 
> >
> > On Tue, Aug 11, 2009 at 10:00 AM, Don  wrote:
> >
> > > I have defined my model.
> >
> > > 
> > > # coding: utf8
> > > # define a SQLite database
> > > database=SQLDB("sqlite://database.db")
> >
> > > # create a vendor table
> > > database.define_table('vendor',
> > >database.Field('name'),
> > >database.Field('alias'),
> > >database.Field('url'),
> > >database.Field('logo'),
> > >database.Field('active')
> > >)
> >
> > > database.vendor.name.type='string'
> > > database.vendor.name.length=64
> > > database.vendor.name.unique=True
> > > database.vendor.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> > > database.vendor.name)]
> >
> > > database.vendor.alias.type='string'
> > > database.vendor.alias.length=16
> > > database.vendor.alias.unique=True
> > > database.vendor.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> > > database.vendor.name),IS_NOT_IN_DB(database, database.vendor.alias)]
> >
> > > database.vendor.url.type='string'
> > > database.vendor.url.length=128
> > > database.vendor.url.requires=[IS_NOT_EMPTY()]
> >
> > > database.vendor.logo.type='upload'
> > > database.vendor.logo.requires=[IS_NOT_EMPTY()]
> >
> > > database.vendor.active.type='boolean'
> > > database.vendor.active.requires=[IS_NOT_EMPTY()]
> >
> > > database.define_table('distro',
> > >database.Field('vendor_id'),
> > >database.Field('name'),
> > >database.

[web2py:28359] Re: Ajax problem

2009-08-11 Thread __Kyo__

I tested the code you gave me and still does not work, I also work
with the same code that brings up the manual and does not work either.
What can I do? Apologies for the delay. Thanks in advance


--Model(this code is taken from web2py manual)
db=SQLDB('sqlite://db.db')
db.define_table('taxpayer',
SQLField('name'),
SQLField('married','boolean'),
SQLField('spouse_name'))

--Controller (this code is taken from web2py manual)
def index():
form=SQLFORM(db.taxpayer)
if form.accepts(request.vars,session):
response.flash='record inserted'
return dict(form=form)

--View(this code is taken from web2py manual)
{{extend 'layout.html'}}
{{=form}}

$(document).ready(function(){
$('#taxpayer_spouse_name__row').hide();
$('#taxpayer_married').attr('onchange',
"if($('#taxpayer_married').attr('checked'))
$('#taxpayer_spouse_name__row').show();
else $('#taxpayer_spouse_name__row').hide();");
});

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28358] dropdown list from model references doesn't work

2009-08-11 Thread Carlos Aboim
Hi everyone

I am using a model like:

http://dpaste.com/hold/78289/


   - the field 'vendedor'
   - the field 'cliente'


in model 'obras' should show a dropdown menu from IS_IN_SET ('vendedor') and
from other table reference ('cliente') parameter
but it doesn't show up no dropdown menus

Any better aproach??


thank you
Carlos Aboim

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28357] Re: unexpected database initilization

2009-08-11 Thread mdipierro

mind that sqlite does not enforce field types (web2py does). This is a
problem if you have already inserted records in the previous
definition and then you changed it. In this case I suggest delete
everything in the folder databases/.

Massimo

On Aug 11, 10:41 am, Don Lee  wrote:
> Thanks, that got rid of my problem with a false value for the boolean.
>
> 
> # coding: utf8
> # define a SQLite database
> database=SQLDB("sqlite://database.db")
>
> # create a vendor table
> database.define_table('vendor',
>     database.Field('name', 'string', length=64, unique=True),
>     database.Field('alias', 'string', length=16, unique=True),
>     database.Field('url', 'string', length=128, unique=True),
>     database.Field('logo', 'upload'),
>     database.Field('active', 'boolean')
>     )
>
> database.vendor.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> database.vendor.name)]
> database.vendor.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> database.vendor.name),IS_NOT_IN_DB(database, database.vendor.alias)]
> database.vendor.url.requires=[IS_NOT_EMPTY()]
> database.vendor.logo.requires=[IS_NOT_EMPTY()]
> database.vendor.active.requires=[IS_NOT_EMPTY()]
>
> database.define_table('distro',
>     database.Field('vendor_id', database.vendor),
>     database.Field('name', 'string', length=64, unique=True),
>     database.Field('alias', 'string', length=16, unique=True),
>     database.Field('active', 'boolean')
>     )
>
> database.distro.vendor_id.requires=IS_IN_DB(database,database.vendor.id
> ,'%(name)s')
> database.distro.name.requires=[IS_NOT_EMPTY()]
> database.distro.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,database.distro.alias)]
> database.distro.active.requires=[IS_NOT_EMPTY()]
>
> database.define_table('release',
>     database.Field('distro_id', database.distro),
>     database.Field('version', 'string', length=16, unique=True),
>     database.Field('alias', 'string', length=16, unique=True),
>     database.Field('active', 'boolean', default=True)
>     )
>
> database.release.distro_id.requires=IS_IN_DB(database,database.distro.id
> ,'%(name)s')
> database.release.version.requires=[IS_NOT_EMPTY()]
> database.release.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,database.release.alias)]
> 
>
> My the tables are still not being defined as i would expect.
>
> 
>
> timestamp: 2009-08-10T11:15:24.393714
> CREATE TABLE vendor(
>     id INTEGER PRIMARY KEY AUTOINCREMENT,
>     name CHAR(32),
>     alias CHAR(32),
>     url CHAR(32),
>     logo CHAR(32),
>     active CHAR(32)
> );
> success!
> timestamp: 2009-08-10T11:15:24.411343
> CREATE TABLE distro(
>     id INTEGER PRIMARY KEY AUTOINCREMENT,
>     vendor_id CHAR(32),
>     name CHAR(32),
>     alias CHAR(32),
>     active CHAR(32)
> );
> success!
> timestamp: 2009-08-10T11:15:24.423518
> CREATE TABLE release(
>     id INTEGER PRIMARY KEY AUTOINCREMENT,
>     distro_id CHAR(32),
>     version CHAR(32),
>     alias CHAR(32),
>     active CHAR(32)
> );
> success!
> 
>
> On Tue, Aug 11, 2009 at 10:00 AM, Don  wrote:
>
> > I have defined my model.
>
> > 
> > # coding: utf8
> > # define a SQLite database
> > database=SQLDB("sqlite://database.db")
>
> > # create a vendor table
> > database.define_table('vendor',
> >    database.Field('name'),
> >    database.Field('alias'),
> >    database.Field('url'),
> >    database.Field('logo'),
> >    database.Field('active')
> >    )
>
> > database.vendor.name.type='string'
> > database.vendor.name.length=64
> > database.vendor.name.unique=True
> > database.vendor.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> > database.vendor.name)]
>
> > database.vendor.alias.type='string'
> > database.vendor.alias.length=16
> > database.vendor.alias.unique=True
> > database.vendor.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> > database.vendor.name),IS_NOT_IN_DB(database, database.vendor.alias)]
>
> > database.vendor.url.type='string'
> > database.vendor.url.length=128
> > database.vendor.url.requires=[IS_NOT_EMPTY()]
>
> > database.vendor.logo.type='upload'
> > database.vendor.logo.requires=[IS_NOT_EMPTY()]
>
> > database.vendor.active.type='boolean'
> > database.vendor.active.requires=[IS_NOT_EMPTY()]
>
> > database.define_table('distro',
> >    database.Field('vendor_id'),
> >    database.Field('name'),
> >    database.Field('alias'),
> >    database.Field('active')
> >    )
>
> > database.distro.vendor_id.type='database.vendor'
> > database.distro.vendor_id.requires=IS_IN_DB
> > (database,database.vendor.id,'%(name)s')
>
> > database.distro.name.type='string'
> > database.distro.name.length=64
> > database.distro.name.unique=True
> > database.distro.name.requires

[web2py:28356] Re: unexpected database initilization

2009-08-11 Thread Don Lee
Thanks, that got rid of my problem with a false value for the boolean.


# coding: utf8
# define a SQLite database
database=SQLDB("sqlite://database.db")

# create a vendor table
database.define_table('vendor',
database.Field('name', 'string', length=64, unique=True),
database.Field('alias', 'string', length=16, unique=True),
database.Field('url', 'string', length=128, unique=True),
database.Field('logo', 'upload'),
database.Field('active', 'boolean')
)

database.vendor.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
database.vendor.name)]
database.vendor.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
database.vendor.name),IS_NOT_IN_DB(database, database.vendor.alias)]
database.vendor.url.requires=[IS_NOT_EMPTY()]
database.vendor.logo.requires=[IS_NOT_EMPTY()]
database.vendor.active.requires=[IS_NOT_EMPTY()]

database.define_table('distro',
database.Field('vendor_id', database.vendor),
database.Field('name', 'string', length=64, unique=True),
database.Field('alias', 'string', length=16, unique=True),
database.Field('active', 'boolean')
)

database.distro.vendor_id.requires=IS_IN_DB(database,database.vendor.id
,'%(name)s')
database.distro.name.requires=[IS_NOT_EMPTY()]
database.distro.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,database.distro.alias)]
database.distro.active.requires=[IS_NOT_EMPTY()]

database.define_table('release',
database.Field('distro_id', database.distro),
database.Field('version', 'string', length=16, unique=True),
database.Field('alias', 'string', length=16, unique=True),
database.Field('active', 'boolean', default=True)
)

database.release.distro_id.requires=IS_IN_DB(database,database.distro.id
,'%(name)s')
database.release.version.requires=[IS_NOT_EMPTY()]
database.release.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,database.release.alias)]


My the tables are still not being defined as i would expect.




timestamp: 2009-08-10T11:15:24.393714
CREATE TABLE vendor(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name CHAR(32),
alias CHAR(32),
url CHAR(32),
logo CHAR(32),
active CHAR(32)
);
success!
timestamp: 2009-08-10T11:15:24.411343
CREATE TABLE distro(
id INTEGER PRIMARY KEY AUTOINCREMENT,
vendor_id CHAR(32),
name CHAR(32),
alias CHAR(32),
active CHAR(32)
);
success!
timestamp: 2009-08-10T11:15:24.423518
CREATE TABLE release(
id INTEGER PRIMARY KEY AUTOINCREMENT,
distro_id CHAR(32),
version CHAR(32),
alias CHAR(32),
active CHAR(32)
);
success!














On Tue, Aug 11, 2009 at 10:00 AM, Don  wrote:

>
> I have defined my model.
>
> 
> # coding: utf8
> # define a SQLite database
> database=SQLDB("sqlite://database.db")
>
> # create a vendor table
> database.define_table('vendor',
>database.Field('name'),
>database.Field('alias'),
>database.Field('url'),
>database.Field('logo'),
>database.Field('active')
>)
>
> database.vendor.name.type='string'
> database.vendor.name.length=64
> database.vendor.name.unique=True
> database.vendor.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> database.vendor.name)]
>
> database.vendor.alias.type='string'
> database.vendor.alias.length=16
> database.vendor.alias.unique=True
> database.vendor.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> database.vendor.name),IS_NOT_IN_DB(database, database.vendor.alias)]
>
> database.vendor.url.type='string'
> database.vendor.url.length=128
> database.vendor.url.requires=[IS_NOT_EMPTY()]
>
> database.vendor.logo.type='upload'
> database.vendor.logo.requires=[IS_NOT_EMPTY()]
>
> database.vendor.active.type='boolean'
> database.vendor.active.requires=[IS_NOT_EMPTY()]
>
>
> database.define_table('distro',
>database.Field('vendor_id'),
>database.Field('name'),
>database.Field('alias'),
>database.Field('active')
>)
>
> database.distro.vendor_id.type='database.vendor'
> database.distro.vendor_id.requires=IS_IN_DB
> (database,database.vendor.id,'%(name)s')
>
> database.distro.name.type='string'
> database.distro.name.length=64
> database.distro.name.unique=True
> database.distro.name.requires=[IS_NOT_EMPTY()]
>
> database.distro.alias.type='string'
> database.distro.alias.length=16
> database.distro.alias.unique=True
> database.distro.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB
> (database,database.distro.alias)]
>
> database.distro.active.type='boolean'
> database.distro.active.requires=[IS_NOT_EMPTY()]
>
> database.define_table('release',
>database.Field('distro_id'),
>database.Field('version'),
>database.Field('alias'),
>database.Field('active')
>)
>
> database.release.di

[web2py:28355] Re: viability test on IBM AS/400 i5 iSeries ...

2009-08-11 Thread Timbo

I haven't recently.  It's likely that the one you downloaded is not
the one I tried.

Have you tried unzipping it on a PC?  Does it give the same error?

On Aug 10, 1:53 pm, DenesL  wrote:
> Thanks, but when I try to unpack ActivePython-2.5.4.4-aix5-
> powerpc.tar.gz I get:
> tar: 0511-169 A directory checksum error on media; 1249928580 not
> equal to 41132
>
> Which one did you try?.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28354] Re: unexpected database initilization

2009-08-11 Thread mdipierro

You cannot do:

...Field('name')...
database.vendor.name.type='string'
database.vendor.name.length=64

you must do

...Field('name','string',length=64)...

all the attributes but type, length, notnull, unique can be specified
later.


On Aug 11, 9:00 am, Don  wrote:
> I have defined my model.
>
> 
> # coding: utf8
> # define a SQLite database
> database=SQLDB("sqlite://database.db")
>
> # create a vendor table
> database.define_table('vendor',
>     database.Field('name'),
>     database.Field('alias'),
>     database.Field('url'),
>     database.Field('logo'),
>     database.Field('active')
>     )
>
> database.vendor.name.type='string'
> database.vendor.name.length=64
> database.vendor.name.unique=True
> database.vendor.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> database.vendor.name)]
>
> database.vendor.alias.type='string'
> database.vendor.alias.length=16
> database.vendor.alias.unique=True
> database.vendor.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
> database.vendor.name),IS_NOT_IN_DB(database, database.vendor.alias)]
>
> database.vendor.url.type='string'
> database.vendor.url.length=128
> database.vendor.url.requires=[IS_NOT_EMPTY()]
>
> database.vendor.logo.type='upload'
> database.vendor.logo.requires=[IS_NOT_EMPTY()]
>
> database.vendor.active.type='boolean'
> database.vendor.active.requires=[IS_NOT_EMPTY()]
>
> database.define_table('distro',
>     database.Field('vendor_id'),
>     database.Field('name'),
>     database.Field('alias'),
>     database.Field('active')
>     )
>
> database.distro.vendor_id.type='database.vendor'
> database.distro.vendor_id.requires=IS_IN_DB
> (database,database.vendor.id,'%(name)s')
>
> database.distro.name.type='string'
> database.distro.name.length=64
> database.distro.name.unique=True
> database.distro.name.requires=[IS_NOT_EMPTY()]
>
> database.distro.alias.type='string'
> database.distro.alias.length=16
> database.distro.alias.unique=True
> database.distro.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB
> (database,database.distro.alias)]
>
> database.distro.active.type='boolean'
> database.distro.active.requires=[IS_NOT_EMPTY()]
>
> database.define_table('release',
>     database.Field('distro_id'),
>     database.Field('version'),
>     database.Field('alias'),
>     database.Field('active')
>     )
>
> database.release.distro_id.type='database.distro'
> database.release.distro_id.requires=IS_IN_DB
> (database,database.distro.id,'%(name)s')
>
> database.release.version.type='string'
> database.release.version.length=16
> database.release.version.unique=True
> database.release.version.requires=[IS_NOT_EMPTY()]
>
> database.release.alias.type='string'
> database.release.alias.length=16
> database.release.alias.unique=True
> database.release.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB
> (database,database.release.alias)]
>
> database.release.active.type='boolean'
> database.release.active.default=True
> =
>
> When I look at sql.log I see
>
> =
> timestamp: 2009-08-10T11:15:24.393714
> CREATE TABLE vendor(
>     id INTEGER PRIMARY KEY AUTOINCREMENT,
>     name CHAR(32),
>     alias CHAR(32),
>     url CHAR(32),
>     logo CHAR(32),
>     active CHAR(32)
> );
> success!
> timestamp: 2009-08-10T11:15:24.411343
> CREATE TABLE distro(
>     id INTEGER PRIMARY KEY AUTOINCREMENT,
>     vendor_id CHAR(32),
>     name CHAR(32),
>     alias CHAR(32),
>     active CHAR(32)
> );
> success!
> timestamp: 2009-08-10T11:15:24.423518
> CREATE TABLE release(
>     id INTEGER PRIMARY KEY AUTOINCREMENT,
>     distro_id CHAR(32),
>     version CHAR(32),
>     alias CHAR(32),
>     active CHAR(32)
> );
> success!
> =
>
> Is it normal for my specifications to be ignored?  Also, via the
> database administration page, I can set the active field of a record
> to "True" but not "False".  If I try to change something to "False" I
> get "invalid length!".
>
> What am I doing wrong?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28353] Re: calling function from the view

2009-08-11 Thread mdipierro

There are two types of frameworks push and pull.

In a push framework (like web2py, Django, Rails) the URL is mapped
into a function, which returns data (in the form of a dictionary) and
the data is rendered by one view.

In a pull framework (like Struts and JBoss) the URL is mapped into a
view which calls one or more controller functions.

>From your question I assume you have a pull framework in mind. You can
mimic a pull framework in web2py in multiple ways. One way is via ajax
requests:

#controller default.py
def index(): return dict()
def f1(): return response.render('partial_view1.html',dict())
def f2(): return response.render('partial_view2.html',dict())

#view default/index.html
{{extend 'alyout.html'}}



jQuery(document).ready(funciton(){
  ajax('{{=URL(f='f1')}}",[],'f1');
  ajax('{{=URL(f='f2')}}",[],'f2');
})};


#view partial_view1.html
Hello

#view partial_view2.html
World


Hope it makes sense.

Massimo


On Aug 11, 8:50 am, Don  wrote:
> I am new to the MVC paradigm, python, and web2py.  I would like to be
> able to:
>
> 1. create a controller (done)
> 1. define a series of functions (including index)
> 2. call any of the function from a single view.
>
> Example.  I have a model that consists of three tables.  My default.py
> controllers index function returns a dictionary containing rows from a
> query about vendor names.  I build a table with the vendor names.  I
> also want to build a subtable listing the products available from each
> vendor.  For that I would like to define another function that takes
> the vendor id and returns products related to that vendor id.  But I
> would have to make another view (if I understand correctly).
>
> I want all the information to appear in a single view.  Is this
> possible?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28352] unexpected database initilization

2009-08-11 Thread Don

I have defined my model.


# coding: utf8
# define a SQLite database
database=SQLDB("sqlite://database.db")

# create a vendor table
database.define_table('vendor',
database.Field('name'),
database.Field('alias'),
database.Field('url'),
database.Field('logo'),
database.Field('active')
)

database.vendor.name.type='string'
database.vendor.name.length=64
database.vendor.name.unique=True
database.vendor.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
database.vendor.name)]

database.vendor.alias.type='string'
database.vendor.alias.length=16
database.vendor.alias.unique=True
database.vendor.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(database,
database.vendor.name),IS_NOT_IN_DB(database, database.vendor.alias)]

database.vendor.url.type='string'
database.vendor.url.length=128
database.vendor.url.requires=[IS_NOT_EMPTY()]

database.vendor.logo.type='upload'
database.vendor.logo.requires=[IS_NOT_EMPTY()]

database.vendor.active.type='boolean'
database.vendor.active.requires=[IS_NOT_EMPTY()]


database.define_table('distro',
database.Field('vendor_id'),
database.Field('name'),
database.Field('alias'),
database.Field('active')
)

database.distro.vendor_id.type='database.vendor'
database.distro.vendor_id.requires=IS_IN_DB
(database,database.vendor.id,'%(name)s')

database.distro.name.type='string'
database.distro.name.length=64
database.distro.name.unique=True
database.distro.name.requires=[IS_NOT_EMPTY()]

database.distro.alias.type='string'
database.distro.alias.length=16
database.distro.alias.unique=True
database.distro.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB
(database,database.distro.alias)]

database.distro.active.type='boolean'
database.distro.active.requires=[IS_NOT_EMPTY()]

database.define_table('release',
database.Field('distro_id'),
database.Field('version'),
database.Field('alias'),
database.Field('active')
)

database.release.distro_id.type='database.distro'
database.release.distro_id.requires=IS_IN_DB
(database,database.distro.id,'%(name)s')

database.release.version.type='string'
database.release.version.length=16
database.release.version.unique=True
database.release.version.requires=[IS_NOT_EMPTY()]

database.release.alias.type='string'
database.release.alias.length=16
database.release.alias.unique=True
database.release.alias.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB
(database,database.release.alias)]

database.release.active.type='boolean'
database.release.active.default=True
=


When I look at sql.log I see

=
timestamp: 2009-08-10T11:15:24.393714
CREATE TABLE vendor(
id INTEGER PRIMARY KEY AUTOINCREMENT,
name CHAR(32),
alias CHAR(32),
url CHAR(32),
logo CHAR(32),
active CHAR(32)
);
success!
timestamp: 2009-08-10T11:15:24.411343
CREATE TABLE distro(
id INTEGER PRIMARY KEY AUTOINCREMENT,
vendor_id CHAR(32),
name CHAR(32),
alias CHAR(32),
active CHAR(32)
);
success!
timestamp: 2009-08-10T11:15:24.423518
CREATE TABLE release(
id INTEGER PRIMARY KEY AUTOINCREMENT,
distro_id CHAR(32),
version CHAR(32),
alias CHAR(32),
active CHAR(32)
);
success!
=

Is it normal for my specifications to be ignored?  Also, via the
database administration page, I can set the active field of a record
to "True" but not "False".  If I try to change something to "False" I
get "invalid length!".

What am I doing wrong?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28351] calling function from the view

2009-08-11 Thread Don

I am new to the MVC paradigm, python, and web2py.  I would like to be
able to:

1. create a controller (done)
1. define a series of functions (including index)
2. call any of the function from a single view.

Example.  I have a model that consists of three tables.  My default.py
controllers index function returns a dictionary containing rows from a
query about vendor names.  I build a table with the vendor names.  I
also want to build a subtable listing the products available from each
vendor.  For that I would like to define another function that takes
the vendor id and returns products related to that vendor id.  But I
would have to make another view (if I understand correctly).

I want all the information to appear in a single view.  Is this
possible?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread mdipierro

>     if db((db.attendance.event==event_id) & 
> (db.attendance.user==auth.user.id)).delete():
>         return 'Not Attending'
>     else:
>         db.attendance.insert(event=event_id, user=auth.user.id)
>         return 'Attending'
>
> This obviously works but looks backwards to me for some reason.  What
> am I missing?

db().delete() returns the number of affected records. If it returns 0
then there are no records to delete and it assumes you meant to insert
one, not delete one. This is the same as your code. I just removed the
explicit check.


> In the view:
>
>     
>
> Can you step me through what is going on here.

This is a bit tricky. Say you have an item.event.id==1. Then it make a
button

...

that when clicked sends an ajax request to /yourapp/
default/'toggle_attendance/1. The /1 implies request.args(0)=1. []
means it passes no request.vars. The last argument of ajax(...,'x1')
means that the value returned by the ajax function goes into the
innerHTML of the tag with id=='x1'.
So basically when you click the button is calls the server, the server
creates or deletes the record and returns the new name for the button.


> I'm not sure
> understand how the helpers work with ajax.  I get that you are
> creating a 'button' and that it is passing the event.id to the toggle
> function.  I guess my confusion is still the confusion about how the
> toggle is deciding what to return.  It seems like if it successfully
> deletes the attendance record, it returns that there IS an attendance,
> and if it inserts an attendance record it returns that is NOT an
> attendance.  This is not what actually happens so why am I reading it
> this way?  I also don't understand where what is actually returned is
> represented in the view.

Sorry. I had a type "Unattending" instead of "Attending".

Hope this makes more sense.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28349] Re: input model data help

2009-08-11 Thread Carlos Aboim
Thank you !! Worked just fine!

2009/8/11 mdipierro 

>
> db.table.field.comment='.'
>
> or
>
> db.table.field.comment=A
> ('help',_href='instructions_url',_target='_blank')
>
>
> On Aug 11, 6:50 am, Carlos Aboim  wrote:
> > Hi everyone
> > Hope everybody is ok.
> >
> > 1 - Do you Folks know if are there a way to instruct (with an
> > attribute) the user of my site how to fill a field
> > of my model? Kind of text wich tells the final user what information
> > is supposed to be filled in a field.
> >
> > 2 - And following the first one, how do I say that a field is an email
> > field (IS_EMAIL ok but...) and if I have no information to put in, how
> > do the model accepts a blank entry in that e-mail field?
> >
> > thank you
> > Carlos Aboim
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread __future__

Okay... I installed your version and took a look at what was going
on.

I am a little confused about a couple of things:

In the controller:

@auth.requires_login()
def toggle_attendance():
"""
This is where a user can toggle attendance to
any event displayed on the 'tonight. page.
"""
event_id = request.args(0)
if db((db.attendance.event==event_id) &
(db.attendance.user==auth.user.id)).delete():
return 'You are attending this event'
else:
db.attendance.insert(event=event_id, user=auth.user.id)
return 'You are not attending this event'

This obviously works but looks backwards to me for some reason.  What
am I missing?

In the view:



Can you step me through what is going on here.  I'm not sure I
understand how the helpers work with ajax.  I get that you are
creating a 'button' and that it is passing the event.id to the toggle
function.  I guess my confusion is still the confusion about how the
toggle is deciding what to return.  It seems like if it successfully
deletes the attendance record, it returns that there IS an attendance,
and if it inserts an attendance record it returns that is NOT an
attendance.  This is not what actually happens so why am I reading it
this way?  I also don't understand where what is actually returned is
represented in the view.

Thanks for your help





On Aug 10, 5:22 pm, __future__  wrote:
> Thanks.
>
> On Aug 10, 2:33 pm, Massimo Di Pierro  wrote:
>
> > @__future__
>
> > I made some improvements using a LEFT join in tonight and "attending/
> > not attending" using AJAX.
>
> > Massimo
>
> >  events.zip
> > 3KViewDownload
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:/] Re: How to implement a wiki

2009-08-11 Thread mdipierro

The example has been rewritten in the new book to use tools. I will
post is soon.

Massimo

On Aug 11, 7:47 am, Fran  wrote:
> On Aug 11, 1:39 pm, Johann Spies  wrote:
>
> > What exactly is a "scaffolding app"?
>
> It is an example application which you can build on easily.
> The 'welcome' app is the default scaffolding app which is what you get
> when you use site admin to create a new app.
>
> > How do I integrate different "scaffolding apps" into one web page?
>
> Copy/Paste ;)
>
> > Is the example in the manual still the best way to construct a wiki?
>
> I'm unaware of any other published examples.
>
> > I have read that much of T2/T3 is now part of the standard web2py.
>
> T2 has been deprecated by gluon/tools.py which does most of the same
> job but better.
> (I still use t2.search() currently as I've not prioritised rewriting
> that in a different way yet)
>
> > Is T3 still useful?
>
> The key example which T3 provides is that all the config is loaded
> from the DB instead of text files, which means you can more easily
> create alternative configuration interfaces.
> However this is currently built on the now-deprecated T2, so I'd copy
> this basic idea if you need it, rather than the whole app.
>
> > Is T3 an example of a "scaffolding app"?
>
> Yes, T3 could be seen as a scaffolding app.
>
> > How do I integrate it into another web page?
>
> If using T2 as scaffolding, copy/paste in your changes.
> If learning from T3 in your own app then copy/paste those parts into
> your app.
>
> > In the examples there is an example of an "ajaxwiki".  I am too much
> > of a beginner to understand the interaction between the that
> > controller example and the model and views involved.  Where can I read
> > more about it?
>
> Ultimately you'll want to look at jQuery if you want to get into 
> AJAX:http://docs.jquery.com.
>
> F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28346] Re: How to implement a wiki

2009-08-11 Thread Fran

On Aug 11, 1:39 pm, Johann Spies  wrote:
> What exactly is a "scaffolding app"?

It is an example application which you can build on easily.
The 'welcome' app is the default scaffolding app which is what you get
when you use site admin to create a new app.

> How do I integrate different "scaffolding apps" into one web page?

Copy/Paste ;)

> Is the example in the manual still the best way to construct a wiki?

I'm unaware of any other published examples.

> I have read that much of T2/T3 is now part of the standard web2py.

T2 has been deprecated by gluon/tools.py which does most of the same
job but better.
(I still use t2.search() currently as I've not prioritised rewriting
that in a different way yet)

> Is T3 still useful?

The key example which T3 provides is that all the config is loaded
from the DB instead of text files, which means you can more easily
create alternative configuration interfaces.
However this is currently built on the now-deprecated T2, so I'd copy
this basic idea if you need it, rather than the whole app.

> Is T3 an example of a "scaffolding app"?

Yes, T3 could be seen as a scaffolding app.

> How do I integrate it into another web page?

If using T2 as scaffolding, copy/paste in your changes.
If learning from T3 in your own app then copy/paste those parts into
your app.

> In the examples there is an example of an "ajaxwiki".  I am too much
> of a beginner to understand the interaction between the that
> controller example and the model and views involved.  Where can I read
> more about it?

Ultimately you'll want to look at jQuery if you want to get into AJAX:
http://docs.jquery.com.

F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28345] How to implement a wiki

2009-08-11 Thread Johann Spies

I want a wiki to be part of a website.

In the manual there as part of the tutorial there is an example on how
to implement a simple wiki:
 "Start  by creating a scaffolding app and call it "mywiki".

Now my questions.

What exactly is a "scaffolding app"?
How do I integrate different "scaffolding apps" into one web page?
Is the example in the manual still the best way to construct a wiki?
I have read that much of T2/T3 is now part of the standard web2py.
Is T3 still useful?  Is T3 an example of a "scaffolding app"?
How do I integrate it into another web page?

In the examples there is an example of an "ajaxwiki".  I am too much
of a beginner to understand the interaction between the that
controller example and the model and views involved.  Where can I read
more about it?

Regards,
Johann

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28344] Re: input model data help

2009-08-11 Thread mdipierro

2) IS_NULL_OR(IS_EMAIL())

On Aug 11, 6:50 am, Carlos Aboim  wrote:
> Hi everyone
> Hope everybody is ok.
>
> 1 - Do you Folks know if are there a way to instruct (with an
> attribute) the user of my site how to fill a field
> of my model? Kind of text wich tells the final user what information
> is supposed to be filled in a field.
>
> 2 - And following the first one, how do I say that a field is an email
> field (IS_EMAIL ok but...) and if I have no information to put in, how
> do the model accepts a blank entry in that e-mail field?
>
> thank you
> Carlos Aboim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28343] Re: input model data help

2009-08-11 Thread mdipierro

db.table.field.comment='.'

or

db.table.field.comment=A
('help',_href='instructions_url',_target='_blank')


On Aug 11, 6:50 am, Carlos Aboim  wrote:
> Hi everyone
> Hope everybody is ok.
>
> 1 - Do you Folks know if are there a way to instruct (with an
> attribute) the user of my site how to fill a field
> of my model? Kind of text wich tells the final user what information
> is supposed to be filled in a field.
>
> 2 - And following the first one, how do I say that a field is an email
> field (IS_EMAIL ok but...) and if I have no information to put in, how
> do the model accepts a blank entry in that e-mail field?
>
> thank you
> Carlos Aboim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread mdipierro



On Aug 11, 6:41 am, Richard  wrote:
> On Aug 11, 5:17 pm, mdipierro  wrote:
>
>
>
> > Thank you Richard,
> > some comments below.
>
> > On Aug 10, 7:21 pm, Richard  wrote:
>
> > > hello,
>
> > > > You know that currently the main repository is on launchpad.net?
>
> > > Currently the Google Code page says "Here you find only the
> > > development version ...", while the Launchpad page says "Does not use
> > > Launchpad for development."
> > > That to me sounds like Google Code is the development repository.
>
> > > Also I read in another thread we were migrating to mercurial on Google
> > > Code. If not, then perhaps the Google Code page should be closed/
> > > edited to avoid confusion.
>
> > Yes. I want to migrate to mercurial. Any news on whether Google code
> > does (will) support this?
>
> it's already supported in Administer -> Source
>
>
>
> > Meanwhile I do read bug reports on both Launchpad and Google code.
> > > > BTW - can you name _one_ feature request that has been "lost"?
>
> > > People like Massimo probably read every thread and so would know all
> > > of the requests. But if a less active user wants to help out they
> > > can't easily find a list of outstanding issues. Here are some threads
> > > I remember because I was interested in these features, so there are
> > > certainly more:
>
> > > - password retrieval has a confirmation email before resetting to
> > > prevent abuse
>
> > I will look into this.
>
> > > - *stackoverflow like OpenID login API
>
> > Technically this is an app, not a web2py feature. Users are working on
> > this already.
> > The functionality exists as an external app. We will see if we need to
> > modify web2py in order to get better integration.
>
> Is this app in appliances?
>
> > > - translation interface for non-admin users

http://www.web2py.com/appliances/default/show/9

> > There is already an app for this in appliances. Perhaps it should be
> > improved. Let me know.
>
> ah just found it:http://www.web2py.com/appliances/default/show/9
> I'll check it out.
>
> > > - *IPv6 support for login to admin interface
>
> > I do not remember this. Can somebody elaborate?
>
> It was raised in this 
> thread:http://groups.google.com/group/web2py/browse_thread/thread/726da9b5ea...
>
> > > - expose uploaded file naming function
>
> > This was done. "strore" in sql.py.
>
> Great!
>
> > > - *logging functionality (problem with builtin logging module)
>
> > I though this was solved by a user provided logging module. Can
> > somebody resend it to me?
>
> > > - *properly remove user, including roles, permissions, and session cookies
>
> > This needs to be done but it complicated since it is not easy to find
> > out which sessions are associated to a user. Ideas?
>
> > > - *appadmin like CRUD view
>
> > I think we need a crud.select similar to t2.select before we do this.
> > I look forward to a patch to accomplish this.
>
> > > - reserved words problem when migrating between databases (will be fixed 
> > > in new DAL?)
>
> > Yes. this is a priority.
>
> > > - single click upgrade of web2py
>
> > Yes. This is a priority.
>
> > > (* means Massimo agreed in thread was a good idea)
> > > Some of these have probably been addressed by now. With a feature
> > > tracker I could easily determine the status.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28341] input model data help

2009-08-11 Thread Carlos Aboim

Hi everyone
Hope everybody is ok.

1 - Do you Folks know if are there a way to instruct (with an
attribute) the user of my site how to fill a field
of my model? Kind of text wich tells the final user what information
is supposed to be filled in a field.

2 - And following the first one, how do I say that a field is an email
field (IS_EMAIL ok but...) and if I have no information to put in, how
do the model accepts a blank entry in that e-mail field?


thank you
Carlos Aboim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread Richard

On Aug 11, 5:17 pm, mdipierro  wrote:
> Thank you Richard,
> some comments below.
>
> On Aug 10, 7:21 pm, Richard  wrote:
>
> > hello,
>
> > > You know that currently the main repository is on launchpad.net?
>
> > Currently the Google Code page says "Here you find only the
> > development version ...", while the Launchpad page says "Does not use
> > Launchpad for development."
> > That to me sounds like Google Code is the development repository.
>
> > Also I read in another thread we were migrating to mercurial on Google
> > Code. If not, then perhaps the Google Code page should be closed/
> > edited to avoid confusion.
>
> Yes. I want to migrate to mercurial. Any news on whether Google code
> does (will) support this?

it's already supported in Administer -> Source


> Meanwhile I do read bug reports on both Launchpad and Google code.
> > > BTW - can you name _one_ feature request that has been "lost"?
>
> > People like Massimo probably read every thread and so would know all
> > of the requests. But if a less active user wants to help out they
> > can't easily find a list of outstanding issues. Here are some threads
> > I remember because I was interested in these features, so there are
> > certainly more:
>
> > - password retrieval has a confirmation email before resetting to
> > prevent abuse
>
> I will look into this.
>
> > - *stackoverflow like OpenID login API
>
> Technically this is an app, not a web2py feature. Users are working on
> this already.
> The functionality exists as an external app. We will see if we need to
> modify web2py in order to get better integration.

Is this app in appliances?


> > - translation interface for non-admin users
>
> There is already an app for this in appliances. Perhaps it should be
> improved. Let me know.

ah just found it: http://www.web2py.com/appliances/default/show/9
I'll check it out.


> > - *IPv6 support for login to admin interface
>
> I do not remember this. Can somebody elaborate?

It was raised in this thread: 
http://groups.google.com/group/web2py/browse_thread/thread/726da9b5eabe2bf5


> > - expose uploaded file naming function
>
> This was done. "strore" in sql.py.

Great!


> > - *logging functionality (problem with builtin logging module)
>
> I though this was solved by a user provided logging module. Can
> somebody resend it to me?
>
> > - *properly remove user, including roles, permissions, and session cookies
>
> This needs to be done but it complicated since it is not easy to find
> out which sessions are associated to a user. Ideas?
>
> > - *appadmin like CRUD view
>
> I think we need a crud.select similar to t2.select before we do this.
> I look forward to a patch to accomplish this.
>
> > - reserved words problem when migrating between databases (will be fixed in 
> > new DAL?)
>
> Yes. this is a priority.
>
> > - single click upgrade of web2py
>
> Yes. This is a priority.
>
> > (* means Massimo agreed in thread was a good idea)
> > Some of these have probably been addressed by now. With a feature
> > tracker I could easily determine the status.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread mdipierro

I have no objection if people use the google code page to track
issues.
Some people have done it in the past. I'd rather not use the the
launchpad because it is very slow.

Massimo

On Aug 11, 5:20 am, "Sebastian E. Ovide" 
wrote:
> I Agree with Richard:
>
> even if all the information is here, in the mailing list, and therefore
> anybody can research in it just using google it would be much clear to
> use some tool such as a bug track system both to track bugs and to track and
> user enhancement requests
>
> some known examples:
>
> http://code.google.com/p/googleappengine/issues/listhttp://code.djangoproject.com/queryhttp://bugs.python.org/https://bugzilla.mozilla.org/http://bugzilla.kernel.org/buglist.cgi?quicksearch=driverhttps://bugs.launchpad.net/ubuntu/+source/panhttps://bugs.eclipse.org/bugs/
>
> In my personal case it would be much easier to convince customers about
> web2py "seriety" and continuity if I could show them some standard software
> development proccess... They keep asking me: "can I see the list of bugs to
> see how they have been managed..." etc
>
> Nevertheless. I agree with Massimo
>
>  "We should not confuse freedom of expression with transparency and with
> *democracy*" 
> (http://groups.google.com/group/web2py/browse_thread/thread/ee3d45486f...
> )
>
> ... and I am thankful to the Massimo's team work... It makes me save a lot
> of time...
>
>
>
> On Tue, Aug 11, 2009 at 8:17 AM, mdipierro  wrote:
>
> > Thank you Richard,
> > some comments below.
>
> > On Aug 10, 7:21 pm, Richard  wrote:
> > > hello,
>
> > > > You know that currently the main repository is on launchpad.net?
>
> > > Currently the Google Code page says "Here you find only the
> > > development version ...", while the Launchpad page says "Does not use
> > > Launchpad for development."
> > > That to me sounds like Google Code is the development repository.
>
> > > Also I read in another thread we were migrating to mercurial on Google
> > > Code. If not, then perhaps the Google Code page should be closed/
> > > edited to avoid confusion.
>
> > Yes. I want to migrate to mercurial. Any news on whether Google code
> > does (will) support this?
> > Meanwhile I do read bug reports on both Launchpad and Google code.
>
> > > > BTW - can you name _one_ feature request that has been "lost"?
>
> > > People like Massimo probably read every thread and so would know all
> > > of the requests. But if a less active user wants to help out they
> > > can't easily find a list of outstanding issues. Here are some threads
> > > I remember because I was interested in these features, so there are
> > > certainly more:
>
> > > - password retrieval has a confirmation email before resetting to
> > > prevent abuse
>
> > I will look into this.
>
> > > - *stackoverflow like OpenID login API
>
> > Technically this is an app, not a web2py feature. Users are working on
> > this already.
> > The functionality exists as an external app. We will see if we need to
> > modify web2py in order to get better integration.
>
> > > - translation interface for non-admin users
>
> > There is already an app for this in appliances. Perhaps it should be
> > improved. Let me know.
>
> > > - *IPv6 support for login to admin interface
>
> > I do not remember this. Can somebody elaborate?
>
> > > - expose uploaded file naming function
>
> > This was done. "strore" in sql.py.
>
> > > - *logging functionality (problem with builtin logging module)
>
> > I though this was solved by a user provided logging module. Can
> > somebody resend it to me?
>
> > > - *properly remove user, including roles, permissions, and session
> > cookies
>
> > This needs to be done but it complicated since it is not easy to find
> > out which sessions are associated to a user. Ideas?
>
> > > - *appadmin like CRUD view
>
> > I think we need a crud.select similar to t2.select before we do this.
> > I look forward to a patch to accomplish this.
>
> > > - reserved words problem when migrating between databases (will be fixed
> > in new DAL?)
>
> > Yes. this is a priority.
>
> > > - single click upgrade of web2py
>
> > Yes. This is a priority.
>
> > > (* means Massimo agreed in thread was a good idea)
> > > Some of these have probably been addressed by now. With a feature
> > > tracker I could easily determine the status.
>
> --
>
> Sebastian E. Ovide
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread Sebastian E. Ovide
I Agree with Richard:

even if all the information is here, in the mailing list, and therefore
anybody can research in it just using google it would be much clear to
use some tool such as a bug track system both to track bugs and to track and
user enhancement requests

some known examples:

http://code.google.com/p/googleappengine/issues/list
http://code.djangoproject.com/query
http://bugs.python.org/
https://bugzilla.mozilla.org/
http://bugzilla.kernel.org/buglist.cgi?quicksearch=driver
https://bugs.launchpad.net/ubuntu/+source/pan
https://bugs.eclipse.org/bugs/

In my personal case it would be much easier to convince customers about
web2py "seriety" and continuity if I could show them some standard software
development proccess... They keep asking me: "can I see the list of bugs to
see how they have been managed..." etc

Nevertheless. I agree with Massimo

 "We should not confuse freedom of expression with transparency and with
*democracy*" (
http://groups.google.com/group/web2py/browse_thread/thread/ee3d45486f44c5d1/55d29f17376818eb?lnk=gst&q=democracy&pli=1
)

... and I am thankful to the Massimo's team work... It makes me save a lot
of time...


On Tue, Aug 11, 2009 at 8:17 AM, mdipierro  wrote:

>
> Thank you Richard,
> some comments below.
>
> On Aug 10, 7:21 pm, Richard  wrote:
> > hello,
> >
> > > You know that currently the main repository is on launchpad.net?
> >
> > Currently the Google Code page says "Here you find only the
> > development version ...", while the Launchpad page says "Does not use
> > Launchpad for development."
> > That to me sounds like Google Code is the development repository.
> >
> > Also I read in another thread we were migrating to mercurial on Google
> > Code. If not, then perhaps the Google Code page should be closed/
> > edited to avoid confusion.
>
> Yes. I want to migrate to mercurial. Any news on whether Google code
> does (will) support this?
> Meanwhile I do read bug reports on both Launchpad and Google code.
>
> > > BTW - can you name _one_ feature request that has been "lost"?
> >
> > People like Massimo probably read every thread and so would know all
> > of the requests. But if a less active user wants to help out they
> > can't easily find a list of outstanding issues. Here are some threads
> > I remember because I was interested in these features, so there are
> > certainly more:
> >
> > - password retrieval has a confirmation email before resetting to
> > prevent abuse
>
> I will look into this.
>
> > - *stackoverflow like OpenID login API
>
> Technically this is an app, not a web2py feature. Users are working on
> this already.
> The functionality exists as an external app. We will see if we need to
> modify web2py in order to get better integration.
>
> > - translation interface for non-admin users
>
> There is already an app for this in appliances. Perhaps it should be
> improved. Let me know.
>
> > - *IPv6 support for login to admin interface
>
> I do not remember this. Can somebody elaborate?
>
> > - expose uploaded file naming function
>
> This was done. "strore" in sql.py.
>
> > - *logging functionality (problem with builtin logging module)
>
> I though this was solved by a user provided logging module. Can
> somebody resend it to me?
>
> > - *properly remove user, including roles, permissions, and session
> cookies
>
> This needs to be done but it complicated since it is not easy to find
> out which sessions are associated to a user. Ideas?
>
> > - *appadmin like CRUD view
>
> I think we need a crud.select similar to t2.select before we do this.
> I look forward to a patch to accomplish this.
>
> > - reserved words problem when migrating between databases (will be fixed
> in new DAL?)
>
> Yes. this is a priority.
>
> > - single click upgrade of web2py
>
> Yes. This is a priority.
>
> > (* means Massimo agreed in thread was a good idea)
> > Some of these have probably been addressed by now. With a feature
> > tracker I could easily determine the status.
>
>
> >
>


-- 

Sebastian E. Ovide

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28337] Re: Static Uploads Time Out

2009-08-11 Thread Alexey Nezhdanov

On Monday 10 August 2009 10:56:23 mdipierro wrote:
> I cannot exclude it is a problem with wsgiserver and ssl. Perhaps the
> decrytpion is done in ram and that is a problem. I will look into
> this.

I had very similar problems back when developing xmpppy library.
On some particular hardware/OS/python combinations SSL connections just stuck 
and won't proceed until you kick it (for instance Ctrl-C). Then it behaves as 
if nothing serious have happened and happily continue sending and receiving 
packets. Though may be Ctrl-C was xmpppy-specific.
I never fixed that, libraries just gradually get updated world-wide.

> On Aug 9, 4:20 pm, Derek  wrote:
> > Internet explorer nor Chrome work, so browser doesn't make a
> > different.
> >
> > When I turn off SSL, it works fine. But, that's annoying. One of the
> > things I'm most excited about with web2py is being able to edit
> > interactive webpages while I'm on my network at a Starbucks. Any
> > suggestions on how to get this to work with SSL? Is it a bug?
> >
> > Thanks,
> >
> > Derek
> >
> > On Aug 9, 4:33 pm, mdipierro  wrote:
> > > And have you tried without ssl?
> > >
> > > On Aug 9, 2:48 pm, Yarko Tymciurak  wrote:
> > > > On Sun, Aug 9, 2009 at 1:03 PM, Derek  wrote:
> > > > > I tried setting the -o option to 600, since I assumed the timeout
> > > > > was in seconds. Now it just sits there for 10 minutes, then gives
> > > > > me the timeout error.
> > > > >
> > > > > I'm using the Windows version of web2py with whatever webserver it
> > > > > includes (tinyhttpd or something?). I pass the -c server.crt and -k
> > > > > server.key options on the command-line.
> > > >
> > > > It is the cherrypy server...
> > > >
> > > > What browser are you using to do the transfer?  Have you tried
> > > > different browsers?
> > > >
> > > > > 126KB should transfer over my local wifi connection in seconds, so
> > > > > filesize nor timeout should really be a factor here. Plus, web
> > > > > images can easily be 126KB or larger... so what gives?
> > > > >
> > > > > Derek
> > > > >
> > > > > On Aug 9, 12:34 pm, mdipierro  wrote:
> > > > > > Are you using ssh with wsgiserver or are you using apache with
> > > > > > mod_ssl?
> > > > > >
> > > > > > Massimo
> > > > > >
> > > > > > On Aug 9, 10:22 am, Derek  wrote:
> > > > > > > Hi all,
> > > > > > >
> > > > > > > I'm trying to upload a 126KB static file, and it keeps giving
> > > > > > > me a timeout. If there were to be any file size limit, I really
> > > > > > > would have expected it to be much larger. Other smaller files
> > > > > > > are uploading fine.
> > > > > > >
> > > > > > > I'm using the binary Windows distribution, and running it over
> > > > > > > SSL on my local network.
> > > > > > >
> > > > > > > Any help would be greatly appreciated.
> > > > > > >
> > > > > > > Derek
>
> 


-- 
Sincerely yours
Alexey Nezhdanov

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28336] Re: Cannot upload file to GAE

2009-08-11 Thread mdipierro

email me for the security code.

On Aug 11, 3:16 am, Jon Romero  wrote:
> > db.define_table('site',
> >                 Field('pic1', 'upload', label ="Banner (125x125)"))
>
> > def download(): return response.download(request,db)
>
> > this works on GAE too because GAE will automatically create the
> > uploadfield for you.
>
> I didn't know that! I haven't found it in any documentation! Should I
> updatehttp://www.web2py.com/AlterEgo/default/show/138?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28335] Re: Cannot upload file to GAE

2009-08-11 Thread mdipierro

please do. thanks.

On Aug 11, 3:16 am, Jon Romero  wrote:
> > db.define_table('site',
> >                 Field('pic1', 'upload', label ="Banner (125x125)"))
>
> > def download(): return response.download(request,db)
>
> > this works on GAE too because GAE will automatically create the
> > uploadfield for you.
>
> I didn't know that! I haven't found it in any documentation! Should I
> updatehttp://www.web2py.com/AlterEgo/default/show/138?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28334] Re: Cannot upload file to GAE

2009-08-11 Thread Jon Romero



> db.define_table('site',
>                 Field('pic1', 'upload', label ="Banner (125x125)"))
>
> def download(): return response.download(request,db)
>
> this works on GAE too because GAE will automatically create the
> uploadfield for you.

I didn't know that! I haven't found it in any documentation! Should I
update
http://www.web2py.com/AlterEgo/default/show/138 ?




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28333] Re: Cannot upload file to GAE

2009-08-11 Thread mdipierro

I do not understand where you are getting the error but you can simply
do:

db.define_table('site',
Field('pic1', 'upload', label ="Banner (125x125)"))

def download(): return response.download(request,db)

this works on GAE too because GAE will automatically create the
uploadfield for you.

Massimo

On Aug 10, 8:52 pm, Jon Romero  wrote:
> I have this table:
> db.define_table('site',
>                 Field('pic1', 'upload', uploadfield='data', label =
> "Banner (125x125)"),
>                 Field('data','blob',default=''))
>
> I also changed this in my controller:
> def download():
>     return site[db.site.pic1.uploadfield]
>
> Now I have some questions:
> First of all, is this line correct?
>     return site[db.site.pic1.uploadfield]
> or it should be
>     return site[db.site.pic1.data]
>
> Documentation here (http://www.web2py.com/AlterEgo/default/show/138)
> says it's the first but it doesn't make any sense (for the record none
> of them work)
>
> Secondly, I added session.connect in my db.py for all cases
> if request.env.web2py_runtime_gae:
>     db = DAL('gae')
> else:                                         # else use a normal
> relational database
>     db = DAL('sqlite://storage.sqlite')       # if not, use SQLite or
> other DB
> session.connect(request, response, db=db) # and store sessions and
> tickets there
>
> None of the combinations work. I get this error (running on GAE and on
> plain web2py server):
> Error traceback
> Traceback (most recent call last):
>   File "/home/jon/Sources/web2py/gluon/main.py", line 389, in wsgibase
>     session._try_store_in_db(request, response)
>   File "/home/jon/Sources/web2py/gluon/globals.py", line 339, in
> _try_store_in_db
>     session_data=cPickle.dumps(dict(self)),
>   File "/usr/lib/python2.5/copy_reg.py", line 69, in _reduce_ex
>     raise TypeError, "can't pickle %s objects" % base.__name__
> TypeError: can't pickle file objects
>
> Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:28332] Re: Calendar Setup

2009-08-11 Thread mdipierro

Yes, you can translate the string using internationalization.

On Aug 10, 8:43 pm, FERNANDO VILLARROEL  wrote:
> Regarding of the calendar.
>
> How i can use calendar with today in format day-month-year?
>
> hoy=time.time()
> desde=time.strftime('%d-%m-%Y 00:00:00',time.localtime(hoy))
>
> INPUT(_type="datetime",_name="desde",_value=hoy,_class='datetime',_id="datetlimite",
>  requires=IS_DATETIME()))
>
> if i use this format the calendar show 30 of January 2016.
>
> If i use format year-month-day the calendar show today fine:10 August 2009.
>
> Is possible i can use format day-month-year with Calendar?
>
> Fernando
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



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

2009-08-11 Thread mdipierro

Thank you Richard,
some comments below.

On Aug 10, 7:21 pm, Richard  wrote:
> hello,
>
> > You know that currently the main repository is on launchpad.net?
>
> Currently the Google Code page says "Here you find only the
> development version ...", while the Launchpad page says "Does not use
> Launchpad for development."
> That to me sounds like Google Code is the development repository.
>
> Also I read in another thread we were migrating to mercurial on Google
> Code. If not, then perhaps the Google Code page should be closed/
> edited to avoid confusion.

Yes. I want to migrate to mercurial. Any news on whether Google code
does (will) support this?
Meanwhile I do read bug reports on both Launchpad and Google code.

> > BTW - can you name _one_ feature request that has been "lost"?
>
> People like Massimo probably read every thread and so would know all
> of the requests. But if a less active user wants to help out they
> can't easily find a list of outstanding issues. Here are some threads
> I remember because I was interested in these features, so there are
> certainly more:
>
> - password retrieval has a confirmation email before resetting to
> prevent abuse

I will look into this.

> - *stackoverflow like OpenID login API

Technically this is an app, not a web2py feature. Users are working on
this already.
The functionality exists as an external app. We will see if we need to
modify web2py in order to get better integration.

> - translation interface for non-admin users

There is already an app for this in appliances. Perhaps it should be
improved. Let me know.

> - *IPv6 support for login to admin interface

I do not remember this. Can somebody elaborate?

> - expose uploaded file naming function

This was done. "strore" in sql.py.

> - *logging functionality (problem with builtin logging module)

I though this was solved by a user provided logging module. Can
somebody resend it to me?

> - *properly remove user, including roles, permissions, and session cookies

This needs to be done but it complicated since it is not easy to find
out which sessions are associated to a user. Ideas?

> - *appadmin like CRUD view

I think we need a crud.select similar to t2.select before we do this.
I look forward to a patch to accomplish this.

> - reserved words problem when migrating between databases (will be fixed in 
> new DAL?)

Yes. this is a priority.

> - single click upgrade of web2py

Yes. This is a priority.

> (* means Massimo agreed in thread was a good idea)
> Some of these have probably been addressed by now. With a feature
> tracker I could easily determine the status.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---