Note, you can do a conditional {{include 'somefile.html'}}, and I believe
that will be able to compile (as long as the include doesn't include a
variable). The compiled view will include all the code from both included
views, though only one will be executed, depending on the condition.
Anthony
On Sunday, October 2, 2011 8:37:17 PM UTC-4, rochacbruno wrote:
>
>
>
> On Sun, Oct 2, 2011 at 9:29 PM, Anthony wrote:
>
>> I don't think you can do a conditional {{extend}}, can you?
>
>
> Yes it works, do not works only if you compile the app.
>
Are you sure? Doesn't seem to work when I try it?
On Sun, Oct 2, 2011 at 9:29 PM, Anthony wrote:
> I don't think you can do a conditional {{extend}}, can you?
Yes it works, do not works only if you compile the app.
I don't think you can do a conditional {{extend}}, can you?
Anthony
On Sunday, October 2, 2011 3:41:46 PM UTC-4, Julie Bouillon wrote:
>
> I've hacked something based on request.env.query_string because it's
> not working
> with the session if the first page visited is a protected one.
>
> Unf
I've hacked something based on request.env.query_string because it's
not working
with the session if the first page visited is a protected one.
Unfortunately, I think I might have found a bug.
Here's an excerpt of the user.html file I use:
{{if "/appname/contname" in request.env.query_string:}}
{
As a quick solution, store the last visited page in session and check
check in user
is not request.function == 'user':
session.last_action = request.function
controller A
@auth.requires_login() --> send to a view user.html specific for
controller A
def myfunctionA():
return dict()
co
On 10/02/2011 06:53 AM, Massimo Di Pierro wrote:
How do you know if a user that has not yet logged is special or not?
Can you provide an example?
On Oct 1, 1:22 pm, "julie.bouil...@yedia.com"
wrote:
Hi,
Is it possible to define different auth page for the same application ? I
mean having an
How do you know if a user that has not yet logged is special or not?
Can you provide an example?
On Oct 1, 1:22 pm, "julie.bouil...@yedia.com"
wrote:
> Hi,
>
> Is it possible to define different auth page for the same application ? I
> mean having an auth page for "regular" user and another one f
On 10/02/2011 12:21 AM, pbreit wrote:
Can you branch in the user() function?
def user():
if request.function=='login' and user_is_special:
redirect('special_login')
Or it might be easier to do it in the view:
{{if user_is_special:}}
{{=form.custom.begin}}
...
{{=form.cu
Can you branch in the user() function?
def user():
if request.function=='login' and user_is_special:
redirect('special_login')
Or it might be easier to do it in the view:
{{if user_is_special:}}
{{=form.custom.begin}}
...
{{=form.custom.end}}
{{else}}
{{=form}}
{{pass
10 matches
Mail list logo