From ab8055b5cab2523d925f59c65bc38df103a26991 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 2 Dec 2020 15:02:12 -0500 Subject: deleted old apps and media --- app/unused_apps/notes/models.py | 50 ----------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 app/unused_apps/notes/models.py (limited to 'app/unused_apps/notes/models.py') diff --git a/app/unused_apps/notes/models.py b/app/unused_apps/notes/models.py deleted file mode 100644 index 8735056..0000000 --- a/app/unused_apps/notes/models.py +++ /dev/null @@ -1,50 +0,0 @@ -from django import forms -from django.contrib.gis.db import models -from django.utils import timezone -from django.conf import settings -from django.urls import reverse -from locations.models import Location - -from locations.models import CheckIn -from utils.util import markdown_to_html, render_images - - -class Note(models.Model): - title = models.CharField(max_length=250, null=True, blank=True) - slug = models.SlugField(unique_for_date='pub_date', blank=True) - pub_date = models.DateTimeField(default=timezone.now) - body_html = models.TextField(blank=True) - body_markdown = models.TextField('Note') - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("notes:detail", kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) - - @property - def region(self): - return self.location.state.country.lux_region - - @property - def longitude(self): - '''Get the site's longitude.''' - return round(self.point.x, 2) - - @property - def latitude(self): - '''Get the site's latitude.''' - return round(self.point.y, 2) - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date() - - @property - def get_next_published(self): - return self.get_next_by_pub_date() - - def save(self, *args, **kwargs): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - super(Note, self).save() -- cgit v1.2.3-70-g09d2