mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Almost working wiki before refactoring again
This commit is contained in:
@ -2,9 +2,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.contrib.auth.models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
import django.core.validators
|
||||
import django.contrib.auth.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -17,28 +18,47 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='User',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, auto_created=True, verbose_name='ID', serialize=False)),
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
||||
('password', models.CharField(verbose_name='password', max_length=128)),
|
||||
('last_login', models.DateTimeField(null=True, blank=True, verbose_name='last login')),
|
||||
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
|
||||
('username', models.CharField(validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], help_text='Required. 254 characters or fewer. Letters, digits and @/./+/-/_ only.', error_messages={'unique': 'A user with that username already exists.'}, verbose_name='username', unique=True, max_length=254)),
|
||||
('last_login', models.DateTimeField(blank=True, verbose_name='last login', null=True)),
|
||||
('is_superuser', models.BooleanField(verbose_name='superuser status', help_text='Designates that this user has all permissions without explicitly assigning them.', default=False)),
|
||||
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, max_length=254, verbose_name='username', validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], unique=True, help_text='Required. 254 characters or fewer. Letters, digits and @/./+/-/_ only.')),
|
||||
('first_name', models.CharField(verbose_name='first name', max_length=30)),
|
||||
('last_name', models.CharField(verbose_name='last name', max_length=30)),
|
||||
('email', models.EmailField(verbose_name='email address', unique=True, max_length=254)),
|
||||
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
|
||||
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
|
||||
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
|
||||
('date_of_birth', models.DateTimeField(verbose_name='date of birth')),
|
||||
('nick_name', models.CharField(blank=True, max_length=30)),
|
||||
('groups', models.ManyToManyField(related_query_name='user', help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', blank=True, to='auth.Group', verbose_name='groups')),
|
||||
('user_permissions', models.ManyToManyField(related_query_name='user', help_text='Specific permissions for this user.', related_name='user_set', blank=True, to='auth.Permission', verbose_name='user permissions')),
|
||||
('is_staff', models.BooleanField(verbose_name='staff status', help_text='Designates whether the user can log into this admin site.', default=False)),
|
||||
('is_active', models.BooleanField(verbose_name='active', help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', default=True)),
|
||||
('date_joined', models.DateTimeField(verbose_name='date joined', default=django.utils.timezone.now)),
|
||||
('groups', models.ManyToManyField(related_name='user_set', to='auth.Group', blank=True, verbose_name='groups', related_query_name='user', help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.')),
|
||||
('user_permissions', models.ManyToManyField(related_name='user_set', to='auth.Permission', blank=True, verbose_name='user permissions', related_query_name='user', help_text='Specific permissions for this user.')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'users',
|
||||
'verbose_name': 'user',
|
||||
'verbose_name_plural': 'users',
|
||||
},
|
||||
managers=[
|
||||
('objects', django.contrib.auth.models.UserManager()),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Page',
|
||||
fields=[
|
||||
('full_name', models.CharField(serialize=False, verbose_name='page full name', primary_key=True, max_length=30)),
|
||||
('name', models.CharField(verbose_name='page name', max_length=30)),
|
||||
('title', models.CharField(blank=True, verbose_name='page title', max_length=255)),
|
||||
('content', models.TextField(blank=True, verbose_name='page content')),
|
||||
('revision', models.PositiveIntegerField(verbose_name='current revision', default=1)),
|
||||
('is_locked', models.BooleanField(verbose_name='page mutex', default=False)),
|
||||
('parent', models.ForeignKey(related_name='children', blank=True, null=True, to='core.Page', on_delete=django.db.models.deletion.SET_NULL)),
|
||||
],
|
||||
options={
|
||||
'permissions': (('can_edit', 'Can edit the page'), ('can_view', 'Can view the page')),
|
||||
},
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='page',
|
||||
unique_together=set([('name', 'parent')]),
|
||||
),
|
||||
]
|
||||
|
@ -1,33 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Page',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=30, verbose_name='page name')),
|
||||
('full_name', models.CharField(max_length=255, verbose_name='full name')),
|
||||
('content', models.TextField(blank=True, verbose_name='page content')),
|
||||
('revision', models.PositiveIntegerField(default=1, verbose_name='current revision')),
|
||||
('is_locked', models.BooleanField(default=False, verbose_name='page mutex')),
|
||||
],
|
||||
options={
|
||||
'permissions': (('can_edit', 'Can edit the page'), ('can_view', 'Can view the page')),
|
||||
},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='date_of_birth',
|
||||
field=models.DateTimeField(default='1970-01-01T00:00:00+01:00', verbose_name='date of birth'),
|
||||
),
|
||||
]
|
@ -1,21 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import datetime
|
||||
from django.utils.timezone import utc
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0002_auto_20151119_1533'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='date_of_birth',
|
||||
field=models.DateTimeField(default=datetime.datetime(1942, 6, 12, 0, 0, tzinfo=utc), verbose_name='date of birth'),
|
||||
),
|
||||
]
|
@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0003_auto_20151119_1635'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='page',
|
||||
name='children',
|
||||
field=models.ForeignKey(to='core.Page', related_name='parent', null=True),
|
||||
),
|
||||
]
|
@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0004_page_children'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='page',
|
||||
name='title',
|
||||
field=models.CharField(blank=True, max_length=255, verbose_name='page title'),
|
||||
),
|
||||
]
|
@ -1,23 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0005_page_title'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='page',
|
||||
name='id',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='page',
|
||||
name='full_name',
|
||||
field=models.CharField(primary_key=True, max_length=255, serialize=False, verbose_name='full name'),
|
||||
),
|
||||
]
|
@ -1,24 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0006_auto_20151120_0958'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='page',
|
||||
name='full_name',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='page',
|
||||
name='id',
|
||||
field=models.AutoField(default=0, auto_created=True, verbose_name='ID', primary_key=True, serialize=False),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0007_auto_20151120_1347'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='date_of_birth',
|
||||
field=models.DateTimeField(verbose_name='date of birth'),
|
||||
),
|
||||
]
|
@ -1,23 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0008_auto_20151122_1717'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='page',
|
||||
name='id',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='page',
|
||||
name='name',
|
||||
field=models.CharField(verbose_name='page name', max_length=30, serialize=False, primary_key=True),
|
||||
),
|
||||
]
|
@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0009_auto_20151123_0902'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='page',
|
||||
old_name='name',
|
||||
new_name='full_name',
|
||||
),
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0010_auto_20151123_0948'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='page',
|
||||
name='name',
|
||||
field=models.CharField(verbose_name='page name', default='guy', max_length=30),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
@ -1,23 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0011_page_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='page',
|
||||
name='children',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='page',
|
||||
name='parent',
|
||||
field=models.ForeignKey(null=True, related_name='children', to='core.Page'),
|
||||
),
|
||||
]
|
@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0012_auto_20151123_1002'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='page',
|
||||
name='full_name',
|
||||
field=models.CharField(verbose_name='page full name', primary_key=True, serialize=False, max_length=30),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='page',
|
||||
name='parent',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='core.Page', related_name='children', null=True),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user