IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
88 | 88 | domain = models.CharField(_('domain name'), max_length=100, |
89 | 89 | validators=[_simple_domain_name_validator], unique=True) |
90 | 90 | name = models.CharField(_('display name'), max_length=50) |
| 91 | protocol = models.CharField(_('prefered protocol'), max_length=32, default="http") |
91 | 92 | objects = SiteManager() |
92 | 93 | |
93 | 94 | class Meta: |
… |
… |
|
101 | 102 | |
102 | 103 | def natural_key(self): |
103 | 104 | return (self.domain,) |
| 105 | |
| 106 | def url(self): |
| 107 | return "%s://%s" % (self.protocol if self.protocol else Site.protocol.default, self.domain) |
104 | 108 | |
105 | 109 | |
106 | 110 | def clear_site_cache(sender, **kwargs): |