Commit ae8554af authored by Michal Čihař's avatar Michal Čihař

Model support for multiple owners

Issue #719
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 44910de4
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('trans', '0036_auto_20150709_1005'),
]
operations = [
migrations.AddField(
model_name='project',
name='owners',
field=models.ManyToManyField(help_text='Owners of the project.', to=settings.AUTH_USER_MODEL, verbose_name='Owners', blank=True),
),
migrations.AlterField(
model_name='project',
name='owner',
field=models.ForeignKey(related_name='old_owned_projects', blank=True, to=settings.AUTH_USER_MODEL, help_text='Owner of the project.', null=True, verbose_name='Owner'),
),
]
......@@ -136,11 +136,20 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin):
verbose_name=ugettext_lazy('Owner'),
null=True,
db_index=True,
related_name='old_owned_projects',
blank=True,
help_text=ugettext_lazy(
'Owner of the project.'
)
)
owners = models.ManyToManyField(
User,
verbose_name=ugettext_lazy('Owners'),
blank=True,
help_text=ugettext_lazy(
'Owners of the project.'
)
)
objects = ProjectManager()
......
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