Add mailing list field to layer

Enable recording the mailing list associated with each layer, if any.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2013-02-23 23:48:06 +00:00
parent 8b742732d8
commit 355c92cfe7
3 changed files with 7 additions and 1 deletions

View File

@ -54,6 +54,11 @@
<a href="{{ layeritem.usage_url }}">Setup information</a>
</span>
{% endif %}
{% if layeritem.mailing_list_url %}
<span class="label label-info">
<a href="{{ layeritem.mailing_list_url }}">Mailing list</a>
</span>
{% endif %}
</p>
<h3>Git repository</h3>

View File

@ -16,7 +16,7 @@ class SubmitLayerForm(forms.ModelForm):
class Meta:
model = LayerItem
fields = ('name', 'layer_type', 'summary', 'description', 'vcs_url', 'vcs_subdir', 'vcs_web_url', 'vcs_web_tree_base_url', 'vcs_web_file_base_url', 'usage_url')
fields = ('name', 'layer_type', 'summary', 'description', 'vcs_url', 'vcs_subdir', 'vcs_web_url', 'vcs_web_tree_base_url', 'vcs_web_file_base_url', 'usage_url', 'mailing_list_url')
def clean_name(self):
name = self.cleaned_data['name'].strip()

View File

@ -36,6 +36,7 @@ class LayerItem(models.Model):
vcs_web_tree_base_url = models.CharField('Repository web interface tree base URL', max_length=200, blank=True)
vcs_web_file_base_url = models.CharField('Repository web interface file base URL', max_length=200, blank=True)
usage_url = models.URLField('Usage web page URL', blank=True)
mailing_list_url = models.URLField('Mailing list URL', blank=True)
class Meta:
verbose_name = "Layer"