diff --git a/models.py b/models.py index b262af8..78e4f6a 100644 --- a/models.py +++ b/models.py @@ -180,7 +180,7 @@ class Category(models.Model): super(Category, self).save() def remove(self): - blog = Blog.objects.get(pk=self.blog) + blog = Blog.objects.get(pk=self.blog.id) output = blog.output_path + '/category/' + self.name_slug if os.path.exists(output): shutil.rmtree(output) @@ -196,7 +196,7 @@ class Tag(models.Model): super(Tag, self).save() def remove(self): - blog = Blog.objects.get(pk=self.blog) + blog = Blog.objects.get(pk=self.blog.id) output = blog.output_path + '/tag/' + self.name_slug if os.path.exists(output): shutil.rmtree(output) diff --git a/views.py b/views.py index 3ffcf7f..4112602 100644 --- a/views.py +++ b/views.py @@ -588,7 +588,7 @@ def _tinymcelist(request, b, year, month): suffix = '/images/' + str(year) + '/' + str(month) path = b.src_path + '/' + suffix - url = 'http://' + b.name + '/' + suffix + '/' + url = 'http://' + b.name + suffix + '/' if os.path.exists(path): files = ''