Create and Run First Project in Django in Pycharm | Live practical

Hello Friends how are you, Today in this post i am going to teach you how you can create your first Django project in Pycharm and how you can run it live on server.

Now I am going to explain everything step by step.

If you want to understand this through video then watch this video i have explained it step by step live

Step 1: Install Pycharm : To install Pycharm into your system first click here , When you visit this link you will get official webpage for downloading Pycharm. On that page there are two download button (blue and black) in which blue download button is for professional version and black download button is for Community version. You have to download Professional Version because in community version there is no facility to create Django project. Just download from there and install it.

Step 2: Create Django Project: After installation of Pycharm open it and click on create new project and then you will get a screen like below.

Create and Run First Project in Django in Pycharm

Here in the above screenshot first step is to select Django then the second step is to Select directory in which you want to create your project and after the directory name for your project for example in my case my project name is WebsiteInDjango and the directory is H. After typing project name click on create button and wait for sometime it will take  to create your project in the system. After successful creation of project you will get a screen like below

Create and Run First Project in Django in Pycharm

Step 3:Run Project: To run the django project click on terminal button which is in left bottom of screen

Create and Run First Project in Django in Pycharm

When you click on this Terminal button you will get a console area like below

Create and Run First Project in Django in Pycharm

Here in the above console area you have to type python manage.py runserver like below

Create and Run First Project in Django in Pycharm

When you will press enter after typing this command you will get output like below screenshot

Create and Run First Project in Django in Pycharm

Now in the above screenshot you have to click on the obtained URL and you will get output screen like below

Create and Run First Project in Django in Pycharm

Now its done successfully. It is the default home screen for Django website.

Step 4:Customize Home Screen:  To customize this default home screen, right click on project name and select new and then click on Python file 

Create and Run First Project in Django in Pycharm

When you will click on Python File then you will get a text box and in this textbox type views and press enter

Create and Run First Project in Django in Pycharm

Now open this views python file and type the following code

Create and Run First Project in Django in Pycharm

After this now open urls.py and add two lines into it , If you have any doubt then you can watch the above video i have explained everything live.

Create and Run First Project in Django in Pycharm

Now again run your project and at this time you will get output screen like below

Create and Run First Project in Django in Pycharm


I hope now you can  create "Django project in Pycharm". If you have any doubt regarding this post  or you want something more in this post then let me know by comment below i will work on it definitely.
 

Request:-If you found this post helpful then let me know by your comment and share it with your friend. 
 
If you want to ask a question or want to suggest then type your question or suggestion in comment box so that we could do something new for you all. 

If you have not subscribed my website then please subscribe my website. Try to learn something new and teach something new to other. 

If you like my post then share it with your friends. Thanks­čśŐHappy Coding.

Post a Comment

0 Comments