8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 15:33:45 +00:00
re2o/tickets/migrations/0001_initial.py

100 lines
3.2 KiB
Python
Raw Permalink Normal View History

2019-08-16 13:43:32 +00:00
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2019-08-19 08:19
2019-08-16 13:43:32 +00:00
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import re2o.mixins
2019-08-16 13:43:32 +00:00
class Migration(migrations.Migration):
initial = True
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
2019-08-16 13:43:32 +00:00
operations = [
migrations.CreateModel(
name="Preferences",
2019-08-16 13:43:32 +00:00
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
),
),
2019-08-16 13:43:32 +00:00
],
options={"verbose_name": "Ticket's settings"},
2019-08-16 13:43:32 +00:00
),
migrations.CreateModel(
name="Ticket",
2019-08-16 13:43:32 +00:00
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,
),
),
2019-08-16 13:43:32 +00:00
],
options={
"verbose_name": "Ticket",
"verbose_name_plural": "Tickets",
"permissions": (("view_tickets", "Can view a ticket object"),),
"verbose_name": "Ticket",
"verbose_name_plural": "Tickets",
2019-08-16 13:43:32 +00:00
},
bases=(re2o.mixins.AclMixin, models.Model),
2019-08-16 13:43:32 +00:00
),
]