django-dbtemplates/dbtemplates/sync_templates.py
leidel a9df6d73b1 new management command 'sync_templates' for syncing the templates bidirectional
git-svn-id: https://django-dbtemplates.googlecode.com/svn/trunk@27 cfb8ba98-e953-0410-9cff-959ffddf5974

committer: leidel <leidel@cfb8ba98-e953-0410-9cff-959ffddf5974>

--HG--
extra : convert_revision : 252aa837acd100f5a4588f12d7ea33c5adf30b3c
2008-05-13 22:34:38 +00:00

17 lines
651 B
Python

"""This is just for backwards compatiblity"""
from optparse import OptionParser
from django.core.management import call_command
def main():
parser = OptionParser()
parser.add_option("-e", "--ext", dest="ext", action="store", type="string",
help="file extension of the files you want to sync [default: %default]",
default="html")
parser.add_option("-f", "--force", action="store_true", dest="force",
default=False, help="overwrite existing database templates")
opts, args = parser.parse_args()
call_command('sync_templates', **{'ext': opts.ext, 'force': opts.force})
if __name__ == "__main__":
main()