I´ll post som code as well.. here´s the view: from mysite.books.models import Book from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.admin.views.decorators import staff_member_required
def report(request): return render_to_response( "admin/books/report.html", {'book_list' : Book.objects.all()}, RequestContext(request, {}), ) report = staff_member_required(report) and here´s the template: {% extends "admin/base_site.html" %} {% block title %}List of books by publisher{% endblock %} {% block content %} <div id="content-main"> <h1>List of books by publisher:</h1> {% regroup book_list|dictsort:"publisher.name" by publisher as books_by_publisher %} {% for publisher in books_by_publisher %} <h3>{{ publisher.grouper }}</h3> <ul> {% for book in publisher.list|dictsort:"title" %} <li>{{ book }}</li> {% endfor %} </ul> {% endfor %} </div> {% endblock %} On Jan 3, 1:44 am, Nianbig <[EMAIL PROTECTED]> wrote: > Hi > > I´m building my own admin view... I have followed this > tutorial:http://www.djangobook.com/en/1.0/chapter17/. Everything works fine > except that all urls in the header, the "home" link, "change password" > link, "logout" link doesn't work for some reasen. > > The home-link is linked to "/", not "/admin/".. and the others are > linked to "/admin/myownview/change_password/" and so on... > > Any ideas? Thanks. > > /Niklas --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---