Re: Extending the base file depending on User type

2013-03-07 Thread Sandeep kaur
On Wed, Mar 6, 2013 at 10:55 PM, Sam Solomon wrote: > Tom Evans has probably the correct answer for you, but another thing that > def some_view(request): > return render(request, "path/to/template.html", {"view_context": ...}) # > The "render(request" portion will

Re: Extending the base file depending on User type

2013-03-06 Thread Sam Solomon
Tom Evans has probably the correct answer for you, but another thing that I've done (maybe not 100% applicable in this case) is to have a default base and then make it extendable from views when necessary: {% extends base_template|default:"base.html" %} This sounds like it isn't applicable in

Re: Extending the base file depending on User type

2013-03-06 Thread Sandeep kaur
On Wed, Mar 6, 2013 at 2:39 AM, Shawn Milochik wrote: > Instead of extends, you could use the "include" directive. > "include" worked but destroyed all the structure of the template. :-/ -- Sandeep Kaur E-Mail: mkaurkha...@gmail.com Blog: sandymadaan.wordpress.com -- You

Re: Extending the base file depending on User type

2013-03-06 Thread Tom Evans
On Tue, Mar 5, 2013 at 9:06 PM, Sandeep kaur wrote: > I want to extend the base template file into the child file depending > on the condition, like if the user is superuser or staff or active > user, the file to extended should ll be different. > For Eg : > > {% if

Re: Extending the base file depending on User type

2013-03-05 Thread Shawn Milochik
Instead of extends, you could use the "include" directive. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to

Extending the base file depending on User type

2013-03-05 Thread Sandeep kaur
I want to extend the base template file into the child file depending on the condition, like if the user is superuser or staff or active user, the file to extended should ll be different. For Eg : {% if user.is_superuser %} {% extends "base.html" %} {% else if user.is_active %} {%