Outlining managers. I know some of these managers sub-modules only have one file in them, but let's keep the convention for consistency.

This commit is contained in:
Greg Taylor 2008-06-15 03:01:58 +00:00
parent 8ba1a93eeb
commit 43f0ae6af6
10 changed files with 68 additions and 15 deletions

View file

@ -0,0 +1,8 @@
"""
Custom manager for HelpEntry objects.
"""
from django.db import models
class HelpEntryManager(models.Manager):
pass

View file

@ -1,5 +1,6 @@
from django.db import models
import ansi
from django.db import models
from apps.helpsys.managers.helpentry import HelpEntryManager
class HelpEntry(models.Model):
"""
@ -8,6 +9,8 @@ class HelpEntry(models.Model):
topicname = models.CharField(max_length=255)
entrytext = models.TextField(blank=True, null=True)
staff_only = models.BooleanField(default=0)
objects = HelpEntryManager()
class Admin:
list_display = ('id', 'topicname', 'staff_only')