Commit 9b0d730d authored by okhin's avatar okhin 🚴

Adding a descriptive block for organisations

parent 275751e3
Pipeline #817 failed with stages
in 3 seconds
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-25 17:25
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('feedback', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='feedback',
name='date',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-30 10:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('organization', '0003_auto_20160807_1603'),
]
operations = [
migrations.AddField(
model_name='organization',
name='description',
field=models.TextField(blank=True),
),
migrations.AddField(
model_name='organization',
name='description_de',
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name='organization',
name='description_en',
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name='organization',
name='description_fr',
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name='organization',
name='logo',
field=models.ImageField(blank=True, upload_to='organization/logos/'),
),
]
......@@ -9,6 +9,8 @@ class Organization(models.Model):
sip_key = models.CharField(max_length=255)
users = models.ManyToManyField(User, blank=True,
related_name='organizations')
description = models.TextField(blank=True)
logo = models.ImageField(upload_to='organization/logos/', blank=True)
def __str__(self):
return self.name
......
from modeltranslation.translator import translator, TranslationOptions
from picampaign.organization.models import Organization
class OrganizationTranslationOptions(TranslationOptions):
fields = ('description',)
translator.register(Organization, OrganizationTranslationOptions)
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