def syncdb(app, created_models, verbosity=2, **kwargs): """Function used by syncdb signal""" app_name = app.__name__.rsplit('.', 1)[0] app_label = app_name.split('.')[-1] if app_label == "locations": from bhoma.apps.locations.loader import load_locations load_locations("static/bhoma_clinics.csv")
def handle(self, * args, ** options): if len(args) < 1: raise CommandError('Please specify %s.' % self.label) file_path = (args[0]) load_locations(file_path)