Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mynul-islam-madhurjo/project-django-blog
Blog CMS Site with Django
https://github.com/mynul-islam-madhurjo/project-django-blog
Last synced: about 1 month ago
JSON representation
Blog CMS Site with Django
- Host: GitHub
- URL: https://github.com/mynul-islam-madhurjo/project-django-blog
- Owner: mynul-islam-madhurjo
- Created: 2023-10-01T16:01:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-27T12:14:58.000Z (11 months ago)
- Last Synced: 2024-01-27T13:32:07.765Z (11 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```2. 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
```
3. Install Django:
```
pip install django==2.1.5
```
4. Navigate to the project directory:
```
cd myblogsite
```
5. Run the development server:
```
python manage.py runserver```
## Other Useful Commands6. Migrate Database:
```
python manage.py migrate```
7. Create Superuser:
```
python manage.py createsuperuser```
8. Create Component
```
python manage.py startapp componentName```
9. New App migration
```
python manage.py makemigrations```
## Create Model Objects Commands10. Creating objects in shell
```
python manage.py shell
#shell
from products.models import Product
Product.objects.all()
Product.objects.create()```
11. 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/.