mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Forgoten migration from skia and fixed migration
This commit is contained in:
@ -20,7 +20,7 @@ class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0024_auto_20170906_1317'),
|
||||
('club', '0009_auto_20170822_2232'),
|
||||
('club', '0010_club_logo'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@ -34,6 +34,11 @@ class Migration(migrations.Migration):
|
||||
name='page',
|
||||
field=models.OneToOneField(related_name='club', blank=True, null=True, to='core.Page'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='club',
|
||||
name='short_description',
|
||||
field=models.CharField(verbose_name='short description', max_length=1000, default='', blank=True, null=True),
|
||||
),
|
||||
PsqlRunOnly('SET CONSTRAINTS ALL IMMEDIATE', reverse_sql=migrations.RunSQL.noop),
|
||||
migrations.RunPython(generate_club_pages),
|
||||
PsqlRunOnly(migrations.RunSQL.noop, reverse_sql='SET CONSTRAINTS ALL IMMEDIATE'),
|
||||
|
@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('club', '0010_auto_20170912_2028'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='club',
|
||||
name='short_description',
|
||||
field=models.CharField(max_length=1000, verbose_name='short description', blank=True),
|
||||
),
|
||||
]
|
@ -60,7 +60,7 @@ class Club(models.Model):
|
||||
)
|
||||
logo = models.ImageField(upload_to='club_logos', verbose_name=_('logo'), null=True, blank=True)
|
||||
is_active = models.BooleanField(_('is active'), default=True)
|
||||
short_description = models.CharField(_('short description'), max_length=1000, blank=True)
|
||||
short_description = models.CharField(_('short description'), max_length=1000, default='', blank=True, null=True)
|
||||
address = models.CharField(_('address'), max_length=254)
|
||||
# email = models.EmailField(_('email address'), unique=True) # This should, and will be generated automatically
|
||||
owner_group = models.ForeignKey(Group, related_name="owned_club",
|
||||
|
@ -2,11 +2,16 @@
|
||||
{% from 'core/macros.jinja' import user_profile_link %}
|
||||
|
||||
{% block content %}
|
||||
{% if club.page and club.page.revisions.exists() %}
|
||||
{{ club.page.revisions.last().content|markdown }}
|
||||
{% else %}
|
||||
<h3>{% trans %}Club{% endtrans %}</h3>
|
||||
{% endif %}
|
||||
<div id="club_detail">
|
||||
{% if club.logo %}
|
||||
<div class="club_logo"><img src="{{ club.logo.url }}" alt="{{ club.unix_name }}"></div>
|
||||
{% endif %}
|
||||
{% if club.page and club.page.revisions.exists() %}
|
||||
{{ club.page.revisions.last().content|markdown }}
|
||||
{% else %}
|
||||
<h3>{% trans %}Club{% endtrans %}</h3>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user