Add a field to link to a project's mailing list archive, and display it on the project info page.
Signed-off-by: Andrew Donnellan <a...@linux.ibm.com> --- .../0034_project_list_archive_url.py | 20 +++++++++++++++++++ patchwork/models.py | 1 + patchwork/templates/patchwork/project.html | 6 ++++++ 3 files changed, 27 insertions(+) create mode 100644 patchwork/migrations/0034_project_list_archive_url.py 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 000000000000..70d1b2bf8542 --- /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 a7eee4dbad9a..e43b062b6f89 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 99e36ff79d6a..bd9d20e263d8 100644 --- a/patchwork/templates/patchwork/project.html +++ b/patchwork/templates/patchwork/project.html @@ -15,6 +15,12 @@ <th>List address</th> <td>{{project.listemail}}</td> </tr> +{% if project.list_archive_url %} + <tr> + <th>List archive</th> + <td><a href="{{ project.list_archive_url }}">{{ project.list_archive_url }}</a></td> + </tr> +{% endif %} <tr> <th>Maintainer{{maintainers|length|pluralize}}</th> <td> -- 2.20.1 _______________________________________________ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork