This Flask program is written in Python and contains routes for handling user authentication, posting, commenting, and deleting posts.
- Routes:
- Home Page (/, /index): Requires user authentication. Users can create posts with an optional image upload feature.
- Login (/login)
- Registration (/register): register with a username, email, and password.
- Logout (/logout)
- Delete Post (/delete/int:id): Allows authorized users to delete their posts. Admins can delete any post.
- Delete Comment (/post/int:commID/delete/int:id): Allows authorized users to delete comments on posts.
- Comment Post (/post/int:id): Allows users to comment on specific posts.
HTTP pages include styling elements, header handling, link styles, images and navigation menus. The Bootstrap and Moment.js libraries are used to improve the appearance and functionality of the page.
- The program uses SQLAlchemy for database operations.
- User authentication is implemented using Flask-Login.