Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Linkmodels #101

Merged
merged 3 commits into from

1 participant

@evildmp
Owner

No description provided.

@evildmp evildmp merged commit 3c435a1 into from
@evildmp evildmp deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 29, 2013
  1. tiny comment amends

    authored
Commits on May 30, 2013
  1. links template fixed

    authored
This page is out of date. Refresh to see the latest.
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):
View
9 news_and_events/tests.py
@@ -41,11 +41,14 @@ def test_generic_attributes(self):
# the item has no informative content
self.assertEqual(self.tootharticle.is_uninformative, True)
- # there are no Entities in the database, so this can't be hosted_by anything
+ # no Entities in the database, so this can't be hosted_by anything
self.assertEqual(self.tootharticle.hosted_by, None)
- # since there are no Entities in the database, default to settings's template
- self.assertEqual(self.tootharticle.get_template, settings.CMS_TEMPLATES[0][0])
+ # no Entities in the database, so default to settings's template
+ self.assertEqual(
+ self.tootharticle.get_template,
+ settings.CMS_TEMPLATES[0][0]
+ )
def test_date_related_attributes(self):
self.tootharticle.date = datetime(year=2012, month=12, day=12)
Something went wrong with that request. Please try again.