SoFunction
Updated on 2024-11-17

How to create a django project in the community version of pycharm (there is no project option on the left side of pycharm's newproject)

First of all, the problem I was having was that there was no django option when newproject was created, and after half a day of checking, I realized that the pycharm I installed was the community version. So I need to use the terminal command line to create a django project.

First, open a random project, then in the bottom left corner of the pycharm interface there is the Terminal terminal icon, tap on it.

cd returns to the root directory

In the terminal type in the directory for your PycharmProjects, since I'm on a mac I typed in:cd /Users/apple/PycharmProjects

After entering the catalog, type:django-admin startproject demo  Enter (where Demo is the name of the project and can be replaced) to create the project

Then file->open-> opens the demo file in the directory

After clicking open, you may be prompted to open a new interface, just select yes.

Open the terminal for the new interface (aka demo project)

Enter the following command:

If the terminal is not in the demo file directory, you need to enter:cd /Users/apple/PycharmProjects/demo Go to the demo directory.

importationpython startapp myweb (where myweb is the application name and can be replaced) Create the application

importationpython runserver Starting services

p s: the following error may be reported

Don't panic!

After control +c, enter the following command

python migrate
Then the following feedback appears:

Re-enterpython runserver, the following occurs:

At this point, let's look at the project directory, which is basically the image below:

which is a management tool provided by django to synchronize databases and so on.

As a final step, open your browser at http://127.0.0.1:8000/

The following screen appears, indicating that the django web page is working properly

If there are other issues, there might be a problem with the django installation. You can refer to my previous post on django installation.

Website Configuration

Add a line with the name of the app you just generated to INSTALLED_APPS to complete the site configuration.

Since I created a new app with the name practice, I added the snippet 'practice', to complete the configuration.

Installing pymysql

Accessing the mysql database

To this point this article on the pycharm newproject left does not appear in the case of the project option to create a Django project solution / community version of pycharm to create a django project method of the article is introduced to this, more related pycharm to create a django project content, please search for my previous articles or continue to browse the following Related articles I hope you will support me more in the future!