Chapters¶
Chapter Model¶
| Model field reference | cv.models.publications.Chapter |
| Authorship set | cv.models.publications.ChapterAuthorship |
| Editorship set | cv.models.publications.ChapterEditorship |
The Chapter model represents an instance
of a chapter. In addition to the authorship attribute that saves
authorship information, the Chapter class also has an
editorship attribute that contains information about editors of
the volume in which the chapter appears. The editorship relationship
operates the same way as
authorship sets and include
the same fields, except that the editorship model does not contain a
student_colleague field.
Chapter Views¶
- Chapter List :
cv.views.CVListView Context object {{chapter_objects}}Template 'cv/lists/chapter_list.html'URL 'chapters/'MIME type text/htmlThe chapter list view produces a page with a list of the author’s chapters. The page renders an instance of the
cv.views.CVListViewwith the named parametermodel_nameset to'chapter'. This view returns the object{{object_list}}in the context with four objects on its dot path:total_chapters- Integer of total number of chapters from all three managers:
chapter_published_list- queryset of all published chapters (uses the
published()method of thePublicationManager) chapter_revise_list- queryset of all chapters in the revision process (uses the
revise()method of thePublicationManager) chapter_inprep_list- queryset of all chapters in preparation for submission (uses
the
inprep()method of thePublicationManager)
The URL can be accessed in templates by using the URL template filter with the named URL
section_listandmodel_nameparameter equal tochapter, i.e.:{% url section_list model_name='chapter' %}
- Chapter Detail:
cv.views.ChapterDetailView Context object {{chapter}}Template 'cv/details/chapter_detail.html'URL 'chapters/<slug:slug>/'MIME type text/htmlThe chapter detail view produces a page that represents a single chapter. The default template includes the title, the abstract, and links to download the citation in both RIS and BibTeX formats (described below). The page is rendered as an instance of the
cv.views.CVDetailViewview with the named parametersmodel_nameset to'chapter'and theslugset to the value of the chapter’s slug field. The view returns the context{{chapter}}that represents a theChapterinstance.The URL can be accessed using the named URL
item_detailwith withmodel_nameset toarticleandslugset to the article’s slug attribute, i.e.:{% url item_detail model_name='chapter' slug='slug-from-short-title' %}
- Chapter Citation:
cv.views.book_citation_view() Context object {{chapter}}Templates 'cv/citations/chapter.ris''cv/citations/chapter.bib'URL 'chapter/<slug:slug>/citation/<str:format>/'MIME types application/x-research-info-systemsapplication/x-bibtexReturns view to allow citation to be downloaded to citation management software.
The
<str:format>named parameter should be one of:'ris'- will create downloadable citation using Reference Manager format specification (see http://endnote.com/sites/rm/files/m/direct_export_ris.pdf).
'bib'- will create downloadable citation using the BibTeX format specification (see http://www.bibtex.org/Format/)