Add new app 'help' for user support
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.
This commit is contained in:
parent
4b7e311c62
commit
f9ea88cd24
14 changed files with 161 additions and 34 deletions
|
@ -0,0 +1,55 @@
|
|||
# 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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
0
gnuviechadmin/help/migrations/__init__.py
Normal file
0
gnuviechadmin/help/migrations/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue