Re: [web2py] CPU 210%

2012-04-16 Thread Bruce Wade
Yes you are correct plus there was 10,000+ requests a second just hitting
the site I think I really need a load balanced. We are getting on average
500-1000 new members a day.
On Apr 16, 2012 10:59 PM, "pbreit"  wrote:

> Don't forget you probably spent quite a bit if time tuning your Pyramid
> app.
>
> The best ways to scale are:
> 1) Cache
> 2) Cache
> 3) Cache
>
> Web2py makes caching queries super easy.
>
> If you are serving a lot of static assets, check out Cloudflare for free
> CDN.
>


[web2py] IS_TIME(format='%H:%M') unexpected keyword argument format

2012-04-16 Thread Annet
I defined the following table:

db.define_table('OpeningHours',
Field('nodeID','reference 
Node',default='',notnull=True,ondelete='CASCADE',writable=False,readable=False),
Field('dayID','reference 
Day',default='',notnull=True,ondelete='RESTRICT'),
Field('fromTime',type='time'),
Field('toTime',type='time'),
migrate=False)

db.OpeningHours.nodeID.requires=[IS_IN_DB(db,'Node.id','%(id)s',zero='select 
a value')]
db.OpeningHours.nodeID.represent=lambda nodeID, row: 
db(db.Organization.nodeID==nodeID).select().first().name
db.OpeningHours.dayID.requires=IS_IN_DB(db,'Day.id','%(name)s',orderby='Day.id',zero='select
 
a value')
db.OpeningHours.dayID.represent=lambda dayID, row: 
db(db.Day.id==dayID).select().first().name
db.OpeningHours.fromTime.requires=IS_TIME(format='%H:%M')
db.OpeningHours.toTime.requires=IS_TIME(format='%H:%M')


Since I only need the hours and minutes I thought I'd format the time like 
this:

IS_TIME(format='%H:%M')

... but that results in an error:


Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/web2py/gluon/restricted.py", line 
205, in restricted
exec ccode in environment
  File 
"/Library/Python/2.5/site-packages/web2py/applications/bootstrap/models/10_table_db.py"
 , 
line 603, in 
db.OpeningHours.fromTime.requires=IS_TIME(format='%H:%M')
TypeError: __init__() got an unexpected keyword argument 'format'



Is there a way to format the time?

Kind regards,

Annet


Re: [web2py] CPU 210%

2012-04-16 Thread pbreit
Don't forget you probably spent quite a bit if time tuning your Pyramid app.

The best ways to scale are:
1) Cache
2) Cache
3) Cache

Web2py makes caching queries super easy.

If you are serving a lot of static assets, check out Cloudflare for free 
CDN.


Re: [web2py] CPU 210%

2012-04-16 Thread Bruce Wade
Yeah the site can't even handle half the load the pyramid version handled.
I really hope I can fix this. Just told some of the members to use it but
it buckles it doesn't use much memory but kills the processor.

The load bandwidth out going went from 0.2MB/sec to 1.6MB/s

On Sun, Apr 15, 2012 at 10:33 AM, Bruce Wade  wrote:

> I think it was the server. I rebuilt/installed from scratch OS etc.. the
> server last night and now it seems to be running without problems. I am
> slowing increasing the load to see how well it handles before moving it to
> the new site again.
>
>
> On Sat, Apr 14, 2012 at 8:13 PM, Bruno Rocha wrote:
>
>> We have to see significant part of the code too figure out what is going
>> on...
>>
>> http://zerp.ly/rochacbruno
>> Em 14/04/2012 22:45, "Bruce Wade"  escreveu:
>>
>> Hi,
>>>
>>> So I just launched and have been hit with a tone of traffic and my CPU
>>> on linode is showing 210% usage. Any suggestions?
>>>
>>> --
>>> --
>>> Regards,
>>> Bruce Wade
>>> http://ca.linkedin.com/in/brucelwade
>>> http://www.wadecybertech.com
>>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>>> http://www.warplydesigned.com
>>>
>>>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>


-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com


[web2py] Re: Row objects always throw me

2012-04-16 Thread Lewis
Solved!

Thanks again for your help.  yes, I had the db's defined in the model. 
 But, they *weren't* quite identical.  AND, I wanted to get the id from the 
"old" table because I will be using it later after I've munged the rest of 
the record--to update the original record in the original table.  I am 
using the new table as a batch update--after the changes are accumulated, 
then I will update the original table.

To break down what was happening,  I decided to purge the "funny" things 
from the rows object (1 record from the old table):  the two lambda 
functions and a foreign key and then I just inserted a single field value 
into the new table to see if that would work.   And that showed me the 
error of my ways--it worked, so the problem had nothing to do with 
postgresql failing to increment the integer index (which is sort of what 
the error message implied...).

What I was stupidly doing was trying to write over the 'id' field of the 
new table with the 'id' field of the old table.   Naturally, postgresql was 
unhappy since the id field is an auto-increment field.

Now, in the "new" table I created a field called 'oldid' to hold the key 
value (old.id) from the old table so I don't try to tromp on the new 
table's 'id' field.  I don't actually care what the values of the new 
table's id are--I'll never use them.  But, I do need to keep the old key 
(oldid) around to later update the right records in the original table.

Doh!   Sorry for being so cranky!  But, rows objects are a bit funky--I'll 
try to think of ways they might be easier.  The real problem showed up as 
an unusual error message, but it was totally because I was doing something 
DUMB.

On Monday, April 16, 2012 8:28:52 PM UTC-7, pbreit wrote:
>
> Doubt this is the problem but your code doesn't look right to me. Did you 
> say you were trying to move a record from one db into an identical table in 
> another db? SO would expect to see something like:
>
> db1 = DAL(...
> db2 = DAL(...
>
> row = db1.joke(jokenum)
> db2.joke.insert(**row.as_dict())
>


[web2py] Re: DAL IMAP errors

2012-04-16 Thread Alan Etkin
> On Monday, April 16, 2012 1:57:02 PM UTC-3, Alan Etkin wrote:I think it 
probably will, since
> replacing anything with "_" would set compatible table name strings.

My mistake, with Massimo regular expression command the brackets are not 
replaced by underscore (they are removed), so I assume the mapping will 
work ok.

> Please share the recipe if you are successfully using DAL with IMAP

The adapter documentation is available here:
http://www.web2py.com/examples/static/epydoc/web2py.gluon.dal.IMAPAdapter-class.html



[web2py] Re: uploads doesn't get cleaned up

2012-04-16 Thread weheh
Thanks Massimo. I wasn't aware of that option. Time to re-read the doc.

On Monday, April 16, 2012 9:30:25 PM UTC+8, weheh wrote:
>
> auth_user_table = db.define_table(
> ... the usual suspects ...
> Field('avatar', 'upload', ondelete='CASCADE', ...)
> )
>
> Using the auth.profile() routine, if user uploads a profile picture, it 
> properly appears under the uploads directory. However, if user uploads a 
> new profile picture, the new picture duly gets uploaded but the old one 
> remains. It is now an orphan file. IMHO, the old profile pic should get 
> deleted when the new one takes its place. Otherwise, if you have a lot of 
> users and people change their profile pics frequently, you're going to end 
> up with a lot of orphaned files taking up disk space unnecessarily.
>
> I will submit this as a web2py ticket if it's considered a bug. As a 
> feature, I think it's only useful to Seagate and WD. ;-)
>


[web2py] Re: Row objects always throw me

2012-04-16 Thread pbreit
Doubt this is the problem but your code doesn't look right to me. Did you 
say you were trying to move a record from one db into an identical table in 
another db? SO would expect to see something like:

db1 = DAL(...
db2 = DAL(...

row = db1.joke(jokenum)
db2.joke.insert(**row.as_dict())


[web2py] Re: Row objects always throw me

2012-04-16 Thread Lewis
Still can't solve this problem.

here is the new code, which I *think* matches your recommendation:


 row = jodb(jodb.joke.id==jokenum).select().first()

 jodb.pending.insert(**row.as_dict())

And I still get the seq error for the table:

 
 currval of sequence "pending_id_seq" is 
not yet defined in this session

So, having spent over 5 hours on this, I'm stuck.   These truly are rare 
problems but really counter-productive when something just seems broken 
somewhere in the stack.   No forward progress; no apparent solutions.

On Monday, April 16, 2012 7:21:49 PM UTC-7, Lewis wrote:
>
> I have restarted postgresql.  I have deleted the table and the migration. 
>  I have tried to do a "fake migration" within web2py.  Now, this table 
> seems to be corrupted somehow because the currval for the id_seq of the 
> table won't update.  Wow.  What a big mess.
>
> Any clues on how to recover from this?
>
> On Monday, April 16, 2012 5:58:00 PM UTC-7, Lewis wrote:
>>
>> Thanks.   Certainly the documentation.  I'll give some thought to whether 
>> there is some other behavior.
>>
>> Now I have a deeper problem:
>>
>>  currval of sequence "pending_id_seq" 
>> is not yet defined in this session
>>
>> This refers to the id field.   I'll change the model and go out to 
>> pgadmin and manually delete the table. Then, I'll put the defintion back in 
>> the model so that DAL can create a clean table.
>>
>> On Monday, April 16, 2012 5:42:53 PM UTC-7, Anthony wrote:
>>>
>>> I think I am trying to do something very simple, but I don't understand 
 row objects (why can't they be a normal Python type instead of a web2py 
 class?).
>>>
>>>
>>> It acts like a dictionary, but you can do row.field instead of having 
>>> to do row['field']. It also has a way of storing and returning the 
>>> value of expressions requested in the query, and it includes special lambda 
>>> functions to update and delete the record. You can't do any of that with a 
>>> normal Python type. If you want a plain dict, just do row.as_dict().
>>>
>>> Regarding your code, the problem is that you are working with a Rows 
>>> object, not a Row object. The select() method returns a Rows object, which 
>>> acts like a list of Row objects (even if it only returns one row). From the 
>>> book (with regard to the select method):
>>>
>>> It returns an iterable object of class gluon.sql.Rows whose elements 
 are Row objects. gluon.sql.Row objects act like dictionaries, but 
 their elements can also be accessed as attributes, like 
 gluon.storage.Storage. The former differ from the latter because its 
 values are readonly.
>>>
>>>
>>> If you want to extract the first row from a Rows object, do:
>>>
>>> row = db(query).select().first()
>>>
>>> To insert into another table:
>>>
>>> db.other_table.insert(**row.as_dict())
>>>  
>>>
 The row object and its strangeness is not described very well in the 
 DAL section of the book.  It's too magical.  It's need to be more 
 transparent.

>>>
>>> Are you saying we need better documentation (agreed), or that the 
>>> behavior or Rows and Row objects should change? If the latter, what would 
>>> you suggest?
>>>
>>> Anthony
>>>
>>

[web2py] Possible to put controller code and view in same file?

2012-04-16 Thread pbreit
I had sort of a dumb thought after seeing another framework (can't remember 
the name): is it possible or desirable to combine controller and view code 
in one file? Since controller and view files are almost always used 
together, I wondered if it might be easier just to code them in same file 
(while still separating the code).
For example:

== default.py ==
def article(): return dict()

== default/article.html ==
{{
row = db.article(request.args(0))
}}

{{extend 'layout.html'}}

row.title
row.body


[web2py] Re: sqlform.grid search widget

2012-04-16 Thread Cliff
Good one.

You earned a browser bookmark.

Thanks.

On Wednesday, March 7, 2012 4:44:00 AM UTC-5, peter wrote:
>
> As I have commented before, sqlform.grid has a particular way of 
> searching. Its combination of search and 'queries' is very powerful. 
> However the search does not really work in the way a casual web user 
> might expect. If entered - Bob Dylan - in the search box and clicked 
> search, then one get 'invalid query'. I eventually worked out how to 
> change the search widget, so as I believe this is currently 
> undocumented I thought I would share it. The semantics I have chosen 
> for search are that it will return records where any of the specified 
> fields (fielda and fieldb in the example) contain all of the words in 
> the search field. i.e if the search term is -Bob Dylan- it will return 
> records that have both Bob and Dylan in the fieldA or both in fieldb. 
>
> Define a search function that creates the form and a function that 
> does the search 
>
> def search_form(self,url): 
> form = FORM('', 
>   
> INPUT(_name='search_text',_value=request.get_vars.search_text, 
>_style='width:200px;', 
>_id='searchText'), 
>  INPUT(_type='submit',_value=T('Search')), 
>  INPUT(_type='submit',_value=T('Clear'), 
>  _onclick="jQuery('#search_text').val('');"), 
>  _method="GET",_action=url) 
>
> return form 
>
> def search_query(tableid,search_text,fields): 
> words= search_text.split(' ') if search_text else [] 
> query=tableid<0#empty query 
> for field in fields: 
> new_query=tableid>0 
> for word in words: 
> new_query=new_query&field.contains(word) 
> query=query|new_query 
> return query 
>
> Then in the function that has the sqlform.grid call, before the call 
> add 
>
> search_text=request.get_vars.search_text 
> query=search_query(db.tablea.id,search_text, 
> [db.tablea.fielda,db.tablea.fieldb]) 
> ... 
> # the query could now be combined with other queries. 
>
> table=SQLFORM.grid(query, search_widget=search_form) 
>
> return dict(table=table) 
>
>
>
>
>
>
>
>
>

[web2py] Re: Row objects always throw me

2012-04-16 Thread Lewis
I have restarted postgresql.  I have deleted the table and the migration. 
 I have tried to do a "fake migration" within web2py.  Now, this table 
seems to be corrupted somehow because the currval for the id_seq of the 
table won't update.  Wow.  What a big mess.

Any clues on how to recover from this?

On Monday, April 16, 2012 5:58:00 PM UTC-7, Lewis wrote:
>
> Thanks.   Certainly the documentation.  I'll give some thought to whether 
> there is some other behavior.
>
> Now I have a deeper problem:
>
>  currval of sequence "pending_id_seq" 
> is not yet defined in this session
>
> This refers to the id field.   I'll change the model and go out to pgadmin 
> and manually delete the table. Then, I'll put the defintion back in the 
> model so that DAL can create a clean table.
>
> On Monday, April 16, 2012 5:42:53 PM UTC-7, Anthony wrote:
>>
>> I think I am trying to do something very simple, but I don't understand 
>>> row objects (why can't they be a normal Python type instead of a web2py 
>>> class?).
>>
>>
>> It acts like a dictionary, but you can do row.field instead of having to 
>> do row['field']. It also has a way of storing and returning the value of 
>> expressions requested in the query, and it includes special lambda 
>> functions to update and delete the record. You can't do any of that with a 
>> normal Python type. If you want a plain dict, just do row.as_dict().
>>
>> Regarding your code, the problem is that you are working with a Rows 
>> object, not a Row object. The select() method returns a Rows object, which 
>> acts like a list of Row objects (even if it only returns one row). From the 
>> book (with regard to the select method):
>>
>> It returns an iterable object of class gluon.sql.Rows whose elements are 
>>> Row objects. gluon.sql.Row objects act like dictionaries, but their 
>>> elements can also be accessed as attributes, like gluon.storage.Storage. 
>>> The former differ from the latter because its values are readonly.
>>
>>
>> If you want to extract the first row from a Rows object, do:
>>
>> row = db(query).select().first()
>>
>> To insert into another table:
>>
>> db.other_table.insert(**row.as_dict())
>>  
>>
>>> The row object and its strangeness is not described very well in the DAL 
>>> section of the book.  It's too magical.  It's need to be more transparent.
>>>
>>
>> Are you saying we need better documentation (agreed), or that the 
>> behavior or Rows and Row objects should change? If the latter, what would 
>> you suggest?
>>
>> Anthony
>>
>

Re: [web2py] Re: Getting https to work with rocket

2012-04-16 Thread Shivakumar GN
Sorry if I was not clear enough. It was https that had the problem - it was
as though no server existed.
The cause was found to be some firewall magic and unrelated to web2py.

I checked http as well because web2py displayed *please visit http://* on
the console. I wanted to check if there has been a silent fallback to http.
Shouldn't the console message say https instead of http? Will file a ticket.

thanks
Shivakumar


On Mon, Apr 16, 2012 at 11:49 PM, Ross Peoples wrote:

> You can't connect to https using http as the protocol. Getting a "bad
> request" message is exactly what happens when you try. So in your browser,
> you need to specifically type https://:3.
>
>
> On Monday, April 16, 2012 1:42:06 PM UTC-4, Shivakumar GN wrote:
>>
>> Hi,
>>
>> I am using python 2.5 on Solaris and web2py 1.99.7
>>
>> I am trying to get https to work with in built web server as per recipe
>> at below link.
>> 
>> http://www.web2py.com/**AlterEgo/default/show/140
>>
>> I built ssl module built from source since it was missing in python 2.5
>>
>> > python web2py.py --nogui -i  -p 3 -c server.crt -k
>> server.key
>>
>> After this, there is no service available via https. On using http, a
>> "bad request" message appears in the browser.
>>
>> This seems similar to issue reported long back, the discussion thread for
>> which doesn't seem to have reached a closure.
>> http://comments.gmane.org/**gmane.comp.python.web2py/46045
>>
>> How to resolve this?
>>
>> thanks & best regards
>> Shivakumar GN
>>
>>


[web2py] Re: unable to deploy web2py application on GAE

2012-04-16 Thread Eric James Soltys


You have to first register your application id in App Engine using the 
Administration Console:

https://developers.google.com/appengine/docs/python/gettingstarted/uploading



[web2py] Re: sqlform.grid search widget

2012-04-16 Thread villas
Hi Peter,  
Just to say thank you so much for your posting this, and with this help I 
did get it working OK.  

@Book Editor.  In the absence of other documentation,  perhaps this example 
ought to be mentioned in the book?
Thanks, David


On Wednesday, 7 March 2012 09:44:00 UTC, peter wrote:
>
> As I have commented before, sqlform.grid has a particular way of 
> searching. Its combination of search and 'queries' is very powerful. 
> However the search does not really work in the way a casual web user 
> might expect. If entered - Bob Dylan - in the search box and clicked 
> search, then one get 'invalid query'. I eventually worked out how to 
> change the search widget, so as I believe this is currently 
> undocumented I thought I would share it. The semantics I have chosen 
> for search are that it will return records where any of the specified 
> fields (fielda and fieldb in the example) contain all of the words in 
> the search field. i.e if the search term is -Bob Dylan- it will return 
> records that have both Bob and Dylan in the fieldA or both in fieldb. 
>
> Define a search function that creates the form and a function that 
> does the search 
>
> def search_form(self,url): 
> form = FORM('', 
>   
> INPUT(_name='search_text',_value=request.get_vars.search_text, 
>_style='width:200px;', 
>_id='searchText'), 
>  INPUT(_type='submit',_value=T('Search')), 
>  INPUT(_type='submit',_value=T('Clear'), 
>  _onclick="jQuery('#search_text').val('');"), 
>  _method="GET",_action=url) 
>
> return form 
>
> def search_query(tableid,search_text,fields): 
> words= search_text.split(' ') if search_text else [] 
> query=tableid<0#empty query 
> for field in fields: 
> new_query=tableid>0 
> for word in words: 
> new_query=new_query&field.contains(word) 
> query=query|new_query 
> return query 
>
> Then in the function that has the sqlform.grid call, before the call 
> add 
>
> search_text=request.get_vars.search_text 
> query=search_query(db.tablea.id,search_text, 
> [db.tablea.fielda,db.tablea.fieldb]) 
> ... 
> # the query could now be combined with other queries. 
>
> table=SQLFORM.grid(query, search_widget=search_form) 
>
> return dict(table=table) 
>
>
>
>
>
>
>
>
>

[web2py] Re: Row objects always throw me

2012-04-16 Thread Lewis
Thanks.   Certainly the documentation.  I'll give some thought to whether 
there is some other behavior.

Now I have a deeper problem:

 currval of sequence "pending_id_seq" is 
not yet defined in this session

This refers to the id field.   I'll change the model and go out to pgadmin 
and manually delete the table. Then, I'll put the defintion back in the 
model so that DAL can create a clean table.

On Monday, April 16, 2012 5:42:53 PM UTC-7, Anthony wrote:
>
> I think I am trying to do something very simple, but I don't understand 
>> row objects (why can't they be a normal Python type instead of a web2py 
>> class?).
>
>
> It acts like a dictionary, but you can do row.field instead of having to 
> do row['field']. It also has a way of storing and returning the value of 
> expressions requested in the query, and it includes special lambda 
> functions to update and delete the record. You can't do any of that with a 
> normal Python type. If you want a plain dict, just do row.as_dict().
>
> Regarding your code, the problem is that you are working with a Rows 
> object, not a Row object. The select() method returns a Rows object, which 
> acts like a list of Row objects (even if it only returns one row). From the 
> book (with regard to the select method):
>
> It returns an iterable object of class gluon.sql.Rows whose elements are 
>> Row objects. gluon.sql.Row objects act like dictionaries, but their 
>> elements can also be accessed as attributes, like gluon.storage.Storage. 
>> The former differ from the latter because its values are readonly.
>
>
> If you want to extract the first row from a Rows object, do:
>
> row = db(query).select().first()
>
> To insert into another table:
>
> db.other_table.insert(**row.as_dict())
>  
>
>> The row object and its strangeness is not described very well in the DAL 
>> section of the book.  It's too magical.  It's need to be more transparent.
>>
>
> Are you saying we need better documentation (agreed), or that the behavior 
> or Rows and Row objects should change? If the latter, what would you 
> suggest?
>
> Anthony
>


[web2py] Re: Row objects always throw me

2012-04-16 Thread Anthony

>
> I think I am trying to do something very simple, but I don't understand 
> row objects (why can't they be a normal Python type instead of a web2py 
> class?).


It acts like a dictionary, but you can do row.field instead of having to do 
row['field']. It also has a way of storing and returning the value of 
expressions requested in the query, and it includes special lambda 
functions to update and delete the record. You can't do any of that with a 
normal Python type. If you want a plain dict, just do row.as_dict().

Regarding your code, the problem is that you are working with a Rows 
object, not a Row object. The select() method returns a Rows object, which 
acts like a list of Row objects (even if it only returns one row). From the 
book (with regard to the select method):

It returns an iterable object of class gluon.sql.Rows whose elements are 
> Row objects. gluon.sql.Row objects act like dictionaries, but their 
> elements can also be accessed as attributes, like gluon.storage.Storage. 
> The former differ from the latter because its values are readonly.


If you want to extract the first row from a Rows object, do:

row = db(query).select().first()

To insert into another table:

db.other_table.insert(**row.as_dict())
 

> The row object and its strangeness is not described very well in the DAL 
> section of the book.  It's too magical.  It's need to be more transparent.
>

Are you saying we need better documentation (agreed), or that the behavior 
or Rows and Row objects should change? If the latter, what would you 
suggest?

Anthony


[web2py] Re: auth.settings.create_user_groups and auth.settings.registration_requires_verification in Auth

2012-04-16 Thread Anthony

>
> You may comment out the line: auth.settings.create_user_groups = False if 
> you're getting the table-not-exist error and that should fix it.
>
> As you can see above, I also setup the email account credentials (though 
> dummy ones in the code above) in the model, and have tested those 
> credentials against actual Gmail login. I have not explicitly tested it 
> using Web2py, but expect them to work given the description in the manual. 
> Thanks!
>

Sorry, I can't reproduce either problem. I put your exact code in a fresh 
app and didn't get either error using SQLite. You named the group table 
"user_group", so I don't know why you would get an error saying the 
"auth_group" table doesn't exist -- the Auth code never refers directly to 
that name except when setting the default value of 
settings.table_group_name (which you have overridden). So, you should only 
get that error if auth.settings.table_group_name is somehow being changed 
to "auth_group" after the table definitions but before the auth.add_group() 
call.

Also, don't do:

auth.add_group('students', 'students')
auth.add_group('teachers', 'teachers')

That will keep creating new "students" and "teachers" groups on every 
request. You have to check to see if the groups are there, and only add 
them if they're not. But that's not efficient because it will still happen 
on every request -- so instead, you should probably just add these groups 
once outside your app code.

As for email, it works fine for me when I use my Gmail credentials. There 
must be something wrong with your configuration. To play around with it, 
trying opening a web2py shell:

python web2py.py -S yourapp -M -N

In the shell, you can access the "mail" object defined in the model and 
trying sending a test email:

mail.send(to='someaddr...@gmail.com', message='test')

(The email address should be a valid address you can access.) If it prints 
an error and returns False, there's something wrong with your email 
configuration. You can play around with it by directly changing 
mail.sender, mail.server, and mail.login in the shell and trying again.

Anthony



[web2py] Row objects always throw me

2012-04-16 Thread Lewis
I think I am trying to do something very simple, but I don't understand row 
objects (why can't they be a normal Python type instead of a web2py class?).

I have gotten this error no matter what I try:  
 insert() takes exactly 1 argument (2 given)

All I want to do is retrieve a row from one table in one db and insert it 
into an identical table in another db just one row at a time.

Here are several attempts, all of which result in the above error:

1.   row = jodb.pending.insert( 
jodb(jodb.joke.id==jokenum).select().as_list())

2. row =  jodb(jodb.joke.id==jokenum).select()
jodb.pending.insert(row)

I have tried using jodb.pending.insert(**row) whch also does not work.

I have tried select().as_dict() which also does not work.

Every time i try to do something with a row object I have to do something 
like  row[0]['field'].

The row object and its strangeness is not described very well in the DAL 
section of the book.  It's too magical.  It's need to be more transparent.




[web2py] Linode Nodebalancer

2012-04-16 Thread Bruce Wade
Hi,

Does any one have experience using Linode's nodebalancer with web2py based
applications?

-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com


[web2py] Re: auth.settings.create_user_groups and auth.settings.registration_requires_verification in Auth

2012-04-16 Thread cyan

Hi Anthony,

Thanks for looking into this.

The model code I am using is as follows:


## use PostgreSQL on localhost

db = DAL("postgres://cyan:123456@localhost:5432/mydb")

#
## web2py authentication utilities ##
#
from gluon.tools import Auth
auth = Auth(db, hmac_key=Auth.get_or_create_key())

## configure email
mail = auth.settings.mailer
mail.settings.server = 'smtp.gmail.com:587'
mail.settings.sender = 'login.n...@gmail.com'
mail.settings.login = 'login.name:123456'

## for the use of reCAPTCHA (with publicly visible site only)
#auth.settings.captcha = Recaptcha(request, 'PUBLIC_KEY', 'PRIVATE_KEY', 
option="theme:'clean', lang:'en'")

## re-name the authentication tables
auth.settings.table_user_name = "user_login"
auth.settings.table_group_name = "user_group"
auth.settings.table_membership_name = "user_membership"
auth.settings.table_permission_name = "user_permission"
auth.settings.table_event_name = "user_event"

## disable the default group creation behavior upon each user creation
auth.settings.create_user_groups = False

## turn on email verification upon registration and pwd reset
auth.settings.registration_requires_verification = True
auth.settings.reset_password_requires_verification = True
auth.settings.registration_requires_approval = False

## set the content of the verification email
auth.messages.verify_email = 'Please click on the link: http://' + \
request.env.http_host + \ URL(r=request,c='account',f='verify_email') + \
'/%(key)s to verify your email address'

## create all tables needed by Auth
auth.define_tables()

## customize the Auth tables
## abandon (but not remove) 'first_name' and 'last_name' from user_login 
table
db.user_login.first_name.writable = db.user_login.last_name.writable = False
db.user_login.first_name.readable = db.user_login.last_name.readable = False

## set the email requirement
db.user_login.email.requires = [IS_NOT_EMPTY(), IS_EMAIL(forced='^.*\.edu
(|\..*)$', error_message='Email must be .edu address'),IS_NOT_IN_DB(db, 
'user_login.email')]

## set the password requirement
db.user_login.password.requires = [IS_NOT_EMPTY(), IS_STRONG(min=7, special=
0, upper=0, number=0, error_message='Minimum 7 characters'), CRYPT()]

## setup the user group structure
auth.add_group('students', 'students')
auth.add_group('teachers', 'teachers')


##
## Custom DB tables ##
##
db.define_table('student', Field('login_id', db.user_login, 
readable=False,writable
=False), Field('first_name', length=128, required=True), 
Field('last_name',length
=128, required=True), Field('sex', required=True), Field('dob', 'date'), 
Field('country'), format='%(first_name)s %(last_name)s')

db.participant.sex.requires = IS_IN_SET(['male','female'])
db.participant.country.requires = IS_IN_SET(['United States','United 
Kingdom'])
db.participant.login_id.requires = IS_IN_DB(db, db.user_login.id, 
'%(email)s')


You may comment out the line: auth.settings.create_user_groups = False if 
you're getting the table-not-exist error and that should fix it.

As you can see above, I also setup the email account credentials (though 
dummy ones in the code above) in the model, and have tested those 
credentials against actual Gmail login. I have not explicitly tested it 
using Web2py, but expect them to work given the description in the manual. 
Thanks!

On Monday, April 16, 2012 6:39:43 PM UTC-4, Anthony wrote:
>
> 1. when I set *auth.settings.create_user_groups = False*, I suspect that 
>> 'auth_group' table is not created at all after calling 
>> 'auth.define_tables()'. Because if I do a 'auth.add_group(...)' after 
>> 'auth.define_tables()' in a model file, web2py will throw error saying that 
>> 'auth_group' table does not exist when trying to do the insert. However, if 
>> I leave *auth.settings.create_user_groups = True *(by default),  no such 
>> error is thrown. If this is the case, I wonder why. Surely, I would still 
>> want the table 'auth_group' created even if I don't want a new group 
>> created for each new user.
>>
>
> I can't reproduce this problem with a fresh app using SQLite. Can you show 
> the exact code you're using?
>  
>
>>
>> 2. according to the manual, if we set 
>> *auth.settings.registration_requires_verification 
>> = True*, then an email will be sent to the user when she registers. I 
>> set it True, but nothing is sent after a user is registered.
>>
>
> Have you configured the mailer with your mail account credentials and 
> confirmed that it works?
>
> Anthony
>
>>

[web2py] Re: auth.settings.create_user_groups and auth.settings.registration_requires_verification in Auth

2012-04-16 Thread Anthony

>
> 1. when I set *auth.settings.create_user_groups = False*, I suspect that 
> 'auth_group' table is not created at all after calling 
> 'auth.define_tables()'. Because if I do a 'auth.add_group(...)' after 
> 'auth.define_tables()' in a model file, web2py will throw error saying that 
> 'auth_group' table does not exist when trying to do the insert. However, if 
> I leave *auth.settings.create_user_groups = True *(by default),  no such 
> error is thrown. If this is the case, I wonder why. Surely, I would still 
> want the table 'auth_group' created even if I don't want a new group 
> created for each new user.
>

I can't reproduce this problem with a fresh app using SQLite. Can you show 
the exact code you're using?
 

>
> 2. according to the manual, if we set 
> *auth.settings.registration_requires_verification 
> = True*, then an email will be sent to the user when she registers. I set 
> it True, but nothing is sent after a user is registered.
>

Have you configured the mailer with your mail account credentials and 
confirmed that it works?

Anthony

>

[web2py] auth.settings.create_user_groups and auth.settings.registration_requires_verification in Auth

2012-04-16 Thread cyan

Hi group,

Two questions relating to two Auth settings:

1. when I set *auth.settings.create_user_groups = False*, I suspect that 
'auth_group' table is not created at all after calling 
'auth.define_tables()'. Because if I do a 'auth.add_group(...)' after 
'auth.define_tables()' in a model file, web2py will throw error saying that 
'auth_group' table does not exist when trying to do the insert. However, if 
I leave *auth.settings.create_user_groups = True *(by default),  no such 
error is thrown. If this is the case, I wonder why. Surely, I would still 
want the table 'auth_group' created even if I don't want a new group 
created for each new user.

2. according to the manual, if we set 
*auth.settings.registration_requires_verification 
= True*, then an email will be sent to the user when she registers. I set 
it True, but nothing is sent after a user is registered. By registration, I 
mean the user fills out the register form exposed by Auth, clicks on the 
'register' button, and gets re-directed to a separate page. I've checked in 
the database and the user details are indeed in 'auth_user' table. However, 
no email is sent, yet no error appears to have been thrown. Do I need to do 
something extra in model or controller? I also wonder if I should look 
deeper to make sure that this service not blocked by firewall on my machine 
etc, but it's not clear to me where I should start looking. Does Web2py 
retain a log for each running application somewhere, or this is done by 
inserting debugging code manually? If the latter case, where should I put 
the debugging/logging code to track down what went wrong when sending the 
verification emails?

Many thanks!


[web2py] Re: uploads doesn't get cleaned up

2012-04-16 Thread Anthony
On Monday, April 16, 2012 2:20:03 PM UTC-4, Massimo Di Pierro wrote:
>
> I think it does both. It not, it is a bug.
>

I just tried it, and you're right -- it does delete the old file on update. 
Was that fixed recently, or has it always worked that way? I thought I 
remembered it not working at some point in the past.

Anthony 


Re: [web2py] Admin not saving data

2012-04-16 Thread Bruce Wade
I don't think so as that would probably cause other saves/updates to fail?

On Mon, Apr 16, 2012 at 11:42 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> Could it be permission on file in your prod server (or the failing server)?
>
> Richard
>
> On Mon, Apr 16, 2012 at 2:36 PM, Bruce Wade  wrote:
>
>> 1.99.7 and it worked on my old server where I had code and database on
>> the same server. Now that I moved database to a different server it doesn't
>> work.
>>
>>
>> On Mon, Apr 16, 2012 at 11:35 AM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> You mean the appadmin controller is not working properly on update!
>>>
>>> Sound like something broke with last version update...
>>>
>>> Which version are you using? Not trunk?
>>>
>>> Richard
>>>
>>>
>>> On Mon, Apr 16, 2012 at 2:18 PM, Bruce Wade wrote:
>>>
 There is no problem with the database, I can view all the details, I
 can use the client facing side to update everything/login etc just the
 admin database administration app doesn't save when I make a change.


 On Mon, Apr 16, 2012 at 10:02 AM, Richard Vézina <
 ml.richard.vez...@gmail.com> wrote:

> Ok, in that case, I think you will have to make sure that your prod
> database is not corrupted... Can you access database with an other client
> then web2py? pg admin 3 maybe if you use postgres...
>
> Then you can try to drop value in auth_user and insert your local dev
> values instead, so It will restore your actual user and password...
>
> Maybe you can just drop your admin user I guest, if not use in any
> relation, it should work, or you will have to drop cascade.
>
> In that latter case, I would restore the entire database.
>
> Richard
>
>
>
> On Mon, Apr 16, 2012 at 12:18 PM, Bruce Wade wrote:
>
>> I can log into admin and update code files. I can not update anything
>> in the database. I guess I should have been more clear.
>>  On Apr 16, 2012 8:36 AM, "Richard Vézina" <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> Ok, maybe you run in the same problem I had in the pass.
>>>
>>> Did you update web2py like this : rm -Rf web2py/
>>>
>>> Or something like that?
>>>
>>> If so, you maybe have deleted parameters_443.py file contained in
>>> the web2py root.
>>>
>>> This file contain an encrypted copy of your password where web2py
>>> look to confirm your password or initialize web2py environnement à boot 
>>> up.
>>>
>>> So, if you have backup you web2py older installation, you may copy
>>> back this file and it should restore your precedent password.
>>>
>>> If you have deleted you older installation. What you can do is, to
>>> create a new parameter_443.py, in a local staging (I mean you should 
>>> setup
>>> a local prod web2py setup, with the web2py installation script) 
>>> deployment
>>> environnement and copy the generated parameter file in your prod web2py
>>> root folder. There is maybe an other way to do it with the dev web 
>>> server,
>>> I don't know.
>>>
>>> You also can search the web2py mailing list thread with
>>> parameters_443, and you will find other ressource for sure.
>>>
>>> Hopes it help!
>>>
>>> Richard
>>>
>>> On Mon, Apr 16, 2012 at 11:23 AM, Bruce Wade 
>>> wrote:
>>>
 My issue isn't solved. I wish. I was saying your password issue
 with the error message None is solved with a new version. Admin is 
 useless
 for me right now in production as I can't update anything with it.


 On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina <
 ml.richard.vez...@gmail.com> wrote:

> Yeah, maybe, in dev I use pretty simple password so, maybe there
> is constrain about that.
>
> All right if your issue is solved.
>
> Richard
>
>
> On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade  > wrote:
>
>> The None is because you are not meeting the password
>> requirements. That error message has been fixed in 1.99.7 release.
>>
>> My issue saves local but doesn't save any changes on my server
>> where my database server is on a separate computer, and there is no 
>> error
>> messages.
>>
>>
>> On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> With the dev web server when I submit the form I get a none
>>> under the first new password field with 1.99.4 version. It is not 
>>> changing
>>> the password. I precise that I set the password in the launching 
>>> web2py
>>> box. In that case the password maybe unchangable.
>>>
>>> Richard
>>>
>>>

Re: [web2py] Re: Get email on ticket creation

2012-04-16 Thread Richard Vézina
Massimo also write a ticket management app here :

http://code.google.com/p/web2py-issuetracker/

Or here :

https://github.com/mdipierro/web2py-appliances/tree/master/IssueTracker

Don't know if there is one more up to date.

But you suppose to be able to configure it so the app collect ticket from
other app...

Richard

On Sat, Apr 14, 2012 at 9:53 PM, Anthony  wrote:

> On Saturday, April 14, 2012 7:33:19 PM UTC-4, howesc wrote:
>>
>> CAVEAT: i'm using routes.py NOT router.py.not sure if that changes
>> the syntax
>
>
> There's no such thing as router.py -- routes always go in routes.py
> (whether using the parameter-based or pattern-based systems).
> Unfortunately, the example file for the parameter-based system is named "
> router.example.py", which is confusing. Massimo doesn't want to rename it
> until the next book edition, though, as the book refers to the current name.
>
> Anthony
>


Re: [web2py] Admin not saving data

2012-04-16 Thread Richard Vézina
Could it be permission on file in your prod server (or the failing server)?

Richard

On Mon, Apr 16, 2012 at 2:36 PM, Bruce Wade  wrote:

> 1.99.7 and it worked on my old server where I had code and database on the
> same server. Now that I moved database to a different server it doesn't
> work.
>
>
> On Mon, Apr 16, 2012 at 11:35 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> You mean the appadmin controller is not working properly on update!
>>
>> Sound like something broke with last version update...
>>
>> Which version are you using? Not trunk?
>>
>> Richard
>>
>>
>> On Mon, Apr 16, 2012 at 2:18 PM, Bruce Wade  wrote:
>>
>>> There is no problem with the database, I can view all the details, I can
>>> use the client facing side to update everything/login etc just the
>>> admin database administration app doesn't save when I make a change.
>>>
>>>
>>> On Mon, Apr 16, 2012 at 10:02 AM, Richard Vézina <
>>> ml.richard.vez...@gmail.com> wrote:
>>>
 Ok, in that case, I think you will have to make sure that your prod
 database is not corrupted... Can you access database with an other client
 then web2py? pg admin 3 maybe if you use postgres...

 Then you can try to drop value in auth_user and insert your local dev
 values instead, so It will restore your actual user and password...

 Maybe you can just drop your admin user I guest, if not use in any
 relation, it should work, or you will have to drop cascade.

 In that latter case, I would restore the entire database.

 Richard



 On Mon, Apr 16, 2012 at 12:18 PM, Bruce Wade wrote:

> I can log into admin and update code files. I can not update anything
> in the database. I guess I should have been more clear.
>  On Apr 16, 2012 8:36 AM, "Richard Vézina" <
> ml.richard.vez...@gmail.com> wrote:
>
>> Ok, maybe you run in the same problem I had in the pass.
>>
>> Did you update web2py like this : rm -Rf web2py/
>>
>> Or something like that?
>>
>> If so, you maybe have deleted parameters_443.py file contained in the
>> web2py root.
>>
>> This file contain an encrypted copy of your password where web2py
>> look to confirm your password or initialize web2py environnement à boot 
>> up.
>>
>> So, if you have backup you web2py older installation, you may copy
>> back this file and it should restore your precedent password.
>>
>> If you have deleted you older installation. What you can do is, to
>> create a new parameter_443.py, in a local staging (I mean you should 
>> setup
>> a local prod web2py setup, with the web2py installation script) 
>> deployment
>> environnement and copy the generated parameter file in your prod web2py
>> root folder. There is maybe an other way to do it with the dev web 
>> server,
>> I don't know.
>>
>> You also can search the web2py mailing list thread with
>> parameters_443, and you will find other ressource for sure.
>>
>> Hopes it help!
>>
>> Richard
>>
>> On Mon, Apr 16, 2012 at 11:23 AM, Bruce Wade wrote:
>>
>>> My issue isn't solved. I wish. I was saying your password issue with
>>> the error message None is solved with a new version. Admin is useless 
>>> for
>>> me right now in production as I can't update anything with it.
>>>
>>>
>>> On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina <
>>> ml.richard.vez...@gmail.com> wrote:
>>>
 Yeah, maybe, in dev I use pretty simple password so, maybe there is
 constrain about that.

 All right if your issue is solved.

 Richard


 On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade 
 wrote:

> The None is because you are not meeting the password requirements.
> That error message has been fixed in 1.99.7 release.
>
> My issue saves local but doesn't save any changes on my server
> where my database server is on a separate computer, and there is no 
> error
> messages.
>
>
> On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> With the dev web server when I submit the form I get a none under
>> the first new password field with 1.99.4 version. It is not changing 
>> the
>> password. I precise that I set the password in the launching web2py 
>> box. In
>> that case the password maybe unchangable.
>>
>> Richard
>>
>>
>> On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade > > wrote:
>>
>>> Hi,
>>>
>>> Having a strange problem. When using admin database
>>> administration and trying to update my password when I click save it
>>> refreshes the page without any errors 

Re: [web2py] Admin not saving data

2012-04-16 Thread Bruce Wade
1.99.7 and it worked on my old server where I had code and database on the
same server. Now that I moved database to a different server it doesn't
work.

On Mon, Apr 16, 2012 at 11:35 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> You mean the appadmin controller is not working properly on update!
>
> Sound like something broke with last version update...
>
> Which version are you using? Not trunk?
>
> Richard
>
>
> On Mon, Apr 16, 2012 at 2:18 PM, Bruce Wade  wrote:
>
>> There is no problem with the database, I can view all the details, I can
>> use the client facing side to update everything/login etc just the
>> admin database administration app doesn't save when I make a change.
>>
>>
>> On Mon, Apr 16, 2012 at 10:02 AM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> Ok, in that case, I think you will have to make sure that your prod
>>> database is not corrupted... Can you access database with an other client
>>> then web2py? pg admin 3 maybe if you use postgres...
>>>
>>> Then you can try to drop value in auth_user and insert your local dev
>>> values instead, so It will restore your actual user and password...
>>>
>>> Maybe you can just drop your admin user I guest, if not use in any
>>> relation, it should work, or you will have to drop cascade.
>>>
>>> In that latter case, I would restore the entire database.
>>>
>>> Richard
>>>
>>>
>>>
>>> On Mon, Apr 16, 2012 at 12:18 PM, Bruce Wade wrote:
>>>
 I can log into admin and update code files. I can not update anything
 in the database. I guess I should have been more clear.
  On Apr 16, 2012 8:36 AM, "Richard Vézina" 
 wrote:

> Ok, maybe you run in the same problem I had in the pass.
>
> Did you update web2py like this : rm -Rf web2py/
>
> Or something like that?
>
> If so, you maybe have deleted parameters_443.py file contained in the
> web2py root.
>
> This file contain an encrypted copy of your password where web2py look
> to confirm your password or initialize web2py environnement à boot up.
>
> So, if you have backup you web2py older installation, you may copy
> back this file and it should restore your precedent password.
>
> If you have deleted you older installation. What you can do is, to
> create a new parameter_443.py, in a local staging (I mean you should setup
> a local prod web2py setup, with the web2py installation script) deployment
> environnement and copy the generated parameter file in your prod web2py
> root folder. There is maybe an other way to do it with the dev web server,
> I don't know.
>
> You also can search the web2py mailing list thread with
> parameters_443, and you will find other ressource for sure.
>
> Hopes it help!
>
> Richard
>
> On Mon, Apr 16, 2012 at 11:23 AM, Bruce Wade wrote:
>
>> My issue isn't solved. I wish. I was saying your password issue with
>> the error message None is solved with a new version. Admin is useless for
>> me right now in production as I can't update anything with it.
>>
>>
>> On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> Yeah, maybe, in dev I use pretty simple password so, maybe there is
>>> constrain about that.
>>>
>>> All right if your issue is solved.
>>>
>>> Richard
>>>
>>>
>>> On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade 
>>> wrote:
>>>
 The None is because you are not meeting the password requirements.
 That error message has been fixed in 1.99.7 release.

 My issue saves local but doesn't save any changes on my server
 where my database server is on a separate computer, and there is no 
 error
 messages.


 On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
 ml.richard.vez...@gmail.com> wrote:

> With the dev web server when I submit the form I get a none under
> the first new password field with 1.99.4 version. It is not changing 
> the
> password. I precise that I set the password in the launching web2py 
> box. In
> that case the password maybe unchangable.
>
> Richard
>
>
> On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade 
> wrote:
>
>> Hi,
>>
>> Having a strange problem. When using admin database
>> administration and trying to update my password when I click save it
>> refreshes the page without any errors but also doesn't save the 
>> password.
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.fittraineronline.com - Fitness Personal Trainers
>> Online
>> http://www.warplydesigned.com

Re: [web2py] Admin not saving data

2012-04-16 Thread Richard Vézina
You mean the appadmin controller is not working properly on update!

Sound like something broke with last version update...

Which version are you using? Not trunk?

Richard

On Mon, Apr 16, 2012 at 2:18 PM, Bruce Wade  wrote:

> There is no problem with the database, I can view all the details, I can
> use the client facing side to update everything/login etc just the
> admin database administration app doesn't save when I make a change.
>
>
> On Mon, Apr 16, 2012 at 10:02 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Ok, in that case, I think you will have to make sure that your prod
>> database is not corrupted... Can you access database with an other client
>> then web2py? pg admin 3 maybe if you use postgres...
>>
>> Then you can try to drop value in auth_user and insert your local dev
>> values instead, so It will restore your actual user and password...
>>
>> Maybe you can just drop your admin user I guest, if not use in any
>> relation, it should work, or you will have to drop cascade.
>>
>> In that latter case, I would restore the entire database.
>>
>> Richard
>>
>>
>>
>> On Mon, Apr 16, 2012 at 12:18 PM, Bruce Wade wrote:
>>
>>> I can log into admin and update code files. I can not update anything in
>>> the database. I guess I should have been more clear.
>>>  On Apr 16, 2012 8:36 AM, "Richard Vézina" 
>>> wrote:
>>>
 Ok, maybe you run in the same problem I had in the pass.

 Did you update web2py like this : rm -Rf web2py/

 Or something like that?

 If so, you maybe have deleted parameters_443.py file contained in the
 web2py root.

 This file contain an encrypted copy of your password where web2py look
 to confirm your password or initialize web2py environnement à boot up.

 So, if you have backup you web2py older installation, you may copy back
 this file and it should restore your precedent password.

 If you have deleted you older installation. What you can do is, to
 create a new parameter_443.py, in a local staging (I mean you should setup
 a local prod web2py setup, with the web2py installation script) deployment
 environnement and copy the generated parameter file in your prod web2py
 root folder. There is maybe an other way to do it with the dev web server,
 I don't know.

 You also can search the web2py mailing list thread with parameters_443,
 and you will find other ressource for sure.

 Hopes it help!

 Richard

 On Mon, Apr 16, 2012 at 11:23 AM, Bruce Wade wrote:

> My issue isn't solved. I wish. I was saying your password issue with
> the error message None is solved with a new version. Admin is useless for
> me right now in production as I can't update anything with it.
>
>
> On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Yeah, maybe, in dev I use pretty simple password so, maybe there is
>> constrain about that.
>>
>> All right if your issue is solved.
>>
>> Richard
>>
>>
>> On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade wrote:
>>
>>> The None is because you are not meeting the password requirements.
>>> That error message has been fixed in 1.99.7 release.
>>>
>>> My issue saves local but doesn't save any changes on my server where
>>> my database server is on a separate computer, and there is no error
>>> messages.
>>>
>>>
>>> On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
>>> ml.richard.vez...@gmail.com> wrote:
>>>
 With the dev web server when I submit the form I get a none under
 the first new password field with 1.99.4 version. It is not changing 
 the
 password. I precise that I set the password in the launching web2py 
 box. In
 that case the password maybe unchangable.

 Richard


 On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade 
 wrote:

> Hi,
>
> Having a strange problem. When using admin database administration
> and trying to update my password when I click save it refreshes the 
> page
> without any errors but also doesn't save the password.
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>

>>>
>>>
>>> --
>>> --
>>> Regards,
>>> Bruce Wade
>>> http://ca.linkedin.com/in/brucelwade
>>> http://www.wadecybertech.com
>>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>>> http://www.warplydesigned.com
>>>
>>>
>>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin

[web2py] Re: uploads doesn't get cleaned up

2012-04-16 Thread Massimo Di Pierro
I think it does both. It not, it is a bug.

On Monday, 16 April 2012 10:27:20 UTC-5, Anthony wrote:
>
> web2py does not like to delete files unless it is told to do so. You can do
>>
>> Field('avatar','upload',autodelete=True)
>>
>> This should work as you expect.
>>
>
> I could be wrong, but if I recall correctly, autodelete only deletes the 
> file when the record is deleted, but not when the record is merely updated 
> with a new file. It should probably do both.
>
> Anthony 
>


[web2py] Re: Getting https to work with rocket

2012-04-16 Thread Ross Peoples
You can't connect to https using http as the protocol. Getting a "bad 
request" message is exactly what happens when you try. So in your browser, 
you need to specifically type https://:3.

On Monday, April 16, 2012 1:42:06 PM UTC-4, Shivakumar GN wrote:
>
> Hi,
>
> I am using python 2.5 on Solaris and web2py 1.99.7
>
> I am trying to get https to work with in built web server as per recipe at 
> below link.
> http://www.web2py.com/AlterEgo/default/show/140
>
> I built ssl module built from source since it was missing in python 2.5
>
> > python web2py.py --nogui -i  -p 3 -c server.crt -k 
> server.key
>
> After this, there is no service available via https. On using http, a "bad 
> request" message appears in the browser.
>
> This seems similar to issue reported long back, the discussion thread for 
> which doesn't seem to have reached a closure.
> http://comments.gmane.org/gmane.comp.python.web2py/46045
>
> How to resolve this?
>
> thanks & best regards
> Shivakumar GN
>
>

Re: [web2py] Admin not saving data

2012-04-16 Thread Bruce Wade
There is no problem with the database, I can view all the details, I can
use the client facing side to update everything/login etc just the
admin database administration app doesn't save when I make a change.

On Mon, Apr 16, 2012 at 10:02 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> Ok, in that case, I think you will have to make sure that your prod
> database is not corrupted... Can you access database with an other client
> then web2py? pg admin 3 maybe if you use postgres...
>
> Then you can try to drop value in auth_user and insert your local dev
> values instead, so It will restore your actual user and password...
>
> Maybe you can just drop your admin user I guest, if not use in any
> relation, it should work, or you will have to drop cascade.
>
> In that latter case, I would restore the entire database.
>
> Richard
>
>
>
> On Mon, Apr 16, 2012 at 12:18 PM, Bruce Wade  wrote:
>
>> I can log into admin and update code files. I can not update anything in
>> the database. I guess I should have been more clear.
>>  On Apr 16, 2012 8:36 AM, "Richard Vézina" 
>> wrote:
>>
>>> Ok, maybe you run in the same problem I had in the pass.
>>>
>>> Did you update web2py like this : rm -Rf web2py/
>>>
>>> Or something like that?
>>>
>>> If so, you maybe have deleted parameters_443.py file contained in the
>>> web2py root.
>>>
>>> This file contain an encrypted copy of your password where web2py look
>>> to confirm your password or initialize web2py environnement à boot up.
>>>
>>> So, if you have backup you web2py older installation, you may copy back
>>> this file and it should restore your precedent password.
>>>
>>> If you have deleted you older installation. What you can do is, to
>>> create a new parameter_443.py, in a local staging (I mean you should setup
>>> a local prod web2py setup, with the web2py installation script) deployment
>>> environnement and copy the generated parameter file in your prod web2py
>>> root folder. There is maybe an other way to do it with the dev web server,
>>> I don't know.
>>>
>>> You also can search the web2py mailing list thread with parameters_443,
>>> and you will find other ressource for sure.
>>>
>>> Hopes it help!
>>>
>>> Richard
>>>
>>> On Mon, Apr 16, 2012 at 11:23 AM, Bruce Wade wrote:
>>>
 My issue isn't solved. I wish. I was saying your password issue with
 the error message None is solved with a new version. Admin is useless for
 me right now in production as I can't update anything with it.


 On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina <
 ml.richard.vez...@gmail.com> wrote:

> Yeah, maybe, in dev I use pretty simple password so, maybe there is
> constrain about that.
>
> All right if your issue is solved.
>
> Richard
>
>
> On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade wrote:
>
>> The None is because you are not meeting the password requirements.
>> That error message has been fixed in 1.99.7 release.
>>
>> My issue saves local but doesn't save any changes on my server where
>> my database server is on a separate computer, and there is no error
>> messages.
>>
>>
>> On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> With the dev web server when I submit the form I get a none under
>>> the first new password field with 1.99.4 version. It is not changing the
>>> password. I precise that I set the password in the launching web2py 
>>> box. In
>>> that case the password maybe unchangable.
>>>
>>> Richard
>>>
>>>
>>> On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade wrote:
>>>
 Hi,

 Having a strange problem. When using admin database administration
 and trying to update my password when I click save it refreshes the 
 page
 without any errors but also doesn't save the password.

 --
 --
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/brucelwade
 http://www.wadecybertech.com
 http://www.fittraineronline.com - Fitness Personal Trainers Online
 http://www.warplydesigned.com


>>>
>>
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>> http://www.warplydesigned.com
>>
>>
>


 --
 --
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/brucelwade
 http://www.wadecybertech.com
 http://www.fittraineronline.com - Fitness Personal Trainers Online
 http://www.warplydesigned.com


>>>
>


-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com


Re: [web2py] Re: routes.py

2012-04-16 Thread Jonathan Lundell
On Apr 16, 2012, at 10:57 AM, Wikus van de Merwe wrote:
> For this type of routing where you don't use complex regular expressions, it 
> is better to use the simple router.
> It could make selected functions of the default controller in the default 
> application available directly, i.e.
> /f1 == /my_app/default_controller/f1
> 
> To have "/rules" mapped to "/aggat/default/rules", you only need this in your 
> routes.py:
> routers = dict(
> BASE = dict(
> default_application = "aggat",
> functions = ["rules"]
> )
> )

There's actually no need to specify the functions list (and if you do, it's 
important to list all the functions in the default controller):

routers = dict(
BASE = dict(
default_application = "aggat",
)
)


[web2py] IndexError: list index out of range

2012-04-16 Thread Astate
Hello,
 
I have this error the first time i open instant-admin
Traceback (most recent call last): 
File "/home/web2py/gluon/restricted.py", line 205,
 in restricted exec ccode in environment
 File "/home/web2py/applications/webadmin/models/plugin_instant_admin.py", 
line 22,
 in db = databases.values()[0] # Take only one database for now.
 IndexError: list index out of range

i have change plugin_instant_admin.py to remplace "from storage import 
Settings" for from.gluon.storage import Settings I populate data in database
Always same result 
sorry for my bad english 


[web2py] Getting https to work with rocket

2012-04-16 Thread Shivakumar GN
Hi,

I am using python 2.5 on Solaris and web2py 1.99.7

I am trying to get https to work with in built web server as per recipe at 
below link.
http://www.web2py.com/AlterEgo/default/show/140

I built ssl module built from source since it was missing in python 2.5

> python web2py.py --nogui -i  -p 3 -c server.crt -k 
server.key

After this, there is no service available via https. On using http, a "bad 
request" message appears in the browser.

This seems similar to issue reported long back, the discussion thread for 
which doesn't seem to have reached a closure.
http://comments.gmane.org/gmane.comp.python.web2py/46045

How to resolve this?

thanks & best regards
Shivakumar GN



[web2py] Re: routes.py

2012-04-16 Thread Wikus van de Merwe
For this type of routing where you don't use complex regular expressions, 
it is better to use the simple router.
It could make selected functions of the default controller in the default 
application available directly, i.e.
/f1 == /my_app/default_controller/f1

To have "/rules" mapped to "/aggat/default/rules", you only need this in 
your routes.py:
routers = dict(
BASE = dict(
default_application = "aggat",
functions = ["rules"]
)
)



Re: [web2py] ImportError: cannot import name PickleableStorage after upgrading to 1.99.7

2012-04-16 Thread Richard Vézina
Could it be cPickleableStorage now?

2012/4/12 David Zejda 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> After upgrade to 1.99.7. I started receiving this error:
>
> Traceback (most recent call last):
>  File "/opt/web2py/gluon/restricted.py", line 194, in restricted
>in code it raises a RestrictedError containing the traceback. layer is
>  File "/opt/web2py/applications/trom/compiled/models/menu.py", line 3,
> in 
>  File "/opt/web2py/gluon/custom_import.py", line 294, in __call__
>#except Exception, e:
>  File "/opt/web2py/gluon/custom_import.py", line 78, in __call__
>level)
>  File "/opt/web2py/gluon/tools.py", line 28, in 
>from storage import Storage, PickleableStorage, StorageList,
> Settings, Messages
> ImportError: cannot import name PickleableStorage
>
> The error disappeared when I removed PickleableStorage from import in
> tools.
>
> D.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk+GdpQACgkQ3oCkkciamVGuJwCffvSARB7XLeCvNdFqWr5tz/Ag
> 19IAoINWjF4MNIEVBpRU8+8xsMXEAR+c
> =jk/I
> -END PGP SIGNATURE-
>


Re: [web2py] Admin not saving data

2012-04-16 Thread Richard Vézina
Ok, in that case, I think you will have to make sure that your prod
database is not corrupted... Can you access database with an other client
then web2py? pg admin 3 maybe if you use postgres...

Then you can try to drop value in auth_user and insert your local dev
values instead, so It will restore your actual user and password...

Maybe you can just drop your admin user I guest, if not use in any
relation, it should work, or you will have to drop cascade.

In that latter case, I would restore the entire database.

Richard



On Mon, Apr 16, 2012 at 12:18 PM, Bruce Wade  wrote:

> I can log into admin and update code files. I can not update anything in
> the database. I guess I should have been more clear.
> On Apr 16, 2012 8:36 AM, "Richard Vézina" 
> wrote:
>
>> Ok, maybe you run in the same problem I had in the pass.
>>
>> Did you update web2py like this : rm -Rf web2py/
>>
>> Or something like that?
>>
>> If so, you maybe have deleted parameters_443.py file contained in the
>> web2py root.
>>
>> This file contain an encrypted copy of your password where web2py look to
>> confirm your password or initialize web2py environnement à boot up.
>>
>> So, if you have backup you web2py older installation, you may copy back
>> this file and it should restore your precedent password.
>>
>> If you have deleted you older installation. What you can do is, to create
>> a new parameter_443.py, in a local staging (I mean you should setup a local
>> prod web2py setup, with the web2py installation script) deployment
>> environnement and copy the generated parameter file in your prod web2py
>> root folder. There is maybe an other way to do it with the dev web server,
>> I don't know.
>>
>> You also can search the web2py mailing list thread with parameters_443,
>> and you will find other ressource for sure.
>>
>> Hopes it help!
>>
>> Richard
>>
>> On Mon, Apr 16, 2012 at 11:23 AM, Bruce Wade wrote:
>>
>>> My issue isn't solved. I wish. I was saying your password issue with the
>>> error message None is solved with a new version. Admin is useless for me
>>> right now in production as I can't update anything with it.
>>>
>>>
>>> On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina <
>>> ml.richard.vez...@gmail.com> wrote:
>>>
 Yeah, maybe, in dev I use pretty simple password so, maybe there is
 constrain about that.

 All right if your issue is solved.

 Richard


 On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade wrote:

> The None is because you are not meeting the password requirements.
> That error message has been fixed in 1.99.7 release.
>
> My issue saves local but doesn't save any changes on my server where
> my database server is on a separate computer, and there is no error
> messages.
>
>
> On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> With the dev web server when I submit the form I get a none under the
>> first new password field with 1.99.4 version. It is not changing the
>> password. I precise that I set the password in the launching web2py box. 
>> In
>> that case the password maybe unchangable.
>>
>> Richard
>>
>>
>> On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade wrote:
>>
>>> Hi,
>>>
>>> Having a strange problem. When using admin database administration
>>> and trying to update my password when I click save it refreshes the page
>>> without any errors but also doesn't save the password.
>>>
>>> --
>>> --
>>> Regards,
>>> Bruce Wade
>>> http://ca.linkedin.com/in/brucelwade
>>> http://www.wadecybertech.com
>>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>>> http://www.warplydesigned.com
>>>
>>>
>>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>

>>>
>>>
>>> --
>>> --
>>> Regards,
>>> Bruce Wade
>>> http://ca.linkedin.com/in/brucelwade
>>> http://www.wadecybertech.com
>>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>>> http://www.warplydesigned.com
>>>
>>>
>>


[web2py] Re: DAL IMAP errors

2012-04-16 Thread Alan Etkin
I think it probably will, since replacing anything with "_" would set 
compatible table name strings.

There's one caveat:

"abc[something]def" mapping will overwrite the "abc/something/def", so you 
cannot have both folders in your mail account.

Although the case is very uneven, perhaps a combined replacement could be 
performed with [ and ] and spacing mapping to different symbols.

El lunes, 16 de abril de 2012 01:25:43 UTC-3, Massimo Di Pierro escribió:
>
> Will the proposed solution solve the problem?
>
> replace mailbox_name = mailbox.replace("[", "").replace("]", "").replace("/", 
> "_")
>
> with
>
> mailbox_name = re.sub('[^_\w]','',re.sub('[/ ]','_',mailbox))
>
>
>
> On Sunday, 15 April 2012 18:40:29 UTC-5, Alan Etkin wrote:
>>
>> Not fixed yet in trunk. There is a regex replacement proposal in the 
>> issue page by Massimo.
>>
>> El sábado, 14 de abril de 2012 22:44:41 UTC-3, pyhead escribió:
>>>
>>>
>>> Hi web2py users,
>>>
>>> db = DAL('imap://') successfully logs in to the mail server, but fails 
>>> when the commonly used spaces or '.' are returned in a folder name. Is 
>>> there any way to substitute not allowed characters for '_' so imap works?
>>>  only [0-9a-zA-Z_] allowed in table and 
>>> field names, received Gmail_All Mail
>>>
>>> This was reported and was flagged as accepted, so the fix should already 
>>> be in the nightly build, right?
>>> http://code.google.com/p/web2py/issues/detail?id=644
>>>
>>> Please share the recipe if you are successfully using DAL with IMAP.  I 
>>> am developing a web2py email client and this is crucial to its success.  
>>> Thank you!
>>>
>>
>> El sábado, 14 de abril de 2012 22:44:41 UTC-3, pyhead escribió:
>>>
>>>
>>> Hi web2py users,
>>>
>>> db = DAL('imap://') successfully logs in to the mail server, but fails 
>>> when the commonly used spaces or '.' are returned in a folder name. Is 
>>> there any way to substitute not allowed characters for '_' so imap works?
>>>  only [0-9a-zA-Z_] allowed in table and 
>>> field names, received Gmail_All Mail
>>>
>>> This was reported and was flagged as accepted, so the fix should already 
>>> be in the nightly build, right?
>>> http://code.google.com/p/web2py/issues/detail?id=644
>>>
>>> Please share the recipe if you are successfully using DAL with IMAP.  I 
>>> am developing a web2py email client and this is crucial to its success.  
>>> Thank you!
>>>
>>
>> El sábado, 14 de abril de 2012 22:44:41 UTC-3, pyhead escribió:
>>>
>>>
>>> Hi web2py users,
>>>
>>> db = DAL('imap://') successfully logs in to the mail server, but fails 
>>> when the commonly used spaces or '.' are returned in a folder name. Is 
>>> there any way to substitute not allowed characters for '_' so imap works?
>>>  only [0-9a-zA-Z_] allowed in table and 
>>> field names, received Gmail_All Mail
>>>
>>> This was reported and was flagged as accepted, so the fix should already 
>>> be in the nightly build, right?
>>> http://code.google.com/p/web2py/issues/detail?id=644
>>>
>>> Please share the recipe if you are successfully using DAL with IMAP.  I 
>>> am developing a web2py email client and this is crucial to its success.  
>>> Thank you!
>>>
>>

[web2py] Re: lambda v: v.strftime('%d/%m/%Y')

2012-04-16 Thread Annet
Johann, Manuele and Massimo,

Thanks for answering my question.

You're right, the problem was somewhere else, in the line before 
db.Node.createdOn.represent

db.Node.createdOn.requires=IS_DATETIME(str(T('%Y-%m-%d %H:%M:%S')))

This saves without problem:

db.Node.createdOn.requires=IS_DATETIME(format='%Y-%m-%d %H:%M:%S')
db.Node.createdOn.represent = lambda v, row: v.strftime('%d/%m/%Y') 

I don't know what's wrong with the first IS_DATETIME() validator.


Kind regards,

Annet



Re: [web2py] Admin not saving data

2012-04-16 Thread Bruce Wade
I can log into admin and update code files. I can not update anything in
the database. I guess I should have been more clear.
On Apr 16, 2012 8:36 AM, "Richard Vézina" 
wrote:

> Ok, maybe you run in the same problem I had in the pass.
>
> Did you update web2py like this : rm -Rf web2py/
>
> Or something like that?
>
> If so, you maybe have deleted parameters_443.py file contained in the
> web2py root.
>
> This file contain an encrypted copy of your password where web2py look to
> confirm your password or initialize web2py environnement à boot up.
>
> So, if you have backup you web2py older installation, you may copy back
> this file and it should restore your precedent password.
>
> If you have deleted you older installation. What you can do is, to create
> a new parameter_443.py, in a local staging (I mean you should setup a local
> prod web2py setup, with the web2py installation script) deployment
> environnement and copy the generated parameter file in your prod web2py
> root folder. There is maybe an other way to do it with the dev web server,
> I don't know.
>
> You also can search the web2py mailing list thread with parameters_443,
> and you will find other ressource for sure.
>
> Hopes it help!
>
> Richard
>
> On Mon, Apr 16, 2012 at 11:23 AM, Bruce Wade  wrote:
>
>> My issue isn't solved. I wish. I was saying your password issue with the
>> error message None is solved with a new version. Admin is useless for me
>> right now in production as I can't update anything with it.
>>
>>
>> On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> Yeah, maybe, in dev I use pretty simple password so, maybe there is
>>> constrain about that.
>>>
>>> All right if your issue is solved.
>>>
>>> Richard
>>>
>>>
>>> On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade wrote:
>>>
 The None is because you are not meeting the password requirements. That
 error message has been fixed in 1.99.7 release.

 My issue saves local but doesn't save any changes on my server where my
 database server is on a separate computer, and there is no error messages.


 On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
 ml.richard.vez...@gmail.com> wrote:

> With the dev web server when I submit the form I get a none under the
> first new password field with 1.99.4 version. It is not changing the
> password. I precise that I set the password in the launching web2py box. 
> In
> that case the password maybe unchangable.
>
> Richard
>
>
> On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade wrote:
>
>> Hi,
>>
>> Having a strange problem. When using admin database administration
>> and trying to update my password when I click save it refreshes the page
>> without any errors but also doesn't save the password.
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>> http://www.warplydesigned.com
>>
>>
>


 --
 --
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/brucelwade
 http://www.wadecybertech.com
 http://www.fittraineronline.com - Fitness Personal Trainers Online
 http://www.warplydesigned.com


>>>
>>
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>> http://www.warplydesigned.com
>>
>>
>


[web2py] Changing Form View _onclick Radio Button Widget

2012-04-16 Thread D.P. Clark
Hey All,

I'm using the radio button widget in my db.  I'm trying to create a more
dynamic form and view that changes as the user clicks each radio button.  I
don't mind setting up different databases, if necessary, for each form.
 Essentially each time a radio button is clicked, the user needs to be
presented with a different set of instructions and field options.

I can do this in pure JS, but I'm not sure how to accomplish this through
the controller and db in web2py.

Perhaps I should add my JS functions to the view and add the '_onclick'
within the radio widget?  Or can I accomplish this with a custom widget?  I
prefer to handle everything within the controller if it's possible.

Thanks,

D.P.


Re: [web2py] Admin not saving data

2012-04-16 Thread Richard Vézina
Ok, maybe you run in the same problem I had in the pass.

Did you update web2py like this : rm -Rf web2py/

Or something like that?

If so, you maybe have deleted parameters_443.py file contained in the
web2py root.

This file contain an encrypted copy of your password where web2py look to
confirm your password or initialize web2py environnement à boot up.

So, if you have backup you web2py older installation, you may copy back
this file and it should restore your precedent password.

If you have deleted you older installation. What you can do is, to create a
new parameter_443.py, in a local staging (I mean you should setup a local
prod web2py setup, with the web2py installation script) deployment
environnement and copy the generated parameter file in your prod web2py
root folder. There is maybe an other way to do it with the dev web server,
I don't know.

You also can search the web2py mailing list thread with parameters_443, and
you will find other ressource for sure.

Hopes it help!

Richard

On Mon, Apr 16, 2012 at 11:23 AM, Bruce Wade  wrote:

> My issue isn't solved. I wish. I was saying your password issue with the
> error message None is solved with a new version. Admin is useless for me
> right now in production as I can't update anything with it.
>
>
> On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Yeah, maybe, in dev I use pretty simple password so, maybe there is
>> constrain about that.
>>
>> All right if your issue is solved.
>>
>> Richard
>>
>>
>> On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade wrote:
>>
>>> The None is because you are not meeting the password requirements. That
>>> error message has been fixed in 1.99.7 release.
>>>
>>> My issue saves local but doesn't save any changes on my server where my
>>> database server is on a separate computer, and there is no error messages.
>>>
>>>
>>> On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
>>> ml.richard.vez...@gmail.com> wrote:
>>>
 With the dev web server when I submit the form I get a none under the
 first new password field with 1.99.4 version. It is not changing the
 password. I precise that I set the password in the launching web2py box. In
 that case the password maybe unchangable.

 Richard


 On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade wrote:

> Hi,
>
> Having a strange problem. When using admin database administration and
> trying to update my password when I click save it refreshes the page
> without any errors but also doesn't save the password.
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>

>>>
>>>
>>> --
>>> --
>>> Regards,
>>> Bruce Wade
>>> http://ca.linkedin.com/in/brucelwade
>>> http://www.wadecybertech.com
>>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>>> http://www.warplydesigned.com
>>>
>>>
>>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>


[web2py] Re: uploads doesn't get cleaned up

2012-04-16 Thread Anthony

>
> web2py does not like to delete files unless it is told to do so. You can do
>
> Field('avatar','upload',autodelete=True)
>
> This should work as you expect.
>

I could be wrong, but if I recall correctly, autodelete only deletes the 
file when the record is deleted, but not when the record is merely updated 
with a new file. It should probably do both.

Anthony 


Re: [web2py] Admin not saving data

2012-04-16 Thread Bruce Wade
My issue isn't solved. I wish. I was saying your password issue with the
error message None is solved with a new version. Admin is useless for me
right now in production as I can't update anything with it.

On Mon, Apr 16, 2012 at 7:54 AM, Richard Vézina  wrote:

> Yeah, maybe, in dev I use pretty simple password so, maybe there is
> constrain about that.
>
> All right if your issue is solved.
>
> Richard
>
>
> On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade  wrote:
>
>> The None is because you are not meeting the password requirements. That
>> error message has been fixed in 1.99.7 release.
>>
>> My issue saves local but doesn't save any changes on my server where my
>> database server is on a separate computer, and there is no error messages.
>>
>>
>> On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> With the dev web server when I submit the form I get a none under the
>>> first new password field with 1.99.4 version. It is not changing the
>>> password. I precise that I set the password in the launching web2py box. In
>>> that case the password maybe unchangable.
>>>
>>> Richard
>>>
>>>
>>> On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade wrote:
>>>
 Hi,

 Having a strange problem. When using admin database administration and
 trying to update my password when I click save it refreshes the page
 without any errors but also doesn't save the password.

 --
 --
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/brucelwade
 http://www.wadecybertech.com
 http://www.fittraineronline.com - Fitness Personal Trainers Online
 http://www.warplydesigned.com


>>>
>>
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>> http://www.warplydesigned.com
>>
>>
>


-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com


Re: [web2py] Admin not saving data

2012-04-16 Thread Richard Vézina
Yeah, maybe, in dev I use pretty simple password so, maybe there is
constrain about that.

All right if your issue is solved.

Richard

On Mon, Apr 16, 2012 at 10:34 AM, Bruce Wade  wrote:

> The None is because you are not meeting the password requirements. That
> error message has been fixed in 1.99.7 release.
>
> My issue saves local but doesn't save any changes on my server where my
> database server is on a separate computer, and there is no error messages.
>
>
> On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> With the dev web server when I submit the form I get a none under the
>> first new password field with 1.99.4 version. It is not changing the
>> password. I precise that I set the password in the launching web2py box. In
>> that case the password maybe unchangable.
>>
>> Richard
>>
>>
>> On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade  wrote:
>>
>>> Hi,
>>>
>>> Having a strange problem. When using admin database administration and
>>> trying to update my password when I click save it refreshes the page
>>> without any errors but also doesn't save the password.
>>>
>>> --
>>> --
>>> Regards,
>>> Bruce Wade
>>> http://ca.linkedin.com/in/brucelwade
>>> http://www.wadecybertech.com
>>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>>> http://www.warplydesigned.com
>>>
>>>
>>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>


Re: [web2py] Admin not saving data

2012-04-16 Thread Bruce Wade
The None is because you are not meeting the password requirements. That
error message has been fixed in 1.99.7 release.

My issue saves local but doesn't save any changes on my server where my
database server is on a separate computer, and there is no error messages.

On Mon, Apr 16, 2012 at 7:01 AM, Richard Vézina  wrote:

> With the dev web server when I submit the form I get a none under the
> first new password field with 1.99.4 version. It is not changing the
> password. I precise that I set the password in the launching web2py box. In
> that case the password maybe unchangable.
>
> Richard
>
>
> On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade  wrote:
>
>> Hi,
>>
>> Having a strange problem. When using admin database administration and
>> trying to update my password when I click save it refreshes the page
>> without any errors but also doesn't save the password.
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.fittraineronline.com - Fitness Personal Trainers Online
>> http://www.warplydesigned.com
>>
>>
>


-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com


Re: [web2py] Content-type header for HTTP exception incorrectly set ?

2012-04-16 Thread Jonathan Lundell
On Apr 16, 2012, at 7:02 AM, Massimo Di Pierro wrote:
> Shame on me. Than it is a bug. Please open a ticket on google code. web2py 
> sets the content-type correctly in gluon/main.html but it seems to lose it 
> when an HTTP exception is raised.

It's not just that the content type should be set to text/json; the content 
itself needs to be JSON. 

This is slightly tricky when web2py is generating the response (as in a 5xx 
error), since the exact nature of a JSON response depends on the content of the 
JSON request (we're supposed to set the id to the id of the request, for 
example, though null is OK if the id is not known). I think it's safe to return 
a JSON-RPC 2.0 error response. 

> 
> On Monday, 16 April 2012 08:56:07 UTC-5, Joseph.Piron wrote:
> Json indeed :)
> 
> On 16 Apr 2012, at 15:44, Jonathan Lundell wrote:
> 
>> On Apr 16, 2012, at 6:24 AM, Massimo Di Pierro wrote:
>>> Because IE browsers, when they receive a error page (HTTP x!=200) and the 
>>> content is less than a certain size, they choose to ignore the content and 
>>> display an uninformative canned message instead. web2py injects in the 
>>> content an html comment to make it just long enough so that IE browser do 
>>> not ignore the comment. This is important for example so that IE displays 
>>> web2py tickets instead of a generic error page.
>> 
>> Except that this is a JSON request, not HTML.
>> 
>>> 
>>> On Monday, 16 April 2012 07:24:46 UTC-5, Joseph.Piron wrote:
>>> Hi gents !
>>> 
>>> I was working on an extjs client intended to discuss with web2py when I 
>>> stumbled upon this weird behaviour:
>>> 
>>> with my client calling "PUT /defaut/api/alarms/1.json", I want the server 
>>> to respond a 409 error code with good json return {success: false, errors: 
>>> {...}}
>>> and use raise HTTP(409, {"success":False, "errors":{...}}) to generate this 
>>> error.
>>> Unfortunately, even if the call has been done with a ".json", the 
>>> content-type header of the response is set to "text/html" and thus, the 
>>> code adds a 
>>> 
>>> 
>>> at the end for a 4xx code (not for a 5xx code, which works for me).
>>> Shouldn't the content-type be set to text/json or something similar ?
>>> 
>>> Thanks for your support !
>> 
>> 
> 




Re: [web2py] Re: new feature in trunk: full auditing

2012-04-16 Thread Johann Spies
On 16 April 2012 16:03, Massimo Di Pierro wrote:

> No. Batch operations do not bypass the auditing process.
>


Thanks.

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


Re: [web2py] Re: new feature in trunk: full auditing

2012-04-16 Thread Massimo Di Pierro
No. Batch operations do not bypass the auditing process.

On Monday, 16 April 2012 08:52:22 UTC-5, Johann Spies wrote:
>
> On 16 April 2012 15:18, Massimo Di Pierro wrote:
>
>> Yes but if you do a batch delete or update web2py has to copy all records 
>> from one table to another one by one. That may cause a significati slowdown 
>> that will lock the db for long time. It may have bad consequences.
>>
>
> Thanks for your answer but because I wrote unnecessarily two contrasting 
> questions and you answered one of them I am not sure which one you have 
> answered :)
>
> Does that 'yes' mean that batch operations will bypass the auditing 
> process?
>
> Regards
> Johann
> -- 
> Because experiencing your loyal love is better than life itself, 
> my lips will praise you.  (Psalm 63:3)
>
>

Re: [web2py] Content-type header for HTTP exception incorrectly set ?

2012-04-16 Thread Massimo Di Pierro
Shame on me. Than it is a bug. Please open a ticket on google code. web2py 
sets the content-type correctly in gluon/main.html but it seems to lose it 
when an HTTP exception is raised.

On Monday, 16 April 2012 08:56:07 UTC-5, Joseph.Piron wrote:
>
> Json indeed :)
>
> On 16 Apr 2012, at 15:44, Jonathan Lundell wrote:
>
> On Apr 16, 2012, at 6:24 AM, Massimo Di Pierro wrote:
>
> Because IE browsers, when they receive a error page (HTTP x!=200) and the 
> content is less than a certain size, they choose to ignore the content and 
> display an uninformative canned message instead. web2py injects in the 
> content an html comment to make it just long enough so that IE browser do 
> not ignore the comment. This is important for example so that IE displays 
> web2py tickets instead of a generic error page.
>
>
> Except that this is a JSON request, not HTML.
>
>
> On Monday, 16 April 2012 07:24:46 UTC-5, Joseph.Piron wrote:
>>
>> Hi gents !
>>
>> I was working on an extjs client intended to discuss with web2py when I 
>> stumbled upon this weird behaviour:
>>
>> with my client calling "PUT /defaut/api/alarms/1.json", I want the server 
>> to respond a 409 error code with good json return {success: false, errors: 
>> {...}}
>> and use raise HTTP(409, {"success":False, "errors":{...}}) to generate 
>> this error.
>> Unfortunately, even if the call has been done with a ".json", the 
>> content-type header of the response is set to "text/html" and thus, the 
>> code adds a 
>>
>> 
>>
>>
>> at the end for a 4xx code (not for a 5xx code, which works for me).
>>
>> Shouldn't the content-type be set to text/json or something similar ?
>>
>>
>> Thanks for your support !
>>
>>
>
>
>

Re: [web2py] Admin not saving data

2012-04-16 Thread Richard Vézina
With the dev web server when I submit the form I get a none under the first
new password field with 1.99.4 version. It is not changing the password. I
precise that I set the password in the launching web2py box. In that case
the password maybe unchangable.

Richard

On Fri, Apr 13, 2012 at 9:22 PM, Bruce Wade  wrote:

> Hi,
>
> Having a strange problem. When using admin database administration and
> trying to update my password when I click save it refreshes the page
> without any errors but also doesn't save the password.
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>


Re: [web2py] Re: How to add an input field in SQLFORM.grid??

2012-04-16 Thread Richard Vézina
Great!

Thanks

Richard

On Fri, Apr 13, 2012 at 7:33 PM, greenpoise  wrote:

> Richard,
> you know what? maybe it does what you want actually because what I get is
> a bunch of records with a txt and one submit button at the end. So,
> basically a grid within a form. I will write it and run it again and send
> you a screenshot.
>
>
>
>
> D
>
> On Friday, 13 April 2012 12:36:29 UTC-7, Richard wrote:
>>
>> Yes I think I miss understood... What I would have is the capability to
>> insert many records in one operation (one form submission). I thought that
>> what Massimo suggest turn the SQLFORM.grid in a kind of multiples rows form
>> or something like that. It was not actually clear what Massimo was doing
>> what Massimo suggested. That why I ask you if you were willing to show a
>> screenshot of the result.
>>
>> Don't mind if I actually miss understand.
>>
>> Cheer.
>>
>> Richard
>>
>> On Fri, Apr 13, 2012 at 3:26 PM, greenpoise wrote:
>>
>>> Richard,
>>>
>>> I tried Massimos approach but it created one form button rather than one
>>> for each row. For my uses, it wont cut it. I need one text field plus a
>>> button on each row. I was able to accomplish this like this
>>>
>>> links = [lambda row: INPUT(_name='qty', _value='1'), lambda row: A('+',
>>> callback=URL('cart_callback',vars=dict(id=row.id,action='add',qt=request
>>> .vars.qty)))]
>>>
>>> Maybe I did not make myself clear but I just want to have a product grid
>>> with all the products and the qty. Sort of a storefront, so the input text
>>> is not db attached. Click on the button and add it to my cart.. Hmmm but it
>>> seems you want to have like a bulk functionality with the grid, right???
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thursday, 12 April 2012 14:27:53 UTC-7, Richard wrote:

 Hello Danel,

 May I see screenshot of what Massimo propose?

 I mean I would be really interrested in a bulk entry capability too.

 If it is already available I would know I was about to make a custom
 mechanism to allow user to add many result at the same time that would rely
 on Excel and validate_and_insert web2py method...

 The problem I had was to read directly Excel file, I would need to
 write a lot of code with xlrd. If I can avoid that I will be happy :)

 Thanks.

 Richard

 On Thu, Apr 12, 2012 at 5:14 PM, greenpoise wrote:

> Massimo,
>
> where do I change the INPUT size (length, width)?
>
>
>
> links = [lambda row: INPUT(_name='quantity', _class='integer',
> _value=1)]
>
>
>
>
>
> On Wednesday, 11 April 2012 18:34:16 UTC-7, Massimo Di Pierro wrote:
>>
>> yes and not and what I said needs clarification.
>>
>> grid = SQLFORM.grid(create=False,update=False) is not a form. If
>> create=True or update=True then it contains a form when you are creating 
>> or
>> updating a record. you must avoind a form within a form and you can do so
>> in the view:
>>
>> {{if grid.create_form or grid.update_form:}}
>> {{=grid}} it is a form
>> {{else:}}
>> {{=grid}} it is not a form but you can embed it in one
>> 
>> {{pass}}
>>
>>
>> On Wednesday, 11 April 2012 20:23:08 UTC-5, greenpoise wrote:
>>>
>>> A bit confused..I thought SQLFORM.grid was itself a form? Also, can
>>> I add more than one link per grid? Reading from the book, it creates a
>>> column so technically sounds as if I could???
>>>
>>> On Wednesday, 11 April 2012 16:27:17 UTC-7, Massimo Di Pierro wrote:

 You can put the grid in a form and you add

 SQLFORM.grid(..., link=[lambda row: INTPUT(...)])

 On Wednesday, 11 April 2012 17:07:58 UTC-5, greenpoise wrote:
>
> Is this possible?? I have a products table that shows all the
> products. I also created an add to cart button in it problem is if I 
> want
> to add 100 items I would have to press the button 100 times.  Is 
> there a
> way to add a quantity text field???
>
>
> Thanks
>
> Dan
>

>>> On Wednesday, 11 April 2012 16:27:17 UTC-7, Massimo Di Pierro wrote:

 You can put the grid in a form and you add

 SQLFORM.grid(..., link=[lambda row: INTPUT(...)])

 On Wednesday, 11 April 2012 17:07:58 UTC-5, greenpoise wrote:
>
> Is this possible?? I have a products table that shows all the
> products. I also created an add to cart button in it problem is if I 
> want
> to add 100 items I would have to press the button 100 times.  Is 
> there a
> way to add a quantity text field???
>
>
> Thanks
>
> Dan
>


>>


[web2py] Re: uploads doesn't get cleaned up

2012-04-16 Thread Massimo Di Pierro
web2py does not like to delete files unless it is told to do so. You can do

Field('avatar','upload',autodelete=True)

This should work as you expect.

On Monday, 16 April 2012 08:30:25 UTC-5, weheh wrote:
>
> auth_user_table = db.define_table(
> ... the usual suspects ...
> Field('avatar', 'upload', ondelete='CASCADE', ...)
> )
>
> Using the auth.profile() routine, if user uploads a profile picture, it 
> properly appears under the uploads directory. However, if user uploads a 
> new profile picture, the new picture duly gets uploaded but the old one 
> remains. It is now an orphan file. IMHO, the old profile pic should get 
> deleted when the new one takes its place. Otherwise, if you have a lot of 
> users and people change their profile pics frequently, you're going to end 
> up with a lot of orphaned files taking up disk space unnecessarily.
>
> I will submit this as a web2py ticket if it's considered a bug. As a 
> feature, I think it's only useful to Seagate and WD. ;-)
>


Re: [web2py] Content-type header for HTTP exception incorrectly set ?

2012-04-16 Thread Joseph Piron
Json indeed :)

On 16 Apr 2012, at 15:44, Jonathan Lundell wrote:

> On Apr 16, 2012, at 6:24 AM, Massimo Di Pierro wrote:
>> Because IE browsers, when they receive a error page (HTTP x!=200) and the 
>> content is less than a certain size, they choose to ignore the content and 
>> display an uninformative canned message instead. web2py injects in the 
>> content an html comment to make it just long enough so that IE browser do 
>> not ignore the comment. This is important for example so that IE displays 
>> web2py tickets instead of a generic error page.
> 
> Except that this is a JSON request, not HTML.
> 
>> 
>> On Monday, 16 April 2012 07:24:46 UTC-5, Joseph.Piron wrote:
>> Hi gents !
>> 
>> I was working on an extjs client intended to discuss with web2py when I 
>> stumbled upon this weird behaviour:
>> 
>> with my client calling "PUT /defaut/api/alarms/1.json", I want the server to 
>> respond a 409 error code with good json return {success: false, errors: 
>> {...}}
>> and use raise HTTP(409, {"success":False, "errors":{...}}) to generate this 
>> error.
>> Unfortunately, even if the call has been done with a ".json", the 
>> content-type header of the response is set to "text/html" and thus, the code 
>> adds a 
>> 
>> 
>> at the end for a 4xx code (not for a 5xx code, which works for me).
>> Shouldn't the content-type be set to text/json or something similar ?
>> 
>> Thanks for your support !
> 
> 



Re: [web2py] Re: new feature in trunk: full auditing

2012-04-16 Thread Johann Spies
On 16 April 2012 15:18, Massimo Di Pierro wrote:

> Yes but if you do a batch delete or update web2py has to copy all records
> from one table to another one by one. That may cause a significati slowdown
> that will lock the db for long time. It may have bad consequences.
>

Thanks for your answer but because I wrote unnecessarily two contrasting
questions and you answered one of them I am not sure which one you have
answered :)

Does that 'yes' mean that batch operations will bypass the auditing process?

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


Re: [web2py] Re: Content-type header for HTTP exception incorrectly set ?

2012-04-16 Thread Jonathan Lundell
On Apr 16, 2012, at 6:24 AM, Massimo Di Pierro wrote:
> Because IE browsers, when they receive a error page (HTTP x!=200) and the 
> content is less than a certain size, they choose to ignore the content and 
> display an uninformative canned message instead. web2py injects in the 
> content an html comment to make it just long enough so that IE browser do not 
> ignore the comment. This is important for example so that IE displays web2py 
> tickets instead of a generic error page.

Except that this is a JSON request, not HTML.

> 
> On Monday, 16 April 2012 07:24:46 UTC-5, Joseph.Piron wrote:
> Hi gents !
> 
> I was working on an extjs client intended to discuss with web2py when I 
> stumbled upon this weird behaviour:
> 
> with my client calling "PUT /defaut/api/alarms/1.json", I want the server to 
> respond a 409 error code with good json return {success: false, errors: {...}}
> and use raise HTTP(409, {"success":False, "errors":{...}}) to generate this 
> error.
> Unfortunately, even if the call has been done with a ".json", the 
> content-type header of the response is set to "text/html" and thus, the code 
> adds a 
> 
> 
> at the end for a 4xx code (not for a 5xx code, which works for me).
> Shouldn't the content-type be set to text/json or something similar ?
> 
> Thanks for your support !




Re: [web2py] Re: Workflow engine for web2py

2012-04-16 Thread António Ramos
For me, the advantage i see is to centrally manage(create,change,edit,etc)
all workflow rules of all apps that use workflow.
maybe there is some disadvantagesomewhere else on the line ...



2012/4/16 Carlos Costa 

> I think it is.
> What are the advantages with this aproach?
>
> Em 16 de abril de 2012 07:44, António Ramos 
> escreveu:
> > I suggest a workflow as a service.
> > I have a database where i define all workflows for all databases.
> >
> > I have something like this way in a Lotus Notes environment.
> > I get away with it very nicely. :)
> > If i keep control fields in my record
> > like,
> > readers
> > authors
> > step
> > next step formula
> > code to execute in this step
> > etc
> >
> > then i just call the webservice and send my document as a paramenter and
> get
> > a recalculated document.
> >
> > Is this feasible in web2py?
> >
> > thank you
> >
> > António
> >
> >
> >
> > 2012/3/1 yamandu 
> >>
> >> Just one resource I found interesting: http://workflowpatterns.com/
> >>
> >> Em terça-feira, 7 de fevereiro de 2012 23h58min19s UTC-2, mart escreveu:
> >>>
> >>> Something to think about if effort is put on this (just a suggestion).
> >>> You may want to consider the importance of 'roles' in an implemented
> >>> wf engine, since user to role interaction should probably be key in a
> >>> wf model (or at least as important as having the ability to move work
> >>> items around).
> >>>
> >>> Just my 2 cents,
> >>> Mart
> >>>
> >>> On Feb 7, 5:35 pm, Richard Vézina  wrote:
> >>> > From what I understand you can do just that, but without reinventing
> >>> > the
> >>> > wheel by designing and implementing your own solution.
> >>> >
> >>> > Richard
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > On Tue, Feb 7, 2012 at 5:27 PM, Ross Peoples  >
> >>> > wrote:
> >>> > > I don't know workflow engines in the general sense that well. I
> once
> >>> > > created a full documentation management system where each document
> >>> > > couple
> >>> > > have a workflow assigned to it. The workflow (predefined, or
> created
> >>> > > on-the-fly) would push the document around from person to person,
> >>> > > ensuring
> >>> > > that each person completed their step in the time allotted,
> otherwise
> >>> > > an
> >>> > > email would get sent to their manager.
> >>> >
> >>> > > Would a workflow engine allow me to do the same thing, or is this a
> >>> > > different type of workflow engine?
> >
> >
>
>
>
> --
> Carlos J. Costa
> Cientista da Computação
> Esp. Gestão em Telecom
>
> EL MELECH NEEMAN!
> אָמֵן
>


[web2py] Grid, links and a modal window

2012-04-16 Thread Johann Spies
I am beginning to work with jquery, javascript and ajax directly as I work 
through tutorials.

I want a grid listing journals with a button for each row which, when 
clicked, will open a modal window with another grid (or sqltable) in it 
containing a list of articles 
published in that journal.

Looking at the MModal plugin 
(http://www.web2py.com/plugins/default/mmodal)  I am not clear on how to 
define a link in the controller for the button in the grid that will open 
the modal window.

I have two functions in a module that I want to use:


def artikels(query = db.akb_articles.id > 0):
links = [lambda row: A(B('View'), _target = "_blank",
   _href = URL(r = request, c = 'default',
   f = 'show_akb_article',
   args = str(row[db.akb_articles.id
])))]

form = SQLFORM.grid(query,
fields = fields,
orderby = db.akb_articles.title,
maxtextlength = 80,
editable = False, deletable = False,
details = False,
links = links,
ui = 'jquery-ui')

return form

def joernaalartikels(juuid):
query = db.akb_articles.journal == juuid
am = PluginMModal(title = T('Articles '), content= artikels(juuid),
  close = T('Close'), width=100, height=70)
return am

My partial definition for 'links' for the first grid (journals) which I 
don't know how to complete:

links = [lambda row: A('Edit' , _href = URL('default', 'edit_journal',
args = [row.id])),
 lambda row: A('Show articles', _href = ('default', ]

According the slice the link should be something like

am.link('click to see related articles')


How do Implement that  (call joernaal_artikels) and pass the result to a 
modal window using SQLFORM.grid's 'links'?

Regards
Johann




[web2py] uploads doesn't get cleaned up

2012-04-16 Thread weheh
auth_user_table = db.define_table(
... the usual suspects ...
Field('avatar', 'upload', ondelete='CASCADE', ...)
)

Using the auth.profile() routine, if user uploads a profile picture, it 
properly appears under the uploads directory. However, if user uploads a 
new profile picture, the new picture duly gets uploaded but the old one 
remains. It is now an orphan file. IMHO, the old profile pic should get 
deleted when the new one takes its place. Otherwise, if you have a lot of 
users and people change their profile pics frequently, you're going to end 
up with a lot of orphaned files taking up disk space unnecessarily.

I will submit this as a web2py ticket if it's considered a bug. As a 
feature, I think it's only useful to Seagate and WD. ;-)


[web2py] Re: Content-type header for HTTP exception incorrectly set ?

2012-04-16 Thread Massimo Di Pierro
Because IE browsers, when they receive a error page (HTTP x!=200) and the 
content is less than a certain size, they choose to ignore the content and 
display an uninformative canned message instead. web2py injects in the 
content an html comment to make it just long enough so that IE browser do 
not ignore the comment. This is important for example so that IE displays 
web2py tickets instead of a generic error page.

On Monday, 16 April 2012 07:24:46 UTC-5, Joseph.Piron wrote:
>
> Hi gents !
>
> I was working on an extjs client intended to discuss with web2py when I 
> stumbled upon this weird behaviour:
>
> with my client calling "PUT /defaut/api/alarms/1.json", I want the server 
> to respond a 409 error code with good json return {success: false, errors: 
> {...}}
> and use raise HTTP(409, {"success":False, "errors":{...}}) to generate 
> this error.
> Unfortunately, even if the call has been done with a ".json", the 
> content-type header of the response is set to "text/html" and thus, the 
> code adds a 
>
> 
>
>
> at the end for a 4xx code (not for a 5xx code, which works for me).
>
> Shouldn't the content-type be set to text/json or something similar ?
>
>
> Thanks for your support !
>
>

[web2py] Re: lambda v: v.strftime('%d/%m/%Y')

2012-04-16 Thread Massimo Di Pierro
As Manuele says, the error is somewhere else (some unbalances bracket 
before) yet this:

db.Node.createdOn.represent = lambda v: v.strftime('%d/%m/%Y') # old syntax

should be

db.Node.createdOn.represent = lambda v, row: v.strftime('%d/%m/%Y') # new 
syntax

the old syntax breaks grid.

On Monday, 16 April 2012 03:25:18 UTC-5, Annet wrote:
>
> In db.py I defined a table:
>
> db.define_table('Node',
> Field('createdOn',type='datetime',writable=False,readable=False),
> migrate=False)
>
> db.Node.createdOn.default=request.now
> db.Node.createdOn.requires=IS_DATETIME(str(T('%Y-%m-%d %H:%M:%S')))
>
> Now, when I add this validator:
>
> db.Node.createdOn.represent = lambda v: v.strftime('%d/%m/%Y')
>
> ... and save the file I get a failed to compile file error because of 
> invalid syntax in this line.
> What is the correct syntax?
>
> Kind regards,
>
> Annet.
>


Re: [web2py] Re: new feature in trunk: full auditing

2012-04-16 Thread Massimo Di Pierro
Yes but if you do a batch delete or update web2py has to copy all records 
from one table to another one by one. That may cause a significati slowdown 
that will lock the db for long time. It may have bad consequences.

On Monday, 16 April 2012 04:56:54 UTC-5, Johann Spies wrote:
>
> Will this auditing also work with changes in data that does not come from 
> form-submission?  Say for instance I run a batch update/delete from a 
> script or using 'selectable' in a grid to select a number of records to be 
> deleted, will that not bypass the auditing?
>
> I ask because calculated fields are not updated in such a case.
>
> Regards
> Johann
> -- 
> Because experiencing your loyal love is better than life itself, 
> my lips will praise you.  (Psalm 63:3)
>
>

Re: [web2py] heroku, web2py and gunicorn

2012-04-16 Thread Massimo Di Pierro
oops there is a typo in anyserver

replace gnuicorn with unicorn in the source. I just fixed it in trunk.

On Monday, 16 April 2012 01:39:26 UTC-5, Rahul wrote:
>
> It gives me an error - 
> *-bash-3.2$ python anyserver.py -s gunicorn -i 72.3.247.225 -p 9065*
> starting gunicorn on 72.3.247.225:9065...
> Traceback (most recent call last):
>   File "anyserver.py", line 299, in 
> main()
>   File "anyserver.py", line 295, in main
> 
> run(options.server,options.ip,options.port,logging=options.logging,profiler=options.profiler)
>   File "anyserver.py", line 157, in run
> getattr(Servers,servername)(application,(ip,int(port)))
> AttributeError: class Servers has no attribute 'gunicorn'
>
> Gunicorn is installed. Anything I need to do in gunicorn configuration to 
> resolve it? 
> I am confused... 
>
> Sincerely, Rahul D
>
>
>
> On Friday, April 13, 2012 7:01:27 PM UTC+5:30, Massimo Di Pierro wrote:
>>
>> No. If you want to use gunicorn you must start web2py with
>>
>> anyserver -s gunicorn
>>
>> anyserver comes with web2py.
>>
>> On Friday, 13 April 2012 04:27:14 UTC-5, Rahul wrote:
>>>
>>> Hi Massimo,
>>>  I am trying to explore gunicorn.  Below is the command I use to 
>>> activate my site. I am not sure if the parameter -s gunicorn does anything. 
>>> How do I confirm this? I have gunicorn, eventlet and greenlet installed via 
>>> virtualenv. I am trying to streamline my deployment and eventually remove 
>>> the port number as well. 
>>> *
>>> -bash-3.2$* python web2py.py -a'' -i flockbird.com -p 
>>> 9065 -s gunicorn &
>>>
>>> Thanks,
>>>
>>> sincerely, Rahul D [www.flockbird.com]
>>>
>>>
>>> On Friday, July 22, 2011 9:33:10 PM UTC+5:30, Furqan Rauf wrote:

 I could do it but I am a newbie, no nothing about the deployment or 
 stress testing

 On Fri, Jul 22, 2011 at 10:06 AM, Massimo Di Pierro <
 massimo.dipie...@gmail.com> wrote:

> Hello everybody,
>
> heroku will be supporting web2py. They run gunicorn. web2py runs with
> gunicorn but I have never tried it.
>
> Any volunteer to run some stress tests?
>
> cd web2py
> python anyserver -s gunicorn
>
> Massimo




 -- 
 *-Furqan Rauf*
 *Do you love your creator? Love your fellow-beings first. -Prophet 
 Muhammad
 *
 *http://www.amway.com/furqanrauf*

  

[web2py] Content-type header for HTTP exception incorrectly set ?

2012-04-16 Thread Joseph.Piron
Hi gents !

I was working on an extjs client intended to discuss with web2py when I 
stumbled upon this weird behaviour:

with my client calling "PUT /defaut/api/alarms/1.json", I want the server 
to respond a 409 error code with good json return {success: false, errors: 
{...}}
and use raise HTTP(409, {"success":False, "errors":{...}}) to generate this 
error.
Unfortunately, even if the call has been done with a ".json", the 
content-type header of the response is set to "text/html" and thus, the 
code adds a 




at the end for a 4xx code (not for a 5xx code, which works for me).

Shouldn't the content-type be set to text/json or something similar ?


Thanks for your support !



[web2py] Re: priority of web2py CMS

2012-04-16 Thread Ross Peoples
No, I've been tied up doing other (non-web2py) projects lately. I hope to 
get back to being more active here in a couple of weeks.

On Sunday, April 15, 2012 2:54:45 AM UTC-4, Gour wrote:
>
> On Mon, 16 Jan 2012 12:41:32 -0800 (PST)
> Ross Peoples 
> wrote:
>
> Hello Ross,
>
> > The good news is I've already figured out how to do it, I just have to
> > put the work in.
>
> Have you done some work on your web2py-powered-CMS-ala-C5?
>
>
> Sincerely,
> Gour
>
> -- 
> But those who, out of envy, disregard these teachings and do not 
> follow them are to be considered bereft of all knowledge, befooled, 
> and ruined in their endeavors for perfection.
>
> http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
>
>

Re: [web2py] Eclipse and autocomplete

2012-04-16 Thread szimszon
Okay. The 

if 0:
from gluon import *
request, session, response, T, cache = current.request, 
current.session,current
.response, current.t, current.cache
from gluon.dal import DAL
from gluon.tools import Auth, Service, Crud
db = DAL()
auth = Auth()
service = Service()
crud = Crud()

code is messing with the autocomplete but if I remove it than I have lots 
of error markers in the code if debugging is enabled :(


2012. április 16., hétfő 0:02:03 UTC+2 időpontban cyan a következőt írta:
>
>
> I've just tried it out.
>
> Unzip the latest stable source code of web2py to a folder, say, 
> "web2py_src".
> Go to Eclipse - Preferences - PyDev - 'Interpreter - Python'
> In the 'System PYTHONPATH' window, add 'web2py_src' to the path.
>
> So far, it seems autocomplete is working without doing all the import 
> statements... Hope it helps.
>
> On Monday, April 9, 2012 3:04:30 PM UTC-4, ikdme wrote:
>>
>> Tang, please how do i implement this your suggestion?
>>
>> On Thu, Apr 5, 2012 at 3:54 PM, Xiaofeng Tang wrote:
>>
>>> I use PyDev and add web2py src into "PyDev - PythonPath" to resolve the
>>> incorrect refs and enable autocompletion.
>>>
>>> Alternatively, u could install the path of web2py src into systeml
>>> envirnoment vairable "pythonpath".
>>>
>>> --- on 2012/4/5 22:51:41, Rod Watkins  wrote:
>>> > I know this has been asked before. I don't mean to be an annoyance.
>>> > I've done the searches are read numerous posts about how to handle
>>> > this. But the advice conflicts and I've yet to actually fix the 
>>> problem.
>>> >
>>> > What is the best way to handle imports for eclipse to get autocomplete
>>> > to work properly (as well as rid eclipse of all the incorrect error
>>> > messages?
>>> >
>>> > I rather like having autocomplete functioning since, as a beginner, it
>>> > helps me discover functionality that I might otherwise miss (besides
>>> > saving some typing).
>>> >
>>> > Please accept my thanks in advance for any help on this.
>>> >
>>> > Cordially,
>>> > Rod Watkins
>>>
>>>
>>

Re: [web2py] Re: Workflow engine for web2py

2012-04-16 Thread Carlos Costa
I think it is.
What are the advantages with this aproach?

Em 16 de abril de 2012 07:44, António Ramos  escreveu:
> I suggest a workflow as a service.
> I have a database where i define all workflows for all databases.
>
> I have something like this way in a Lotus Notes environment.
> I get away with it very nicely. :)
> If i keep control fields in my record
> like,
> readers
> authors
> step
> next step formula
> code to execute in this step
> etc
>
> then i just call the webservice and send my document as a paramenter and get
> a recalculated document.
>
> Is this feasible in web2py?
>
> thank you
>
> António
>
>
>
> 2012/3/1 yamandu 
>>
>> Just one resource I found interesting: http://workflowpatterns.com/
>>
>> Em terça-feira, 7 de fevereiro de 2012 23h58min19s UTC-2, mart escreveu:
>>>
>>> Something to think about if effort is put on this (just a suggestion).
>>> You may want to consider the importance of 'roles' in an implemented
>>> wf engine, since user to role interaction should probably be key in a
>>> wf model (or at least as important as having the ability to move work
>>> items around).
>>>
>>> Just my 2 cents,
>>> Mart
>>>
>>> On Feb 7, 5:35 pm, Richard Vézina  wrote:
>>> > From what I understand you can do just that, but without reinventing
>>> > the
>>> > wheel by designing and implementing your own solution.
>>> >
>>> > Richard
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Tue, Feb 7, 2012 at 5:27 PM, Ross Peoples 
>>> > wrote:
>>> > > I don't know workflow engines in the general sense that well. I once
>>> > > created a full documentation management system where each document
>>> > > couple
>>> > > have a workflow assigned to it. The workflow (predefined, or created
>>> > > on-the-fly) would push the document around from person to person,
>>> > > ensuring
>>> > > that each person completed their step in the time allotted, otherwise
>>> > > an
>>> > > email would get sent to their manager.
>>> >
>>> > > Would a workflow engine allow me to do the same thing, or is this a
>>> > > different type of workflow engine?
>
>



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: Workflow engine for web2py

2012-04-16 Thread António Ramos
I suggest a workflow as a service.
I have a database where i define all workflows for all databases.

I have something like this way in a Lotus Notes environment.
I get away with it very nicely. :)
If i keep control fields in my record
like,
readers
authors
step
next step formula
code to execute in this step
etc

then i just call the webservice and send my document as a paramenter and
get a recalculated document.

Is this feasible in web2py?

thank you

António



2012/3/1 yamandu 

> Just one resource I found interesting: http://workflowpatterns.com/
>
> Em terça-feira, 7 de fevereiro de 2012 23h58min19s UTC-2, mart escreveu:
>
>> Something to think about if effort is put on this (just a suggestion).
>> You may want to consider the importance of 'roles' in an implemented
>> wf engine, since user to role interaction should probably be key in a
>> wf model (or at least as important as having the ability to move work
>> items around).
>>
>> Just my 2 cents,
>> Mart
>>
>> On Feb 7, 5:35 pm, Richard Vézina  wrote:
>> > From what I understand you can do just that, but without reinventing
>> the
>> > wheel by designing and implementing your own solution.
>> >
>> > Richard
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Tue, Feb 7, 2012 at 5:27 PM, Ross Peoples 
>> wrote:
>> > > I don't know workflow engines in the general sense that well. I once
>> > > created a full documentation management system where each document
>> couple
>> > > have a workflow assigned to it. The workflow (predefined, or created
>> > > on-the-fly) would push the document around from person to person,
>> ensuring
>> > > that each person completed their step in the time allotted, otherwise
>> an
>> > > email would get sent to their manager.
>> >
>> > > Would a workflow engine allow me to do the same thing, or is this a
>> > > different type of workflow engine?
>
>


Re: [web2py] lambda v: v.strftime('%d/%m/%Y')

2012-04-16 Thread Manuele Pesenti

Il 16/04/2012 10:25, Annet ha scritto:

In db.py I defined a table:

db.define_table('Node',
Field('createdOn',type='datetime',writable=False,readable=False),
migrate=False)

db.Node.createdOn.default=request.now
db.Node.createdOn.requires=IS_DATETIME(str(T('%Y-%m-%d 
%H:%M:%S')))

Now, when I add this validator:


db.Node.createdOn.represent = lambda v: v.strftime('%d/%m/%Y')


the error could not be in this line... for example if you forgot to 
close brackets opened in the lines before, so maybe it's better you 
report much more code :)


M.



... and save the file I get a failed to compile file error because of 
invalid syntax in this line.

What is the correct syntax?

Kind regards,

Annet.




Re: [web2py] lambda v: v.strftime('%d/%m/%Y')

2012-04-16 Thread Johann Spies
On 16 April 2012 10:25, Annet  wrote:

> In db.py I defined a table:
>
> db.define_table('Node',
> Field('createdOn',type='datetime',writable=False,readable=False),
> migrate=False)
>
> db.Node.createdOn.default=request.now
> db.Node.createdOn.requires=IS_DATETIME(str(T('%Y-%m-%d %H:%M:%S')))
>
> Now, when I add this validator:
>
> db.Node.createdOn.represent = lambda v: v.strftime('%d/%m/%Y')
>

Try:

db.Node.createdOn.represent = lambda
db.mytable.name.represent = lambda v, row: v.strftime('%d/%m/%Y')


See the examples in the book:


   - represent can be None or can point to a function that takes a field
   value and returns an alternate representation for the field value.
   Examples:

1.
2.
3.
4.

db.mytable.name.represent = lambda name,row: name.capitalize()
db.mytable.other_id.represent = lambda id,row: row.myfield
db.mytable.some_uploadfield.represent = lambda value,row: \
A('get it', _href=URL('download', args=value))


Regards
Johann

-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


Re: [web2py] Re: new feature in trunk: full auditing

2012-04-16 Thread Johann Spies
Will this auditing also work with changes in data that does not come from
form-submission?  Say for instance I run a batch update/delete from a
script or using 'selectable' in a grid to select a number of records to be
deleted, will that not bypass the auditing?

I ask because calculated fields are not updated in such a case.

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


Re: [web2py] getting mail to work with SSL connection on port 465

2012-04-16 Thread Johann Spies
On 14 April 2012 16:13, weheh  wrote:

> I'm trying without success to get web2py mail working with an SSL
> connection. I've searched the forum and come up with this:
>
> mail.settings.tls = True
> mail.settings.login = False  # I am not using auth in this case
> mail.settings.server = 'mail.mydomain.com:465'  # your SMTP server
> mail.settings.login = 'me:somepasswd'  # your credentials
> mail.settings.sender = 'm...@mydomain.com'  # your email
>
> web2py looks like it's sending the email but I'm not getting it. I wonder
> if anyone can shed some more light on the matter.
>

Try mail.settings.login = None  (and delete the second mail.settings.login
line)

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


[web2py] Re: how to access google spreadsheets using Oauth2 in web2py

2012-04-16 Thread SB
Thanks Massimo..

On Sunday, 15 April 2012 20:19:48 UTC+5:30, Massimo Di Pierro wrote:
>
> Look into gluon/contrib/login_methods/oauth2_auth.py there is sample code 
> in there.
>
> On Saturday, 14 April 2012 09:33:51 UTC-5, SB wrote:
>>
>> how to access google spreadsheets using Oauth2 in web2py. Need help.
>>
>

[web2py] lambda v: v.strftime('%d/%m/%Y')

2012-04-16 Thread Annet
In db.py I defined a table:

db.define_table('Node',
Field('createdOn',type='datetime',writable=False,readable=False),
migrate=False)

db.Node.createdOn.default=request.now
db.Node.createdOn.requires=IS_DATETIME(str(T('%Y-%m-%d %H:%M:%S')))

Now, when I add this validator:

db.Node.createdOn.represent = lambda v: v.strftime('%d/%m/%Y')

... and save the file I get a failed to compile file error because of 
invalid syntax in this line.
What is the correct syntax?

Kind regards,

Annet.


Re: [web2py] shared host deployment of my web2py site

2012-04-16 Thread Chibuzo Ottih
thanks keith, i understand the difference between 'you' and 'u', was just
trying to be fast and i was surfing via my Blackberry smartphone not a PC
so needed shortcuts. Thanks anyways, would check out for the command line
prompt in my control panel.

Once again, many thanks



On Sun, Apr 15, 2012 at 10:06 PM, Keith Edmunds  wrote:

> On Sun, 15 Apr 2012 07:36:19 +0100, doncoleon...@gmail.com said:
>
> > So you mean I should just click the 'configure' file?
>
> You need to do this from the command line.
>
> > And how do I add
> > the parameters, are u saying
>
> It's "you", not "u".
>
> You need a open a terminal window and type in the commands you quoted
> originally.
> --
> "You can have everything in life you want if you help enough other people
> get what they want" - Zig Ziglar.
>
> Who did you help today?
>


[web2py] Re: CMS/blog app suitable for web2py beginners

2012-04-16 Thread Gour
On Sun, 15 Apr 2012 09:51:39 +0100
Chibuzo Ottih 
wrote:

> Yeah, with instantpress, you can manage users, create tags and
> categories, publish articles in few seconds and more. It also has the
> ability to manage comments. 

Thank you.

> To see more, I think you should download it and add it as an
> application to your web2py framework to see how it works. Most of your
> configuration/customization would be done in the apconfig.py file

I have installed it...it looks a bit rudimentary in comparison with e.g.
Concrete5 (PHP), but let's hope it is going to be enhanced.

It would be nice to have robust CMS platform based on web2py for which
it could be possible to write many add-ons (blog, news, themes, etc.).


Sincerely,
Gour


-- 
What is night for all beings is the time of awakening 
for the self-controlled; and the time of awakening for 
all beings is night for the introspective sage.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


signature.asc
Description: PGP signature