How to start a Django Project?

I am a developer from Delhi, India
Search for a command to run...

I am a developer from Delhi, India
No comments yet. Be the first to comment.
In this series, I will walk you through everything needed to become a Django Developer. However, the pre-requisite of this series, is that you are well versed with Python.
This article is part of a series regarding Complete Beginners Guide to Django. So, if you haven't seen the first part of this series, check it out at https://livecode247.com/how-to-start-a-django-project So, after following the instructions in the f...
DISCLAIMER: This might not be the most well-written article since I haven't written in a while and I just wanted to get back to writing with a short article about my experience of the day, so sorry about that I previously used this repository for my...

The release of NextJS 13 brought about a plethora of new and impressive features, with one standout being the updated data fetching and management process. The fetch API replaced the more complicated functions, including getServerSideProps, getStatic...

Looking for a safe and reliable way to authenticate users? Consider implementing magic links. They offer a secure alternative to traditional passwords and can help mitigate the risk of password leaks and forgotten passwords. Magic Link authentication...

Neovim is a powerful text editor that can be customized with plugins to enhance its functionality. In this article, we will explore the top 10 essential Neovim plugins. These plugins can help improve your Neovim experience by adding features such as ...

A type-safe and zero-runtime version of Tailwind CSS

Django is one of the biggest web development with Python, web framework in the market and the biggest companies, including Facebook, Google, etc. have started using Django for it’s backend programming
So, here is how you can start your first Django Project
Prerequisites:
You should have basic knowledge about Python and should be well-versed with Object Oriented programming in Python
Basic frontend knowledge with HTML, CSS (You can use css frameworks like bootstrap to make your work easy)
That’s pretty much it… So let’s get started
If you have come so far, in this blog, you must know Python well. So, since you have python installed, you would have got, PIP which is a python packaging tool, which is an equivalent of NPM if you have used JS
So, first we need to create a directory. For that, go into the terminal and type:
mkdir livecode247 && cd livecode247
Once you have done that, you will be inside, the livecode247 directory Now, run:
pip3 install django
This would take some time. After that is done, you would have installed Django on your laptop. However, it is always better to work on a virtual environment, so we will make one as follows
pip3 install virtualenv
virtualenv myenv --python=python3
This would: 1. Install virtualenv on your device 2. Create a vitualenv in the current directory, i.e. livecode247
Now, we need to activate this environment
source myenv/bin/activate
Now, that we have activated the environment, all our changes in here would not affect our device. So, now let us install django in this virtualenv
pip3 install django
Now, we will start a django project. To start a django project, run:
django-admin startproject livecode247 .
DON’T FORGET THE “.” IN THE END OF THE LINE
Now, run:
python3 manage.py runserver
Now, go to the browser and type http://127.0.0.1:8000 Voilà, you have successfully created your first django project