# HG changeset patch # User Brian Neal # Date 1377734443 18000 # Node ID dcd097a59223a9e4251cfc4eb7f5ba62ab4be81e # Parent 388be986392e12be18799a610a09467fef7c8c28 For Django 1.5: slugify is now available in django.utils.text. diff -r 388be986392e -r dcd097a59223 photologue/models.py --- a/photologue/models.py Wed Aug 28 18:32:57 2013 -0500 +++ b/photologue/models.py Wed Aug 28 19:00:43 2013 -0500 @@ -1,6 +1,5 @@ import os import random -import shutil import zipfile from datetime import datetime @@ -11,7 +10,7 @@ from django.conf import settings from django.core.files.base import ContentFile from django.core.urlresolvers import reverse -from django.template.defaultfilters import slugify +from django.utils.text import slugify from django.utils.functional import curry from django.utils.translation import ugettext_lazy as _ @@ -230,7 +229,7 @@ slug = slugify(title) try: p = Photo.objects.get(title_slug=slug) - except Photo.DoesNotExist: + except Photo.DoesNotExist: photo = Photo(title=title, title_slug=slug, caption=self.caption, is_public=self.is_public,