Somehow month is a string. How is it defined?
On Nov 3, 5:25 am, annet <annet.verm...@gmail.com> wrote:
> I had a two column layout:
>
> <div id="twoColLayout">
> <div id="primarycontent">
> ....
> <h3>Nieuws {{=month.replace('_',' ')}}</h3>
> ....
> </div> <!-- primarycontent -->
> <div id="sidecontent">
> ....
> </div> <!-- sidecontent -->
> </div> <!-- twoColLayout -->
>
> Now when I reverse the order in which the columns appear in the view.
>
> <div id="twoColLayout">
> <div id="sidecontent">
> ....
> </div> <!-- sidecontent -->
> <div id="primarycontent">
> ....
> <h3>Nieuws {{=month.replace('_',' ')}}</h3>
> ....
> </div> <!-- primarycontent -->
> </div> <!-- twoColLayout -->
>
> This function:
>
> {{=month.replace('_',' ')}}
>
> Results in an error:
>
> Traceback (most recent call last):
> File "/Library/Python/2.5/site-packages/web2py/gluon/restricted.py",
> line 184, in restricted
> exec ccode in environment
> File "/Library/Python/2.5/site-packages/web2py/applications/init/
> views/news/archive.html", line 98, in <module>
> File "/Library/Python/2.5/site-packages/web2py/gluon/sql.py", line
> 605, in __getattr__
> return dict.__getitem__(self,key)
> KeyError: 'replace'
>
> When I do:
>
> {{=month}}
>
> I get the same kind of error message. Does one of you know why order
> is important here?
>
> Kind regards,
>
> Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---