Small fixes for Warnings found by PyCharm, mostly spellingerrors.
This commit is contained in:
@@ -111,6 +111,7 @@ class Article(models.Model):
|
||||
"""Returns the headline of this article."""
|
||||
return self.headline
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
@property
|
||||
def get_image(self):
|
||||
"""Return the article image, or the category image if unset."""
|
||||
@@ -169,6 +170,7 @@ class Category(models.Model):
|
||||
return self.name
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
class Page(models.Model):
|
||||
"""A page on this homepage. It can have a "static" HTML page, the URL of a
|
||||
dynamic Django view, or a PDF document.
|
||||
@@ -317,12 +319,12 @@ class Page(models.Model):
|
||||
raise ValidationError(
|
||||
_(u'Please upload a PDF-File to this PDF-Page.'))
|
||||
|
||||
def get_absolute_url(self):
|
||||
def get_absolute_url(self) -> str:
|
||||
"""Return the path with an extension that matches the content type.
|
||||
It's useful for an user to match the URL to the contenttype.
|
||||
It's useful for a user to match the URL to the contenttype.
|
||||
|
||||
:return: sting with the absolute URL of this page."""
|
||||
return '/' + self.path + CONTENT_TYPE_EXTENSIONS[self.content_type]
|
||||
:return: string with the absolute URL of this page."""
|
||||
return '/' + str(self.path) + CONTENT_TYPE_EXTENSIONS[self.content_type]
|
||||
|
||||
class Meta(object):
|
||||
"""Set default ordering and an unique priamry key to avoid dupes."""
|
||||
|
||||
Reference in New Issue
Block a user