Skip to content

Commit

Permalink
added site info
Browse files Browse the repository at this point in the history
  • Loading branch information
walosha committed Jan 21, 2023
1 parent 835a484 commit f98ff88
Show file tree
Hide file tree
Showing 31 changed files with 210 additions and 294 deletions.
4 changes: 3 additions & 1 deletion account/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .forms import CustomUserCreationForm, CustomUserChangeForm
from django.contrib.auth.forms import AdminPasswordChangeForm
from django.contrib.auth.admin import UserAdmin
from .models import CustomUser
from .models import CustomUser, ChurchGroup


class CustomUserAdmin(UserAdmin):
Expand Down Expand Up @@ -47,3 +47,5 @@ class CustomUserAdmin(UserAdmin):


admin.site.register(CustomUser, CustomUserAdmin) # Here

admin.site.register(ChurchGroup) # Here
50 changes: 34 additions & 16 deletions account/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated by Django 4.0.8 on 2023-01-01 00:47
# Generated by Django 4.0.8 on 2023-01-21 17:14

import account.managers
from django.db import migrations, models
import django.utils.timezone
import account.managers


class Migration(migrations.Migration):
Expand All @@ -17,22 +17,40 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='CustomUser',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
('id', models.BigAutoField(auto_created=True,
primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(
max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(
blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False,
help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('first_name', models.CharField(blank=True,
max_length=150, verbose_name='first name')),
('last_name', models.CharField(blank=True,
max_length=150, verbose_name='last name')),
('is_staff', models.BooleanField(default=False,
help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(
default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(
default=django.utils.timezone.now, verbose_name='date joined')),
('email', models.EmailField(max_length=254,
unique=True, verbose_name='email address')),
('firstname', models.CharField(max_length=256)),
('lastname', models.CharField(max_length=256)),
('role', models.CharField(choices=[
('admin', 'admin'), ('admin', 'admin')], max_length=50)),
('category', models.CharField(choices=[('unknown', 'unknown'), ('children', 'children'), (
'teeneger', 'teeneger'), ('adult', 'adult')], default='unknown', max_length=20)),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.',
related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.',
related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
],
options={
'verbose_name': 'custom user',
'verbose_name_plural': 'custom users',
'verbose_name': 'user',
'verbose_name_plural': 'users',
},
managers=[
('objects', account.managers.CustomUserManager()),
Expand Down

This file was deleted.

31 changes: 31 additions & 0 deletions account/migrations/0002_churchgroup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Generated by Django 4.0.8 on 2023-01-21 17:30

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

dependencies = [
('account', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='ChurchGroup',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=256)),
('purpose', models.CharField(max_length=256)),
('leader', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='leader', to=settings.AUTH_USER_MODEL)),
('memebers', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ('-created_at',),
},
),
]
18 changes: 18 additions & 0 deletions account/migrations/0003_rename_memebers_churchgroup_members.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.0.8 on 2023-01-21 17:33

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('account', '0002_churchgroup'),
]

operations = [
migrations.RenameField(
model_name='churchgroup',
old_name='memebers',
new_name='members',
),
]
18 changes: 0 additions & 18 deletions account/migrations/0003_rename_type_customuser_category.py

This file was deleted.

17 changes: 17 additions & 0 deletions account/migrations/0004_alter_customuser_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.0.8 on 2023-01-21 18:18

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('account', '0003_rename_memebers_churchgroup_members'),
]

operations = [
migrations.AlterModelOptions(
name='customuser',
options={'ordering': ('-id',), 'verbose_name': 'user', 'verbose_name_plural': 'users'},
),
]

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions account/migrations/0006_alter_customuser_lastname.py

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f98ff88

Please sign in to comment.