id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 22682 Makemigrations fails when specifying custom location for migration files ovidiuc4 nobody "When running the initial: {{{ python ./manage.py makemigrations appname }}} a ""migrations"" directory is automatically created inside the apps base directory. When specifying a custom migration file location via MIGRATION_MODULES setting, running initial migration fails to create the directories needed for the migration files. One would expect the same behavior in both situations. In my case, I want to have all the migrations inside a generic folder named ""migrations"", setup like so: {{{ # in settings: MIGRATION_MODULES = dict([(app, 'migrations.' + app) for app in INSTALLED_APPS]) # running makemigrations python ./manage.py makemigrations appname Traceback (most recent call last): File ""./manage.py"", line 10, in execute_from_command_line(sys.argv) File ""/home/dev/.envs/atlas2/src/django/django/core/management/__init__.py"", line 427, in execute_from_command_line utility.execute() File ""/home/dev/.envs/atlas2/src/django/django/core/management/__init__.py"", line 419, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File ""/home/dev/.envs/atlas2/src/django/django/core/management/base.py"", line 288, in run_from_argv self.execute(*args, **options.__dict__) File ""/home/dev/.envs/atlas2/src/django/django/core/management/base.py"", line 337, in execute output = self.handle(*args, **options) File ""/home/dev/.envs/atlas2/src/django/django/core/management/commands/makemigrations.py"", line 54, in handle loader = MigrationLoader(None) File ""/home/dev/.envs/atlas2/src/django/django/db/migrations/loader.py"", line 47, in __init__ self.build_graph() File ""/home/dev/.envs/atlas2/src/django/django/db/migrations/loader.py"", line 144, in build_graph self.load_disk() File ""/home/dev/.envs/atlas2/src/django/django/db/migrations/loader.py"", line 71, in load_disk module = import_module(module_name) File ""/usr/lib/python2.7/importlib/__init__.py"", line 37, in import_module __import__(name) ImportError: No module named appname }}} I would expect the same behavior in both cases, i.e. have the modules automatically created." Bug closed Migrations dev Normal fixed 1.7b4 ovidiuc4 Accepted 1 0 0 0 0 0