[web2py] 2.0.6: "Required=True" not enforced by DAL?

2012-09-05 Thread mjm
I have created simple table:

db.define_table('hoortoestel', 
# algemeen
Field('merk', type='string', required=True, ), 
Field('type', type='string', required=True, ),
...

When trying to enter a new record in appadmin I noticed that when not 
entering anything in either field, the new record data is accepted and 
entered into the (SQLlite) database. I think that's a bug. 
If I change the required constraint to notnull=True, the empty record is 
indeed rejected, as expected. 


-- 





[web2py] 2.0.6 bug? "required=True" not enforced

2012-09-05 Thread mjm
I have defined a simple table: 

db.define_table('hoortoestel', 
# algemeen
Field('merk', type='string', required=True, ), 
Field('type', type='string', required=True, ),
...

If I then try to enter a new record in appadmin and do not enter anything 
for the fields, the record is still accepted and entered into the (SQLite) 
database. I would have expected the DAL to refuse the values. 
If I change the constraints from required=True to notnull=True, the empty 
values are not accepted. 

Bug or oversight by me?

-- 





[web2py] No CMS for Web2Py?

2013-03-12 Thread mjm
I really like Web2Py to get things done without much fuss. But I am 
somewhat surprised there seems to be no CMS for W2P. 

Projects mentioned in this context on this list Instant Press and Movuca 
are not very active: Instant Press has seen no releases since 2010. Movuca 
almost no commits in the last year, the website is gone. A shame really, it 
seemed quite promising. 
Auth.wiki is a nice recent addition to W2P but seems geared to developers, 
not end users. 

Are there any projects I missed? 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: No CMS for Web2Py?

2013-03-12 Thread mjm
Hi Massimo 

auth.wiki seems useful, but mostly for the site developer, not user 
friendly enough for site owner/user IMHO. Something like Plone is overkill 
for a website. I'd like to see something simple and polished somewhere in 
between.
I'd be hesitant to use projects like Instant Press and Movuca that seem 
(almost) abandoned. I'll have a look at w2cms.

Marcel


On Tuesday, March 12, 2013 11:18:54 PM UTC+1, Massimo Di Pierro wrote:
>
> The builit-in wiki despite the misleading name, is kind of a CMS. You have 
> pages. Pages have attachements. Pages have permissions. Attachments inherit 
> permissions. If you think of a page as a folder, this is a CMS lite. ;-)
>
> There is InstantPress, there is movu.ca and there is w2cms (
> https://github.com/mdipierro/w2cms experimental to be revived).
>
> On Tuesday, 12 March 2013 16:31:23 UTC-5, mjm wrote:
>>
>> I really like Web2Py to get things done without much fuss. But I am 
>> somewhat surprised there seems to be no CMS for W2P. 
>>
>> Projects mentioned in this context on this list Instant Press and Movuca 
>> are not very active: Instant Press has seen no releases since 2010. Movuca 
>> almost no commits in the last year, the website is gone. A shame really, it 
>> seemed quite promising. 
>> Auth.wiki is a nice recent addition to W2P but seems geared to 
>> developers, not end users. 
>>
>> Are there any projects I missed? 
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: No CMS for Web2Py?

2013-03-24 Thread mjm
Hi Loïc,

This looks very promising! 

Thx for the tip.

Marcel

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: No CMS for Web2Py?

2013-03-24 Thread mjm
Hi Derek

Web2Py might be backward compatible but neither Movuca nor InstantPress 
work out of the box. That does not inspire others to contribute ;-)

Marcel


On Wednesday, March 13, 2013 1:58:24 AM UTC+1, Derek wrote:
>
> Well, the thing about web2py is that it's been backwards compatible from 
> the start, so an abandoned project should work just fine in the latest 
> version of Web2py. The way it's laid out, it makes modifying code easy as 
> well. Don't be afraid to pick up an older CMS and run with it.
>
> On Tuesday, March 12, 2013 4:06:09 PM UTC-7, mjm wrote:
>>
>> Hi Massimo 
>>
>> auth.wiki seems useful, but mostly for the site developer, not user 
>> friendly enough for site owner/user IMHO. Something like Plone is overkill 
>> for a website. I'd like to see something simple and polished somewhere in 
>> between.
>> I'd be hesitant to use projects like Instant Press and Movuca that seem 
>> (almost) abandoned. I'll have a look at w2cms.
>>
>> Marcel
>>
>>
>> On Tuesday, March 12, 2013 11:18:54 PM UTC+1, Massimo Di Pierro wrote:
>>>
>>> The builit-in wiki despite the misleading name, is kind of a CMS. You 
>>> have pages. Pages have attachements. Pages have 
>>> permissions. Attachments inherit permissions. If you think of a page as a 
>>> folder, this is a CMS lite. ;-)
>>>
>>> There is InstantPress, there is movu.ca and there is w2cms (
>>> https://github.com/mdipierro/w2cms experimental to be revived).
>>>
>>> On Tuesday, 12 March 2013 16:31:23 UTC-5, mjm wrote:
>>>>
>>>> I really like Web2Py to get things done without much fuss. But I am 
>>>> somewhat surprised there seems to be no CMS for W2P. 
>>>>
>>>> Projects mentioned in this context on this list Instant Press and 
>>>> Movuca are not very active: Instant Press has seen no releases since 2010. 
>>>> Movuca almost no commits in the last year, the website is gone. A shame 
>>>> really, it seemed quite promising. 
>>>> Auth.wiki is a nice recent addition to W2P but seems geared to 
>>>> developers, not end users. 
>>>>
>>>> Are there any projects I missed? 
>>>>
>>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] CAS provider: additional fields only picked up at creation of local user

2013-04-24 Thread mjm
The docs at 
http://web2py.com/books/default/chapter/29/09#Central-Authentication-Service 
say: "Thanks to CAS 2.0 all fields that are readable on the provider and 
have a corresponding field in the auth_user table of the consumer will be 
copied automatically."

This is correct but does not mention that the contents of the additional 
field are only copied to the corresponding local field when the user logs 
in the first time, ie when the local user is created. When the original 
field (in the CAS provider) changes and the user later logs in locally the 
contents of the changed field are not copied again. 
This may be by design but may be confusing (it was to me). I suggest 
appending the docs. 

Also does anyone know what the local auth_cas table is for?

TIA

Marcel

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Use DAL connection pool for MongoDB?

2013-04-24 Thread mjm
DAL now supports MongoDB which is nice for auth and forms. But I'd like to 
use the MongoDB query facilities (and maybe GridFS). 
Is it possible to obtain a connection to the database through DAL or should 
just use pymongo's MongoClient, as if it was another application?

TIA

Marcel

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Use DAL connection pool for MongoDB?

2013-04-25 Thread mjm
Thanks!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Is LOAD broken in Web2Py github repo?

2013-07-09 Thread mjm
LOADed components don't seem to work anymore in the development version of 
w2p (2.6.0-development+timestamp.2013.07.08.01.37.54). 

As a test I modified the welcome to have this controller:

def loaded():
return SQLFORM.grid(db.auth_user, csv=False)

And this view:

{{extend 'layout.html'}}
{{=LOAD('default','loaded',ajax=True)}}

The page shows only the text "Loading".

Regular w2p (2.5.0) works fine. 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Reusing a prefilled, readonly SQLFORM.factory form?

2014-02-17 Thread mjm
I observed the same behavior for SQLFORM.factory generated read-only forms. 
I ran into this when I had a table with lots of fields for which I wanted 
to create forms that displayed/edited only a selection of the 
fields. SQLFORM.factory is the way to go. 
Having the readonly form ignore the prepopulated form.vars looks like a bug 
to me. 



On Friday, November 4, 2011 5:21:50 PM UTC+1, pepper_bg wrote:
>
> This got solved by using the fact that Field.default could be 
> manipulated *after* the Field has been created (following the above 
> line of examples): 
>
> def build_form(readonly=False): 
> #create fields or get from 
> db 
> field1=Field('test') 
> field2=db.my_table.best 
> #set 
> defaults 
> field1.default='abc' 
> field2.default='123' 
> #give it to the 
> form 
> form = SQLFORM.factory( *[field1, field2], readonly=readonly ) 
>
> def frm(): 
> form = build_form( readonly=True ) 
> return dict(form=form) 
>
> So readonly=True and no need of form.accepts. The lesson (if I am 
> still not missing something) - if you want to reuse a SQLFORM.factory 
> form and make it readonly set the defaults using Field.default and not 
> Form.vars. Very particular... 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.