c52bf300ff
* first version of dect registration and phonebook functionality, missing export functionality for dect phone system, the rest should more or less work * add a missing button and message * fix typo * add django-oauth-toolkit to implement oauth2 auth for the DECT csv export * remove unused HMAC code * add logger * only show buttons when user is logged in * remove unneeded enctype
88 lines
2.9 KiB
Python
88 lines
2.9 KiB
Python
# Generated by Django 3.0.3 on 2020-02-25 18:39
|
|
|
|
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),
|
|
("camps", "0034_add_team_permission_sets"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="DectRegistration",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.AutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("created", models.DateTimeField(auto_now_add=True)),
|
|
("updated", models.DateTimeField(auto_now=True)),
|
|
(
|
|
"number",
|
|
models.CharField(
|
|
help_text="The DECT number, numeric or as letters", max_length=9
|
|
),
|
|
),
|
|
(
|
|
"letters",
|
|
models.CharField(
|
|
blank=True,
|
|
help_text="The letters chosen to represent this DECT number in the phonebook. Optional.",
|
|
max_length=9,
|
|
),
|
|
),
|
|
(
|
|
"description",
|
|
models.TextField(
|
|
blank=True,
|
|
help_text="Description of this registration, like a name or a location or a service.",
|
|
),
|
|
),
|
|
(
|
|
"activation_code",
|
|
models.CharField(
|
|
blank=True,
|
|
help_text="The 10 digit numeric activation code",
|
|
max_length=10,
|
|
),
|
|
),
|
|
(
|
|
"publish_in_phonebook",
|
|
models.BooleanField(
|
|
default=True,
|
|
help_text="Check to list this registration in the phonebook",
|
|
),
|
|
),
|
|
(
|
|
"camp",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.PROTECT,
|
|
related_name="dect_registrations",
|
|
to="camps.Camp",
|
|
),
|
|
),
|
|
(
|
|
"user",
|
|
models.ForeignKey(
|
|
help_text="The django user who created this DECT registration",
|
|
on_delete=django.db.models.deletion.PROTECT,
|
|
to=settings.AUTH_USER_MODEL,
|
|
),
|
|
),
|
|
],
|
|
options={"unique_together": {("camp", "number")},},
|
|
),
|
|
]
|