This repository contains a Django project named "myblogsite."
- Python 3.9 installed on your system.
- Clone this repository to your local machine:
git clone
- Create a virtual environment and activate it:
python -m venv myenv
source myenv/bin/activate # On macOS and Linux
source myenv/Scripts/activate # On Windows
- Install Django:
pip install django==2.1.5
- Navigate to the project directory:
cd myblogsite
- Run the development server:
python manage.py runserver
- Migrate Database:
python manage.py migrate
- Create Superuser:
python manage.py createsuperuser
- Create Component
python manage.py startapp componentName
- New App migration
python manage.py makemigrations
- Creating objects in shell
python manage.py shell
#shell
from products.models import Product
Product.objects.all()
Product.objects.create()
- Get a data from database with id
python manage.py shell
#shell
from products.models import Product
Product.objects.get(id=1)
Access your project in a web browser at http://127.0.0.1:8000/.