Skip to content

Latest commit

 

History

History
118 lines (77 loc) · 1.64 KB

README.md

File metadata and controls

118 lines (77 loc) · 1.64 KB

Django News Reader

Advanced news reader website using django and celery.

How to Run Project

Download Codes

git clone https://github.com/dori-dev/news-reader.git
cd news-reader

Build Virtual Environment

python -m venv env
source env/bin/activate

Install Project Requirements

pip install -r requirements.txt

Set Environ Variables

rename .env.example to .env and change values.

mv .env.example .env

set your environment variables in .env file.

Migrate Models

python manage.py makemigrations news taggit
python manage.py migrate

Add Super User

python manage.py createsuperuser

Install Redis

Install redis from here After installing redis run redis server

redis-server --daemonize yes

Then test redis

$ redis-cli ping
PONG

Run Project

Run project using this command

python manage.py runserver

Open another terminal in this path then run celery worker

source env/bin/activate
python -m celery -A config worker -l info

And open another terminal in this path then run celery beat:

source env/bin/activate
python -m celery -A config beat -l info

Note: Celery get news every 2 minutes.

Open On Browser

Home Page: 127.0.0.1:8000
Admin Page: 127.0.0.1:8000/admin

Links

Download Source Code: Click Here

My Github Account: Click Here