Migrating models, many admin tweaks

This commit is contained in:
Griatch 2021-05-20 23:42:12 +02:00
parent a7f1e24c9c
commit 1bdcafcef4
15 changed files with 211 additions and 25 deletions

View file

@ -0,0 +1,22 @@
# Generated by Django 3.2.3 on 2021-05-20 21:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('help', '0003_auto_20190128_1820'),
]
operations = [
migrations.RemoveField(
model_name='helpentry',
name='db_staff_only',
),
migrations.AddField(
model_name='helpentry',
name='db_date_created',
field=models.DateTimeField(auto_now=True, verbose_name='creation date'),
),
]

View file

@ -9,6 +9,7 @@ forms of help that do not concern commands, like information about the
game world, policy info, rules and similar.
"""
from datetime import datetime
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.urls import reverse
@ -76,9 +77,8 @@ class HelpEntry(SharedMemoryModel):
help_text="tags on this object. Tags are simple string markers to "
"identify, group and alias objects.",
)
# (deprecated, only here to allow MUX helpfile load (don't use otherwise)).
# TODO: remove this when not needed anymore.
db_staff_only = models.BooleanField(default=False)
# Creation date. This is not changed once the object is created.
db_date_created = models.DateTimeField("creation date", editable=False, auto_now=True)
# Database manager
objects = HelpEntryManager()