Wednesday, March 27, 2013

Re: Navigation Bar

In my last project I created a template tag that would take an app name as an argument and build the links according to that user's permissions for the links in that app. This made the template easier to read at the cost of having to write the function and learning how it worked. Since I was the only one in the project, I didn't have to worry too much about that, so it was just a matter of using {% menu 'profiles' %} and {% menu 'blog' %}, for example.

I don't know if this is design pattern is The Right Way (TM), but It Just Works (TM).

You can find documentation on writing custom tags here:


Cheers,
AT

On Wed, Mar 27, 2013 at 11:16 AM, Venkatraman S <venkat83@gmail.com> wrote:

On Wed, Mar 27, 2013 at 5:55 PM, Simon Shaw <simonhamelech@gmail.com> wrote:
I am Django/Web newbie developer and I am looking for the correct way to add a navigation bar (hopefully the correct term) to my ticketing app such that the options "Admin", "Open New Ticket", "View New Ticket", "Dashboard", "Logout" will always appear at the top of the page and that the page where the user is currently located will be highlighted.  Ideally, for users that are not logged in as Admin I would prefer not to show the admin option, should this not be possible I would like the admin option to be grayed out.


django-tabs

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment