forked from DGNum/gestioCOF
Modèle settings
- Ajout de l'unicité du nom d'un paramètre Ce qui a pour conséquence de rajouter un index sur le nom, ce qui est bien
This commit is contained in:
parent
346cbb2695
commit
515a7ce28e
2 changed files with 22 additions and 1 deletions
19
kfet/migrations/0013_auto_20160807_1840.py
Normal file
19
kfet/migrations/0013_auto_20160807_1840.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('kfet', '0012_settings'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='settings',
|
||||
name='name',
|
||||
field=models.CharField(unique=True, max_length=45),
|
||||
),
|
||||
]
|
|
@ -418,7 +418,9 @@ class GlobalPermissions(models.Model):
|
|||
)
|
||||
|
||||
class Settings(models.Model):
|
||||
name = models.CharField(max_length = 45)
|
||||
name = models.CharField(
|
||||
max_length = 45,
|
||||
unique = True)
|
||||
value_decimal = models.DecimalField(
|
||||
max_digits = 6, decimal_places = 2,
|
||||
blank = True, null = True, default = None)
|
||||
|
|
Loading…
Reference in a new issue