Greetings group!
I've been trying to get this code to work:
http://www.djangosnippets.org/snippets/282/
I created a templatetags folder in my app, and added __init__.py and
usertags.py. I pasted the code from the snippets site into my
usertags.py. I have a view define like this:
@login_required
def user_home(request):
return render_to_response('master/template/user_home.html',
{},
context_instance=RequestContext(request),)
And my user_home.html looks like this:
{% load usertags %}
{% ifusergroup member %}
You are a member.
{% endifusergroup %}
This works, but I don't understand why I can't call render_to_response
like so:
render_to_response('master/template/user_home.html')
I've read over the "Extending the Template Engine" chapter of the book
but I feel like I keep getting further from an answer.
Thanks in advance for any help.
-JD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---