Permalink
Browse files

Allow customizable statuses.

  • Loading branch information...
1 parent 5405e2a commit da013c4110806385a7e06f7e4bfbc2f2eb2994f2 @alex committed May 6, 2010
Showing with 9 additions and 3 deletions.
  1. +6 −1 docs/index.txt
  2. +3 −2 flag/models.py
View
@@ -3,4 +3,9 @@ django-flag
This app lets users of your site flag content as inappropriate or spam.
-(more here soon)
+By default some choices for status are available, however if you'd like to
+customize them you can provide a ``FLAG_STATUSES`` setting which is a list of
+two tuples where the first item is the value (a one character string) and the
+second is the readable value. The default choice should have a key of ``"1"``.
+
+(more here soon)
View
@@ -1,5 +1,6 @@
from datetime import datetime
+from django.conf import settings
from django.db import models
from django.contrib.auth.models import User
@@ -8,13 +9,13 @@
from django.utils.translation import ugettext_lazy as _
-STATUS = (
+STATUS = getattr(settings, "FLAG_STATUSES", [
("1", _("flagged")),
("2", _("flag rejected by moderator")),
("3", _("creator notified")),
("4", _("content removed by creator")),
("5", _("content removed by moderator")),
-)
+])
class FlaggedContent(models.Model):

0 comments on commit da013c4

Please sign in to comment.