To add virtual environment to Intellij Idea, You have added virtualenv folder's python to project sdk. Which means that virtualenv directory's python( for example venv/bin/python2.7) needs to be added to Intellij Idea project path. Here is a demonstration:
First you need to go to file>project structure (in IntellijIdea)
Press new in Project SDK and add new path to virtualenv's python directory like this:
Go to Modules>Dependencies and set your module sdk to Python SDK which is marked on this picture:
Now press ok and final look of the Project settings:
Now need to run the project.
My Stackoverflow Answer is here: http://stackoverflow.com/questions/20877106/using-intellijidea-within-an-existing-virtualenv/20879661#20879661