From 56270febc30956a8c9a07c35bdc41c3e7833720e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 28 Feb 2012 16:03:23 +0100 Subject: [PATCH] Configurable web browser url --- trans/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trans/models.py b/trans/models.py index 73ee444dc..f50648f96 100644 --- a/trans/models.py +++ b/trans/models.py @@ -52,6 +52,7 @@ class SubProject(models.Model): slug = models.SlugField(db_index = True) project = models.ForeignKey(Project) repo = models.CharField(max_length = 200) + repoweb = models.URLField() branch = models.CharField(max_length = 50) filemask = models.CharField(max_length = 200) style_choices = (('po', 'GNU Gettext'), ('ts', 'Qt TS')) @@ -370,7 +371,7 @@ class Unit(models.Model): for location in self.location.split(','): location = location.strip() filename, line = location.split(':') - link = 'https://github.com/phpmyadmin/phpmyadmin/blob/master/%s#L%s' % (filename, line) + link = '%s%s#L%s' % (self.translation.subproject.repoweb, filename, line) ret.append('%s' % (link, location)) return mark_safe('\n'.join(ret))