X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/75a6ae558051c8a4d85d72f23ad612de834556c7..2a6726356f43599014a74540c23115a3f2a61a0e:/apps/catalogue/management/commands/make_master.py diff --git a/apps/catalogue/management/commands/make_master.py b/apps/catalogue/management/commands/make_master.py index 2d170e51..4bca3834 100644 --- a/apps/catalogue/management/commands/make_master.py +++ b/apps/catalogue/management/commands/make_master.py @@ -22,8 +22,8 @@ dc_namespaces = { "dc": "http://purl.org/dc/elements/1.1/" } class Command(BaseCommand): option_list = BaseCommand.option_list + ( - make_option('-s', '--slug', dest='slug', help="Slug for master module"), - make_option('-F', '--file', dest='slugs_file', help="file with child module slugs per line"), + make_option('-s', '--slug', dest='slug', help="Slug for master module (if empty will be generated from title)"), + make_option('-F', '--file', dest='slugs_file', help="file with child module titles per line"), make_option('-t', '--title', dest='title', default='', help="title of master module"), make_option('-l', '--level', dest='audience', default='', help='Audience level'), ) @@ -59,11 +59,11 @@ class Command(BaseCommand): print "type is '%s', setting to '%s'" % (typ.text, typ_) changed = True typ.text = typ_ - audience = t.xpath("//dc:audience", namespaces=dc_namespaces)[0] - if audience.text != audience_: - print "audience is '%s', setting to '%s'" % (audience.text, audience_) - changed = True - audience.text = audience_ + #audience = t.xpath("//dc:audience", namespaces=dc_namespaces)[0] + #if audience.text != audience_: + # print "audience is '%s', setting to '%s'" % (audience.text, audience_) + # changed = True + # audience.text = audience_ if changed: print "will commit." fc.commit(etree.tostring(t, encoding=unicode), **commit_args)