Skip to content

Commit

Permalink
development tgext.admin now works with ToscaWidgets2
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Mar 25, 2012
1 parent 0801c85 commit fe6c5cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions devtools/templates/turbogears/+package+/controllers/root.py_tmpl
Expand Up @@ -14,14 +14,12 @@ from {{package}}.controllers.secure import SecureController
from {{package}}.model import DBSession, metadata
{{endif}}

{{if tw1 == 'True'}}
{{if auth == "sqlalchemy"}}
{{if auth == "sqlalchemy"}}
from tgext.admin.tgadminconfig import TGAdminConfig
from tgext.admin.controller import AdminController
{{elif auth == "ming"}}
{{elif auth == "ming"}}
from tgext.admin.mongo import TGMongoAdminConfig
from tgext.admin.controller import AdminController
{{endif}}
{{endif}}

from {{package}}.lib.base import BaseController
Expand All @@ -48,12 +46,10 @@ class RootController(BaseController):
secc = SecureController()
{{endif}}

{{if tw1 == 'True'}}
{{if auth == "sqlalchemy"}}
{{if auth == "sqlalchemy"}}
admin = AdminController(model, DBSession, config_type=TGAdminConfig)
{{elif auth == "ming"}}
{{elif auth == "ming"}}
admin = AdminController(model, None, config_type=TGMongoAdminConfig)
{{endif}}
{{endif}}

error = ErrorController()
Expand Down
2 changes: 1 addition & 1 deletion devtools/templates/turbogears/setup.py_tmpl
Expand Up @@ -44,13 +44,13 @@ install_requires=[
"repoze.what >= 1.0.8",
"repoze.who-friendlyform >= 1.0.4",
"repoze.who==1.0.19",
"tgext.admin >= 0.3.11",
{{endif}}
{{if auth == "sqlalchemy"}}
"repoze.who.plugins.sa",
"repoze.what.plugins.sql>=1.0.1",
{{endif}}
{{if tw1 == 'True'}}
"tgext.admin >= 0.3.11",
"tw.forms",
{{else}}
"tw2.forms",
Expand Down

0 comments on commit fe6c5cf

Please sign in to comment.