Merge pull request #1586 from MITx/feature/cdodge/make-update-templates-django-admin-util

move call to update_templates on service startup into a django-admin com...
This commit is contained in:
Don Mitchell
2013-03-04 13:11:46 -08:00
3 changed files with 16 additions and 2 deletions

View File

@@ -1,3 +1 @@
from xmodule.templates import update_templates
update_templates()

View File

@@ -0,0 +1,9 @@
from xmodule.templates import update_templates
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = \
'''Imports and updates the Studio component templates from the code pack and put in the DB'''
def handle(self, *args, **options):
update_templates()

View File

@@ -440,6 +440,13 @@ namespace :cms do
end
end
namespace :cms do
desc "Imports all the templates from the code pack"
task :update_templates do
sh(django_admin(:cms, :dev, :update_templates))
end
end
namespace :cms do
desc "Import course data within the given DATA_DIR variable"
task :xlint do