something like? {% if request.user.is_staff %} {% include 'smth.html' %} {% else %} {% include 'smth2.html' %} {% endif %}
On 24 мар, 00:23, Mazery Smith <mazerysm...@gmail.com> wrote: > Hello, > I have a results.html page and mylibrary.html page on my site that > both display search information in a results box (broken into two > columns (a left and a right column)). > > The left-handed column stays the same (in terms of data being > displayed) between both the results page and the mylibrary page. > > The right-handed column differs between the two pages depending on the > user's permissions and status of page objects being displayed. > > I started breaking both pages down into a number of templates and I'm > finding this to be a nightmare b/c I want my view function to pass my > search results (page objects) to a .html parent of the columns instead > of to the farthest child downstream. Now I'm thinking about using > inclusion template tags to make this transition easier. > > I'm looking for advice on ways to structure nested templates with > changing elements based on user permissions and authentification? > > Ideas? > > Thanks > Mazery -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.