Merge branch 'feature/#56_agregar_es_usuario_boletin_a_usuario' into 'develop'
Closed feature/#56_agregar_es_usuario_boletin_a_usuario See merge request !38
Showing
4 changed files
with
24 additions
and
2 deletions
@@ -15,7 +15,8 @@ class UsuarioAdmin(UserAdmin): | @@ -15,7 +15,8 @@ class UsuarioAdmin(UserAdmin): | ||
15 | 'first_name', | 15 | 'first_name', |
16 | 'last_name', | 16 | 'last_name', |
17 | 'email', | 17 | 'email', |
18 | - 'cuil' | 18 | + 'cuil', |
19 | + 'es_usuario_boletin' | ||
19 | ) | 20 | ) |
20 | }), | 21 | }), |
21 | (_('Organismo'), {'fields': ('organismo',)}), | 22 | (_('Organismo'), {'fields': ('organismo',)}), |
@@ -28,7 +29,7 @@ class UsuarioAdmin(UserAdmin): | @@ -28,7 +29,7 @@ class UsuarioAdmin(UserAdmin): | ||
28 | (None, { | 29 | (None, { |
29 | 'classes': ('wide',), | 30 | 'classes': ('wide',), |
30 | 'fields': ( | 31 | 'fields': ( |
31 | - 'first_name', 'last_name', 'username', "password1", "password2", 'email', 'cuil', | 32 | + 'first_name', 'last_name', 'username', "password1", "password2", 'email', 'cuil', 'es_usuario_boletin', |
32 | 'organismo', 'is_staff',)} | 33 | 'organismo', 'is_staff',)} |
33 | ), | 34 | ), |
34 | ) | 35 | ) |
1 | +# Generated by Django 4.1.9 on 2023-09-12 13:16 | ||
2 | + | ||
3 | +from django.db import migrations, models | ||
4 | + | ||
5 | + | ||
6 | +class Migration(migrations.Migration): | ||
7 | + | ||
8 | + dependencies = [ | ||
9 | + ('usuario', '0003_alter_usuario_cuil'), | ||
10 | + ] | ||
11 | + | ||
12 | + operations = [ | ||
13 | + migrations.AddField( | ||
14 | + model_name='usuario', | ||
15 | + name='es_usuario_boletin', | ||
16 | + field=models.BooleanField(default=False), | ||
17 | + ), | ||
18 | + ] |
@@ -8,6 +8,7 @@ class Usuario(AbstractUser): | @@ -8,6 +8,7 @@ class Usuario(AbstractUser): | ||
8 | 8 | ||
9 | cuil = models.CharField(max_length=11, verbose_name='Número de Cuil (Sin guiones)', unique=True) | 9 | cuil = models.CharField(max_length=11, verbose_name='Número de Cuil (Sin guiones)', unique=True) |
10 | organismo = models.ForeignKey('organismo.Organismo', on_delete=models.SET_NULL, blank=True, null=True) | 10 | organismo = models.ForeignKey('organismo.Organismo', on_delete=models.SET_NULL, blank=True, null=True) |
11 | + es_usuario_boletin = models.BooleanField(default=False) | ||
11 | 12 | ||
12 | def __str__(self): | 13 | def __str__(self): |
13 | return f'{self.username}' | 14 | return f'{self.username}' |
@@ -15,6 +15,7 @@ class UsuarioSerializer(serializers.ModelSerializer): | @@ -15,6 +15,7 @@ class UsuarioSerializer(serializers.ModelSerializer): | ||
15 | 'last_name', | 15 | 'last_name', |
16 | 'email', | 16 | 'email', |
17 | 'cuil', | 17 | 'cuil', |
18 | + 'es_usuario_boletin', | ||
18 | 'organismo', | 19 | 'organismo', |
19 | 'permisos_usuario', | 20 | 'permisos_usuario', |
20 | ) | 21 | ) |
@@ -36,6 +37,7 @@ class UsuarioListaSerializer(serializers.ModelSerializer): | @@ -36,6 +37,7 @@ class UsuarioListaSerializer(serializers.ModelSerializer): | ||
36 | 'first_name', | 37 | 'first_name', |
37 | 'last_name', | 38 | 'last_name', |
38 | 'cuil', | 39 | 'cuil', |
40 | + 'es_usuario_boletin', | ||
39 | ) | 41 | ) |
40 | 42 | ||
41 | 43 |
-
Please register or login to post a comment