I have seem to overcomplicated and I hope i understand your question right :)

You just need to render the template with your titles and content (i
guess you call it resources).

If you have a link such as <a href=/resources/#title>link</a> anywhere
on your site, once you click on it you should return HttpResponse and
render your template with titles and content normally.

You don't need HttpResponseRedirect in resources view and you don't
need to do any special handling of fragment id in Django. It is done
by your client (browser).

so instead of

def resources(request):
       return HttpResponseRedirect('/resources/')

you would have something like:

def resources(request):
  articles = Context({'articles': Articles.objects.all()})
  return render_to_response('resources.html', articles)

If anywhere in your resources.html (once it's rendered) there is a
title or any other element which has id="title" your browser will
position that page on that element.

I suggest you read more on fragment identifiers.

http://en.wikipedia.org/wiki/Fragment_identifier

Davor

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.


Reply via email to