From f714cce8fd2f04693a118b05c0f9432a70d1bef7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Wed, 3 Sep 2008 18:40:22 +0200 Subject: [PATCH] Changed all imports of slughifi and dcparser to new imports. --- catalogue/forms.py | 2 +- catalogue/management/commands/importbooks.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/catalogue/forms.py b/catalogue/forms.py index 51d7cbad9..1c6ca83cd 100644 --- a/catalogue/forms.py +++ b/catalogue/forms.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- from django import forms +from slughifi import slughifi from catalogue.models import Tag from catalogue.fields import JQueryAutoCompleteField -from catalogue.lib.slughifi import slughifi class SearchForm(forms.Form): diff --git a/catalogue/management/commands/importbooks.py b/catalogue/management/commands/importbooks.py index 24908fe44..3b8a56463 100644 --- a/catalogue/management/commands/importbooks.py +++ b/catalogue/management/commands/importbooks.py @@ -1,11 +1,11 @@ -from django.core.management.base import BaseCommand, CommandError +import os + +from django.core.management.base import BaseCommand from django.core.management.color import color_style from optparse import make_option -import sys -import os +from slughifi import slughifi +import dcparser -from catalogue.lib.dcparser import parse -from catalogue.lib.slughifi import slughifi from catalogue.models import Book, Tag @@ -43,7 +43,7 @@ class Command(BaseCommand): if verbosity > 1: print "Parsing '%s'" % file_path - book_info = parse(file_path) + book_info = dcparser.parse(file_path) book = Book(title=book_info.title, slug=slughifi(book_info.title)) book.save() -- 2.20.1