initial version

This commit is contained in:
2026-06-28 14:24:41 +01:00
commit a5fa596244
388 changed files with 71390 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# Generated by Django 4.2.17 on 2024-12-14 18:37
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Categories',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(blank=True, max_length=100)),
('slug', models.SlugField(blank=True, null=True, unique=True)),
('picture', models.ImageField(blank=True, null=True, upload_to='main/images')),
('citation', models.TextField(blank=True)),
('date_created', models.DateTimeField(auto_now_add=True, null=True)),
('parentcategory', models.ManyToManyField(blank=True, related_name='children', to='main.categories')),
],
options={
'verbose_name_plural': 'Categories',
'ordering': ['id'],
},
),
]
+30
View File
@@ -0,0 +1,30 @@
# Generated by Django 4.2.17 on 2024-12-18 12:08
from django.db import migrations, models
import phonenumber_field.modelfields
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('email', models.EmailField(max_length=254)),
('subject', models.CharField(max_length=50)),
('phone_number', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
('message', models.TextField()),
('date_created', models.DateTimeField(auto_now_add=True)),
],
options={
'verbose_name_plural': 'Contacts',
'ordering': ['id'],
},
),
]
@@ -0,0 +1,196 @@
# Generated by Django 4.2.17 on 2024-12-18 18:57
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import phonenumber_field.modelfields
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('main', '0002_contact'),
]
operations = [
migrations.CreateModel(
name='Codes',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('code', models.CharField(blank=True, max_length=200)),
],
options={
'verbose_name_plural': 'code Zip',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='Countries',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('country', models.CharField(blank=True, max_length=200)),
],
options={
'verbose_name_plural': 'Pays',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='Courses',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=33)),
('slug', models.SlugField(blank=True, null=True, unique=True)),
('price', models.DecimalField(decimal_places=2, default=0.0, max_digits=19)),
('description', models.TextField(blank=True)),
('status', models.CharField(blank=True, choices=[('Online', 'Online'), ('Facetoface', 'Facetoface'), ('Blended', 'Blended')], default='Online', max_length=30, null=True)),
('date_created', models.DateTimeField(auto_now_add=True)),
('date_updated', models.DateTimeField(auto_now=True)),
('active', models.BooleanField(default=False)),
('category', models.ManyToManyField(to='main.categories')),
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name_plural': 'Courses',
'ordering': ['date_created'],
},
),
migrations.CreateModel(
name='Partners',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=50)),
('slug', models.SlugField(blank=True, null=True, unique=True)),
('image', models.ImageField(upload_to='main/images')),
],
options={
'verbose_name_plural': 'Partners',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='Wilayas',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(blank=True, max_length=200)),
('slug', models.SlugField(blank=True, null=True, unique=True)),
('size', models.IntegerField(blank=True, null=True)),
('image', models.ImageField(blank=True, null=True, upload_to='main/images')),
],
options={
'verbose_name_plural': 'Wilayas',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='Testimonials',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('testimonial', models.TextField()),
('date_created', models.DateTimeField(auto_now_add=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name_plural': 'Testimonials',
'ordering': ['date_created'],
},
),
migrations.CreateModel(
name='School',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=33)),
('city', models.CharField(blank=True, max_length=33)),
('slug', models.SlugField(blank=True, null=True, unique=True)),
('description', models.TextField(blank=True)),
('logo', models.ImageField(upload_to='main/images')),
('banner', models.ImageField(upload_to='main/images')),
('email', models.EmailField(max_length=254)),
('facebook', models.URLField(blank=True, null=True)),
('instagram', models.URLField(blank=True, null=True)),
('linkedin', models.URLField(blank=True, null=True)),
('youtube', models.URLField(blank=True, null=True)),
('website', models.URLField(blank=True, null=True)),
('whatsapp', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, null=True, region=None)),
('maps', models.URLField(blank=True, null=True)),
('location', models.TextField(blank=True)),
('date_created', models.DateTimeField(auto_now_add=True)),
('date_updated', models.DateTimeField(auto_now=True)),
('active', models.BooleanField(default=False)),
('sponsored', models.BooleanField(default=False)),
('category', models.ManyToManyField(related_name='product_categories', to='main.categories')),
('code', models.ManyToManyField(blank=True, related_name='code_store', to='main.codes')),
('country', models.ManyToManyField(blank=True, related_name='country_store', to='main.countries')),
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('partner', models.ManyToManyField(blank=True, to='main.partners')),
('wilaya', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.wilayas')),
],
options={
'verbose_name_plural': 'Schools',
'ordering': ['date_created'],
},
),
migrations.CreateModel(
name='Phones',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(blank=True, max_length=200)),
('phone', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='main.school')),
],
options={
'verbose_name_plural': 'Numéros Téléphone',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='Images',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(blank=True, max_length=33)),
('file', models.ImageField(blank=True, null=True, upload_to='main/images')),
('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.courses')),
],
options={
'verbose_name_plural': 'Images',
'ordering': ['id'],
},
),
migrations.AddField(
model_name='courses',
name='partner',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.partners'),
),
migrations.AddField(
model_name='courses',
name='school',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.school'),
),
migrations.CreateModel(
name='Cities',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('city', models.CharField(blank=True, max_length=200)),
('wilaya', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.wilayas')),
],
options={
'verbose_name_plural': 'Villes',
'ordering': ['id'],
},
),
migrations.CreateModel(
name='Addresses',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(blank=True, max_length=200)),
('address', models.TextField()),
('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='main.school')),
],
options={
'verbose_name_plural': 'Adresses',
'ordering': ['id'],
},
),
]
View File