Project is deployed on heroku at this link https://django-random-news.herokuapp.com/
- Ensure the following python library is installed in your computer
newsapi-python
Django
-
Obtain a api key from https://newsapi.org/ and place it into apiKey.py in 'website' app
-
Make migration for the website app
python manage.py makemigrations website
python manage.py migrate
- To run the web app
python manage.py runserver
User will be able to
- Login and logout
- Click on generate news button to random pulls a recent article text from a random news outlet
- Specify what category of news they are interested in
- View list of articles viewed in the past
- Delete article from history
RandomNews
- project directoryWebsite
- Main app directorystatic\website
- Contains all the static filesscript.js
- Contains the js codes
templates\website
- Contains all the html filesindex.html
- Main page for the websitelayout.html
- Template for the websitelogin.htmml
- Contains the template for logging innavbar.html
- Inserted into layout.html for the navbarregister.html
- Contains the template for registering
admin.py
: added models here to access in admin pageapiKey.py
: Contains the API key for newsAPImodels.py
: Contains the models for this projecturls.py
: Contains the URL routesviews.py
: Contains the function for the views
Requirements.txt
: Contains all the necessary library and their version