in views:
create template_examples/variables.html no
views/template_examples/variables.html, but is
views/views/ template_examples/variables.html.
Ovidio Marinho Falcao Neto
ITJP.NET.BR
[email protected]
[email protected]
Brasil
2014-02-02 Austin Taylor <[email protected]>:
> Same error: invalid function (views/template_examples)
>
>
> On Sunday, February 2, 2014 4:03:24 PM UTC-5, Massimo Di Pierro wrote:
>>
>> The view should be
>>
>> views/template_examples/variables.html
>>
>> On Sunday, 2 February 2014 11:21:30 UTC-6, Austin Taylor wrote:
>>>
>>>
>>> I've tried some of the examples on the site and created a function in my
>>> controllers folder.
>>>
>>> Controllers folder I have template_examples.py with a function called:
>>> def variables():
>>> return dict(a=10, b=20)
>>>
>>> In my views folder I have variables.html with this code:
>>> {{extend 'layout.html'}}
>>> <h1>You variables</h1>
>>> <h2>a={{=a}}</h2>
>>> <h2>a={{=b}}</h2>
>>>
>>> I try to navigate to 127.0.0.1:8000/myapp/template_
>>> examples/variables.html and I get:
>>>
>>> invalid function (template_examples/variables)
>>>
>>> I'm new to web developing with web2app and am trying to understand the
>>> basic layout, so I might have missed a step or need to add something else.
>>> I've also tried restarting the server. Any thoughts on what I could be
>>> missing?
>>>
>> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.