Changeset - cf4168ca6aec
[Not reviewed]
Merge
2 9 2
Patrick Altman - 9 years ago 2015-08-03 13:00:14
paltman@gmail.com
Merge pull request #87 from miurahr/sponsorship-display-url

display_url
1 file changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
symposion/sponsorship/models.py
Show inline comments
...
 
@@ -40,6 +40,7 @@ class Sponsor(models.Model):
 
                                  null=True)
 

	
 
    name = models.CharField(_("Sponsor Name"), max_length=100)
 
    display_url = models.URLField(_("display URL"), blank=True)
 
    external_url = models.URLField(_("external URL"))
 
    annotation = models.TextField(_("annotation"), blank=True)
 
    contact_name = models.CharField(_("Contact Name"), max_length=100)
...
 
@@ -66,6 +67,12 @@ class Sponsor(models.Model):
 
            return reverse("sponsor_detail", kwargs={"pk": self.pk})
 
        return reverse("sponsor_list")
 

	
 
    def get_display_url(self):
 
        if self.display_url:
 
            return self.display_url
 
        else:
 
            return self.external_url
 

	
 
    @property
 
    def website_logo(self):
 
        if self.sponsor_logo is None:
0 comments (0 inline, 0 general)