Remove unused code
This commit is contained in:
parent
c9c378e2d6
commit
c6b6002ee8
1 changed files with 0 additions and 6 deletions
|
@ -6,14 +6,12 @@ import markdown
|
||||||
from django.contrib.auth.models import AbstractUser
|
from django.contrib.auth.models import AbstractUser
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.http import HttpRequest
|
|
||||||
from django.template.defaultfilters import slugify
|
from django.template.defaultfilters import slugify
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from markdown.extensions.codehilite import CodeHiliteExtension
|
from markdown.extensions.codehilite import CodeHiliteExtension
|
||||||
|
|
||||||
from articles.markdown import LazyLoadingImageExtension
|
from articles.markdown import LazyLoadingImageExtension
|
||||||
from articles.utils import build_full_absolute_url
|
|
||||||
|
|
||||||
|
|
||||||
class User(AbstractUser):
|
class User(AbstractUser):
|
||||||
|
@ -67,10 +65,6 @@ class Article(AdminUrlMixin, models.Model):
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse("article-detail", kwargs={"slug": self.slug})
|
return reverse("article-detail", kwargs={"slug": self.slug})
|
||||||
|
|
||||||
def get_full_absolute_url(self, request: HttpRequest = None):
|
|
||||||
url = self.get_absolute_url()
|
|
||||||
return build_full_absolute_url(request, url)
|
|
||||||
|
|
||||||
def get_abstract(self):
|
def get_abstract(self):
|
||||||
html = self.get_formatted_content()
|
html = self.get_formatted_content()
|
||||||
return html.split("<!--more-->")[0]
|
return html.split("<!--more-->")[0]
|
||||||
|
|
Reference in a new issue