[web2py] Re: new book now available in HTML (english, japanese, italian)

2011-12-18 Thread lyn2py
I agree with Anthony on the second level headings in chapter TOCs.
Much easier to look for specific topics!

On Dec 19, 2:25 pm, Anthony  wrote:
> Very nice. Note, "experts4soluions" should be "experts4solutions" (in the
> menu and on the login page).
>
> I miss the second level headings in the chapter TOCs -- very helpful for
> finding topics. Also, not too big a deal, but maybe consider generating the
> chapter TOCs server side -- there's often quite a lag with the client side
> JS rendering.
>
> Anthony
>
>
>
>
>
>
>
> On Monday, December 19, 2011 1:12:31 AM UTC-5, Massimo Di Pierro wrote:
>
> > The latest book edition (4th) is now available for free here:
>
> >    http://web2py.com/book
>
> > This is not the final version of the new book application but it is a
> > major improvement over the old one.
> > It works on mobiles. Has true multi book, multi version and multi
> > language support.
>
> > I disabled some functions because they are not polished yet but I
> > should be done very soon.
> > When done I will open the book for editing so you can fix typos
> > yourself.
>
> > Should also be faster than the previous one.
>
> > Please give it a try and report any problems, including css issues.
> > Do not report typos quite yet. You will be able to fix them yourself.
>
> > Massimo


[web2py] Re: new book now available in HTML (english, japanese, italian)

2011-12-18 Thread Massimo Di Pierro
:-)

I will get a certificate.

On Dec 19, 12:38 am, Anthony  wrote:
> 6 minutes -- is that the best you can do? ;-)
>
> Are you going to get a real SSL certificate for the PDF purchase -- I
> assume most people won't feel too comfortable with the certificate warning?
>
>
>
>
>
>
>
> On Monday, December 19, 2011 1:31:21 AM UTC-5, Massimo Di Pierro wrote:
>
> > ok, fixed typo and toc. We will eventually have server side toc.
> > Should be easy.
>
> > On Dec 19, 12:25 am, Anthony  wrote:
> > > Very nice. Note, "experts4soluions" should be "experts4solutions" (in the
> > > menu and on the login page).
>
> > > I miss the second level headings in the chapter TOCs -- very helpful for
> > > finding topics. Also, not too big a deal, but maybe consider generating
> > the
> > > chapter TOCs server side -- there's often quite a lag with the client
> > side
> > > JS rendering.
>
> > > Anthony
>
> > > On Monday, December 19, 2011 1:12:31 AM UTC-5, Massimo Di Pierro wrote:
>
> > > > The latest book edition (4th) is now available for free here:
>
> > > >    http://web2py.com/book
>
> > > > This is not the final version of the new book application but it is a
> > > > major improvement over the old one.
> > > > It works on mobiles. Has true multi book, multi version and multi
> > > > language support.
>
> > > > I disabled some functions because they are not polished yet but I
> > > > should be done very soon.
> > > > When done I will open the book for editing so you can fix typos
> > > > yourself.
>
> > > > Should also be faster than the previous one.
>
> > > > Please give it a try and report any problems, including css issues.
> > > > Do not report typos quite yet. You will be able to fix them yourself.
>
> > > > Massimo


Re: [web2py] email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-18 Thread Constantine Vasil
Thank you - for login it works but for register it does not.

In the case of register the validator executes after register and register
is telling the email is invalid.

On Sun, Dec 18, 2011 at 6:44 PM, Anthony  wrote:

> Problem is the login() function automatically replaces the email
> validator(s) with its own temporary validator, so you'll lose the IS_LOWER
> in that case. That should probably be fixed, but for now, the alternative
> is to use an onvalidation function for login.
>
> Anthony
>
>
> On Sunday, December 18, 2011 7:40:08 PM UTC-5, ニコノコ wrote:
>>
>> Couldn't you just add something like this?
>> #in your db.py, after auth.define_tables()
>> db.auth_user.email.requires=(**IS_LOWER(),IS_EMAIL(),IS_NOT_**
>> IN_DB(db,'auth_user.email'))
>>
>> Or if you use customize your auth tables ...:
>> Field('email', length=512,default='',comment=**'*'
>>,requires=(IS_LOWER(),IS_**
>> EMAIL(),IS_NOT_IN_DB(db,'auth_**user.email')))
>>
>>
>> On Friday, December 16, 2011, Anthony wrote:
>>
>>> def user():
>>> if request.args(0) == 'register':
>>> db.auth_user.email.requires.**insert(0, IS_LOWER())
>>> [rest of code]
>>>
>>> Note, the above assumes there is already at least one validator defined
>>> for the email field (which there should be by default) -- otherwise, just
>>> do requires=...
>>>
>>> Anthony
>>>
>>> On Thursday, December 15, 2011 5:09:37 PM UTC-5, thstart wrote:

 could you please post a code how to that for register especially?
>>>
>>>


Re: [web2py] book 4th edition in PDF

2011-12-18 Thread Martin Weissenboeck
I am trying.

Regards, Martin


[web2py] Re: new book now available in HTML (english, japanese, italian)

2011-12-18 Thread Anthony
6 minutes -- is that the best you can do? ;-)

Are you going to get a real SSL certificate for the PDF purchase -- I 
assume most people won't feel too comfortable with the certificate warning?

On Monday, December 19, 2011 1:31:21 AM UTC-5, Massimo Di Pierro wrote:
>
> ok, fixed typo and toc. We will eventually have server side toc.
> Should be easy.
>
> On Dec 19, 12:25 am, Anthony  wrote:
> > Very nice. Note, "experts4soluions" should be "experts4solutions" (in the
> > menu and on the login page).
> >
> > I miss the second level headings in the chapter TOCs -- very helpful for
> > finding topics. Also, not too big a deal, but maybe consider generating 
> the
> > chapter TOCs server side -- there's often quite a lag with the client 
> side
> > JS rendering.
> >
> > Anthony
> >
> >
> >
> >
> >
> >
> >
> > On Monday, December 19, 2011 1:12:31 AM UTC-5, Massimo Di Pierro wrote:
> >
> > > The latest book edition (4th) is now available for free here:
> >
> > >http://web2py.com/book
> >
> > > This is not the final version of the new book application but it is a
> > > major improvement over the old one.
> > > It works on mobiles. Has true multi book, multi version and multi
> > > language support.
> >
> > > I disabled some functions because they are not polished yet but I
> > > should be done very soon.
> > > When done I will open the book for editing so you can fix typos
> > > yourself.
> >
> > > Should also be faster than the previous one.
> >
> > > Please give it a try and report any problems, including css issues.
> > > Do not report typos quite yet. You will be able to fix them yourself.
> >
> > > Massimo
>


[web2py] Re: new book now available in HTML (english, japanese, italian)

2011-12-18 Thread Massimo Di Pierro
ok, fixed typo and toc. We will eventually have server side toc.
Should be easy.

On Dec 19, 12:25 am, Anthony  wrote:
> Very nice. Note, "experts4soluions" should be "experts4solutions" (in the
> menu and on the login page).
>
> I miss the second level headings in the chapter TOCs -- very helpful for
> finding topics. Also, not too big a deal, but maybe consider generating the
> chapter TOCs server side -- there's often quite a lag with the client side
> JS rendering.
>
> Anthony
>
>
>
>
>
>
>
> On Monday, December 19, 2011 1:12:31 AM UTC-5, Massimo Di Pierro wrote:
>
> > The latest book edition (4th) is now available for free here:
>
> >    http://web2py.com/book
>
> > This is not the final version of the new book application but it is a
> > major improvement over the old one.
> > It works on mobiles. Has true multi book, multi version and multi
> > language support.
>
> > I disabled some functions because they are not polished yet but I
> > should be done very soon.
> > When done I will open the book for editing so you can fix typos
> > yourself.
>
> > Should also be faster than the previous one.
>
> > Please give it a try and report any problems, including css issues.
> > Do not report typos quite yet. You will be able to fix them yourself.
>
> > Massimo


[web2py] Re: new book now available in HTML (english, japanese, italian)

2011-12-18 Thread Anthony
Very nice. Note, "experts4soluions" should be "experts4solutions" (in the 
menu and on the login page).

I miss the second level headings in the chapter TOCs -- very helpful for 
finding topics. Also, not too big a deal, but maybe consider generating the 
chapter TOCs server side -- there's often quite a lag with the client side 
JS rendering.

Anthony

On Monday, December 19, 2011 1:12:31 AM UTC-5, Massimo Di Pierro wrote:
>
> The latest book edition (4th) is now available for free here:
>
> http://web2py.com/book
>
> This is not the final version of the new book application but it is a
> major improvement over the old one.
> It works on mobiles. Has true multi book, multi version and multi
> language support.
>
> I disabled some functions because they are not polished yet but I
> should be done very soon.
> When done I will open the book for editing so you can fix typos
> yourself.
>
> Should also be faster than the previous one.
>
> Please give it a try and report any problems, including css issues.
> Do not report typos quite yet. You will be able to fix them yourself.
>
> Massimo
>
>
>

Re: [web2py] problem with mod_wsgi deployment

2011-12-18 Thread nils
Hi,

What is the contents of your httpd.conf file. can you post it ?

Regards,

Nils


On Mon, Dec 19, 2011 at 6:23 AM, Johann Spies  wrote:
> Dear Hassan,
>
> On 15 December 2011 12:32, Web2Py Freak  wrote:
>>
>> Dear All,
>> i am trying to use mod_wsgi with apache on fedora  i installed  web2py
>> in var/www/ and i unzipped it , and i edited the httpd.conf and added
>> the virtual host script but it keeps giving me this error with i do "$
>> service httpd start "
>>
>> the error is :
>>
>> bad user name : root@linux
>>
>>
>
> Try using the script  setup-web2py-fedora.sh in web2py/scripts.
>
> Regards
> Johann
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)
>


Re: [web2py] problem with mod_wsgi deployment

2011-12-18 Thread Johann Spies
Dear Hassan,

On 15 December 2011 12:32, Web2Py Freak  wrote:

> Dear All,
> i am trying to use mod_wsgi with apache on fedora  i installed  web2py
> in var/www/ and i unzipped it , and i edited the httpd.conf and added
> the virtual host script but it keeps giving me this error with i do "$
> service httpd start "
>
> the error is :
>
> bad user name : root@linux
>
>
>
Try using the script  setup-web2py-fedora.sh in web2py/scripts.

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


[web2py] new book now available in HTML (english, japanese, italian)

2011-12-18 Thread Massimo Di Pierro
The latest book edition (4th) is now available for free here:

http://web2py.com/book

This is not the final version of the new book application but it is a
major improvement over the old one.
It works on mobiles. Has true multi book, multi version and multi
language support.

I disabled some functions because they are not polished yet but I
should be done very soon.
When done I will open the book for editing so you can fix typos
yourself.

Should also be faster than the previous one.

Please give it a try and report any problems, including css issues.
Do not report typos quite yet. You will be able to fix them yourself.

Massimo




[web2py] Re: Logout if browser is closed

2011-12-18 Thread pbreit
I think what you might want is to set expiration to 0. I haven't tried it 
though. That sets the cookie expiration to now which I believe makes it a 
"session" cookie which expires when the browser is quit.

Try setting one or both of these to 0:

settings.expiration = 3600# one hour
settings.long_expiration = 3600*30*24 # one month


[web2py] Re: email registration link

2011-12-18 Thread Anthony
I think you should be able to use the host and scheme arguments.

[web2py] email registration link

2011-12-18 Thread Olympus Runner


I did this to change my website registration link sent out to via
email.

BEFORE:
auth.messages.verify_email = 'Click on the link
http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s
to verify your email.'

AFTER:
auth.messages.verify_email = 'Click on the link http://'+
'lucky.example.com' + URL('default','user',args=['verify_email']) + '/%
(key)s to verify your email for my great site!'

can we use the following URL arguments:
Host=True
Scheme=True

instead of 'lucky.example.com' or request.env.http_host (as used by
web2py)

I'm guessing this depends on the routes.py setup.
I tried testing in the shell but got 127.0.0.1:8000 instead.

Any help would be appreciated.

Thanks,
Olympus Runner


[web2py]

2011-12-18 Thread IVYtony smth
Sent from my HTC Touch Pro2 on the Now Network from Sprint®.


[web2py]

2011-12-18 Thread IVYtony smth
Sent from my HTC Touch Pro2 on the Now Network from Sprint®.


[web2py] Re: Problem with form submission in nested components

2011-12-18 Thread monotasker
OK, I found the problem. I wasn't actually returning the 
OptionsWidget.widget object during form creation. I was returning a LOAD 
helper which then inserted the OptionsWidget.widget object at a second 
stage. It looks like the accepts() method looks at the *widgets returned 
during form building* to establish the fields it will validate. 

I've worked around this by returning the OptionsWidget.widget object 
wrapped in a named SPAN at initial form creation. Instead of using a LOAD 
helper, I'm just using the cid parameter of a link to refresh the content 
of that span via ajax. It actually works out simpler in the end too. 
(satisfied sigh).

I'm still wondering why the accepts() method works this way, though.


[web2py] Re: Problem with form submission in nested components

2011-12-18 Thread monotasker
How would I check for that? The field is part of the table in db, and the 
form fields are being generated by SQLFORM. So the field should be defined 
properly.

(Thanks, by the way, for taking the time to help. I realize this kind of 
debugging problem is hard to help with.)


[web2py] How do I aggregate accounts using OAuth & web2py?

2011-12-18 Thread Matthew
Tumblr provides a very simple interface to link your Twitter and
Facebook accounts for posting through their service. I'd like to do
something similar in my application - provide a single point for
people to aggregate different accounts like Flickr, Facebook, Twitter,
etc. - and I don't want to spend $1,000 per year for Janrain's Account
Mapping to do so.

How do I link multiple accounts in aggregate using web2py?

I have a feeling I should start at
http://web2py.com/book/default/chapter/08?search=oauth#Other-Login-Methods-and-Login-Forms,
but was hoping there were more concrete tutorials or best practices
documented. Does anyone know of any?

Thanks,
Matthew


[web2py] Re: Problem with form submission in nested components

2011-12-18 Thread Anthony
Is the field in question defined in the form object on the server side?

On Sunday, December 18, 2011 5:20:33 PM UTC-5, monotasker wrote:
>
> I succeeded in removing the DIV wrapper from the select widget, but that 
> didn't solve the problem. So I've got a perfectly formed HTML form, sent 
> properly by POST, but this one field isn't being processed! AARGH!
>


Re: [web2py] email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-18 Thread Anthony
Problem is the login() function automatically replaces the email 
validator(s) with its own temporary validator, so you'll lose the IS_LOWER 
in that case. That should probably be fixed, but for now, the alternative 
is to use an onvalidation function for login.

Anthony

On Sunday, December 18, 2011 7:40:08 PM UTC-5, ニコノコ wrote:
>
> Couldn't you just add something like this?
> #in your db.py, after auth.define_tables()
>
> db.auth_user.email.requires=(IS_LOWER(),IS_EMAIL(),IS_NOT_IN_DB(db,'auth_user.email'))
>
> Or if you use customize your auth tables ...:
> Field('email', length=512,default='',comment='*'
>   
>  ,requires=(IS_LOWER(),IS_EMAIL(),IS_NOT_IN_DB(db,'auth_user.email')))
>
>
> On Friday, December 16, 2011, Anthony wrote:
>
>> def user():
>> if request.args(0) == 'register':
>> db.auth_user.email.requires.insert(0, IS_LOWER())
>> [rest of code]
>>
>> Note, the above assumes there is already at least one validator defined 
>> for the email field (which there should be by default) -- otherwise, just 
>> do requires=...
>>
>> Anthony
>>
>> On Thursday, December 15, 2011 5:09:37 PM UTC-5, thstart wrote:
>>>
>>> could you please post a code how to that for register especially?
>>
>> 

[web2py] Re: grid search exceptions

2011-12-18 Thread Nik Go
please check:
http://code.google.com/p/web2py/issues/detail?id=572

Thanks

On Friday, December 16, 2011, Massimo Di Pierro wrote:

> Can you please open a ticket about this?
>
> On Dec 16, 12:10 am, Nik Go > wrote:
> > A grid search causes an exception when a user enters an unexpected field
> > type.
> >
> > I have this field:
> >
> > Field('gender', 'integer', default=0,
> > requires=IS_IN_SET([(0,'Unknown'), (1, 'Male'), (2, 'Female')])
> >
> > Since they are represented as a string (ie Male) on screen, the user may
> > attempt a search like *"gender is 'Male'"* (whereas the correct but
> > counter-intuitive term is "*gender is 1*") which results in an error:
> >
> > ValueError: invalid literal for int() with base 10: 'Male'
> >
> > Perhaps there's a better way for grid search to handle exceptions like
> > these? Or maybe the query popup should list the options provided for by
> the
> > field's default validator?
>


[web2py] Re: list:reference validation

2011-12-18 Thread Anthony
It does:

min <= len(values) < max

Note it's a strict less than for the max, so if you want <= 2 values, that 
is equivalent to < 3. Basically, it's an inclusive min but an exclusive max.

Anthony

On Sunday, December 18, 2011 7:40:10 PM UTC-5, ニコノコ wrote:
>
> Anthony, could you elaborate a bit on that notation?
> multiple=(0,3)
>
> I wanted a maximum of two items and yet I need to write "3". In the book, 
> I've seen something similar with the limitby argument for DAL select:
> >>>for row in db().select(db.person.ALL, limitby=(0, 2)): print row.name
>
> which fetches "the first two, starting at zero" records.
>
>
> On Friday, December 16, 2011, Anthony wrote:
>
>> Shhh! It's a secret.
>>
>> Actually, it has been added to the new 4th edition, which should be 
>> available online soon.
>>
>> Anthony
>>
>> On Thursday, December 15, 2011 7:06:21 PM UTC-5, ニコノコ wrote:
>>>
>>> Thanks Anthony. I don't think I've seen that in the docs.
>>>
>>> On Thursday, December 15, 2011, Anthony wrote:
>>>
 Try

 IS_IN_DB(..., multiple=(0, 3))

 The "multiple" argument to IS_IN_SET and IS_IN_DB can be a list or 
 tuple specifying a minimum and maximum number of items to be selected 
 (strictly less than on the max, so set the max to 3 to make sure there are 
 no more than 2).

 Anthony

 On Wednesday, December 14, 2011 11:19:40 PM UTC-5, ニコノコ wrote:
>
> I have a list:reference field and would like a user to select none or 
> up to two values from the list
>
> I could validate by calling onvalidation but I'm wondering if there's 
> any built-in validator that should work? I've tried the following, 
> none of which worked for me:
>
>- IS_LENGTH(minsize=0,maxsize=2)
>- IS_EXPR('len(value)<=2')
>
>
>
> 

[web2py] Re: problem when upgrade to 1.99.4

2011-12-18 Thread Pepe Araya
thank you very much!
my fault.
:(


[web2py] Re: list:reference validation

2011-12-18 Thread Nik Go
Anthony, could you elaborate a bit on that notation?
multiple=(0,3)

I wanted a maximum of two items and yet I need to write "3". In the book,
I've seen something similar with the limitby argument for DAL select:
>>>for row in db().select(db.person.ALL, limitby=(0, 2)): print row.name

which fetches "the first two, starting at zero" records.


On Friday, December 16, 2011, Anthony wrote:

> Shhh! It's a secret.
>
> Actually, it has been added to the new 4th edition, which should be
> available online soon.
>
> Anthony
>
> On Thursday, December 15, 2011 7:06:21 PM UTC-5, ニコノコ wrote:
>>
>> Thanks Anthony. I don't think I've seen that in the docs.
>>
>> On Thursday, December 15, 2011, Anthony wrote:
>>
>>> Try
>>>
>>> IS_IN_DB(..., multiple=(0, 3))
>>>
>>> The "multiple" argument to IS_IN_SET and IS_IN_DB can be a list or tuple
>>> specifying a minimum and maximum number of items to be selected (strictly
>>> less than on the max, so set the max to 3 to make sure there are no more
>>> than 2).
>>>
>>> Anthony
>>>
>>> On Wednesday, December 14, 2011 11:19:40 PM UTC-5, ニコノコ wrote:

 I have a list:reference field and would like a user to select none or
 up to two values from the list

 I could validate by calling onvalidation but I'm wondering if there's
 any built-in validator that should work? I've tried the following,
 none of which worked for me:

- IS_LENGTH(minsize=0,maxsize=2)
- IS_EXPR('len(value)<=2')






Re: [web2py] How to change the message 'value already in database or empty' in Register?

2011-12-18 Thread Nik Go
IS_IN_DB(db(db.mytable.id>0), 'mytable.id', db.mytable._format

,error_message=T("Sorry chap, that doesn't exist"))


You may specify your own error_message for any built-in validator.


On Sunday, December 11, 2011, Constantine Vasil wrote:

> How to change the message 'value already in database or empty' in Register?
>
> Thanks,
>
> Regards,
> --Constantine
>


Re: [web2py] email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-18 Thread Nik Go
Couldn't you just add something like this?
#in your db.py, after auth.define_tables()
db.auth_user.email.requires=(IS_LOWER(),IS_EMAIL(),IS_NOT_IN_DB(db,'auth_user.email'))

Or if you use customize your auth tables ...:
Field('email', length=512,default='',comment='*'

 ,requires=(IS_LOWER(),IS_EMAIL(),IS_NOT_IN_DB(db,'auth_user.email')))


On Friday, December 16, 2011, Anthony wrote:

> def user():
> if request.args(0) == 'register':
> db.auth_user.email.requires.insert(0, IS_LOWER())
> [rest of code]
>
> Note, the above assumes there is already at least one validator defined
> for the email field (which there should be by default) -- otherwise, just
> do requires=...
>
> Anthony
>
> On Thursday, December 15, 2011 5:09:37 PM UTC-5, thstart wrote:
>>
>> could you please post a code how to that for register especially?
>
>


[web2py] Re: problem when upgrade to 1.99.4

2011-12-18 Thread Massimo Di Pierro
db.actividades.fecha.represent = lambda v, r: r.strftime('%d-%m-%Y')

should be

db.actividades.fecha.represent = lambda v, r: v and v.strftime('%d-%m-
%Y') or ''

else if you row.fecha==v==None, it cannot be represented using
v.strftime.

On Dec 18, 5:50 pm, Pepe Araya  wrote:
> sorry, is related with this:
>
> db.actividades.fecha.represent = lambda *v, r: v.strftime(*'%d-%m-%Y')


[web2py] Re: Logout if browser is closed

2011-12-18 Thread Massimo Di Pierro
It is impossible to reliable detect that a user has a left a web site
unless we use websockets.

On Dec 18, 4:01 pm, pbreit  wrote:
> Would that work when the user quits when visiting a different web site?


[web2py] Re: websocket for python

2011-12-18 Thread Massimo Di Pierro
we do have some websocket login in web2py.js (included in all pages)
and gluon/contrib/comet_messaging.py to handle serverside, based on
tornado.
eventually we should document it and improve functionality.


On Dec 18, 1:42 pm, Khalil KHAMLICHI 
wrote:
> Hi everyone,
> Is there any chances to see (in the near future) the websocket technology
> becoming an integrated part of web2py framework?
> As intranet apps are becoming more demanding for real time data, websockets
> are the solution but it must be integrated into w2p.
>
> Thanks


[web2py] Re: problem when upgrade to 1.99.4

2011-12-18 Thread Pepe Araya
sorry, is related with this:

db.actividades.fecha.represent = lambda *v, r: v.strftime(*'%d-%m-%Y')


[web2py] problem when upgrade to 1.99.4

2011-12-18 Thread Pepe Araya
Hi,

I have this ticket when upgrade to 1.99.4:

 'NoneType' object has no attribute 
'strftime'VERSIONweb2py™(1, 99, 4, datetime.datetime(2011, 12, 14, 14, 46, 
14), 'stable')PythonPython 2.7.1: /usr/local/bin/pythonTRACEBACK

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.

Traceback (most recent call last):
  File "/home/doctoradoarq/webapps/web2py_docv3/web2py/gluon/restricted.py", 
line 204, in restricted
exec ccode in environment
  File 
"/home/doctoradoarq/webapps/web2py_docv3/web2py/applications/doctoradofadeu/controllers/administrar.py"
 
,
 line 244, in 
  File "/home/doctoradoarq/webapps/web2py_docv3/web2py/gluon/globals.py", line 
172, in 
self._caller = lambda f: f()
  File 
"/home/doctoradoarq/webapps/web2py_docv3/web2py/applications/doctoradofadeu/controllers/administrar.py"
 
,
 line 92, in agenda
return index()
  File 
"/home/doctoradoarq/webapps/web2py_docv3/web2py/applications/doctoradofadeu/controllers/administrar.py"
 
,
 line 88, in index
grid = SQLFORM.smartgrid(db.actividades)
  File "/home/doctoradoarq/webapps/web2py_docv3/web2py/gluon/sqlhtml.py", line 
1962, in smartgrid
user_signature=user_signature,**kwargs)
  File "/home/doctoradoarq/webapps/web2py_docv3/web2py/gluon/sqlhtml.py", line 
1781, in grid
value=field.represent(value,row)
  File 
"/home/doctoradoarq/webapps/web2py_docv3/web2py/applications/doctoradofadeu/models/ac_a_actividades.py"
 
,
 line 33, in 
db.actividades.fecha.represent = lambda v, r: v.strftime('%d-%m-%Y')
AttributeError: 'NoneType' object has no attribute 'strftime'


related to:
db.actividades.fecha.represent = lambda v, r: r.strftime('%d-%m-%Y')

what is a 'date' field

in version 1.99.2 it works ok, and reformat the date.

Thanks!! 


[web2py] webfaction increased memory

2011-12-18 Thread elffikk
hi,

I just noticed that webfaction increased memory from 80 to 256Mb
important to notice that this is application memory
"This is the actual memory available to your long-running processes
(for instance, your Rails or Django processes). Unlike on a VPS, the
memory used by the operating system, the main web server and the
database servers doesn't count towards your memory usage"

and Roberto have made optimizations to uwsgi to run on low resources
hostings,
so it is a great time to use web2py with uwsgi and webfaction

so now uwsgi command to run web2py on webfaction will be

uwsgi --http 127.0.0.1:yourport --pythonpath /home/youruser/web2py --
module wsgihandler -d /home/youruser/tmp/uwsgi.log -t 20 --async 10 --
ugreen --limit-as 100 -r --no-orphans -M -p 2 --touch-reload /home/
youruser/tmp/uwsgireload.txt --reload-on-rss 100

short: 2 uwsgi workers(processes) each limited to 100Mb
uwsgi version 0.9.8.6


if you are new you could use my affiliate link (hope you will not
judge me for that :) )
http://www.webfaction.com/services/hosting?affiliate=fermer


[web2py] Re: Readers Choice - Python - Best programming Language 2011

2011-12-18 Thread monotasker
This is certainly my experience. Coming to programming "backwards" through 
web-design, I stumbled into JavaScript first, then PHP. When I started 
coding in Python it was like a breath of fresh air. 

[web2py] Re: [OT] Pycharm 2 is out

2011-12-18 Thread monotasker
I voted too. +1

[web2py] Re: Problem with form submission in nested components

2011-12-18 Thread monotasker
I succeeded in removing the DIV wrapper from the select widget, but that 
didn't solve the problem. So I've got a perfectly formed HTML form, sent 
properly by POST, but this one field isn't being processed! AARGH!


[web2py] Readers Choice - Python - Best programming Language 2011

2011-12-18 Thread António Ramos
Nice
http://www.linuxjournal.com/slideshow/readers-choice-2011?page=27


[web2py] Re: question about google app engine blob property

2011-12-18 Thread howesc
chawk,

the problem is that the upload field in web2py does not use blobstore on 
GAE, it uses a blob property on the model.  very different, and limited to 
1mb (or maybe something smaller based on your test).  if you want the file 
size permitted by the blobstore, check out 
http://www.web2pyslices.com/slices/take_slice/63  and/or read up on the GAE 
files API (that might be easier than this but i have not used it for image 
upload yet)

good luck!

cfh


Re: [web2py] Re: Logout if browser is closed

2011-12-18 Thread pbreit
Would that work when the user quits when visiting a different web site?

[web2py] Re: Problem with form submission in nested components

2011-12-18 Thread monotasker
OK, I've isolated the issue. Again, I've placed one of the form fields in a 
LOAD wrapper. The POST action for the form does send a value for this field 
(according to Firebug), but web2py doesn't receive a value for it. Printing 
the form.error that is thrown results in this:



So the question is why the field value within the component isn't being 
passed along. My hunch is that this is due to the LOAD helper wrapping the 
select widget in an extra .



[web2py] Re: [OT] Pycharm 2 is out

2011-12-18 Thread Pepe Araya
Voted

[web2py] Combine SQLFORM and SQLFORM.grid?

2011-12-18 Thread Martin Weissenboeck
Hi,
I have one form created with SQLFORM and another form created with
SQLFORM.grid. Each form has its own submit-button.
Is there a simple way to concatanate these forms to one form, which could
be sent with one submit-button?

Regards, Martin


Re: [web2py] Re: Logout if browser is closed

2011-12-18 Thread Khalil KHAMLICHI
Hi,
Javascript might help you i guess,
Event will be the "onUnload" in body tag, and your function will be
lauching a popup (window.open) with the exacte url used by logout button.
This should suffice unless user has blocked popups from your application.


Re: [web2py] websocket for python

2011-12-18 Thread Khalil KHAMLICHI
Hi everyone,
Is there any chances to see (in the near future) the websocket technology
becoming an integrated part of web2py framework?
As intranet apps are becoming more demanding for real time data, websockets
are the solution but it must be integrated into w2p.

Thanks


[web2py] Re: Editor for textarea fields?

2011-12-18 Thread LightDot
I have been using WYMeditor as WYSIWYM (What You See is What You Mean) 
editor and it works quite nicely with some tweaking.

https://github.com/wymeditor/wymeditor is where all the action is, their 
web page is outdated.

Perhaps this is because of all the problems from the times when WYSIWYG 
editors were a horrible mess, but I prefer this approach over WYSIWYG.

[web2py] Re: Logout if browser is closed

2011-12-18 Thread pbreit
I think what you want is for the login cookie to be a browser session 
cookie and I'm not sure how to do that or if it's possible without 
customization.

In this age when you pretty much never quit the browser, I'm not sure it's 
that useful.


[web2py] Re: do import module work in gae?

2011-12-18 Thread howesc
do other gluon.contrib modules import?  is the file somehow missing for you?


[web2py] Re: book 4th edition in PDF

2011-12-18 Thread Detectedstealth
It worked for me.

Thanks,
Bruce

On Dec 16, 4:51 pm, Massimo Di Pierro 
wrote:
> I apologize posting the electronic version of the book4thed in html
> andpdfis taking longer than expected but truly I am almost done. The
> delay was due to these facts:
>
> 1) complete rewrite of the online book app
> 2) do not use lulu for thepdfdownload but use the web app itself in
> order to
>    a) lower the price
>    b) make the process simpler and painless
>    c) watermark every copy of the book (so I know who posts it online)
>    d) allow users to download future new version without paying again
> 3) allow the system to sell multiple books (by me and other people).
>
> I need a tester.
>
> If you plan to buy thePDFbook:
>
> - post on this list a message saying: I am trying
> - try buy it here:https://web2py.com/pdfbuy
> - post on this list a message saying whether is worked or did not work
> or you gave up.
> - do not try download is somebody else is an has not reported back.
>
> I am trying avoid too many downloads as I do not know how many I can
> handle concurrently because of ram.
>
> If this works well I will merge this app and the new html/book app
> (which is also done).


[web2py] Re: [OT] Pycharm 2 is out

2011-12-18 Thread Gerd
Hi!

Voted

regards
Gerd


[web2py] Re: question about google app engine blob property

2011-12-18 Thread chawk
Massimo,

This seems to be a GAE file size issue.  i checked the error log and
even though the file is under 1 mb it was saying that it was too
large.  Maybe the dimensions of the photo were too large as opposed to
the actual disk space of the file? Either way it is not a problem with
Web2py, just a limitation that i did not run into until testing on
GAE.  I used a smaller 50px by 50px photo which was about 15kb and it
works fine.

Per Google docs, it says that the upload file size limits is one
gig.

this is what the development console looks like:

Profile_Name (string) amanda
Avatar (string)   auth_user.Avatar.a05d3cb080ce697d.
4a656c6c79666973682e6a7067.jpg
Avatar_blob (Blob)
password (string) eaa0c72ce4ea6949e14bfa4ad575cab6



[web2py] Re: question about google app engine blob property

2011-12-18 Thread chawk
This is testing on GAE Locally

extra fields:

auth.settings.extra_fields['auth_user']= [
  Field('City'),
  Field('State'),
  Field('Country'),
  Field('Profile_Name'),
  Field('Avatar', 'upload')]


When the user registers i get a "unrecoverable error message" after
submission.  I checked the db admin for GAE and it shows that all info
was received including the blob.  When i try form submission leaving
the upload field blank it works fine.  At first i thought that the
image files were too big, but they are all under a 1mb.


chawk


[web2py] Re: SQLFORM.smartgrid PLURALIZE by default!!!!?????

2011-12-18 Thread Pepe Araya
sorry if my speech is annoying, but it's really irritating.

My apologies.


[web2py] Re: Editor for textarea fields?

2011-12-18 Thread Anthony
Are you looking for a WYSIWYG editor? Nothing built in, but there are some 
plugins:

https://bitbucket.org/PhreeStyle/web2py_ckeditor/src
https://github.com/rochacbruno/Movuca/blob/master/modules/plugin_ckeditor.py 
 (based on the one above)
http://dev.s-cubism.com/plugin_elrte_widget

It's also not too difficult to hook up any available JS editor for use with 
web2py.

Anthony

On Sunday, December 18, 2011 11:15:25 AM UTC-5, lyn2py wrote:
>
> Hi is there a built-in editor for textarea fields that can be used?
>
> Thanks!
>


[web2py] Re: SQLFORM.smartgrid PLURALIZE by default!!!!?????

2011-12-18 Thread Anthony
Good point -- maybe that should be easier to turn off. For now, you could 
do something like this (after your last table definition):

for table in db.tables:
db[table]._plural = db[table]._singular

Or if you don't like the singular conversion either, you could do:

db[table]._plural = db[table]._singular  = table

You can also manually define both the singular and plural labels for 
individual tables via:

db.define_table('my_table', ..., singular='My Table', plural='My Tables')

Anthony

On Sunday, December 18, 2011 11:42:38 AM UTC-5, Pepe Araya wrote:
>
> Why pluralize by default!!???!
>
> that ONLY work for english language, in spanish isn't so simply like add 
> "s" for everything. I hate that, is like Rails...
> please, don't go in the wrong way...
>
> can I get my WELL FORMED labels back in some way?
>
> thanks.
>


[web2py] SQLFORM.smartgrid PLURALIZE by default!!!!?????

2011-12-18 Thread Pepe Araya
Why pluralize by default!!???!

that ONLY work for english language, in spanish isn't so simply like add 
"s" for everything. I hate that, is like Rails...
please, don't go in the wrong way...

can I get my WELL FORMED labels back in some way?

thanks.


[web2py] Editor for textarea fields?

2011-12-18 Thread lyn2py
Hi is there a built-in editor for textarea fields that can be used?

Thanks!


[web2py] Help with multiple tables' update_or_insert in one form

2011-12-18 Thread lyn2py
I have 3 tables:
  db.post, (post title, post content)
  db.tag, (tag names)
  db.post_tags (1:N relationship)

I want to create a page to allow a post to be created and tags to be
added to the post.
The tags can be existing or new.

I can create the form with SQLFORM + extra form elements (a field for
Tags to be added to the post).

But my real issue is... how can I implement the tags part in the
controller so that I can:
  insert new tag names into db.tag and insert relationship into
db.post_tags, and
  take the existing tag ids from db.tag and update_or_insert
relationship into db.post_tags

I imagine I can do this with jQuery/AJAX (which I am not expert at),
but can this be more easily accomplished in the controller with web2py
(probably under form.process().accepted or form.validate().accepted?)

Appreciate any help to get me going with this. Thanks!


[web2py] Re: smartgrid - still not resolving a problem

2011-12-18 Thread Anthony
OK, I'll wait for the app.

On Sunday, December 18, 2011 10:39:06 AM UTC-5, Massimo Di Pierro wrote:
>
> That is correct. I could not figure out the problem so I left "live"
> in there. If you or anybody else have any time to experiment would be
> great. I will soon release an app that uses this so you may want to
> wait for that to test it.
>
> massimo
>
> On Dec 18, 9:29 am, Anthony  wrote:
> > On Saturday, December 17, 2011 11:02:49 PM UTC-5, Massimo Di Pierro 
> wrote:
> >
> > > The jquery.checkbox plugin replaces the usual checkbox with a [yes]/
> > > [no] slider. If I replace 'slide' with 'click' the [yes]/[no] behaves
> > > the opposite way (yes for unchecked and no for checked). weird.
> >
> > Are you saying:
> >
> > jQuery("input[type='checkbox'].delete", target).click(...)
> >
> > causes your yes/no slider to misbehave, but
> >
> > jQuery("input[type='checkbox'].delete", target).live('click', ...)
> >
> > does not? What does "slide" have to do with it?
> >
> > What do you suggest we do with web2py.js? If we use .live('click', ...), 
> a
> > component loaded with a delete checkbox in it will get the handler twice,
> > which causes problems (that's why we originally changed it from .live to
> > .click, as well as adding the 'target' context to the selector).
> >
> > Anthony
>
>

[web2py] Re: assigning class name to SQLform element parent gives error

2011-12-18 Thread Paolo Caruccio
My fault.
I omitted to say that the error occurs after some options have been 
selected and form is submitted leaving empty the text input.

Thank you for your consideration.

Paolo


[web2py] Re: smartgrid - still not resolving a problem

2011-12-18 Thread Massimo Di Pierro
That is correct. I could not figure out the problem so I left "live"
in there. If you or anybody else have any time to experiment would be
great. I will soon release an app that uses this so you may want to
wait for that to test it.

massimo

On Dec 18, 9:29 am, Anthony  wrote:
> On Saturday, December 17, 2011 11:02:49 PM UTC-5, Massimo Di Pierro wrote:
>
> > The jquery.checkbox plugin replaces the usual checkbox with a [yes]/
> > [no] slider. If I replace 'slide' with 'click' the [yes]/[no] behaves
> > the opposite way (yes for unchecked and no for checked). weird.
>
> Are you saying:
>
> jQuery("input[type='checkbox'].delete", target).click(...)
>
> causes your yes/no slider to misbehave, but
>
> jQuery("input[type='checkbox'].delete", target).live('click', ...)
>
> does not? What does "slide" have to do with it?
>
> What do you suggest we do with web2py.js? If we use .live('click', ...), a
> component loaded with a delete checkbox in it will get the handler twice,
> which causes problems (that's why we originally changed it from .live to
> .click, as well as adding the 'target' context to the selector).
>
> Anthony


[web2py] Re: book 4th edition in PDF

2011-12-18 Thread Gerd
Hi!

It worked for me

Thanks
Gerd


[web2py] Re: the Set class should be deprecated

2011-12-18 Thread Massimo Di Pierro
We do support something silimilar:

db(Query(db, db._adapter.EQ, db.mytable.myfield, value))>select()

but it is not advertised because this is an internal issue and do not
promise backward compatibility.

We also support

>>> e = Expression(db,"mytable.myfield LIKE 'value' ")
>>> db(db.mytable)(e)._select()

Where expression can be anything.

On Dec 18, 7:09 am, Alan Etkin  wrote:
> And what if DAL supported statements like this? I think it doesen't by
> now:
>
> db(Query(db.mytable.myfield, "mystringoperator", myvalue)).select()
>
> Would that be a possible to implement, enhanced way of querying the
> database for the framework?
> Does it follows B. Will A option?
>
> On 17 dic, 16:18, Massimo Di Pierro 
> wrote:
>
>
>
>
>
>
>
> > I am reading this over and over... "a == b is a boolean". I know what
> > you mean but it may be confusing to other users so I will clarify.
> > It is a boolean when a and b have values, else it is just an
> > expression. In dal, "a==b" is a query (an expression) that is
> > evaluated on every record and if it returns true the record is
> > selected (not unlike SQL).
>
> > So in
>
> > db(a == b).select() or the proposed (a==b).select()
>
> > (a==b) does not return a boolean.
>
> > Massimo
>
> > On Dec 17, 11:36 am, Alan Etkin  wrote:
>
> > > > @Alan Etkin
> > > > Actually, (db.mytable.id == 3) is neither a tuple or a bool. The ==
> > > > operator used on a field returns a Query object.
>
> > > Yes, you are right, what i was trying to say is that this:
>
> > > (a == b).select()
>
> > > is more confusing to me than the normal web2py instruction because in
> > > a python program the above sentence should call a method of a bool
> > > object:
>
> > > "...Comparisons yield boolean values: True or False..."


[web2py] Re: smartgrid - still not resolving a problem

2011-12-18 Thread Anthony
On Saturday, December 17, 2011 11:02:49 PM UTC-5, Massimo Di Pierro wrote:
>
> The jquery.checkbox plugin replaces the usual checkbox with a [yes]/
> [no] slider. If I replace 'slide' with 'click' the [yes]/[no] behaves
> the opposite way (yes for unchecked and no for checked). weird.


Are you saying:

jQuery("input[type='checkbox'].delete", target).click(...)

causes your yes/no slider to misbehave, but

jQuery("input[type='checkbox'].delete", target).live('click', ...) 

does not? What does "slide" have to do with it?

What do you suggest we do with web2py.js? If we use .live('click', ...), a 
component loaded with a delete checkbox in it will get the handler twice, 
which causes problems (that's why we originally changed it from .live to 
.click, as well as adding the 'target' context to the selector).

Anthony




[web2py] Re: assigning class name to SQLform element parent gives error

2011-12-18 Thread Anthony
I cannot reproduce this error running the exact code you have below.

Anthony

On Sunday, December 18, 2011 5:16:48 AM UTC-5, Paolo Caruccio wrote:
>
> *Scenario*
>
> 1. #model db.py
> db.define_table('specializzazioni',
> Field('specializzazione', 
> type='string',notnull=True,label=T('Specialization')),
> format='%(specializzazione)s',
> )
>
> db.define_table('t_valutazione_risorsa',
> Field('f_specializzazione',type='list:reference 
> specializzazioni',notnull=True,label=T('Specialization')),
> 
> Field('f_valutazione_qualifica',type='string',notnull=True,label=T('Rating')),
> )
> db.t_valutazione_risorsa.f_specializzazione.requires = [IS_IN_DB(db, 
> db.specializzazioni.id, db.specializzazioni._format, 
> multiple=True),IS_NOT_EMPTY()]
> db.t_valutazione_risorsa.f_specializzazione.widget = 
> SQLFORM.widgets.multiple.widget
>
> 2. # controller default.py
> def test():
> form = SQLFORM(db.t_valutazione_risorsa)
>
> if form.accepts(request, session):
> response.flash = T('resource rating added')
>
> if isinstance(form,FORM):
> ms = form.element("select", _name='f_specializzazione')
> ms["_class"]="chosen"
> ms.parent["_class"]="multi"
>
> return dict(form=form)
>
> *Error traceback*
>
> Traceback (most recent call last):
>   File "M:\UniServer\www\web2py_trunk\gluon\restricted.py", line 204, in 
> restricted
> exec ccode in environment
>   File 
> "M:/UniServer/www/web2py_trunk/applications/test/controllers/default.py" 
> , line 
> 85, in 
>   File "M:\UniServer\www\web2py_trunk\gluon\globals.py", line 172, in 
> self._caller = lambda f: f()
>   File 
> "M:/UniServer/www/web2py_trunk/applications/test/controllers/default.py" 
> , line 
> 81, in test
> ms.parent["_class"]="multi"
> TypeError: 'NoneType' object does not support item assignment
>
>
> Wondering why this happens?
>
> Thank you for your reply.
>


[web2py] Re: the Set class should be deprecated

2011-12-18 Thread Alan Etkin
And what if DAL supported statements like this? I think it doesen't by
now:

db(Query(db.mytable.myfield, "mystringoperator", myvalue)).select()

Would that be a possible to implement, enhanced way of querying the
database for the framework?
Does it follows B. Will A option?

On 17 dic, 16:18, Massimo Di Pierro 
wrote:
> I am reading this over and over... "a == b is a boolean". I know what
> you mean but it may be confusing to other users so I will clarify.
> It is a boolean when a and b have values, else it is just an
> expression. In dal, "a==b" is a query (an expression) that is
> evaluated on every record and if it returns true the record is
> selected (not unlike SQL).
>
> So in
>
> db(a == b).select() or the proposed (a==b).select()
>
> (a==b) does not return a boolean.
>
> Massimo
>
> On Dec 17, 11:36 am, Alan Etkin  wrote:
>
> > > @Alan Etkin
> > > Actually, (db.mytable.id == 3) is neither a tuple or a bool. The ==
> > > operator used on a field returns a Query object.
>
> > Yes, you are right, what i was trying to say is that this:
>
> > (a == b).select()
>
> > is more confusing to me than the normal web2py instruction because in
> > a python program the above sentence should call a method of a bool
> > object:
>
> > "...Comparisons yield boolean values: True or False..."
>
>


[web2py] Re: nice article on web2py

2011-12-18 Thread Alan Etkin
I agree with him/her

On 18 dic, 02:05, Massimo Di Pierro 
wrote:
> http://pixelturf.com/2011/12/15/if-python/
>
> :-)


[web2py] Re: Postgres LIKE case sensitive

2011-12-18 Thread Floyd
Hi Massimo,
it should be similar to the .contain() method. It allows to pass the 
"all=True" parameter. for checking more than a contains condition.

It could be something like (in dal.py):

In the class Expression(object):
def like(self, value, caseInsensitive=True):
if caseInsensitive and self.db._adapter.__class__.__name__ == 
"PostgreSQLAdapter":
return Query(self.db, self.db._adapter.ILIKE, self, value)
else:
return Query(self.db, self.db._adapter.LIKE, self, value)

In the class PostgreSQLAdapter(BaseAdapter):
def LIKE(self,first,second):
return '(%s LIKE %s)' % 
(self.expand(first),self.expand(second,'string'))
def ILIKE(self,first,second):
return '(%s ILIKE %s)' % 
(self.expand(first),self.expand(second,'string'))

It would affect only the PostgreSQL Adapter and could be easily extended to 
the .startswith() and .endswith() methods for PostgreSQL that have the same 
behaviour.

I open an issue to track this propose as you suggested.

Bye,
Giovanni



[web2py] Re: application can't find modules on fluxflex.com

2011-12-18 Thread ma...@rockiger.com
Ok, I found the mistake. Somehow, I deleted the __init__.py in the modules 
directory.

So sorry, for the post.


[web2py] assigning class name to SQLform element parent gives error

2011-12-18 Thread Paolo Caruccio
*Scenario*

1. #model db.py
db.define_table('specializzazioni',
Field('specializzazione', 
type='string',notnull=True,label=T('Specialization')),
format='%(specializzazione)s',
)

db.define_table('t_valutazione_risorsa',
Field('f_specializzazione',type='list:reference 
specializzazioni',notnull=True,label=T('Specialization')),

Field('f_valutazione_qualifica',type='string',notnull=True,label=T('Rating')),
)
db.t_valutazione_risorsa.f_specializzazione.requires = [IS_IN_DB(db, 
db.specializzazioni.id, db.specializzazioni._format, 
multiple=True),IS_NOT_EMPTY()]
db.t_valutazione_risorsa.f_specializzazione.widget = 
SQLFORM.widgets.multiple.widget

2. # controller default.py
def test():
form = SQLFORM(db.t_valutazione_risorsa)

if form.accepts(request, session):
response.flash = T('resource rating added')

if isinstance(form,FORM):
ms = form.element("select", _name='f_specializzazione')
ms["_class"]="chosen"
ms.parent["_class"]="multi"

return dict(form=form)

*Error traceback*

Traceback (most recent call last):
  File "M:\UniServer\www\web2py_trunk\gluon\restricted.py", line 204, in 
restricted
exec ccode in environment
  File "M:/UniServer/www/web2py_trunk/applications/test/controllers/default.py" 
, line 
85, in 
  File "M:\UniServer\www\web2py_trunk\gluon\globals.py", line 172, in 
self._caller = lambda f: f()
  File "M:/UniServer/www/web2py_trunk/applications/test/controllers/default.py" 
, line 
81, in test
ms.parent["_class"]="multi"
TypeError: 'NoneType' object does not support item assignment


Wondering why this happens?

Thank you for your reply.


[web2py] Re: deployment problem with mod_wsgi

2011-12-18 Thread LightDot
You have an error in your Apache configuration somewhere, that much is 
obvious. Please post the part of your httpd.conf that you've changed and 
any other changes that you've made to the server configuration.


[web2py] deployment problem with mod_wsgi

2011-12-18 Thread Web2Py Freak
Dear All,
i am trying to use mod_wsgi with apache on fedora  i installed
web2py
in var/www/ and i unzipped it , and i edited the httpd.conf and added
the virtual host script but it keeps giving me this error with i do
"$
service httpd start "
the error is :
bad user name : root@linux
what to do  i tryed  everything !!! please help
Best Regards,
Hassan Al-natour


Re: [web2py] Web Resources

2011-12-18 Thread Chandrakant Kumar

Yes sure

On Sat, 17 Dec 2011 21:33:20 +0530, Javier Quarite   
wrote:



On Sat, Dec 17, 2011 at 10:51 AM, chandrakant kumar
wrote:


Hi Javier

I'm working on same, let me know if we can collaborate.




Really? Well I'm actually beginning with web2py, It just came as an idea
this project because I've seen others and also I was wondering how to do
something like that... if there's some questions... I hope you can help  
me

:)

Javier





[web2py] Re: Record Versioning

2011-12-18 Thread JF
I don't know if having a field using the same name as the table was a 
problem, but I changed it anyway.  It was confusing.
 
But I finally figured out my problem was in the following lines (Note that 
I replaced the table name from mpn to part:
 
db.part.iditm.requires = IS_IN_DB(db, 'item.ipn')
db.part.idbsn.requires = IS_IN_DB(db, 'business.name')
I just modified the code to be:
 
db.part.iditm.requires = IS_IN_DB(db, 'item.id', '%(ipn)s')
db.part.idbsn.requires = IS_IN_DB(db, 'business.id', '%(name)s')
Now everything is working as expected.
 
Thanks,
JF