Add migration for adding a2_service, fix import path for ForeignKey
This commit is contained in:
parent
a81f23a5d4
commit
34302b62de
|
@ -0,0 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentic2', '0007_auto_20150523_0028'),
|
||||
('authentic2_pratic', '0005_auto_20150616_1649'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='service',
|
||||
name='a2_service',
|
||||
field=models.ForeignKey(related_name='pratic_service', verbose_name='related authentic2 service', blank=True, to='authentic2.Service', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='serviceinstance',
|
||||
name='a2_service',
|
||||
field=models.ForeignKey(related_name='pratic_service_instances', verbose_name='related authentic2 service', blank=True, to='authentic2.Service', null=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
|
@ -287,9 +287,10 @@ class Service(Model):
|
|||
cas_service_url = URLField(
|
||||
verbose_name=_('CAS service URL'),
|
||||
blank=True)
|
||||
a2_service = models.ForeignKey(
|
||||
a2_service = ForeignKey(
|
||||
to='authentic2.Service',
|
||||
verbose_name=_('related authentic2 service'),
|
||||
related_name='pratic_service',
|
||||
blank=True,
|
||||
null=True)
|
||||
|
||||
|
@ -344,9 +345,10 @@ class ServiceInstance(Model):
|
|||
verbose_name=_('Authentication by certificate only'),
|
||||
default=False,
|
||||
blank=True)
|
||||
a2_service = models.ForeignKey(
|
||||
a2_service = ForeignKey(
|
||||
to='authentic2.Service',
|
||||
verbose_name=_('related authentic2 service'),
|
||||
related_name='pratic_service_instances',
|
||||
blank=True,
|
||||
null=True)
|
||||
|
||||
|
|
Reference in New Issue