mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-06-30 02:31:09 +02:00
Initial commit, projet med
This commit is contained in:
@ -1,13 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-06-28 10:30
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
@ -15,16 +18,20 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='User',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)),
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('password', models.CharField(max_length=128, verbose_name='password')),
|
||||
('last_login', models.DateTimeField(blank=True, verbose_name='last login', null=True)),
|
||||
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('surname', models.CharField(max_length=255)),
|
||||
('email', models.EmailField(max_length=254)),
|
||||
('state', models.IntegerField(default=0, choices=[(0, 'STATE_ACTIVE'), (1, 'STATE_DISABLED'), (2, 'STATE_ARCHIVE')])),
|
||||
('pseudo', models.CharField(max_length=32, unique=True)),
|
||||
('email', models.EmailField(blank=True, max_length=254, null=True)),
|
||||
('telephone', models.CharField(blank=True, max_length=15, null=True)),
|
||||
('adresse', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('maxemprunt', models.IntegerField(default=5)),
|
||||
('state', models.IntegerField(choices=[(0, 'STATE_ACTIVE'), (1, 'STATE_DISABLED'), (2, 'STATE_ARCHIVE')], default=0)),
|
||||
('pseudo', models.CharField(help_text='Doit contenir uniquement des lettres, chiffres, ou tirets. ', max_length=32, unique=True)),
|
||||
('comment', models.CharField(blank=True, help_text='Commentaire, promo', max_length=255)),
|
||||
('registered', models.DateTimeField(auto_now_add=True)),
|
||||
('admin', models.BooleanField(default=False)),
|
||||
('right', models.IntegerField(choices=[(0, 'BASIC'), (1, 'PERM'), (2, 'BUREAU')], default=0)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
@ -33,8 +40,8 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='Request',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)),
|
||||
('type', models.CharField(max_length=2, choices=[('PW', 'Mot de passe'), ('EM', 'Email')])),
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('type', models.CharField(choices=[('PW', 'Mot de passe'), ('EM', 'Email')], max_length=2)),
|
||||
('token', models.CharField(max_length=32)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('expires_at', models.DateTimeField()),
|
||||
|
@ -1,24 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='comment',
|
||||
field=models.CharField(blank=True, help_text='Commentaire, promo', max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='pseudo',
|
||||
field=models.CharField(unique=True, help_text='Doit contenir uniquement des lettres, chiffres, ou tirets. ', max_length=32),
|
||||
),
|
||||
]
|
25
users/migrations/0002_auto_20170629_1438.py
Normal file
25
users/migrations/0002_auto_20170629_1438.py
Normal file
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-06-29 12:38
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='maxemprunt',
|
||||
field=models.IntegerField(default=5, help_text="Maximum d'emprunts autorisés"),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='right',
|
||||
field=models.IntegerField(choices=[(0, 'BASIC'), (1, 'PERM'), (2, 'BUREAU')], default=0, help_text='Droits accordés'),
|
||||
),
|
||||
]
|
45
users/migrations/0003_auto_20170629_2156.py
Normal file
45
users/migrations/0003_auto_20170629_2156.py
Normal file
@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-06-29 19:56
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0002_auto_20170629_1438'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ListRight',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('listright', models.CharField(max_length=255, unique=True)),
|
||||
('details', models.CharField(blank=True, help_text='Description', max_length=255)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Right',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('right', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='users.ListRight')),
|
||||
],
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='user',
|
||||
name='right',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='right',
|
||||
name='user',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='right',
|
||||
unique_together=set([('user', 'right')]),
|
||||
),
|
||||
]
|
@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import macaddress.fields
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0002_auto_20170610_1550'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Machines',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)),
|
||||
('mac_address', macaddress.fields.MACAddressField(unique=True, max_length=17, integer=False)),
|
||||
('proprio', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=django.db.models.deletion.PROTECT)),
|
||||
],
|
||||
),
|
||||
]
|
@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import macaddress.fields
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0003_machines'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Machine',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)),
|
||||
('mac_address', macaddress.fields.MACAddressField(max_length=17, unique=True, integer=False)),
|
||||
('proprio', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=django.db.models.deletion.PROTECT)),
|
||||
],
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='machines',
|
||||
name='proprio',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='Machines',
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user