48 lines
1.5 KiB
Python
48 lines
1.5 KiB
Python
# Generated by Django 3.2.23 on 2024-02-20 15:15
|
|
|
|
import django.core.validators
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
('eo_facture', '0022_auto_20240111_1328'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='PieceJointe',
|
|
fields=[
|
|
(
|
|
'id',
|
|
models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
|
),
|
|
(
|
|
'nom',
|
|
models.TextField(
|
|
blank=True,
|
|
max_length=50,
|
|
validators=[django.core.validators.RegexValidator('[0-9a-zA-Z_]+.[0-9a-zA-Z]{3}')],
|
|
verbose_name='Nom',
|
|
),
|
|
),
|
|
('fichier', models.FileField(upload_to='', verbose_name='Fichier')),
|
|
(
|
|
'facture',
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name='pieces_jointes',
|
|
to='eo_facture.facture',
|
|
verbose_name='Facture',
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
'verbose_name': 'Pièce jointe',
|
|
'verbose_name_plural': 'Pièces jointes',
|
|
'ordering': ('nom',),
|
|
},
|
|
),
|
|
]
|