Blogs
Created by: ay701
This PR is about adding Blogs section to BlocPower marketing website
What to test:
- User can post new blogs with a full-featured editor through admin page
- User can search blogs using keywords (on blogs page's side bar)
- User can filter blogs by categories (on blogs page's side bar)
- User can filter blogs by archived years (on blogs page's side bar)
- User can subscribe newsletter from BlocPower (on both blogs page's and individual blog page's side bar, at right bottom)
- User can see the most recent articles (on individual blog page's side bar)
- User can see images and styled format context on individual blog page
- User can see default/blank image if blog has empty/invalid image set in backend
- Pages should be mobile/tablet/iPad/Laptop friendly
- Navigation bar menu has background styling
How to test :
- Go to
marketingWebsiteproject on your local machine - Run
git fetchif you don't haveblogsbranch yet - Run
git checkout blogsto switch the branch - Run
git pull origin blogsto pull latest updates - Run
pip install -r requirements.txtto install the new required packages - Run
python manage.py collectstaticto collect all the new static files - Run
python manage.py runserverto start the server - Go to browser:
http://127.0.0.1:8000/see ifblogsshown on header menu - Click
blogstab on header menu see if all blogs loaded properly - Login to
http://127.0.0.1:8000/admin, post some newblog articlesNote Login credential should be available on1passwordapp Theimagecolumn value is used for displaying blog image onblogspage Currently we load the image from static path on the server Ideally we will use boto3 URi path forimagecolumn value in the future It's not allowed to upload image yet - Go to
blogspage on the website, click around and refresh - Check if everything works as expected For example: the pagination, search, filter, newsletter subscription, mobile/tablet friendly etc.
- Check on
http://127.0.0.1:8000/adminto see if you can upload image by browsing Note Make sure you copy the images to/static/media/uploads/