From: Andrew Donnellan Date: Thu, 22 Aug 2019 07:12:57 +0000 (+1000) Subject: models, templates: Add project list archive URL field X-Git-Tag: v2.2.0-rc1~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64f39cbc2d09889bd238a93d01ab95092e538300;p=thirdparty%2Fpatchwork.git models, templates: Add project list archive URL field Add a field to link to a project's mailing list archive, and display it on the project info page. Add the new field to the patchwork project in the supplied example fixture. Signed-off-by: Andrew Donnellan Signed-off-by: Daniel Axtens --- diff --git a/patchwork/fixtures/default_projects.xml b/patchwork/fixtures/default_projects.xml index 30d34612..39d26983 100644 --- a/patchwork/fixtures/default_projects.xml +++ b/patchwork/fixtures/default_projects.xml @@ -5,5 +5,6 @@ Patchwork patchwork.ozlabs.org patchwork@lists.ozlabs.org + https://lists.ozlabs.org/pipermail/patchwork/ diff --git a/patchwork/migrations/0034_project_list_archive_url.py b/patchwork/migrations/0034_project_list_archive_url.py new file mode 100644 index 00000000..70d1b2bf --- /dev/null +++ b/patchwork/migrations/0034_project_list_archive_url.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.21 on 2019-07-01 12:30 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('patchwork', '0033_remove_patch_series_model'), + ] + + operations = [ + migrations.AddField( + model_name='project', + name='list_archive_url', + field=models.CharField(blank=True, max_length=2000), + ), + ] diff --git a/patchwork/models.py b/patchwork/models.py index a7eee4db..e43b062b 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -77,6 +77,7 @@ class Project(models.Model): web_url = models.CharField(max_length=2000, blank=True) scm_url = models.CharField(max_length=2000, blank=True) webscm_url = models.CharField(max_length=2000, blank=True) + list_archive_url = models.CharField(max_length=2000, blank=True) # configuration options diff --git a/patchwork/templates/patchwork/project.html b/patchwork/templates/patchwork/project.html index 99e36ff7..bd9d20e2 100644 --- a/patchwork/templates/patchwork/project.html +++ b/patchwork/templates/patchwork/project.html @@ -15,6 +15,12 @@ List address {{project.listemail}} +{% if project.list_archive_url %} + + List archive + {{ project.list_archive_url }} + +{% endif %} Maintainer{{maintainers|length|pluralize}}