datatracker/ietf/dbtemplate/migrations/0005_add_default_topic_description.py

33 lines
953 B
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-24 09:30
from __future__ import unicode_literals
from django.db import migrations
def forward(apps, schema_editor):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
DBTemplate.objects.create(
path='/nomcom/defaults/topic/description',
title='Description of Topic',
variables='$topic: Topic',
type_id='rst',
content="""This is a description of the topic "$topic"
Describe the topic and add any information/instructions for the responder here.
""",
)
def reverse(apps, schema_editor):
DBTemplate = apps.get_model('dbtemplate','DBTemplate')
DBTemplate.objects.filter(path='/nomcom/defaults/topic/description').delete()
class Migration(migrations.Migration):
dependencies = [
('dbtemplate', '0004_team_review_content_templates'),
]
operations = [
migrations.RunPython(forward,reverse),
]