This is a simple blog application built with Flask and WTForms. It supports creating, editing, and managing blog entries, including image uploads and tagging functionality.
- Create, edit, and delete blog entries
- Upload images to entries (supports jpg, jpeg, png, gif)
- Tag entries with multiple tags (comma-separated)
- View entries and tags
- Filter entries by multiple tags (e.g., /tags/python+flask)
- Database migrations with Alembic
app.py,main.py,manage.py: Application entry points and management scriptsmodels.py: Database models for entries and tagsentries/: Blueprint for entry-related routes, forms, and templatesforms.py: WTForms forms for entries, images, and tagsblueprint.py: Blueprint routes for entry operationstemplates/entries/: Jinja2 templates for entry views
static/: Static files (CSS, JS, images, fonts)templates/: Base and shared templatesmigrations/: Alembic migration scripts
- ImageForm: Handles image uploads for entries, validates file type, and populates entry objects.
- TagField: Custom WTForms field for handling tags as comma-separated strings, supports parsing and database integration.
- EntryForm: Main form for creating and editing entries, includes title, body, status, slug, and tags.
- Install dependencies:
pip install -r requirements.txt
- Set up the database:
python scripts/create_db.py
- Run migrations (if needed):
flask db upgrade
- Start the application:
flask run
MIT License