简体   繁体   中英

Intellij IDEA not display Django in the facet list

I am using Fedora 20 with OpenJDK-1.7.0.60 setup. I can setup and run Intellij IDEA 13.1 successfully, then setup Python plugin. Well, when I tried generate a project from Intellij with Python module selectly, I could not find Django facet in the technology part. I searched web but could not find any solution, even any question. I stuck and cannot do anything. Please help.

Note: Python and related Django had been installed on my machine before I setup the plugin.

Regards.

Your symptoms are similar to a problem I've also had, which was solved by editing the IDEA module file, which will appear as {your_project_name}.iml . This file is either in the root of your project (or module) or in the .idea directory of the project.

You'll likely see that the module element's type attribute is JAVA_MODULE . Change this to PYTHON_MODULE , save the file, and restart Intellij.

You'll likely see this:

<module type="JAVA_MODULE" version="4">

Or this:

<module version="4">

In either case, what you want is for the type attribute to say PYTHON_MODULE :

<module type="PYTHON_MODULE" version="4">

After saving that, when you go into Project Structure and add a Facet, you'll see Django.

My guess is when your project was initially opened in Intellij, the IDE did not recognize the directory as a python module, and set it to the default (Java).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM