Notice migrate_neabled=False as notting to do with read only, it only tell
to web2py to not migrate apply to the models in models.py. It is more of a
complement.

You may also consider to use auth permissions and set them to read and
select for every objects in your database for more sercure read only. So in
case you forgot a update or a create somewhere they will be disabled by the
permissions if you check for permission in your functions.

:)

Richard


On Mon, Jan 13, 2014 at 9:22 PM, Teddy Nyambe <[email protected]>wrote:

> Brilliant, am using mural db...have found an inbuilt replication feature
> in mysql. So will try out the dam(..., migrate_enabled=False) feature for
> read only. And of course will use only select statements in the read only
> app.
>
> Thanx
> On 13 Jan 2014 21:42, "Anthony" <[email protected]> wrote:
>
>> Also, set DAL(..., migrate_enabled=False) to prevent migrations.
>>
>> Anthony
>>
>> On Monday, January 13, 2014 2:35:40 PM UTC-5, Richard wrote:
>>>
>>> web2py readonly :
>>> You implement select only in your app function everywhere :
>>>
>>> db().select()
>>>
>>> SQLFORM(..., readonly=True)
>>>
>>> SQLFORM.grid(..., deletable=False, editable=False, create=Flase,
>>> details=True, selectable=True)
>>>
>>> Replication :
>>> An audit trail on your table that received the new data should be what
>>> you want?
>>>
>>>
>>> :)#
>>>
>>> Richard
>>>
>>>
>>> On Mon, Jan 13, 2014 at 7:12 AM, Teddy Nyambe <[email protected]>wrote:
>>>
>>>> I have two web2py apps, one updates database the other app should just
>>>> read. But i want the readonly app to have its own db to ready from with
>>>> selected tables from the main db. Whats the best way to replicate selected
>>>> tables and monitor changes to main db. Secondly what would be the
>>>> configuration of web2py operate in readonly mode?
>>>>
>>>> --
>>>> ............................................................
>>>> ...........................
>>>> Teddy Lubasi Nyambe
>>>> Opensource Zambia
>>>> Lusaka, ZAMBIA
>>>>
>>>> Cell: +260 97 7760473
>>>> website: http://www.opensource.org.zm
>>>>
>>>> ~/
>>>> Human Knowledge belongs to the world! - AntiTrust
>>>>
>>>> Man is a tool-using animal. Without tools he is nothing, with tools he
>>>> is all - Thomas Carlyle 1795-1881
>>>>
>>>> /~
>>>>
>>>> --
>>>> 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 [email protected].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  --
>> 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 [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>  --
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to