Looks like a quite clean way.

Kenneth

There is nothing wrong, i just want to know if this is a "clean" way
to do what i do above or there is a better way.

Thodoris

On Nov 15, 1:26 pm, Kenneth Lundström<[email protected]>
wrote:
Whats wrong in what you just described?

{{if c != None:}}

Kenneth







I want to do the following
def some_function():
      a = ...
      b = ...
      if auth.is_logged_in():
          c = ...
      else:
          c = None
      return (a=a,b=b,c=c)
And in the view some_function.html
{{if c is not None:}}
do something here
{{pass}}
which is the best practice to do it?

Reply via email to