Commit 704df7f2 authored by Aymeric Barantal's avatar Aymeric Barantal

move Group to organization module

parent 9e745f6b
from django.contrib import admin
from campaign.campaign.models import (Campaign, Contact, CampaignContact,
Group, Argumentary)
Argumentary)
admin.site.register(Campaign)
admin.site.register(Contact)
admin.site.register(CampaignContact)
admin.site.register(Group)
admin.site.register(Argumentary)
from django.db import models
from campaign.organization.models import Organization
class Contact(models.Model):
......@@ -15,19 +14,6 @@ class Contact(models.Model):
return '%s %s' % (self.first_name, self.last_name)
class Group(models.Model):
"""Group model to qualify contacts"""
id = models.AutoField(primary_key=True)
organisation_id = models.ForeignKey(Organization)
name = models.CharField(max_length=64)
type = models.CharField(max_length=255, blank=True)
media = models.CharField(max_length=255, blank=True)
contacts = models.ManyToManyField(Contact)
def __unicode__(self):
return self.name
class Campaign(models.Model):
"""Campaign model, describe what have to be achieved"""
id = models.AutoField(primary_key=True)
......
from django.contrib import admin
from campaign.organization.models import Organization
from campaign.organization.models import Organization, Group
admin.site.register(Organization)
admin.site.register(Group)
from django.db import models
from django.contrib.auth.models import User
from campaign.campaign.models import Contact
class Organization(models.Model):
......@@ -10,3 +11,16 @@ class Organization(models.Model):
def __unicode__(self):
return self.name
class Group(models.Model):
"""Group model to qualify contacts"""
id = models.AutoField(primary_key=True)
organisation_id = models.ForeignKey(Organization)
name = models.CharField(max_length=64)
type = models.CharField(max_length=255, blank=True)
media = models.CharField(max_length=255, blank=True)
contacts = models.ManyToManyField(Contact)
def __unicode__(self):
return self.name
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