comparison downloads/admin.py @ 685:a75554eb6bae

For Django 1.5: slugify is now available at django.utils.text.
author Brian Neal <bgneal@gmail.com>
date Fri, 23 Aug 2013 19:40:01 -0500
parents 0dd84cff2477
children
comparison
equal deleted inserted replaced
684:161b56849114 685:a75554eb6bae
9 from downloads.models import PendingDownload 9 from downloads.models import PendingDownload
10 from downloads.models import Download 10 from downloads.models import Download
11 from downloads.models import Category 11 from downloads.models import Category
12 from downloads.models import AllowedExtension 12 from downloads.models import AllowedExtension
13 from downloads.models import VoteRecord 13 from downloads.models import VoteRecord
14 # TODO: In Django 1.5 this will be available in django.utils.text: 14 from django.utils.text import slugify
15 from django.template.defaultfilters import slugify
16 15
17 16
18 def rename_download(dl): 17 def rename_download(dl):
19 """Rename the download's file to a slugified version of the title.""" 18 """Rename the download's file to a slugified version of the title."""
20 19