I'm developing a simple online catalog using Turbogears as backend to an Angular app.
The app runs very smooth and well. But, it has come to my attention that, using Angular's HashLocationStrategy google is unable to parse content.
My design uses a catalog_controller.py which only renders index, from there Angular takes over, having urls like '/catalog#/category/443435523daf321f123123sfaf1234'
class CatalogController(BaseController):
# Uncomment this line if your controller requires an authenticated user
# allow_only = predicates.not_anonymous()
@expose()
def _default(self, *args):
site_dir = os.path.join(config.get('here'), '/catalogapp/public')
return StaticURLParser(site_dir)(tg.request)
# return WSGIAppController(StaticURLParser(site_dir)), args
@expose('bodegagourmet.templates.catalog')
def index(self, **kw):
return dict(page='catalog-index')
I'm trying to use the new Angular routing systems which no longer requires hashes, but now all those links are intercepted by TG controllers, returning 404's everywhere.
My question is, where to tell TG to ignore requests beyond a controller?
I mean, I'm looking for TG to ignore all requests from /catalog/ (except, maybe for index)
Thanks