Commit 714db7a2 authored by Florent Chehab's avatar Florent Chehab
Browse files

obj_level_moderation added

parent 964ee65a
# Generated by Django 2.0.3 on 2018-09-01 13:18 # Generated by Django 2.0.3 on 2018-09-02 14:42
import backend.utils.friendly_path import backend.utils.friendly_path
from django.conf import settings from django.conf import settings
...@@ -24,6 +24,7 @@ class Migration(migrations.Migration): ...@@ -24,6 +24,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)), ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
('is_main_campus', models.BooleanField()), ('is_main_campus', models.BooleanField()),
('name', models.CharField(max_length=200, null=True)), ('name', models.CharField(max_length=200, null=True)),
...@@ -38,6 +39,7 @@ class Migration(migrations.Migration): ...@@ -38,6 +39,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('name', models.CharField(max_length=200)), ('name', models.CharField(max_length=200)),
('local_name', models.CharField(blank=True, max_length=200, null=True)), ('local_name', models.CharField(blank=True, max_length=200, null=True)),
('area', models.CharField(blank=True, max_length=200, null=True)), ('area', models.CharField(blank=True, max_length=200, null=True)),
...@@ -51,6 +53,7 @@ class Migration(migrations.Migration): ...@@ -51,6 +53,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('name', models.CharField(max_length=200)), ('name', models.CharField(max_length=200)),
('iso_alpha2_code', models.CharField(max_length=2, primary_key=True, serialize=False)), ('iso_alpha2_code', models.CharField(max_length=2, primary_key=True, serialize=False)),
('iso_alpha3_code', models.CharField(max_length=3, unique=True)), ('iso_alpha3_code', models.CharField(max_length=3, unique=True)),
...@@ -71,6 +74,7 @@ class Migration(migrations.Migration): ...@@ -71,6 +74,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('comment', models.TextField(blank=True)), ('comment', models.TextField(blank=True)),
('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)), ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
], ],
...@@ -84,6 +88,7 @@ class Migration(migrations.Migration): ...@@ -84,6 +88,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('comment', models.TextField(blank=True)), ('comment', models.TextField(blank=True)),
('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)), ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
('type', models.CharField(max_length=200)), ('type', models.CharField(max_length=200)),
...@@ -99,6 +104,7 @@ class Migration(migrations.Migration): ...@@ -99,6 +104,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('code', models.CharField(max_length=3, primary_key=True, serialize=False)), ('code', models.CharField(max_length=3, primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)), ('name', models.CharField(max_length=100)),
('symbol', models.CharField(blank=True, max_length=30, null=True)), ('symbol', models.CharField(blank=True, max_length=30, null=True)),
...@@ -115,6 +121,7 @@ class Migration(migrations.Migration): ...@@ -115,6 +121,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('code', models.CharField(max_length=6, primary_key=True, serialize=False)), ('code', models.CharField(max_length=6, primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)), ('name', models.CharField(max_length=100)),
('active', models.BooleanField()), ('active', models.BooleanField()),
...@@ -131,6 +138,7 @@ class Migration(migrations.Migration): ...@@ -131,6 +138,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('aaa', models.CharField(max_length=100)), ('aaa', models.CharField(max_length=100)),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
...@@ -145,6 +153,7 @@ class Migration(migrations.Migration): ...@@ -145,6 +153,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('bbb', models.CharField(max_length=100)), ('bbb', models.CharField(max_length=100)),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
...@@ -159,6 +168,7 @@ class Migration(migrations.Migration): ...@@ -159,6 +168,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('nb_seats_offered', models.PositiveIntegerField()), ('nb_seats_offered', models.PositiveIntegerField()),
('nb_seats_offered_exchange', models.PositiveIntegerField(null=True)), ('nb_seats_offered_exchange', models.PositiveIntegerField(null=True)),
('nb_seats_offered_double_degree', models.PositiveIntegerField(null=True)), ('nb_seats_offered_double_degree', models.PositiveIntegerField(null=True)),
...@@ -182,6 +192,7 @@ class Migration(migrations.Migration): ...@@ -182,6 +192,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('Utc_departure_id', models.IntegerField()), ('Utc_departure_id', models.IntegerField()),
('is_anonymous', models.BooleanField()), ('is_anonymous', models.BooleanField()),
('courses', django.contrib.postgres.fields.jsonb.JSONField(null=True)), ('courses', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
...@@ -197,6 +208,7 @@ class Migration(migrations.Migration): ...@@ -197,6 +208,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('is_anonymous', models.BooleanField(default=True)), ('is_anonymous', models.BooleanField(default=True)),
('is_public', models.BooleanField(default=False)), ('is_public', models.BooleanField(default=False)),
('courses_and_courses_feedback', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('courses_and_courses_feedback', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
...@@ -219,6 +231,7 @@ class Migration(migrations.Migration): ...@@ -219,6 +231,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('is_anonymous', models.BooleanField(default=True)), ('is_anonymous', models.BooleanField(default=True)),
('is_public', models.BooleanField(default=False)), ('is_public', models.BooleanField(default=False)),
('order_in_list', models.PositiveIntegerField()), ('order_in_list', models.PositiveIntegerField()),
...@@ -234,6 +247,7 @@ class Migration(migrations.Migration): ...@@ -234,6 +247,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('is_anonymous', models.BooleanField(default=True)), ('is_anonymous', models.BooleanField(default=True)),
('is_public', models.BooleanField(default=False)), ('is_public', models.BooleanField(default=False)),
('public', models.BooleanField()), ('public', models.BooleanField()),
...@@ -248,6 +262,7 @@ class Migration(migrations.Migration): ...@@ -248,6 +262,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('code', models.CharField(max_length=6, primary_key=True, serialize=False)), ('code', models.CharField(max_length=6, primary_key=True, serialize=False)),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
...@@ -262,6 +277,7 @@ class Migration(migrations.Migration): ...@@ -262,6 +277,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('code', models.CharField(max_length=6)), ('code', models.CharField(max_length=6)),
('name', models.CharField(max_length=100)), ('name', models.CharField(max_length=100)),
('active', models.BooleanField()), ('active', models.BooleanField()),
...@@ -276,6 +292,7 @@ class Migration(migrations.Migration): ...@@ -276,6 +292,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('name', models.CharField(max_length=100, unique=True)), ('name', models.CharField(max_length=100, unique=True)),
('config', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)), ('config', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
...@@ -291,6 +308,7 @@ class Migration(migrations.Migration): ...@@ -291,6 +308,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('name', models.CharField(max_length=200)), ('name', models.CharField(max_length=200)),
('acronym', models.CharField(blank=True, max_length=20, null=True)), ('acronym', models.CharField(blank=True, max_length=20, null=True)),
('logo', models.ImageField(default='path/to/my/default/image.jpg', max_length=250, upload_to=backend.utils.friendly_path.friendly_path('uploads/universities/logos/', 'name'))), ('logo', models.ImageField(default='path/to/my/default/image.jpg', max_length=250, upload_to=backend.utils.friendly_path.friendly_path('uploads/universities/logos/', 'name'))),
...@@ -306,6 +324,7 @@ class Migration(migrations.Migration): ...@@ -306,6 +324,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('comment', models.TextField(blank=True)), ('comment', models.TextField(blank=True)),
('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)), ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
...@@ -320,6 +339,7 @@ class Migration(migrations.Migration): ...@@ -320,6 +339,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('comment', models.TextField(blank=True)), ('comment', models.TextField(blank=True)),
('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)), ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
('type', models.CharField(max_length=200)), ('type', models.CharField(max_length=200)),
...@@ -338,6 +358,7 @@ class Migration(migrations.Migration): ...@@ -338,6 +358,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('contact_info', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('contact_info', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('contact_info_is_public', models.BooleanField(default=False)), ('contact_info_is_public', models.BooleanField(default=False)),
('config', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('config', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
...@@ -352,6 +373,7 @@ class Migration(migrations.Migration): ...@@ -352,6 +373,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('campus', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.Campus')), ('campus', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.Campus')),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
...@@ -364,6 +386,7 @@ class Migration(migrations.Migration): ...@@ -364,6 +386,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('city', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.City')), ('city', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.City')),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
...@@ -376,6 +399,7 @@ class Migration(migrations.Migration): ...@@ -376,6 +399,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('country', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='country_items', serialize=False, to='backend.Country')), ('country', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='country_items', serialize=False, to='backend.Country')),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
...@@ -388,6 +412,7 @@ class Migration(migrations.Migration): ...@@ -388,6 +412,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('comment', models.TextField(blank=True)), ('comment', models.TextField(blank=True)),
('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)), ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
('university', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='university_info', serialize=False, to='backend.University')), ('university', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='university_info', serialize=False, to='backend.University')),
...@@ -406,6 +431,7 @@ class Migration(migrations.Migration): ...@@ -406,6 +431,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('comment', models.TextField(blank=True)), ('comment', models.TextField(blank=True)),
('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)), ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
('university', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='university_semesters_dates', serialize=False, to='backend.University')), ('university', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='university_semesters_dates', serialize=False, to='backend.University')),
...@@ -425,6 +451,7 @@ class Migration(migrations.Migration): ...@@ -425,6 +451,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('moderated_on', models.DateTimeField(null=True)), ('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)), ('updated_on', models.DateTimeField(null=True)),
('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), ('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('university', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.University')), ('university', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.University')),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
......
# Generated by Django 2.0.3 on 2018-09-02 15:16
import backend.models.my_model.myModel
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='campus',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='campustaggeditem',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='city',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='citytaggeditem',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='country',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='countrydri',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='countryscholarship',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='countrytaggeditem',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='currency',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='department',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='fortestingmoderation',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='fortestingversioning',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='offer',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='previousdeparture',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='previousdeparturefeedback',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='recommendation',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='recommendationlist',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='semester',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='specialty',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='tag',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='university',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='universitydri',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='universityinfo',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='universityscholarship',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='universitysemestersdates',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='universitytaggeditem',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
migrations.AlterField(
model_name='userdata',
name='obj_moderation_level',
field=models.SmallIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), backend.models.my_model.myModel.validate_obj_model_lv]),
),
]
...@@ -16,7 +16,7 @@ class BasicModule(MyModelVersionned): ...@@ -16,7 +16,7 @@ class BasicModule(MyModelVersionned):
class BasicModuleSerializer(MyModelVersionnedSerializer): class BasicModuleSerializer(MyModelVersionnedSerializer):
def validate(self, attrs): def my_validate(self, attrs):
content = {'usefull_links': attrs['usefull_links']} content = {'usefull_links': attrs['usefull_links']}
config = {'usefull_links': USEFULL_LINKS_CONFIG} config = {'usefull_links': USEFULL_LINKS_CONFIG}
validate_content_against_config(config, content) validate_content_against_config(config, content)
......
...@@ -27,7 +27,7 @@ class Scholarship(BasicModule): ...@@ -27,7 +27,7 @@ class Scholarship(BasicModule):
class ScholarshipSerializer(BasicModuleSerializer): class ScholarshipSerializer(BasicModuleSerializer):
def validate(self, attrs): def my_validate(self, attrs):
if attrs['amount_max'] < attrs['amount_min']: if attrs['amount_max'] < attrs['amount_min']:
raise serializers.ValidationError( raise serializers.ValidationError(
"Amount_max should be greater or equal than amount_min") "Amount_max should be greater or equal than amount_min")
......