• Ctrl+C+Python
  • Posts
  • 🐍 Build Your First Django Website: Day 2

🐍 Build Your First Django Website: Day 2

Now that your environment is set up, it's time to install Django and create your first project. By the end of today, you'll have a working development server running. This is where the magic begins!

Day 2: Install Django and Create Your Project

Today we’re installing Django and creating your first project!

1. Install Django

In your activated virtual environment, install Django with:

pip install django

2. Create Your First Project

Create a new Django project using:

django-admin startproject mysite

3. Run the Development Server

Navigate into the project folder and start the server:

cd mysite
python manage.py runserver

Open your browser and go to http://127.0.0.1:8000 or http://localhost:8000 to see Django’s welcome page!

4. Next Step

Tomorrow, we’ll create our first app in Django.

πŸ† Final Thoughts

If you missed out on the previous step, head on over to this post.

If you want to see an overview of all of the steps, check out this post.

Having trouble with this step? Let me know in the comments! πŸš€πŸ

Happy coding! πŸš€πŸ

Digital Shade

Want more Python tips and tricks?

πŸ”” Join my Beehiiv newsletter for exclusive cheat sheets, Python hacks, and expert tutorials!

Take your learning to the next level with quick, aesthetic coding tutorials on my YouTube channel! πŸš€βœ¨

πŸŽ₯ Watch now: @CtrlCPython

Subscribe for bite-sized Python lessons with lofi vibes & clean code. β˜•πŸŽΆ 

Reply

or to participate.