Commit c30c0331 authored by Simo Sorce's avatar Simo Sorce Committed by Jeremy Kerr
Browse files

Add URL and SCM data to projects

This allows us to display friendly links to the project website,
web SCM UI and SCM URL.

For example for the patchwork project these could be set to:
scm_url: git://

Requires a DB schema upgrade
Signed-off-by: default avatarSimo Sorce <>
Signed-off-by: default avatarJeremy Kerr <>
parent 2894c4ae
......@@ -64,6 +64,9 @@ class Project(models.Model):
name = models.CharField(max_length=255, unique=True)
listid = models.CharField(max_length=255, unique=True)
listemail = models.CharField(max_length=200)
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)
send_notifications = models.BooleanField()
def __unicode__(self):
ALTER TABLE "patchwork_project" ADD COLUMN "web_url" varchar(2000);
ALTER TABLE "patchwork_project" ADD COLUMN "scm_url" varchar(2000);
ALTER TABLE "patchwork_project" ADD COLUMN "webscm_url" varchar(2000);
......@@ -28,6 +28,24 @@
<th>Patch count</th>
<td>{{n_patches}} (+ {{n_archived_patches}} archived)</td>
{% if project.web_url %}
<td><a href="{{project.web_url}}">{{project.web_url}}</a></td>
{% endif %}
{% if project.webscm_url %}
<th>Source Code Web Interface</th>
<td><a href="{{project.webscm_url}}">{{project.webscm_url}}</a></td>
{% endif %}
{% if project.scm_url %}
<th>Source Code Manager URL</th>
<td><a href="{{project.scm_url}}">{{project.scm_url}}</a></td>
{% endif %}
{% if settings.ENABLE_XMLRPC %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment