I guess it is referring to the packing/installation of *.w2p files via the 
admin interface.  Only files under the app's dir would be packed, 
 therefore site-packages would have to be installed outside that mechanism. 

By using Dropbox you are not relying on the admin interface for the 
mentioned "portability" feature.



On Friday, August 17, 2012 9:38:26 PM UTC+1, curiouslearn wrote:
>
> Thanks pbreit and weheh. 
>
> I looked at the link give by pbreit. It says the following:
>
> "applications requiring site-packages are not portable unless these 
> modules are installed separately."
>
> What exactly does it mean they are not portable? For example, as of now my 
> application which lives in a dropbox folder synced with pythonanywhere, 
> works great on pythonanywhere. Would that stop working?
>
> Thanks.
>
> On Friday, August 17, 2012 8:22:43 AM UTC-4, weheh wrote:
>>
>> CSS belongs under static. Packages and common routines belong under 
>> modules and are "import"ed. You could have a common static and modules and 
>> symbolically link. I have never done that, but it makes sense.
>>
>> I suppose you could also put the CSS just about anywhere on the file 
>> system. And modules could be put under the python package library and 
>> imported from there. I haven't tried that, but seems like it would work.
>>
>> On Friday, August 17, 2012 11:57:02 AM UTC+8, curiouslearn wrote:
>>>
>>> Hello,
>>>
>>> What is the recommended place in web2py folder where I should store 
>>> custom functions that are useful to multiple applications? For example, 
>>> suppose I have a function such as the following:
>>>
>>> *def connecttodb():*
>>> *    if request.is_local:*
>>> *        user="user"*
>>> *        passwd="passed"*
>>> *        host="localhost"*
>>> *    else:*
>>> *        user="user_nonlocal"*
>>> *        passwd="passwd_nonlocal"*
>>> *        host="nonlocalhost"*
>>> *    con = mdb.connect(user=user,*
>>> *                      passwd=passwd,*
>>> *                      host=host)*
>>> *    c = con.cursor()*
>>> *    return con, c*
>>>
>>>
>>>  I will need this in every application. Further, if I decide to change 
>>> the host, I have to go and change the values in every application. There 
>>> are other useful functions common to all applications. Can I just store 
>>> them in one folder and import them, so that they work both on local and web 
>>> hosts? If so, where do you recommend I save them?
>>>
>>> Thank you.
>>>
>>

-- 



Reply via email to