You can use request.now, that is a default datetime.datetime object..
e.g. (paste this on the view)
month: {{=request.now.month}}
day : {{=request.now.day}}
...
On 14 Giu, 00:32, Giuseppe Luca Scrofani wrote:
> Hi, how I can insert in a page not served by a controller (think
> layout.
No do not worry. The import only happes the first time, than the
module is cached.
On Jun 13, 5:32 pm, Giuseppe Luca Scrofani
wrote:
> Hi, how I can insert in a page not served by a controller (think
> layout.html in the welcome application) current day and month?
>
> I've tested something like
If you want this variable globally available for all views then put
`giugno = 6' into a model.
Or if you only want this variable for a certain view then pass it
explicitly in the controller with `return dict(giugno=6, ...)'
Then in the view[s] you can use {{= giugno }}
On Jun 14, 11:58 pm, Giuse
Thanks for answering friends, it worked! Now, how I can setup a
condition block to transform the digit returned by
{{=request.now.month}} (example: 6) into something like "giugno" (june
in italian language)?
> e.g. (paste this on the view)
>
> month: {{=request.now.month}}
> day : {{=reque
Thanks friend :)
> If you want this variable globally available for all views then put
> `giugno = 6' into a model.
> Or if you only want this variable for a certain view then pass it
> explicitly in the controller with `return dict(giugno=6, ...)'
5 matches
Mail list logo