# Path: folivora/utils/pypi.py
# def normalize_name(name):
#     return pkg_resources.safe_name(name).lower()


import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from ..utils.pypi import normalize_name
# -*- coding: utf-8 -*-

class Migration(DataMigration):

    def forwards(self, orm):
        "Write your forwards methods here."
        for package in orm['folivora.Package'].objects.all():

# Path: folivora/utils/pypi.py
# def normalize_name(name):
#     return pkg_resources.safe_name(name).lower()


# Path: folivora/migrations/0007_normalize_names.py
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from ..utils.pypi import normalize_name

# -*- coding: utf-8 -*-

class Migration(DataMigration):

    def forwards(self, orm):
        "Write your forwards methods here."
        for package in orm['folivora.Package'].objects.all():

            package.normalized_name = normalize_name(package.name)