Welcome to the Django quickstart! Here's how to get started with Django development in 5 simple steps:
Install Django 📦
Use pip to install Django:pip install django
Create a New Project 🏗️
Run the following command in your terminal:django-admin startproject myproject
This will generate the basic project structure.
Create a New App 📥
Navigate to your project directory and execute:python manage.py startapp myapp
Add
myapp
toINSTALLED_APPS
insettings.py
.Define Models 🧱
Create amodels.py
file in your app directory and define your data structure.
Example:from django.db import models class Book(models.Model): title = models.CharField(max_length=100) author = models.CharField(max_length=100) published_date = models.DateField()
Run the Development Server 🚀
Start the server with:python manage.py runserver
Visit
http://127.0.0.1:8000/
to see your project in action.
For advanced topics, check out our Django Advanced Tutorials 📚. Let me know if you need further assistance!