Changeset - d9d28cf439d7
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 6 months ago 2023-10-13 01:44:28
ben@sturm.com.au
Update podjango model __str__ methods for newer Django
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
www/podjango/apps/cast/models.py
Show inline comments
...
 
@@ -19,9 +19,9 @@
 
from django.db import models
 
from django.conf import settings
 
from django.urls import reverse
 
#from podjango.apps.staff.models import Person
 
from datetime import datetime, timedelta
 

	
 

	
 
class CastTag(models.Model):
 
    """Tagging for casts"""
 

	
...
 
@@ -31,12 +31,13 @@ class CastTag(models.Model):
 
    class Meta:
 
        db_table = 'cast_tags' # legacy
 

	
 
    def __unicode__(self):
 
    def __str__(self):
 
        return self.label
 

	
 
    def get_absolute_url(self):
 
        return reverse('podjango:cast') + "?tag=%s" % self.slug
 

	
 

	
 
class Cast(models.Model):
 
    """Cast"""
 

	
...
 
@@ -45,7 +46,6 @@ class Cast(models.Model):
 
    summary = models.TextField(help_text="Use raw HTML.  This summary is not included at the beginning of the body when the entry is displayed.  It used only for the material on the front page.")
 
    body = models.TextField(help_text="Use raw HTML.  Include the full body of any show notes or other information about this episode.  It will be labelled on the site as Show Notes.  It is included on the detail entry, and in the description data on the cast RSS feed.")
 
    pub_date = models.DateTimeField()
 
#    poster = models.ForeignKey(Person)
 
    tags = models.ManyToManyField(CastTag, blank=True)
 
    ogg_path = models.CharField(max_length=300, blank=True,
 
                             help_text="Local filename of the Ogg file, relative to webroot.  File should be uploaded into the static media area for casts.")
...
 
@@ -63,7 +63,7 @@ class Cast(models.Model):
 
        ordering = ('-pub_date',)
 
        get_latest_by = 'pub_date'
 

	
 
    def __unicode__(self):
 
    def __str__(self):
 
        return self.title
 

	
 
    def get_absolute_url(self):
0 comments (0 inline, 0 general)