Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #101 from evildmp/linkmodels

Linkmodels
  • Loading branch information...
commit 3c435a1777425087e864e49195bb40326c52eb98 2 parents 45df867 + 0fb5963
@evildmp authored
View
7 housekeeping/templates/housekeeping/tidy_links.html
@@ -42,13 +42,14 @@
<dd>{{ duplicate }}: used on {{ duplicate.objects|length }} objects and in {{ duplicate.plugins|length }} plugins</dd>
{% endfor %}
{% endfor %}
-<dl>
+</dl>
-<h3>Unused sites</h3><ul>
+<h3>Unused sites</h3>
+<ul>
{% for site in report.sites_to_delete %}
<li>{{site}}</li>
{% endfor %}
-<ul>
+</ul>
<h3>Convert old-style URLFields to ForeignKeys</h3>
<ul>
{% for module, module_values in report.models_dictionary.modules.items %}
View
29 links/models.py
@@ -211,24 +211,43 @@ def save(self, *args, **kwargs):
class LinkType(models.Model):
- scheme = models.CharField(max_length=50, help_text=u"e.g. 'http', 'mailto', etc",
- unique=True)
- name = models.CharField(max_length=50, help_text=u"e.g. 'Hypertext', 'email', etc")
+ scheme = models.CharField(
+ max_length=50,
+ help_text=u"e.g. 'http', 'mailto', etc",
+ unique=True
+ )
+ name = models.CharField(
+ max_length=50,
+ help_text=u"e.g. 'Hypertext', 'email', etc"
+ )
def __unicode__(self):
return self.scheme
class ExternalSite(models.Model):
+
site = models.CharField(
+ "site name",
max_length=50,
help_text = u"e.g. 'BBC News', 'Welsh Assembly Goverment', etc",
null = True
)
- domain = models.CharField(max_length=256, null = True, blank = True,)
- parent = models.ForeignKey('self', blank=True, null = True, related_name='children')
+ domain = models.CharField(
+ "domain name",
+ max_length=256,
+ null = True,
+ blank = True,
+ help_text = u"Do not amend unless you know what you are doing",
+ )
+ parent = models.ForeignKey('self',
+ blank=True,
+ null = True,
+ related_name='children'
+ )
class Meta:
+ verbose_name = "domain"
ordering = ['domain',]
def __unicode__(self):
Please sign in to comment.
Something went wrong with that request. Please try again.