Provide default & ugly images for organizations

Summary: Organizations have a default logo/banner to help devs

Test Plan:
- Apply provided migration
- Apply provided fixture
- Run server

Reviewers: corbeaumax

Reviewed By: corbeaumax

Spies: Armteck

Maniphest Tasks: T60

Differential Revision: https://phabricator.atilla.org/D31
parent ca8ecb3c
......@@ -6,3 +6,5 @@ build
db.sqlite3
ldap_login.json
media/
!/media/associations/banner/default.png
!/media/associations/logo/default.png
[{"model": "associations.association", "pk": 1, "fields": {"name": ">~/ATILLA", "description": "", "validation_state": "MD", "logo": "", "banner": "", "subscription_cost": 10, "room": "CY106"}}, {"model": "associations.association", "pk": 2, "fields": {"name": "Bowl'EISTI", "description": "", "validation_state": "MD", "logo": "", "banner": "", "subscription_cost": 0, "room": "None."}}, {"model": "associations.membership", "pk": 1, "fields": {"date_subscription": "2017-02-08", "is_board": false, "role": "OT", "custom_role": "", "accepted": true, "year": 1, "association": 1, "account": 1}}, {"model": "associations.sociallink", "pk": 1, "fields": {"association": 1, "type_link": "TW", "url": "http://twitter.com/@CY106"}}, {"model": "associations.sociallink", "pk": 2, "fields": {"association": 1, "type_link": "WE", "url": "http://atilla.org"}}]
\ No newline at end of file
[{"model": "associations.association", "pk": 1, "fields": {"name": ">~/ATILLA", "description": "L'un des premiers buts d'ATILLA est de promouvoir le logiciel libre et de d\u00e9fendre l'internet libre. Nous soutenons des associations telles que la Quadrature du Net ou l'APRIL afin de sensibiliser les \u00e9tudiants \u00e0 ces questions.", "validation_state": "MD", "logo": "associations/logo/default.png", "banner": "associations/banner/default.png", "subscription_cost": 10, "room": "CY106"}}, {"model": "associations.association", "pk": 2, "fields": {"name": "E-EISTI", "description": "", "validation_state": "MD", "logo": "associations/logo/default.png", "banner": "associations/banner/default.png", "subscription_cost": 7, "room": "CY206"}}, {"model": "associations.association", "pk": 3, "fields": {"name": "Bowl'EISTI", "description": "", "validation_state": "MD", "logo": "associations/logo/default.png", "banner": "associations/banner/default.png", "subscription_cost": 5, "room": ""}}, {"model": "associations.sociallink", "pk": 1, "fields": {"association": 1, "type_link": "FB", "url": "https://www.facebook.com/atilla.org"}}, {"model": "associations.sociallink", "pk": 2, "fields": {"association": 1, "type_link": "TW", "url": "http://twitter.com/@CY106"}}, {"model": "associations.sociallink", "pk": 3, "fields": {"association": 1, "type_link": "YT", "url": "https://www.youtube.com/channel/UCvhqFFyH0V-6FBhzvuG58Jg"}}, {"model": "associations.sociallink", "pk": 4, "fields": {"association": 1, "type_link": "WE", "url": "https://atilla.org"}}]
\ No newline at end of file
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2018-01-26 00:02
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('associations', '0005_auto_20170206_2113'),
]
operations = [
migrations.AlterField(
model_name='association',
name='banner',
field=models.ImageField(default='associations/banner/default.png', upload_to='associations/banner', verbose_name="Bannière de l'association"),
),
migrations.AlterField(
model_name='association',
name='logo',
field=models.ImageField(default='associations/logo/default.png', upload_to='associations/logo', verbose_name="Logo de l'association"),
),
]
......@@ -34,15 +34,13 @@ class Association(models.Model):
logo = models.ImageField(
"Logo de l'association",
upload_to="associations/logo",
null=True,
blank=True,
default="associations/logo/default.png"
)
banner = models.ImageField(
"Bannière de l'association",
upload_to="associations/banner",
null=True,
blank=True,
default="associations/banner/default.png"
)
subscription_cost = models.IntegerField(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment