Skip to content

Remove Page.content_type when we move PEPs to RtD #1105

@berkerpeksag

Description

@berkerpeksag

I noticed this while working on #1102. Page.content_type was added in #520. However, we could use Page.content.markup_type for the same purpose.

>>> rss = Page.objects.get(path='dev/peps/peps.rss')
>>> rss.content_type
'application/rss+xml'
>>> rss.content.markup_type
'restructuredtext'
  • While doing this, we should also add a comment saying PageView.content_type is a public attribute of TemplateResponseMixin.content_type which is a base class of DetailView.
  • And add a note that says templates/pages/raw.html is used to create /dev/peps/peps.rss.

Metadata

Metadata

Assignees

Labels

app/pagesRelates to the pages appapp/pepsRelates to the peps app

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions