Merge pull request 'Add new VSL app with initial models and admin configuration.' (#28) from vsl into master
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m2s
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m2s
Reviewed-on: #28
This commit is contained in:
@@ -52,6 +52,7 @@ INSTALLED_APPS = [
|
||||
'studenteval.apps.StudentevalConfig',
|
||||
'comm_op.apps.CommOpConfig',
|
||||
'custom_admin.apps.CustomAdminConfig',
|
||||
'vsl.apps.VslConfig',
|
||||
'rangefilter',
|
||||
'django.contrib.admin',
|
||||
'carnet_rouge.apps.CarnetRougeConfig',
|
||||
|
0
vsl/__init__.py
Normal file
0
vsl/__init__.py
Normal file
11
vsl/admin.py
Normal file
11
vsl/admin.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from django.contrib import admin
|
||||
from vsl.models import VslDest
|
||||
|
||||
|
||||
@admin.register(VslDest)
|
||||
class vsl_destAdmin(admin.ModelAdmin):
|
||||
list_display = ('id', 'name')
|
||||
|
||||
ordering = ('id',)
|
||||
list_per_page = 100
|
||||
search_fields = ('name',)
|
6
vsl/apps.py
Normal file
6
vsl/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class VslConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'vsl'
|
23
vsl/migrations/0001_initial.py
Normal file
23
vsl/migrations/0001_initial.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.0.10 on 2025-06-04 16:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='VslDest',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID du Suivi')),
|
||||
('name', models.CharField(max_length=255, verbose_name='Dénomination')),
|
||||
('date_creation', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
|
||||
('date_modification', models.DateTimeField(auto_now=True, verbose_name='Date de modification')),
|
||||
],
|
||||
),
|
||||
]
|
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.0.10 on 2025-06-04 16:49
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('vsl', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='vsldest',
|
||||
old_name='date_creation',
|
||||
new_name='dtCreate',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='vsldest',
|
||||
old_name='date_modification',
|
||||
new_name='dtUpdate',
|
||||
),
|
||||
]
|
18
vsl/migrations/0003_rename_name_vsldest_dest.py
Normal file
18
vsl/migrations/0003_rename_name_vsldest_dest.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0.10 on 2025-06-04 16:50
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('vsl', '0002_rename_date_creation_vsldest_dtcreate_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='vsldest',
|
||||
old_name='name',
|
||||
new_name='dest',
|
||||
),
|
||||
]
|
18
vsl/migrations/0004_rename_dest_vsldest_name.py
Normal file
18
vsl/migrations/0004_rename_dest_vsldest_name.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0.10 on 2025-06-04 16:51
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('vsl', '0003_rename_name_vsldest_dest'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='vsldest',
|
||||
old_name='dest',
|
||||
new_name='name',
|
||||
),
|
||||
]
|
0
vsl/migrations/__init__.py
Normal file
0
vsl/migrations/__init__.py
Normal file
22
vsl/models.py
Normal file
22
vsl/models.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class VslDest(models.Model):
|
||||
# ID auto-incrémenté par défaut
|
||||
id = models.AutoField("ID du Suivi", primary_key=True)
|
||||
|
||||
# Champ de chaîne de caractères avec une longueur maximale de 255 caractères
|
||||
name = models.CharField("Dénomination", max_length=255)
|
||||
|
||||
# Champ pour la date de création, automatiquement défini à la création
|
||||
dtCreate = models.DateTimeField("Date de création", auto_now_add=True)
|
||||
|
||||
# Champ pour la date de modification, automatiquement mis à jour à chaque modification
|
||||
dtUpdate = models.DateTimeField("Date de modification", auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
class Meta:
|
||||
verbose_name = "Destination VSL"
|
||||
verbose_name_plural = "Destinations VSL"
|
||||
ordering = ["id"]
|
3
vsl/tests.py
Normal file
3
vsl/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
3
vsl/views.py
Normal file
3
vsl/views.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
Reference in New Issue
Block a user