mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
feat(people): Add people list view
This commit is contained in:
@@ -2,18 +2,25 @@
|
||||
Views for displaying or manipulating models in the 'people' app.
|
||||
"""
|
||||
|
||||
from django.views.generic import DetailView
|
||||
from django.views.generic import DetailView, ListView
|
||||
|
||||
from . import models
|
||||
|
||||
|
||||
class PersonListView(ListView):
|
||||
"""
|
||||
View displaying a list of :class:`Person` objects - searchable.
|
||||
"""
|
||||
model = models.Person
|
||||
template_name = 'people/person/list.html'
|
||||
|
||||
|
||||
class ProfileView(DetailView):
|
||||
"""
|
||||
View displaying the profile of a :class:`Person` - who may be a user.
|
||||
"""
|
||||
model = models.Person
|
||||
template_name = 'people/person/detail.html'
|
||||
context_object_name = 'person'
|
||||
|
||||
|
||||
class RelationshipDetailView(DetailView):
|
||||
@@ -22,4 +29,3 @@ class RelationshipDetailView(DetailView):
|
||||
"""
|
||||
model = models.Relationship
|
||||
template_name = 'people/relationship/detail.html'
|
||||
context_object_name = 'relationship'
|
||||
|
||||
Reference in New Issue
Block a user