From 21a4725b923565dd67219317062c02b652207880 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Mar 2014 11:00:23 -0500 Subject: Bump django-countries and pytz requirements --- requirements.txt | 4 ++-- requirements_prod.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 81070449..0b5ecb64 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ IPy==0.81 Markdown==2.4 South==0.8.4 bencode==1.0 -django-countries==2.0 +django-countries==2.1.2 jsmin==2.0.9 pgpdump==1.5 -pytz>=2013.8 +pytz>=2014.2 diff --git a/requirements_prod.txt b/requirements_prod.txt index 840e0396..e773bb4c 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -4,10 +4,10 @@ IPy==0.81 Markdown==2.4 South==0.8.4 bencode==1.0 -django-countries==2.0 +django-countries==2.1.2 jsmin==2.0.9 pgpdump==1.5 psycopg2==2.5.2 pyinotify==0.9.4 python-memcached==1.53 -pytz>=2013.8 +pytz>=2014.2 -- cgit v1.2.3 From 945337177d35a5c038e29b6594e1251f26d42156 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Mar 2014 11:56:29 -0500 Subject: Add last_modified column to mirrors This will make it easier in the future to clear out inactive mirrors that haven't been touched in a while. Signed-off-by: Dan McGee --- mirrors/admin.py | 2 +- .../0028_auto__add_field_mirror_last_modified.py | 87 ++++++++++++++++++++++ mirrors/models.py | 1 + templates/mirrors/mirror_details.html | 4 + 4 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 mirrors/migrations/0028_auto__add_field_mirror_last_modified.py diff --git a/mirrors/admin.py b/mirrors/admin.py index 17365486..d958e21b 100644 --- a/mirrors/admin.py +++ b/mirrors/admin.py @@ -67,7 +67,7 @@ class MirrorAdmin(admin.ModelAdmin): 'isos', 'admin_email', 'alternate_email') list_filter = ('tier', 'active', 'public') search_fields = ('name', 'admin_email', 'alternate_email') - readonly_fields = ('created',) + readonly_fields = ('created', 'last_modified') inlines = [ MirrorUrlInlineAdmin, MirrorRsyncInlineAdmin, diff --git a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py new file mode 100644 index 00000000..dbd4b129 --- /dev/null +++ b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + db.add_column(u'mirrors_mirror', 'last_modified', + self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now()), + keep_default=False) + orm.Mirror.objects.update(last_modified=models.F('created')) + + def backwards(self, orm): + db.delete_column(u'mirrors_mirror', 'last_modified') + + + models = { + u'mirrors.checklocation': { + 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, + 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), + 'created': ('django.db.models.fields.DateTimeField', [], {}), + 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) + }, + u'mirrors.mirror': { + 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, + 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), + 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), + 'bug': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'last_modified': ('django.db.models.fields.DateTimeField', [], {}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), + 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), + 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), + 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) + }, + u'mirrors.mirrorlog': { + 'Meta': {'object_name': 'MirrorLog'}, + 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), + 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'null': 'True', 'to': u"orm['mirrors.CheckLocation']"}), + 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) + }, + u'mirrors.mirrorprotocol': { + 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, + 'created': ('django.db.models.fields.DateTimeField', [], {}), + 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) + }, + u'mirrors.mirrorrsync': { + 'Meta': {'ordering': "('ip',)", 'object_name': 'MirrorRsync'}, + 'created': ('django.db.models.fields.DateTimeField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip': ('mirrors.fields.IPNetworkField', [], {'max_length': '44'}), + 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) + }, + u'mirrors.mirrorurl': { + 'Meta': {'object_name': 'MirrorUrl'}, + 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {}), + 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), + 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), + 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + } + } + + complete_apps = ['mirrors'] diff --git a/mirrors/models.py b/mirrors/models.py index 0b053043..41132229 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -32,6 +32,7 @@ class Mirror(models.Model): bug = models.PositiveIntegerField("Flyspray bug", null=True, blank=True) notes = models.TextField(blank=True) created = models.DateTimeField(editable=False) + last_modified = models.DateTimeField(editable=False) class Meta: ordering = ('name',) diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index 8a652563..7e1ab9f8 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -45,6 +45,10 @@ Created: {{ mirror.created }} + + Last Modified: + {{ mirror.last_modified }} + Rsync IPs: {{mirror.rsync_ips.all|join:', '}} -- cgit v1.2.3 From 6a09ffdd8e7ed12b73d181f0530510562ec7e316 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Mar 2014 12:28:05 -0500 Subject: Protect ORM migration portion in db.dry_run Signed-off-by: Dan McGee --- mirrors/migrations/0028_auto__add_field_mirror_last_modified.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py index dbd4b129..35e80733 100644 --- a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py +++ b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py @@ -11,7 +11,8 @@ class Migration(SchemaMigration): db.add_column(u'mirrors_mirror', 'last_modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now()), keep_default=False) - orm.Mirror.objects.update(last_modified=models.F('created')) + if not db.dry_run: + orm.Mirror.objects.update(last_modified=models.F('created')) def backwards(self, orm): db.delete_column(u'mirrors_mirror', 'last_modified') -- cgit v1.2.3 From dbe0ae1a77ae601b7c413a534eca7cf7118be8b3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 22 Apr 2014 15:38:46 -0500 Subject: Bump Django version Signed-off-by: Dan McGee --- requirements.txt | 2 +- requirements_prod.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0b5ecb64..30cf352a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.6.2 +Django==1.6.3 IPy==0.81 Markdown==2.4 South==0.8.4 diff --git a/requirements_prod.txt b/requirements_prod.txt index e773bb4c..038e4183 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -1,5 +1,5 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.6.2 +Django==1.6.3 IPy==0.81 Markdown==2.4 South==0.8.4 -- cgit v1.2.3 From fa5414a72ac866a3162e74970427aeaaf8134cce Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 29 Apr 2014 09:19:29 -0500 Subject: Bump Django version, again Signed-off-by: Dan McGee --- requirements.txt | 2 +- requirements_prod.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 30cf352a..3f95a583 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.6.3 +Django==1.6.4 IPy==0.81 Markdown==2.4 South==0.8.4 diff --git a/requirements_prod.txt b/requirements_prod.txt index 038e4183..6df42e81 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -1,5 +1,5 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.6.3 +Django==1.6.4 IPy==0.81 Markdown==2.4 South==0.8.4 -- cgit v1.2.3 From e660aa18eb7051399fda5fa07f3798c42d6d6de3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 18 May 2014 21:28:09 -0500 Subject: Bump some requirements Signed-off-by: Dan McGee --- requirements.txt | 4 ++-- requirements_prod.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3f95a583..be29db23 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.6.4 +Django==1.6.5 IPy==0.81 Markdown==2.4 South==0.8.4 @@ -7,4 +7,4 @@ bencode==1.0 django-countries==2.1.2 jsmin==2.0.9 pgpdump==1.5 -pytz>=2014.2 +pytz>=2014.3 diff --git a/requirements_prod.txt b/requirements_prod.txt index 6df42e81..8d1aeb9c 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -1,5 +1,5 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.6.4 +Django==1.6.5 IPy==0.81 Markdown==2.4 South==0.8.4 @@ -7,7 +7,7 @@ bencode==1.0 django-countries==2.1.2 jsmin==2.0.9 pgpdump==1.5 -psycopg2==2.5.2 +psycopg2==2.5.3 pyinotify==0.9.4 python-memcached==1.53 -pytz>=2014.2 +pytz>=2014.3 -- cgit v1.2.3 From be4b9dc36338b57ad8b78491ef31cb91fbde9335 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 31 May 2014 15:13:58 -0500 Subject: Bump markdown requirement version Signed-off-by: Dan McGee --- requirements.txt | 2 +- requirements_prod.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index be29db23..4de9aeec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin Django==1.6.5 IPy==0.81 -Markdown==2.4 +Markdown==2.4.1 South==0.8.4 bencode==1.0 django-countries==2.1.2 diff --git a/requirements_prod.txt b/requirements_prod.txt index 8d1aeb9c..38f96f72 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -1,7 +1,7 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin Django==1.6.5 IPy==0.81 -Markdown==2.4 +Markdown==2.4.1 South==0.8.4 bencode==1.0 django-countries==2.1.2 -- cgit v1.2.3 From d3a36903d0fb738e3a916169fb109072efbff721 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 31 May 2014 15:30:13 -0500 Subject: Convert ~~~ to date/username text when editing mirror notes Requested by Florian to make leaving notes on mirrors a bit easier. Signed-off-by: Dan McGee --- mirrors/admin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mirrors/admin.py b/mirrors/admin.py index d958e21b..d5c89c2a 100644 --- a/mirrors/admin.py +++ b/mirrors/admin.py @@ -1,3 +1,4 @@ +from datetime import datetime from urlparse import urlparse, urlunsplit from django import forms @@ -73,6 +74,13 @@ class MirrorAdmin(admin.ModelAdmin): MirrorRsyncInlineAdmin, ] + def save_model(self, request, obj, form, change): + if '~~~' in obj.notes: + date = datetime.utcnow().strftime('%Y-%m-%d') + usertext = request.user.get_full_name() + obj.notes = obj.notes.replace('~~~', '%s (%s)' % (date, usertext)) + obj.save() + class MirrorProtocolAdmin(admin.ModelAdmin): list_display = ('protocol', 'is_download', 'default') -- cgit v1.2.3 From c51ff717d9bdfed86e604af1cbbaf2870176f031 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 10 Jun 2014 21:04:39 -0500 Subject: Use last element in args tuple as error message When things blow up in low-level C code, the tuple is sometimes of length one, such as when it contains this error message: _ssl.c:495: The handshake operation timed out Just use the last element of the tuple, which works for all of the cases. Signed-off-by: Dan McGee --- mirrors/management/commands/mirrorcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirrors/management/commands/mirrorcheck.py b/mirrors/management/commands/mirrorcheck.py index e48aa42e..d2a27bee 100644 --- a/mirrors/management/commands/mirrorcheck.py +++ b/mirrors/management/commands/mirrorcheck.py @@ -139,7 +139,7 @@ def check_mirror_url(mirror_url, location, timeout): if isinstance(e.reason, socket.timeout): log.error = "Connection timed out." elif isinstance(e.reason, socket.error): - log.error = e.reason.args[1] + log.error = e.reason.args[-1] logger.debug("failed: %s, %s", url, log.error) except HTTPException: # e.g., BadStatusLine -- cgit v1.2.3 From 45f5ba71e76128bb266f6621b7eaec71af19ed2b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 28 Jun 2014 11:56:27 -0500 Subject: Bump some requirements Signed-off-by: Dan McGee --- requirements.txt | 4 ++-- requirements_prod.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4de9aeec..317e800c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ Markdown==2.4.1 South==0.8.4 bencode==1.0 django-countries==2.1.2 -jsmin==2.0.9 +jsmin==2.0.11 pgpdump==1.5 -pytz>=2014.3 +pytz>=2014.4 diff --git a/requirements_prod.txt b/requirements_prod.txt index 38f96f72..a4e338b4 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -5,9 +5,9 @@ Markdown==2.4.1 South==0.8.4 bencode==1.0 django-countries==2.1.2 -jsmin==2.0.9 +jsmin==2.0.11 pgpdump==1.5 psycopg2==2.5.3 pyinotify==0.9.4 python-memcached==1.53 -pytz>=2014.3 +pytz>=2014.4 -- cgit v1.2.3 From 35fc1b458ce4b549607f1ab0c846ba5998da0183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Tue, 1 Jul 2014 13:03:06 +0200 Subject: update URLs to Arch wiki MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub Klinkovský Signed-off-by: Dan McGee --- templates/public/download.html | 2 +- templates/public/index.html | 10 +++++----- urls.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/public/download.html b/templates/public/download.html index 00db9bed..967d8a6e 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -28,7 +28,7 @@ {% if release.version %}
  • Current Release: {{ release.version }}
  • {% endif %} {% if release.kernel_version %}
  • Included Kernel: {{ release.kernel_version }}
  • {% endif %} {% if release.torrent_data %}
  • ISO Size: {{ release.torrent.file_length|filesizeformat }}
  • {% endif %} -
  • Installation Guide
  • +
  • Installation Guide
  • Resources: @@ -123,11 +123,11 @@ @@ -180,7 +180,7 @@
    • Signing Master Keys
    • -
    • Press Coverage
    • Logos & Artwork
    • News Archives
    • diff --git a/urls.py b/urls.py index 79838ce3..46c8ace6 100644 --- a/urls.py +++ b/urls.py @@ -111,7 +111,7 @@ legacy_urls = ( ('^todolists/$', '/todo/'), ('^docs/en/guide/install/arch-install-guide.html', - 'https://wiki.archlinux.org/index.php/Installation_Guide'), + 'https://wiki.archlinux.org/index.php/Installation_guide'), ('^docs/en/', 'https://wiki.archlinux.org/'), ('^docs/', -- cgit v1.2.3 From 2382c55c435af9ab7d7ce3bd71abda5b2a2928b5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 1 Sep 2014 15:34:23 -0500 Subject: Requirements bumping Signed-off-by: Dan McGee --- requirements.txt | 6 +++--- requirements_prod.txt | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index 317e800c..a27bd35a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.6.5 +Django==1.6.6 IPy==0.81 Markdown==2.4.1 -South==0.8.4 +South==1.0 bencode==1.0 django-countries==2.1.2 jsmin==2.0.11 pgpdump==1.5 -pytz>=2014.4 +pytz>=2014.7 diff --git a/requirements_prod.txt b/requirements_prod.txt index a4e338b4..a26ef54a 100644 --- a/requirements_prod.txt +++ b/requirements_prod.txt @@ -1,13 +1,13 @@ -e git+git://github.com/fredj/cssmin.git@master#egg=cssmin -Django==1.6.5 +Django==1.6.6 IPy==0.81 Markdown==2.4.1 -South==0.8.4 +South==1.0 bencode==1.0 django-countries==2.1.2 jsmin==2.0.11 pgpdump==1.5 -psycopg2==2.5.3 +psycopg2==2.5.4 pyinotify==0.9.4 python-memcached==1.53 -pytz>=2014.4 +pytz>=2014.7 -- cgit v1.2.3 From 08ecb6036b6f2f552c2d9f9171e4eacf5bfba022 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 1 Sep 2014 08:55:15 -0500 Subject: De-emphasize package files pages Signed-off-by: Dan McGee --- sitemaps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sitemaps.py b/sitemaps.py index 42b08922..d79b00b5 100644 --- a/sitemaps.py +++ b/sitemaps.py @@ -35,7 +35,7 @@ class PackagesSitemap(Sitemap): class PackageFilesSitemap(PackagesSitemap): changefreq = "weekly" - priority = "0.2" + priority = "0.1" def location(self, obj): return PackagesSitemap.location(self, obj) + 'files/' -- cgit v1.2.3 From 0b17362c37ee91d329184fae3bb3f38801ede152 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 28 Jun 2014 12:02:27 -0500 Subject: Add default value for boolean field Signed-off-by: Dan McGee --- releng/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releng/models.py b/releng/models.py index c73e28d8..5d4caf2b 100644 --- a/releng/models.py +++ b/releng/models.py @@ -111,7 +111,7 @@ class Test(models.Model): rollback_modules = models.ManyToManyField(Module, related_name="rollback_test_set", null=True, blank=True) - success = models.BooleanField() + success = models.BooleanField(default=True) comments = models.TextField(null=True, blank=True) -- cgit v1.2.3 From 9335d3330b2cee8065cbd46eb71a7ebc50b4b037 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 1 Sep 2014 15:53:23 -0500 Subject: Save some space, (secs) -> (s) Signed-off-by: Dan McGee --- templates/mirrors/mirror_details.html | 4 ++-- templates/mirrors/status_table.html | 4 ++-- templates/mirrors/url_details.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index 7e1ab9f8..2ff41828 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -105,8 +105,8 @@ Last Sync Completion % μ Delay (hh:mm) - μ Duration (secs) - σ Duration (secs) + μ Duration (s) + σ Duration (s) Score Details diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html index 00b9c1df..278256ae 100644 --- a/templates/mirrors/status_table.html +++ b/templates/mirrors/status_table.html @@ -8,8 +8,8 @@ Country Completion % μ Delay (hh:mm) - μ Duration (secs) - σ Duration (secs) + μ Duration (s) + σ Duration (s) Mirror Score diff --git a/templates/mirrors/url_details.html b/templates/mirrors/url_details.html index 54960a0d..201e1895 100644 --- a/templates/mirrors/url_details.html +++ b/templates/mirrors/url_details.html @@ -63,7 +63,7 @@ Check IP Last Sync Delay (hh:mm) - Duration (secs) + Duration (s) Success? Error Message -- cgit v1.2.3 From a8ceba34299cca271ddf433bf7618aa98e56cc36 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 1 Sep 2014 16:16:44 -0500 Subject: Add details link to mirror status page Signed-off-by: Dan McGee --- mirrors/models.py | 13 ++++++++----- templates/mirrors/status.html | 4 +++- templates/mirrors/status_table.html | 2 ++ templates/mirrors/url_details.html | 4 ++++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/mirrors/models.py b/mirrors/models.py index 41132229..e360801b 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -75,6 +75,12 @@ class MirrorUrl(models.Model): created = models.DateTimeField(editable=False) active = models.BooleanField(default=True) + class Meta: + verbose_name = 'mirror URL' + + def __unicode__(self): + return self.url + def address_families(self): hostname = urlparse(self.url).hostname info = socket.getaddrinfo(hostname, None, 0, socket.SOCK_STREAM) @@ -101,11 +107,8 @@ class MirrorUrl(models.Model): self.has_ipv4 = False self.has_ipv6 = False - def __unicode__(self): - return self.url - - class Meta: - verbose_name = 'mirror URL' + def get_absolute_url(self): + return '/mirrors/%s/%d/' % (self.mirror.name, self.pk) class MirrorRsync(models.Model): diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index e97ad4ba..24408be7 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -80,7 +80,9 @@