The pages in T3 are not web2py templates. Things like this where never
allowed.
{{if self.logged_in:}}<br>
{{=self.create(db.student, next='wiki/students')}}<br>
{{pass}}<br>
You can do:
{{=self.create(db.student, next='wiki/students') if self.logged_in or
''}}
Massimo
On Oct 31, 3:50 pm, Júlio Monteiro <[email protected]> wrote:
> Hello there!
> Another strange behavior, when trying to register a new user I get:
> Traceback (most recent call last):
> File "gluon/restricted.py", line 184, in restricted
> exec ccode in environment
> File "/var/local/web2py/applications/alunos/controllers/default.py", line
> 112, in <module>
> File "gluon/globals.py", line 103, in <lambda>
> self._caller = lambda f: f()
> File "/var/local/web2py/applications/alunos/controllers/default.py", line
> 29, in register
> def register(): return
> dict(form=t2.register(verification=settings.email_verification,sender=settings.email_sender))
> File "applications/alunos/modules/t2.py", line 1077, in register
> vars={'registration_key': str(uuid.uuid4()) if verification else ''}
> NameError: global name 'uuid' is not defined
> What could be the problem?
> Julio Monteiro
> Júlio Monteiro wrote:I was testing the new released version with T3, but I am
> getting a strange error now.
> One of my pages has this code:
> {{if self.logged_in:}}<br>
> {{=self.create(db.student, next='wiki/students')}}<br>
> {{pass}}<br>
> I get this error:Traceback(most recent call
> last):File"applications/alunos/modules/t2.py",line41,int3_executeexec(c,{},environment)File"<string>",line1if
> self.logged_in: ^SyntaxError:unexpected EOFwhileparsing
> Actually I get this error with any command that ends with ":", like "for".
> Any clues on what is causing this?
> Thanks a lot!
> Julio Monteiro
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---