Sure, you can access the same database from multiple applications (web2py 
or not).

On Tuesday, August 8, 2017 at 6:29:30 PM UTC-4, jim kaubisch wrote:
>
> Thanks, I think you're right. But its working now, so I'll revisit it once 
> the delivery heat is off.
>
> Please, on the related topic of my other post, I'm I missing something by 
> thinking I should be able to access the SAME mysql db both from web2py as 
> well as a standard Python program, assuming the same version of DAL? 
> In fact, the web2py app creates the db and uses it fine, but the 
> standalone app claims it can't connect to it.
>
> I haven't tried it, but what about 2 web2py apps? Can they access the same 
> (mysql) db
>
> Thanks
>
> On Tuesday, August 8, 2017 at 12:56:23 PM UTC-7, Anthony wrote:
>>
>> As I was developing the app, I realized that I was writing basically the 
>>> same code over and over and over, just with slight differences, e.g. the 
>>> table name, the criteria, the fields I wanted to return and their display 
>>> order...
>>> so a couple of dictionaries to define (1) the tableviews criteria and 
>>> (2) ordered list of fields to return and the core becomes a small 
>>> parameterization of basically the same db query - 10s of lines of code.
>>>
>>
>> Sounds like something you could handle by abstracting everything into a 
>> special function and maybe using Python argument unpacking:
>>
>> db(db.table).select(*list_of_fields, **dictonary_of_named_arguments)
>>
>> Anthony
>>
>

-- 
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/d/optout.

Reply via email to