Added a data migration for htpasswd import, to be run as part of the deployment of the django-auth release.

- Legacy-Id: 7584
This commit is contained in:
Henrik Levkowetz 2014-04-09 18:29:46 +00:00
parent 4c0d52d9ed
commit 303e93f65f
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
from django.conf import settings
from south.v2 import DataMigration
from ietf.utils.management.commands.import_htpasswd import import_htpasswd_file
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Note: Don't use "from appname.models import ModelName".
# Use orm.ModelName to refer to models in this application,
# and orm['appname.ModelName'] for models in other applications.
print("Importing password hashes from %s," % settings.HTPASSWD_FILE)
print("leaving entries without matching usernames alone.")
import_htpasswd_file(settings.HTPASSWD_FILE, verbosity=2)
def backwards(self, orm):
"Write your backwards methods here."
models = {
}
complete_apps = ['ietfauth']
symmetrical = True

View file