This is a simple yet powerful blog website built using Flask, HTML, CSS, JS, and Jinja. The application includes features like a home page displaying blog posts, an about page, a contact page with email notifications, and an admin login page for managing blog content.
-
Home Page:
- Displays a single blog post at a time.
- Navigation buttons for previous and next posts.
-
About Page:
- Provides information about the website and its purpose.
-
Contact Page:
- Allows users to submit their contact details.
- Sends an automatic email notification with the user's information.
-
Admin Login Page:
- Add, edit, and delete blog posts.
- Upload files related to blog content.
- Python environment with Flask installed.
- XAMPP for database setup (MySQL).
-
Clone the repository:
git clone https://github.com/sahilgoyal7214/Flask-Blog.git cd Flask-Blog
-
Install dependencies:
pip install -r requirements.txt
-
Configure the database:
- Start XAMPP, and ensure both Apache and MySQL are running.
- Create a new database in phpMyAdmin.
- Import the provided
quantum_codebreakers.sql
file.
-
Configure the application:
- Open
config.json
and set the following parameters:local_uri
: Local database URI.prod_uri
: Production database URI.gmail-user
: Your Gmail email address.gmail-password
: Your Gmail password.about_p1
: First paragraph of the about page.about_p2
: Second paragraph of the about page.about_p3
: Third paragraph of the about page.website_title
: Title of your blog website.tagline
: A brief tagline for your website.no_of_posts
: Number of posts to display on the home page.login_image
: Image for the login page.admin_user
: Admin username for the login page.admin_password
: Admin password for the login page.upload_location
: Path to the location for file uploads.
- Open
-
Run the application:
python main.py
Visit
https://localhost:5000
in your browser.
update config.json
and set the following parameters:
- local_uri
: Local database URI.
- prod_uri
: Production database URI.
- gmail-user
: Your Gmail email address.
- gmail-password
: Your Gmail password.
- about_p1
: First paragraph of the about page.
- about_p2
: Second paragraph of the about page.
- about_p3
: Third paragraph of the about page.
- website_title
: Title of your blog website.
- tagline
: A brief tagline for your website.
- no_of_posts
: Number of posts to display on the home page.
- login_image
: Image for the login page.
- admin_user
: Admin username for the login page.
- admin_password
: Admin password for the login page.
- upload_location
: Path to the location for file uploads.
For any issues or questions, please contact Sahil Goyal.