Skip to content

mynul-islam-madhurjo/project-django-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

My Django Project

This repository contains a Django project named "myblogsite."

Prerequisites

  • Python 3.9 installed on your system.

Getting Started

  1. Clone this repository to your local machine:
git clone
  1. 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
  1. Install Django:
pip install django==2.1.5
  1. Navigate to the project directory:
cd myblogsite
  1. Run the development server:
python manage.py runserver

Other Useful Commands

  1. Migrate Database:
python manage.py migrate

  1. Create Superuser:
 python manage.py createsuperuser

  1. Create Component
python manage.py startapp componentName

  1. New App migration
python manage.py makemigrations

Create Model Objects Commands

  1. Creating objects in shell
python manage.py shell 
#shell
from products.models import Product
Product.objects.all()
Product.objects.create()

  1. 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/.

About

Blog CMS Site with Django

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published