I have a model named Articles with title and content fields.  Each
page of my site should display a list of the titles, linked with
anchor tags to the corresponding area of the Resources page which
displays all the titles and content.  I am having trouble figuring out
how to pass the #title info.  I've read a previous post:http://
groups.google.com/group/django-users/browse_thread/thread/
bf5bae5b333aae/b8627d237d34fd69?lnk=gst&q=anchor+tag#b8627d237d34fd69,
but am still struggling.

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

Base Template(snippet):
        <div id="sidebar">
                <h2>Resources</h2>
                <ul>
                {% for articles in articles %}
                <li><a href="/resources#{{ articles.title }}/" target="_blank">
{{ articles }}</a></li>
        {% endfor %}
                </ul>
        </div>

I am getting a 'too many redirect' error with this code.  Can anybody
help me with this?

--

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