--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.10 on 2016-10-12 15:07
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-network', '0036_auto_20161005_1509'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='organizationtype',
+ name='css_class',
+ field=models.CharField(blank=True, help_text='Determine color on map.', max_length=64, null=True, verbose_name='class css'),
+ ),
+ ]
class OrganizationType(Named):
"""(OrganizationType description)"""
+ css_class = models.CharField(_('class css'), max_length=64, blank=True, null=True, help_text="Determine color on map.")
+
class Meta:
verbose_name = _('organization type')
ordering = ['name',]
def get_context_data(self, **kwargs):
context = super(OrganizationListView, self).get_context_data(**kwargs)
- context['organization_types'] = self.get_queryset().values_list('type__name', flat=True).order_by('type__name').distinct('type__name')
+ context['organization_types'] = self.get_queryset().values_list('type__name', 'type__css_class').order_by('type__name').distinct('type__name')
return context
{{ organization.city }}, {{ organization.country.name }}
</div>
<div class="">
- {{ organization.type }}
+ {{ organization.type }}, {{ organization.type.css_class }}
</div>
</li>