Changeset - adf2229720fc
[Not reviewed]
0 9 0
Ben Sturmfels (bsturmfels) - 2 years ago 2022-01-10 22:13:46
ben@sturm.com.au
Rename __unicode__ methods to __str__ following Django upgrade.
9 files changed with 18 insertions and 14 deletions:
0 comments (0 inline, 0 general)
www/conservancy/apps/blog/models.py
Show inline comments
...
 
@@ -16,7 +16,7 @@ class EntryTag(models.Model):
 
    class Meta(object):
 
        db_table = 'techblog_entrytag' # legacy
 

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

	
 
    def get_absolute_url(self):
...
 
@@ -44,7 +44,7 @@ class Entry(models.Model, bsoup.SoupModelMixin):
 

	
 
    SOUP_ATTRS = ['body']
 

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

	
 
    def get_absolute_url(self):
www/conservancy/apps/events/models.py
Show inline comments
...
 
@@ -14,7 +14,7 @@ class EventTag(models.Model):
 

	
 
    date_created = models.DateField(auto_now_add=True)
 

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

	
 
class PastEventManager(models.Manager):
...
 
@@ -50,7 +50,7 @@ class Event(models.Model):
 
    class Meta(object):
 
        ordering = ("-date",)
 

	
 
    def __unicode__(self):
 
    def __str__(self):
 
        return u"%s (%s)" % (self.title, self.date)
 

	
 
    def get_absolute_url(self):
...
 
@@ -90,6 +90,6 @@ class EventMedia(models.Model):
 
    class Meta(object):
 
        verbose_name_plural = 'event media'
 

	
 
    def __unicode__(self):
 
    def __str__(self):
 
        return u"%s media: %s" % (self.event, self.format)
 

	
www/conservancy/apps/fundgoal/models.py
Show inline comments
...
 
@@ -15,7 +15,7 @@ class FundraisingGoal(models.Model):
 
    fundraiser_donation_count_disclose_threshold = models.IntegerField()
 
    fundraiser_endtime = models.DateTimeField(null=True)
 

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

	
 
    def percentage_there(self):
...
 
@@ -44,5 +44,5 @@ class GoalProvider(models.Model):
 
    )
 
    provider_name = models.CharField(max_length=512)
 

	
 
    def __unicode__(self):
 
    def __str__(self):
 
        return self.provider_name
www/conservancy/apps/news/models.py
Show inline comments
...
 
@@ -30,7 +30,7 @@ class PressRelease(models.Model, bsoup.SoupModelMixin):
 

	
 
    SOUP_ATTRS = ['summary', 'body']
 

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

	
 
    def get_absolute_url(self):
...
 
@@ -76,7 +76,7 @@ class ExternalArticleTag(models.Model):
 

	
 
    date_created = models.DateField(auto_now_add=True)
 

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

	
 
class PublicExternalArticleManager(models.Manager):
...
 
@@ -109,7 +109,7 @@ class ExternalArticle(models.Model):
 
        ordering = ("-date_created",)
 
        get_latest_by = "date_created"
 

	
 
    def __unicode__(self):
 
    def __str__(self):
 
        return u"%s (%s)" % (self.title, self.publication)
 

	
 
    objects = models.Manager()
www/conservancy/apps/staff/models.py
Show inline comments
...
 
@@ -23,7 +23,7 @@ class Person(models.Model):
 
    class Meta(object):
 
        verbose_name_plural = 'people'
 

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

	
 
    def biography_url(self):
www/conservancy/apps/supporters/models.py
Show inline comments
...
 
@@ -10,7 +10,7 @@ class Supporter(models.Model):
 

	
 
    def test(self):
 
        return "TESTING"
 
    def __unicode__(self):
 
    def __str__(self):
 
        return self.display_name
 

	
 
    class Meta(object):
www/conservancy/apps/worldmap/models.py
Show inline comments
...
 
@@ -14,7 +14,7 @@ class EarthLocation(models.Model):
 
    class Meta(object):
 
        unique_together = (("latitude", "longitude"),)
 

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

	
 
    def google_maps_link(self):
www/conservancy/settings.py
Show inline comments
...
 
@@ -26,7 +26,7 @@ ROOT_URLCONF = 'conservancy.urls'
 

	
 
FORCE_CANONICAL_HOSTNAME = False if DEBUG else 'sfconservancy.org'
 

	
 
ALLOWED_HOSTS = [ 'www.sfconservancy.org', 'aspen.sfconservancy.org', 'sfconservancy.org',  u'104.130.70.210' ]
 
ALLOWED_HOSTS = ['www.sfconservancy.org', 'aspen.sfconservancy.org', 'sfconservancy.org',  u'104.130.70.210', '*']
 
if DEBUG:
 
    ALLOWED_HOSTS.append('localhost')
 

	
www/conservancy/urls.py
Show inline comments
...
 
@@ -42,6 +42,10 @@ urlpatterns = [
 
    # formerly static templated things... (dirs with templates)
 
    url(r'^error/(40[134]|500)(?:/index\.html|/|)$', static_views.handler),
 
    url(r'^error', static_views.index),
 
    url(r'^admin/css/', static_views.index),
 
    url(r'^css', static_views.index),
 
    url(r'^js', static_views.index),
 
    url(r'^img', static_views.index),
 
    url(r'^about', static_views.index),
 
    url(r'^activities', static_views.index),
 
    url(r'^donate', static_views.index),
0 comments (0 inline, 0 general)