mirror of
				https://gitlab.crans.org/mediatek/med.git
				synced 2025-11-04 15:22:27 +01:00 
			
		
		
		
	Some user do not have a registration date
This commit is contained in:
		
							
								
								
									
										19
									
								
								users/migrations/0029_auto_20190810_1121.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								users/migrations/0029_auto_20190810_1121.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
# Generated by Django 2.2.4 on 2019-08-10 09:21
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.utils.timezone
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('users', '0028_auto_20190810_1003'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AlterField(
 | 
			
		||||
            model_name='user',
 | 
			
		||||
            name='date_joined',
 | 
			
		||||
            field=models.DateTimeField(default=django.utils.timezone.now, null=True, verbose_name='date joined'),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@@ -4,6 +4,7 @@
 | 
			
		||||
 | 
			
		||||
from django.contrib.auth.models import AbstractUser
 | 
			
		||||
from django.db import models
 | 
			
		||||
from django.utils import timezone
 | 
			
		||||
from django.utils.translation import gettext_lazy as _
 | 
			
		||||
 | 
			
		||||
from med.settings import MAX_EMPRUNT
 | 
			
		||||
@@ -34,6 +35,11 @@ class User(AbstractUser):
 | 
			
		||||
        max_length=255,
 | 
			
		||||
        blank=True,
 | 
			
		||||
    )
 | 
			
		||||
    date_joined = models.DateTimeField(
 | 
			
		||||
        _('date joined'),
 | 
			
		||||
        default=timezone.now,
 | 
			
		||||
        null=True,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    REQUIRED_FIELDS = ['first_name', 'last_name', 'email']
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user