From 441238539485dcf0b5fd612e8f795a7bfb233727 Mon Sep 17 00:00:00 2001 From: Elrond Date: Sat, 26 Jan 2013 00:10:30 +0100 Subject: [PATCH] Better docs for GenerateSlugMixin. --- mediagoblin/db/mixin.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mediagoblin/db/mixin.py b/mediagoblin/db/mixin.py index f2c2932c..0dc3bc85 100644 --- a/mediagoblin/db/mixin.py +++ b/mediagoblin/db/mixin.py @@ -53,9 +53,17 @@ class UserMixin(object): class GenerateSlugMixin(object): + """ + Mixin to add a generate_slug method to objects. + + Depends on: + - self.slug + - self.title + - self.check_slug_used(new_slug) + """ def generate_slug(self): """ - Generate a unique slug for this MediaEntry. + Generate a unique slug for this object. This one does not *force* slugs, but usually it will probably result in a niceish one. -- 2.25.1