aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-05-16 18:22:13 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-05-16 18:22:13 -0500
commit37af09a2e51394c630bf7efd1718b77a574b272d (patch)
treee6ca05ba1b964e42559365ff7fb5270b82c820a9
parent18cf34d4701f86f5c8951ae0d340824b4b4f19ac (diff)
downloadmediagoblin-37af09a2e51394c630bf7efd1718b77a574b272d.tar.lz
mediagoblin-37af09a2e51394c630bf7efd1718b77a574b272d.tar.xz
mediagoblin-37af09a2e51394c630bf7efd1718b77a574b272d.zip
Require that the slug field have only unique values.
-rw-r--r--mediagoblin/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mediagoblin/models.py b/mediagoblin/models.py
index edb1d46d..cdb06a35 100644
--- a/mediagoblin/models.py
+++ b/mediagoblin/models.py
@@ -99,6 +99,10 @@ class MediaEntry(Document):
'created': datetime.datetime.utcnow,
'state': u'unprocessed'}
+ indexes = [
+ {'fields': 'slug',
+ 'unique': True}]
+
def main_mediafile(self):
pass