meysam81 / PyQuotes

PyQuotes is a Django-based web application and REST API. That will allow you to launch an online quotes service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyQuotes

PyQuotes is a Django-based web application and REST API. That will allow you to launch an online quotes service.


Features

  • Has a person management section to create and edit a person (Full Name, Bio, Avatar)
  • Has a category section to create and edit category (Title)
  • Has a quote section to create and edit quote (Content, Person, Category)
  • Has a REST-API to show content in other client user interface
  • Displays the list of quotes as paged in Index
  • Contains random quotes display page
  • Displays the list of people as paged
  • Show list of persons as widgets
  • Show list of categories as widgets
  • Show quotes by perosn
  • Show quotes by category
  • Used by "Django Admin" to manage quotes and categories and persons
  • Used by "Bootstrap v4.x" to create front-end web application
  • Used by "Sqlite" to create DB

Screenshots

Index Page

Persons Page

Random Quotes Page

Show Quotes By Person

Show Quotes By Category


How to install and run (GNU/Linux and Mac)

  1. Install git,python3, pip3, virtualenv in your operating system
  2. Create a development environment ready by using these commands
git clone https://github.com/mavenium/PyQuotes		# clone the project
cd PyQuotes		# go to the project DIR
virtualenv -p python3 .venv		# Create virtualenv named .venv
source .venv/bin/activate		# Active virtualenv named .venv
pip install -r requirements.txt		# Install project requirements in .venv
python manage.py makemigrations		# Create migrations files
python manage.py migrate		# Create database tables
python manage.py collectstatic		# Create statics files
python manage.py runserver		# Run the project
  1. Go to http://127.0.0.1:8000/ to use project

REST API

http://127.0.0.1:8000/api/persons/		# JSON objects of persons
http://127.0.0.1:8000/api/categories/		# JSON objects of categories
http://127.0.0.1:8000/api/quotes/		# JSON objects of quotes
http://127.0.0.1:8000/api/quotes_random/		# JSON objects of quotes by random
http://127.0.0.1:8000/api/qbp/pk/		# JSON objects of quotes by person pk
http://127.0.0.1:8000/api/qbc/pk/		# JSON objects of quotes by category pk

TODO list

  • Create useful tests

About

PyQuotes is a Django-based web application and REST API. That will allow you to launch an online quotes service.


Languages

Language:Python 64.4%Language:HTML 35.6%