Showing posts with label Django. Show all posts
Showing posts with label Django. Show all posts

Saturday, January 1, 2022

To create your first Django project

Requirements: Python , VSCode [Or any other code editor]

Use the following steps to create a project in Django.

  • Create a folder and open that in VSCode

  • Create virtual environment using the following command

python -m venv env

  • Here venv is the command to create the virtual environment and env is the name of the environment.

  • After that activate the environment by going into the scripts folder and use the activate command

(env):\scripts>activate

  • Once the virtual environment is active (your virtual environment name (env): indicates you are in virtual environment) then install the Django using the following command

pip install django

  • Now we can create our project using the below command

django-admin startproject project-name .

  • The (.) here indicated that it will create manage.py in the root folder else it will create one more folder inside the root with the project-name and add the manage.py file inside it.

Saturday, December 7, 2019

Deploy Django application on XAMPP apache Server (Windows)

Below are the steps to deploy the Django application on XAMPP apache server.

Assuming that you have already downloaded and installed the following.




  • After copying the file from the folder rename it with mod_wsgi.so and paste the file where the XAMPP server is installed on your system inside the modules.


  • Make change in the httpd.conf file



  • Add the below line in httpd.conf


  • Create a Django project inside the htdocs folder.

  • After completion of the project when ready to deploy once again open the httpd.conf and add few more lines of code.




  • After add the above lines of code then restart the system and run the XAMPP server to check 



Git Commands

Git Version   To check the git version Git -v       Git Clone To clone the repository, use the following command: Git clone [u...