Merged. Still need to update some migrations.
This commit is contained in:
commit
c676c9965f
29 changed files with 821 additions and 401 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# This module implements a simple news entry system
|
||||
# for the evennia website. One needs to use the
|
||||
# admin interface to add/edit/delete entries.
|
||||
# for the evennia website. One needs to use the
|
||||
# admin interface to add/edit/delete entries.
|
||||
#
|
||||
|
||||
from django.db import models
|
||||
|
|
@ -13,8 +13,8 @@ class NewsTopic(models.Model):
|
|||
"""
|
||||
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',
|
||||
icon = models.ImageField(upload_to='newstopic_icons',
|
||||
default='newstopic_icons/default.png',
|
||||
blank=True, help_text="Image for the news topic.")
|
||||
|
||||
def __str__(self):
|
||||
|
|
@ -35,7 +35,7 @@ class NewsEntry(models.Model):
|
|||
body = models.TextField()
|
||||
topic = models.ForeignKey(NewsTopic, related_name='newstopic')
|
||||
date_posted = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue