Make some project information optional

This commit is contained in:
Michal Čihař 2012-03-01 14:34:26 +01:00
parent f7c156b3d9
commit 6a1def5564
2 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,10 @@
<h2>{% trans "Project Information" %}</h2>
<p>{% trans "Project website:" %} <a href="{{ object.web }}">{{ object.web }}</a></p>
{% if object.mail %}
<p>{% trans "Mailing list for translators:" %} <a href="mailto:{{ object.mail }}">{{ object.mail }}</a></p>
{% endif %}
{% if object.instructions %}
<p>{% trans "Instructions for translators:" %} <a href="{{ object.instructions }}">{{ object.instructions }}</a></p>
{% endif %}

View File

@ -25,8 +25,8 @@ class Project(models.Model):
name = models.CharField(max_length = 100)
slug = models.SlugField(db_index = True)
web = models.URLField()
mail = models.EmailField()
instructions = models.URLField()
mail = models.EmailField(blank = True)
instructions = models.URLField(blank = True)
class Meta:
ordering = ['name']