Make curator_title optional
This commit is contained in:
18
boards/migrations/0005_auto_20200119_1554.py
Normal file
18
boards/migrations/0005_auto_20200119_1554.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.8 on 2020-01-19 15:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boards', '0004_auto_20200107_1904'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='board',
|
||||
name='curator_title',
|
||||
field=models.CharField(max_length=120, null=True),
|
||||
),
|
||||
]
|
||||
@@ -16,7 +16,7 @@ class Board(models.Model):
|
||||
avatar = models.URLField(max_length=512, null=True)
|
||||
|
||||
curator_name = models.CharField(max_length=120)
|
||||
curator_title = models.CharField(max_length=120)
|
||||
curator_title = models.CharField(max_length=120, null=True)
|
||||
curator_url = models.URLField(null=True)
|
||||
curator_bio = models.CharField(max_length=120, null=True)
|
||||
curator_footer = models.TextField(null=True)
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
<a class="landing-board" href="{% url "board" board.slug %}">
|
||||
<span class="avatar landing-board-avatar" style="background-image: url('{{ board.avatar }}'), linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);"></span>
|
||||
<span class="landing-board-name">{{ board.curator_name }}</span>
|
||||
<span class="landing-board-title">{{ board.curator_title }}</span>
|
||||
{% if board.curator_title %}
|
||||
<span class="landing-board-title">{{ board.curator_title }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user