Also, note that technically, you don't have to move the zip codes to a 
third database. You can leave them where they are and just have other apps 
access that database (again, making sure only one of the apps is managing 
migrations of that table).

Also, depending on the details, you may not need to re-define the zip code 
table model in the other apps -- instead, you can use the auto_import 
<http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Using-DAL-without-define-tables>
 
feature (note, that will provide the basic field information but won't 
include things like validators, labels, etc.).

You can also put the table definition in a function in a module and import 
it in any app that needs it.

Anthony

On Friday, March 6, 2015 at 4:47:40 AM UTC-5, mcm wrote:
>
> You can have zipdb = DAL('<connection to the zip database') in both of 
> your apps (let's call them app1 and app2) and identical table definitions 
> for zipdb.
> Then you can have db = DAL('<connection to app1 db') in app1 models and db 
> = DAL('<connection to app2 db') in app2.
> Just remember to pay attention to migration on zipdb, i.e. only one can 
> have migrate=True when needed while the other must have migrate=False always
>
>
> 2015-03-06 4:57 GMT+01:00 lucas <[email protected]>:
>
>> wouldn't SQL based be better? especially with searching through indexes. 
>>  like i use postgresql and i wouldn't mind sticking with that.  lucas
>>
>> On Thursday, March 5, 2015 at 9:39:21 PM UTC-5, Ron Chatterjee wrote:
>>>
>>> Once solution I can think of, you can save them all on a csv file and 
>>> write them on a csv file. import and export on demand and create tables 
>>> that way. There are some links I saw about how to create DAL object using 
>>> csv file. 
>>>
>>  -- 
>> 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/d/optout.
>>
>
>

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

Reply via email to