mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Forgoten migration from skia and fixed migration
This commit is contained in:
parent
db509bf060
commit
4026d076b3
@ -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 %}
|
||||
<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 %}
|
||||
|
||||
|
||||
|
19
core/migrations/0026_auto_20170926_1512.py
Normal file
19
core/migrations/0026_auto_20170926_1512.py
Normal file
@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0025_auto_20170919_1521'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='notification',
|
||||
name='type',
|
||||
field=models.CharField(choices=[('MAILING_MODERATION', 'A new mailing list needs to be moderated'), ('NEWS_MODERATION', 'There are %s fresh news to be moderated'), ('FILE_MODERATION', 'New files to be moderated'), ('SAS_MODERATION', 'There are %s pictures to be moderated in the SAS'), ('NEW_PICTURES', "You've been identified on some pictures"), ('REFILLING', 'You just refilled of %s €'), ('SELLING', 'You just bought %s'), ('GENERIC', 'You have a notification')], verbose_name='type', max_length=32, default='GENERIC'),
|
||||
),
|
||||
]
|
@ -1224,3 +1224,16 @@ label {
|
||||
.ui-corner-left {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#club_detail {
|
||||
|
||||
.club_logo {
|
||||
float: right;
|
||||
img {
|
||||
display: block;
|
||||
max-height: 10em;
|
||||
max-width: 10em;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user