8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00
re2o/tickets/migrations/0001_initial.py
Hugo Levy-Falk c4a104b3b6 I like my black.
Just ran black on the whoe repository. Fix #210.
2019-11-04 22:47:24 +01:00

99 lines
3.2 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2019-08-19 08:19
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import re2o.mixins
class Migration(migrations.Migration):
initial = True
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
operations = [
migrations.CreateModel(
name="Preferences",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"publish_address",
models.EmailField(
help_text="Email address to publish the new tickets (leave empty for no publications)",
max_length=1000,
null=True,
),
),
(
"mail_language",
models.IntegerField(
choices=[(0, "Français"), (1, "English")], default=0
),
),
],
options={"verbose_name": "Ticket's settings"},
),
migrations.CreateModel(
name="Ticket",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"title",
models.CharField(help_text="Title of the ticket", max_length=255),
),
(
"description",
models.TextField(
help_text="Description of the ticket", max_length=3000
),
),
("date", models.DateTimeField(auto_now_add=True)),
(
"email",
models.EmailField(
help_text="An email address to get back to you",
max_length=100,
null=True,
),
),
("solved", models.BooleanField(default=False)),
(
"user",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="tickets",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"verbose_name": "Ticket",
"verbose_name_plural": "Tickets",
"permissions": (("view_tickets", "Can view a ticket object"),),
"verbose_name": "Ticket",
"verbose_name_plural": "Tickets",
},
bases=(re2o.mixins.AclMixin, models.Model),
),
]