Moving application initial data over to JSON and fixtures. This is much better than using those raw SQL files that might not work with all RDBMs. The Objects app needs to be converted to use fixtures as well, but I've got something bad data in there that's causing some issues (which I'm working on hunting down).

This commit is contained in:
Greg Taylor 2008-02-09 02:49:03 +00:00
parent ea88ace9fa
commit 38f8225a37
6 changed files with 4 additions and 45 deletions

View file

@ -0,0 +1 @@
[{"pk": 9, "model": "config.commandalias", "fields": {"user_input": "@desc", "equiv_command": "@describe"}}, {"pk": 3, "model": "config.commandalias", "fields": {"user_input": "@dest", "equiv_command": "@destroy"}}, {"pk": 4, "model": "config.commandalias", "fields": {"user_input": "@nuke", "equiv_command": "@destroy"}}, {"pk": 6, "model": "config.commandalias", "fields": {"user_input": "@tel", "equiv_command": "@teleport"}}, {"pk": 2, "model": "config.commandalias", "fields": {"user_input": "ex", "equiv_command": "examine"}}, {"pk": 7, "model": "config.commandalias", "fields": {"user_input": "i", "equiv_command": "inventory"}}, {"pk": 8, "model": "config.commandalias", "fields": {"user_input": "inv", "equiv_command": "inventory"}}, {"pk": 1, "model": "config.commandalias", "fields": {"user_input": "l", "equiv_command": "look"}}, {"pk": 5, "model": "config.commandalias", "fields": {"user_input": "sa", "equiv_command": "say"}}, {"pk": 1, "model": "config.configvalue", "fields": {"conf_value": "Evennia Test Site", "conf_key": "site_name"}}, {"pk": 2, "model": "config.configvalue", "fields": {"conf_value": "2", "conf_key": "player_dbnum_start"}}, {"pk": 3, "model": "config.configvalue", "fields": {"conf_value": "Credits", "conf_key": "money_name_plural"}}, {"pk": 4, "model": "config.configvalue", "fields": {"conf_value": "Credit", "conf_key": "money_name_singular"}}, {"pk": 5, "model": "config.configvalue", "fields": {"conf_value": "0", "conf_key": "game_firstrun"}}, {"pk": 6, "model": "config.configvalue", "fields": {"conf_value": "1800", "conf_key": "idle_timeout"}}, {"pk": 7, "model": "config.configvalue", "fields": {"conf_value": "2", "conf_key": "default_home"}}, {"pk": 8, "model": "config.configvalue", "fields": {"conf_value": "\n%ch%cb==================================================================%cn\n Welcome to Evennia! Please type one of the following to begin:\n\n If you have an existing account, connect to it by typing:\n %chconnect <email> <password2>%cn\n If you need to create an account, type (without the <>'s):\n %chcreate \"<username>\" <email> <password>%cn\n%ch%cb==================================================================%cn\n", "conf_key": "connect_screen"}}]

View file

@ -1,9 +0,0 @@
INSERT INTO config_commandalias VALUES(1,'l','look');
INSERT INTO config_commandalias VALUES(2,'ex','examine');
INSERT INTO config_commandalias VALUES(3,'@dest','@destroy');
INSERT INTO config_commandalias VALUES(4,'@nuke','@destroy');
INSERT INTO config_commandalias VALUES(5,'sa','say');
INSERT INTO config_commandalias VALUES(6,'@tel','@teleport');
INSERT INTO config_commandalias VALUES(7,'i','inventory');
INSERT INTO config_commandalias VALUES(8,'inv','inventory');
INSERT INTO config_commandalias VALUES(9,'@desc','@describe');

View file

@ -1,17 +0,0 @@
INSERT INTO config_configvalue VALUES(1,'site_name','Evennia Test Site');
INSERT INTO config_configvalue VALUES(2,'player_dbnum_start','2');
INSERT INTO config_configvalue VALUES(3,'money_name_plural','Credits');
INSERT INTO config_configvalue VALUES(4,'money_name_singular','Credit');
INSERT INTO config_configvalue VALUES(5,'game_firstrun','1');
INSERT INTO config_configvalue VALUES(6,'idle_timeout','1800');
INSERT INTO config_configvalue VALUES(7,'default_home','2');
INSERT INTO config_configvalue VALUES(8,'connect_screen','
%%ch%%cb==================================================================%%cn
Welcome to Evennia! Please type one of the following to begin:
If you have an existing account, connect to it by typing:
%%chconnect <email> <password2>%%cn
If you need to create an account, type (without the <>''s):
%%chcreate "<username>" <email> <password>%%cn
%%ch%%cb==================================================================%%cn
');

View file

@ -0,0 +1 @@
[{"pk": 3, "model": "helpsys.helpentry", "fields": {"entrytext": "Commands in Evennia are generally organized into one of two categories: %cgPublic%cn or %cyPrivileged%cn commands.\n\n%cgPublic%cn commands are more or less available to everyone. None of these commands are prefixed with anything, they are typical, every-day commands like %chlook%cn, %chsay%cn, and %chget%cn.\n\n%cyPrivileged%cn command availability is largely dependent on the privileges and powers bestowed on you by the staff. Privileged commands are generally building\/administration related and aren't of general interest to players. These commands are all pre-fixed by a '%ch@%cn' character.\n\nTo see a list of all commands, use %ch@list commands%cn. If you'd like to learn more about any individual command, you may do so by typing %chhelp <topic>%cn, where <topic> is the name of the command (without the <>'s).", "topicname": "Commands", "staff_only": false}}, {"pk": 2, "model": "helpsys.helpentry", "fields": {"entrytext": "Evennia is a product of a small community of developers, all working towards the continual improvement of the codebase. The following people have made major contributions with the end result being what you are now playing.\n\n\"Kelvin\" (Greg Taylor) - Lead developer and original author.", "topicname": "Credits", "staff_only": false}}, {"pk": 1, "model": "helpsys.helpentry", "fields": {"entrytext": "This game has yet to customize its help index, so for now you may browse the generic codebase help files.\n\nTopics\nNEWBIE %t%t Getting started (for new players).\nCOMMANDS %t How to get help with commands.\nCREDITS %t Codebase credits.", "topicname": "Help Index", "staff_only": false}}]

View file

@ -1,17 +0,0 @@
INSERT INTO helpsys_helpentry VALUES(1,'Help Index','This game has yet to customize its help index, so for now you may browse the generic codebase help files.
Topics
------
NEWBIE %%t%%t Getting started (for new players).
COMMANDS %%t How to get help with commands.
CREDITS %%t Codebase credits.',0);
INSERT INTO helpsys_helpentry VALUES(2,'Credits','Evennia is a product of a small community of developers, all working towards the continual improvement of the codebase. The following people have made major contributions with the end result being what you are now playing.
"Kelvin" (Greg Taylor) - Lead developer and original author.',0);
INSERT INTO helpsys_helpentry VALUES(3,'Commands','Commands in Evennia are generally organized into one of two categories: %%cgPublic%%cn or %%cyPrivileged%%cn commands.
%%cgPublic%%cn commands are more or less available to everyone. None of these commands are prefixed with anything, they are typical, every-day commands like %%chlook%%cn, %%chsay%%cn, and %%chget%%cn.
%%cyPrivileged%%cn command availability is largely dependent on the privileges and powers bestowed on you by the staff. Privileged commands are generally building/administration related and aren''t of general interest to players. These commands are all pre-fixed by a ''%%ch@%%cn'' character.
To see a list of all commands, use %%ch@list commands%%cn. If you''d like to learn more about any individual command, you may do so by typing %%chhelp <topic>%%cn, where <topic> is the name of the command (without the <>''s).',0);

View file

@ -5,7 +5,7 @@ class NewsTopic(models.Model):
"""
Represents a news topic.
"""
name = models.CharField(maxlength=75, unique=True)
name = models.CharField(max_length=75, unique=True)
description = models.TextField(blank=True)
icon = models.ImageField(upload_to='newstopic_icons', default='newstopic_icons/default.png', blank=True, help_text="Image for the news topic.")
@ -26,7 +26,7 @@ class NewsEntry(models.Model):
An individual news entry.
"""
author = models.ForeignKey(User, related_name='author')
title = models.CharField(maxlength=255)
title = models.CharField(max_length=255)
body = models.TextField()
topic = models.ForeignKey(NewsTopic, related_name='newstopic')
date_posted = models.DateTimeField(auto_now_add=True)