Disrupt07 wrote:

>Thanks again Jo.
>
>However I had to modify the start-myproject.py (the following line)
>   from myproject.controllersfolder.ctrl1 import Root
>  
>
here an example....

../myproject/start-myproject.py:
-----------------------------------------
cherrypy.lowercase_api = True
from os.path import *
import sys
if len(sys.argv) > 1:
    turbogears.update_config(configfile=sys.argv[1], 
modulename="myproject.config")
elif exists(join(dirname(__file__), "setup.py")):
    turbogears.update_config(configfile="dev.cfg", 
modulename="myproject.config")
else:
    turbogears.update_config(configfile="prod.cfg", 
modulename="myproject.config")
from myproject.myfoldercontrollers import Root
turbogears.start_server(Root())

../myproject/controllers/
-------------------------------------
__init__.py:
import ctrl1
ctrl1  = ctrl1.Controller()


../myproject/controllers/ctrl1.py:
-------------------------------
class Controller(object):
    @identity.require(dentity.not_anonymous())
    @expose(template="kid:myproject.templates.ctrl1.index")
    def index(self,**data):
        ....
        ....


jo


>Now, is there a similar way for grouping my models in a folder and
>using them?
>
>Thanks
>
>Marco Mariani wrote:
>  
>
>>Disrupt07 wrote:
>>    
>>
>>>But what do I write in start-myproject.py?
>>>
>>>      
>>>
>>It does not really matter as long as you call tg.start_server(Root())
>>sooner or later... where you get that Root from is up to you
>>    
>>
>
>
>>
>  
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to