Re: [flask] Using context processors when using app factories
- From:
- Simon Sapin
- Date:
- 2011-02-07 @ 08:32
Le 07/02/2011 16:26, John Anderson a écrit :
> Any ideas on what I'm doing wrong?
>
After the line
import regolution.context_processors
Try adding
app.register_module(regolution.context_processors.context_processors)
ie. register the Module object with the app.
Regards,
--
Simon Sapin
http://exyr.org/
Re: [flask] Using context processors when using app factories
- From:
- John Anderson
- Date:
- 2011-02-07 @ 08:40
>
>
> After the line
>
> import regolution.context_processors
>
> Try adding
>
> app.register_module(regolution.context_processors.context_processors)
>
> ie. register the Module object with the app.
>
>
Thats what I'm doing, if you look at the sample, I'm grabbing the module
object:
from project.context_processors import context_processors
then i'm registering it:
app.register_module(context_processors)
Re: [flask] Using context processors when using app factories
- From:
- John Anderson
- Date:
- 2011-02-07 @ 08:56
>
>
>> Thats what I'm doing, if you look at the sample, I'm grabbing the module
> object:
> from project.context_processors import context_processors
>
> then i'm registering it:
> app.register_module(context_processors)
>
using @ctx.app_context_processor Since my context_processors.py were their
own module I don't think any of templates for other modules had access to it
:)