librelist archives

« back to archive

Is the extension flask-themes still usable?

Is the extension flask-themes still usable?

From:
Fazheng Li
Date:
2013-01-07 @ 00:34
I have been stuck on this all day.
I download the source code from
https://bitbucket.org/leafstorm/flask-themes/src
and I go to the folder "example" run command "python themesandbox " to
start a server.

folder "example" is like this(some items are not listed):
/examples
....posts.yaml
....themesandbox.py
..../templates
     ....index.html
     ....layout.html
..../themes
    ..../plain
        ..../templates
            ....layout.html
    ..../calmblue
        ..../templates
            ....layout.html


if you go to 127.0.0.1:5000,
the server will return "render_theme_template(theme,index.html,**args)"
and in index.html,"layout.html" is included.

if you choose different themes, the server is supposed to render different
layout.html.

the trouble I met is when I click some links on web page to change
themes,it doesn't work at all.
so is there anybody here can help me to solve this problem? thank you very
much.

Re: [flask] Is the extension flask-themes still usable?

From:
Owein Reese
Date:
2013-01-07 @ 00:44
Do you have some code we could look at?
On Jan 6, 2013 7:43 PM, "Fazheng Li" <fzleee@gmail.com> wrote:

> I have been stuck on this all day.
> I download the source code from
> https://bitbucket.org/leafstorm/flask-themes/src
> and I go to the folder "example" run command "python themesandbox " to
> start a server.
>
> folder "example" is like this(some items are not listed):
> /examples
> ....posts.yaml
> ....themesandbox.py
> ..../templates
>      ....index.html
>      ....layout.html
> ..../themes
>     ..../plain
>         ..../templates
>             ....layout.html
>     ..../calmblue
>         ..../templates
>             ....layout.html
>
>
> if you go to 127.0.0.1:5000,
> the server will return "render_theme_template(theme,index.html,**args)"
> and in index.html,"layout.html" is included.
>
> if you choose different themes, the server is supposed to render different
> layout.html.
>
> the trouble I met is when I click some links on web page to change
> themes,it doesn't work at all.
> so is there anybody here can help me to solve this problem? thank you very
> much.
>
>
>
>
>

Re: [flask] Is the extension flask-themes still usable?

From:
Fazheng Li
Date:
2013-01-07 @ 01:00
all  my code is  in https://bitbucket.org/leafstorm/flask-themes/src
and  only the  file "themesandbox. py" need to  be take  into account.

I didn't do anythig  to the source code ,I just run an example of it ,and
it doesn't work. I even read some source code of flask-themes, and I can
not found why. ..
On Jan 7, 2013 1:50 AM, "Owein Reese" <owreese@gmail.com> wrote:

> Do you have some code we could look at?
> On Jan 6, 2013 7:43 PM, "Fazheng Li" <fzleee@gmail.com> wrote:
>
>> I have been stuck on this all day.
>> I download the source code from
>> https://bitbucket.org/leafstorm/flask-themes/src
>> and I go to the folder "example" run command "python themesandbox " to
>> start a server.
>>
>> folder "example" is like this(some items are not listed):
>> /examples
>> ....posts.yaml
>> ....themesandbox.py
>> ..../templates
>>      ....index.html
>>      ....layout.html
>> ..../themes
>>     ..../plain
>>         ..../templates
>>             ....layout.html
>>     ..../calmblue
>>         ..../templates
>>             ....layout.html
>>
>>
>> if you go to 127.0.0.1:5000,
>> the server will return "render_theme_template(theme,index.html,**args)"
>> and in index.html,"layout.html" is included.
>>
>> if you choose different themes, the server is supposed to render
>> different layout.html.
>>
>> the trouble I met is when I click some links on web page to change
>> themes,it doesn't work at all.
>> so is there anybody here can help me to solve this problem? thank you
>> very much.
>>
>>
>>
>>
>>

Re: [flask] Is the extension flask-themes still usable?

From:
Owein Reese
Date:
2013-01-07 @ 01:08
Whoops. Sorry.
On Jan 6, 2013 8:08 PM, "Fazheng Li" <fzleee@gmail.com> wrote:

> all  my code is  in https://bitbucket.org/leafstorm/flask-themes/src
> and  only the  file "themesandbox. py" need to  be take  into account.
>
> I didn't do anythig  to the source code ,I just run an example of it ,and
> it doesn't work. I even read some source code of flask-themes, and I can
> not found why. ..
> On Jan 7, 2013 1:50 AM, "Owein Reese" <owreese@gmail.com> wrote:
>
>> Do you have some code we could look at?
>> On Jan 6, 2013 7:43 PM, "Fazheng Li" <fzleee@gmail.com> wrote:
>>
>>> I have been stuck on this all day.
>>> I download the source code from
>>> https://bitbucket.org/leafstorm/flask-themes/src
>>> and I go to the folder "example" run command "python themesandbox " to
>>> start a server.
>>>
>>> folder "example" is like this(some items are not listed):
>>> /examples
>>> ....posts.yaml
>>> ....themesandbox.py
>>> ..../templates
>>>      ....index.html
>>>      ....layout.html
>>> ..../themes
>>>     ..../plain
>>>         ..../templates
>>>             ....layout.html
>>>     ..../calmblue
>>>         ..../templates
>>>             ....layout.html
>>>
>>>
>>> if you go to 127.0.0.1:5000,
>>> the server will return "render_theme_template(theme,index.html,**args)"
>>> and in index.html,"layout.html" is included.
>>>
>>> if you choose different themes, the server is supposed to render
>>> different layout.html.
>>>
>>> the trouble I met is when I click some links on web page to change
>>> themes,it doesn't work at all.
>>> so is there anybody here can help me to solve this problem? thank you
>>> very much.
>>>
>>>
>>>
>>>
>>>

Re: [flask] Is the extension flask-themes still usable?

From:
Fazheng Li
Date:
2013-01-07 @ 12:59
I get the reason. There is a bug in flask-themes
it doesn't work well on flask 0.8 or higher version

from the issue here we can find the solution:



https://bitbucket.org/leafstorm/flask-themes/pull-request/2/fix-to-make-jinjas-include-and-import/diff


2013/1/7 Owein Reese <owreese@gmail.com>

> Whoops. Sorry.
> On Jan 6, 2013 8:08 PM, "Fazheng Li" <fzleee@gmail.com> wrote:
>
>> all  my code is  in https://bitbucket.org/leafstorm/flask-themes/src
>> and  only the  file "themesandbox. py" need to  be take  into account.
>>
>> I didn't do anythig  to the source code ,I just run an example of it ,and
>> it doesn't work. I even read some source code of flask-themes, and I can
>> not found why. ..
>> On Jan 7, 2013 1:50 AM, "Owein Reese" <owreese@gmail.com> wrote:
>>
>>> Do you have some code we could look at?
>>> On Jan 6, 2013 7:43 PM, "Fazheng Li" <fzleee@gmail.com> wrote:
>>>
>>>> I have been stuck on this all day.
>>>> I download the source code from
>>>> https://bitbucket.org/leafstorm/flask-themes/src
>>>> and I go to the folder "example" run command "python themesandbox " to
>>>> start a server.
>>>>
>>>> folder "example" is like this(some items are not listed):
>>>> /examples
>>>> ....posts.yaml
>>>> ....themesandbox.py
>>>> ..../templates
>>>>      ....index.html
>>>>      ....layout.html
>>>> ..../themes
>>>>     ..../plain
>>>>         ..../templates
>>>>             ....layout.html
>>>>     ..../calmblue
>>>>         ..../templates
>>>>             ....layout.html
>>>>
>>>>
>>>> if you go to 127.0.0.1:5000,
>>>> the server will return "render_theme_template(theme,index.html,**args)"
>>>> and in index.html,"layout.html" is included.
>>>>
>>>> if you choose different themes, the server is supposed to render
>>>> different layout.html.
>>>>
>>>> the trouble I met is when I click some links on web page to change
>>>> themes,it doesn't work at all.
>>>> so is there anybody here can help me to solve this problem? thank you
>>>> very much.
>>>>
>>>>
>>>>
>>>>
>>>>