I haven't touched Python so much and am quite a beginner, but I will study it little by little.
I will proceed while referring to.
We will proceed on the assumption that Python is already installed.
Start Pycharm> New Project> Select Django
After deciding "Location" and "Interpreter", the project will be created with the "Create" button.
At this time, even if Django is not installed, it will be installed automatically.
The project you just created in PyCharm should look like the following if it is named "mysite".
I won't explain each file in Creating your first Django app, part 1.
Launching from PyCharm is simple, just click the "Run" button in the upper right corner of the editor to launch the server.
Starting from Terminal
C: /.../mysite/manage.py runserver port number
But you can.
Then
.
.
Django version 1.10, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
You'll see something like this, and when you access it, you'll see a page that says "It worked!". The development server is now up and running.
Now let's create an application from PyCharm using the mange.py task.
Tools > Run mange.py Task...(Ctrl+Alt+R)
You will see something like a mange.py task command tool under the editor.
manage.py@mysite>
This is the same as doing the python manage.py command
in Terminal, and remembering the shortcuts will save you from having to type python manage.py
every time in Terminal.
Then the command to automatically generate the application "polls" is
manage.py@mysite>startapp polls
Now in the same directory as manage.py
Is made.
This makes it easier to develop your Django project with PyCharm.
Subsequent view creation etc. should work if you follow the tutorial.
Recommended Posts