Intellij Doesn't Recognize Django project
I initially created a Django project in Intellij using the Python plugin. By "created" I mean I had no code in that project, but used Intellij to create it.
Then I got a new machine, installed Intellij IDEA X on it, enabled the Python plugin, and checked my Django project out of my Git repo. Now Intellij understands that it is a Python project, but it does not add the Django facet to it. So now it doesn't let me run the test server inside of Intellij, and etc. Nor does it seem like I can add the Django facet manually.
Any ideas?
Please sign in to leave a comment.
Hello Mike,
You certainly can add the Django facet manually. Go to Project Structure,
select your module, press the button and add the facet.
Note that the facet definition is stored in the .iml file, so if you store
it in Git, you'll automatically have a correctly configured project on every
machine.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
OK, it's supposed to let me add the Django facet, but it doesn't. See the attached screenshots.
I can add the Intellij files on the other machine and move it over.
Attachment(s):
facet_shot.png
python_project.png
Hello Mike,
Right now a Django facet can only be added to a Python module, not to a Java
module with a Python facet. We plan to remove this shortcoming in a future
version of the plugin.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
So then how do I create a project from existing source without having it be a Java project? Or do I need to put the IDEA-specific files into git for it to always be a Django/Python project?
Hello Mike,
The "Create project from existing source" wizard is specific to Java; it
doesn't have any added value for Python projects. Instead, you can simply
select "Create project from scratch" and point it to your existing source
code.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
That worked -- and you knew it would.
I've always been nervous about "doing it from scratch" because I thought it was looking for an empty project and would error out (or worse . . . ).
Anyway, thanks for helping the newbie out!