@@ -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)
+ website = models.CharField(max_length=2000, blank=True)
+ webscm = models.CharField(max_length=2000, blank=True)
+ scmurl = models.CharField(max_length=2000, blank=True)
send_notifications = models.BooleanField()
def __unicode__(self):
new file mode 100644
@@ -0,0 +1,5 @@
+BEGIN;
+ALTER TABLE "patchwork_project" ADD COLUMN "website" varchar(2000);
+ALTER TABLE "patchwork_project" ADD COLUMN "webscm" varchar(2000);
+ALTER TABLE "patchwork_project" ADD COLUMN "scmurl" varchar(2000);
+COMMIT;
@@ -28,6 +28,24 @@
<th>Patch count</th>
<td>{{n_patches}} (+ {{n_archived_patches}} archived)</td>
</tr>
+{% if project.website %}
+ <tr>
+ <th>Website</th>
+ <td><a href="{{project.website}}">{{project.website}}</a></td>
+ </tr>
+{% endif %}
+{% if project.webscm %}
+ <tr>
+ <th>Source Code Web Interface</th>
+ <td><a href="{{project.webscm}}">{{project.webscm}}</a></td>
+ </tr>
+{% endif %}
+{% if project.scmurl %}
+ <tr>
+ <th>Source Code Manager URL</th>
+ <td><a href="{{project.scmurl}}">{{project.scmurl}}</a></td>
+ </tr>
+{% endif %}
</table>
{% if settings.ENABLE_XMLRPC %}
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: website: http://jk.ozlabs.org/projects/patchwork/ webscm: http://git.ozlabs.org/?p=patchwork;a=tree scmurl: git://ozlabs.org/home/jk/git/patchwork Signed-off-by: Simo Sorce <idra@samba.org> --- apps/patchwork/models.py | 3 +++ lib/sql/migration/012-project-add-columns.sql | 5 +++++ templates/patchwork/project.html | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 lib/sql/migration/012-project-add-columns.sql