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:
parent
ea88ace9fa
commit
38f8225a37
6 changed files with 4 additions and 45 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue