I'm hoping to use a newer Django (1.7.dev) inside PyCharm 2.7.3... so it's the only Django version installed in my project's virtualenv.
But, the "Tools" -> "Run manage.py task" list isn't discovering the new commands included in Django itself, like migrate
or makemigrations
. (Based on prior experience with apps like South, I'd hoped all available tasks would be auto-discovered.)
Is there a way to help PyCharm 2.7.3 discover and use these new options?
the "Tools" -> "Run manage.py task" doesn't see the makemigration or migrate argument.
You can run manage.py with right click on manage.py file in you project.
with this output:
*
*Usage: manage.py subcommand [options] [args]
Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose output
--settings=SETTINGS The Python path to a settings module, e.g.
"myproject.settings.main". If this isn't provided, the
DJANGO_SETTINGS_MODULE environment variable will be
used.
--pythonpath=PYTHONPATH
A directory to add to the Python path, e.g.
"/home/djangoprojects/myproject".
--traceback Raise on exception
--no-color Don't colorize the command output.
--version show program's version number and exit
-h, --help show this help message and exit
Type 'manage.py help <subcommand>' for help on a specific subcommand.
Available subcommands:
[auth]
changepassword
createsuperuser
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
runfcgi
shell
sql
sqlall
sqlclear
sqlcustom
sqldropindexes
sqlflush
sqlindexes
sqlinitialdata
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
syncdb
test
testserver
validate
[sessions]
clearsessions
[staticfiles]
collectstatic
findstatic
runserver*
*
As you can see "makemigrations" and "migrate" are in the available subcommands for django
So you have to "Run" - > "Edit Configurations" and add "makemigrations" or "migrate" in the script parameters
Now run the script and it works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With