Forbedring av #9 og #10. Har reparert sortering, slik at forfattere er sortert på navn, og bøker på år og tittel.
This commit is contained in:
parent
79c73b2502
commit
9daecbb4f7
@ -10,7 +10,7 @@ relations = {'Author' : u'Forfatter', 'Illustrator' : u'Tegner', 'Translator' :
|
||||
# Create your views here.
|
||||
def BookView(request,book_identifier):
|
||||
book=get_object_or_404(Book,isbn=book_identifier)
|
||||
people = book.persons.all().order_by('person')
|
||||
people = book.persons.all().order_by('person__last_name', 'person__first_name')
|
||||
shelves = None
|
||||
global relations
|
||||
if book.category:
|
||||
@ -38,7 +38,7 @@ def BookRedirect(request,book_identifier):
|
||||
def PersonView(request,person_identifier):
|
||||
global relations
|
||||
person = get_object_or_404(Person,id=person_identifier)
|
||||
books = person.books.all().order_by('book')
|
||||
books = person.books.all().order_by('book__published_year', 'book__title')
|
||||
contributed = {}
|
||||
for book in books:
|
||||
if str(book.relation) in relations:
|
||||
|
Reference in New Issue
Block a user