'Felix H' via bottlepy
2014-10-20 20:47:28 UTC
I'm trying to build a small python app based on the bottle framework.
First some information about the structure:
/application
app.py
/controllers
content.py
media.py
settings.py
/models
/views
The python files in the controllers directory each contains a bottle app
which will be all merged to a single one in the app.py - I'm trying to
simulate the mvc pattern. For these apps I'm using the jinja2 template
engine with some custom filters e.g. for formatting a timestamp. So every
'small' app has an import like this:
from Bottle import jinja2_view as view
Therefore I have to define the custom filters in each app - not really
satisfying.
Is there a possibility to define these custom filters just one time and use
them in all apps/templates?
--
Thanks and best regards,
Felix
--
First some information about the structure:
/application
app.py
/controllers
content.py
media.py
settings.py
/models
/views
The python files in the controllers directory each contains a bottle app
which will be all merged to a single one in the app.py - I'm trying to
simulate the mvc pattern. For these apps I'm using the jinja2 template
engine with some custom filters e.g. for formatting a timestamp. So every
'small' app has an import like this:
from Bottle import jinja2_view as view
Therefore I have to define the custom filters in each app - not really
satisfying.
Is there a possibility to define these custom filters just one time and use
them in all apps/templates?
--
Thanks and best regards,
Felix
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.