0001_initial.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import models, migrations
  4. import netfields.fields
  5. import coin.validation
  6. import coin.mixins
  7. class Migration(migrations.Migration):
  8. dependencies = [
  9. ('configuration', '0001_initial'),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='VPNConfiguration',
  14. fields=[
  15. ('configuration_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='configuration.Configuration')),
  16. ('activated', models.BooleanField(default=False, verbose_name='activ\xe9')),
  17. ('login', models.CharField(help_text='leave empty for automatic generation', unique=True, max_length=50, verbose_name='identifiant', blank=True)),
  18. ('password', models.CharField(max_length=256, null=True, verbose_name='mot de passe', blank=True)),
  19. ('ipv4_endpoint', netfields.fields.InetAddressField(validators=[coin.validation.validate_v4], max_length=39, blank=True, help_text='Adresse IPv4 utilis\xe9e par d\xe9faut sur le VPN', null=True, verbose_name='IPv4')),
  20. ('ipv6_endpoint', netfields.fields.InetAddressField(validators=[coin.validation.validate_v6], max_length=39, blank=True, help_text='Adresse IPv6 utilis\xe9e par d\xe9faut sur le VPN', null=True, verbose_name='IPv6')),
  21. ('comment', models.CharField(max_length=512, verbose_name='commentaire', blank=True)),
  22. ],
  23. options={
  24. 'verbose_name': 'VPN',
  25. },
  26. bases=(coin.mixins.CoinLdapSyncMixin, 'configuration.configuration'),
  27. ),
  28. migrations.CreateModel(
  29. name='LdapVPNConfig',
  30. fields=[
  31. ],
  32. options={
  33. 'managed': False,
  34. },
  35. bases=(models.Model,),
  36. ),
  37. ]