fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
locale
[wolnelektury.git]
/
src
/
catalogue
/
management
/
commands
/
update_tag_description.py
diff --git
a/src/catalogue/management/commands/update_tag_description.py
b/src/catalogue/management/commands/update_tag_description.py
index
d13b120
..
bd00562
100644
(file)
--- a/
src/catalogue/management/commands/update_tag_description.py
+++ b/
src/catalogue/management/commands/update_tag_description.py
@@
-1,15
+1,17
@@
-# -*- coding: utf-8 -*-
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.core.management import BaseCommand
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.core.management import BaseCommand
-
from catalogue.models import Tag
class Command(BaseCommand):
help = "Update description for given tag."
from catalogue.models import Tag
class Command(BaseCommand):
help = "Update description for given tag."
- args = 'category slug description_filename'
+
+ def add_arguments(self, parser):
+ parser.add_argument('category')
+ parser.add_argument('slug')
+ parser.add_argument('description_filename')
def handle(self, category, slug, description_filename, **options):
tag = Tag.objects.get(category=category, slug=slug)
def handle(self, category, slug, description_filename, **options):
tag = Tag.objects.get(category=category, slug=slug)