Jan Dittberner
f9ea88cd24
This commit adds a new model that enhances the user profile with an offline support code, a postal address and an email address to allow users to reset their profile. The commit adds to Django admin commands 'populate' and 'reset_offline_code' to maintain the help user profiles from the Django command line.
55 lines
1.6 KiB
Python
55 lines
1.6 KiB
Python
# Generated by Django 3.2.18 on 2023-04-16 09:32
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="HelpUser",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"email_address",
|
|
models.EmailField(
|
|
help_text="Contact email address", max_length=254
|
|
),
|
|
),
|
|
(
|
|
"postal_address",
|
|
models.TextField(blank=True, help_text="Contact postal address"),
|
|
),
|
|
(
|
|
"offline_account_code",
|
|
models.CharField(
|
|
default="",
|
|
help_text="Offline account reset code",
|
|
max_length=36,
|
|
),
|
|
),
|
|
(
|
|
"user",
|
|
models.OneToOneField(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
to=settings.AUTH_USER_MODEL,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
]
|