From efaa6edb88de601aadea913aafe0a90439d6a029 Mon Sep 17 00:00:00 2001 From: marax Date: Sat, 11 Dec 2021 11:20:30 +0100 Subject: [PATCH] Je ne sais pas les changements --- .../migrations/0004_alter_profile_birthdate.py | 18 ++++++++++++++++++ app1/models.py | 2 +- docker-compose.yml | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 app1/migrations/0004_alter_profile_birthdate.py diff --git a/app1/migrations/0004_alter_profile_birthdate.py b/app1/migrations/0004_alter_profile_birthdate.py new file mode 100644 index 0000000..569ea88 --- /dev/null +++ b/app1/migrations/0004_alter_profile_birthdate.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.8 on 2021-11-05 14:38 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('app1', '0003_alter_profile_birthdate'), + ] + + operations = [ + migrations.AlterField( + model_name='profile', + name='birthdate', + field=models.DateField(), + ), + ] diff --git a/app1/models.py b/app1/models.py index 4b0fea2..337176c 100644 --- a/app1/models.py +++ b/app1/models.py @@ -32,7 +32,7 @@ class Profile(models.Model): first_name = models.CharField( max_length=50, blank=True) last_name = models.CharField( max_length=50, blank=True) gender = models.CharField(choices=GENRE_CHOICES, max_length=1, default='m') - birthdate = models.DateField(default=date.today()) + birthdate = models.DateField() companyname = models.CharField(max_length=200, blank=True) bio = models.TextField(default='no bio ...', max_length=300, blank=True) avatar = models.OneToOneField( diff --git a/docker-compose.yml b/docker-compose.yml index 02a14bd..e6fb80c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,10 +6,11 @@ services: image: postgres restart: always volumes: - - ./pgdata:/var/lib/postgresql/data + - /dbdata:/var/lib/postgresql/data environment: POSTGRES_PASSWORD: c1secret2qbc POSTGRES_DB: weontheme + PGDATA: /var/lib/postgresql/data/dbfiles ports: - 5432:5432