Skip to content

Advanced news reader website using django and celery.

License

Notifications You must be signed in to change notification settings

dori-dev/news-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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