Skip to main content
Navigation
HomeTechnical ReferenceJournalGitHubGitHub
Sidebar — toggle document categories via the logo
Dive Sandy Beach Flask — Informational Dive Site CMS

Dive Sandy Beach Flask — Informational Dive Site CMS

August 14, 2019

Overview

Dive Sandy Beach (Flask) is a Python-based informational website for Sandy Beach Dive Centre in Fujairah, UAE. The application provides a public-facing blog platform, PADI course management, and dive site listings, all delivered through a classic Model-View-Controller (MVC) architecture.

The project was structured around Flask Blueprints for modular component design — separating concerns into main, posts, users, and error handlers. This was the earlier iteration of the Sandy Beach web presence before being superseded by the production Django application.


Key Features

  • User registration & login: Full authentication flow with Flask-Login
  • PADI course CRUD: Create, read, update, and delete PADI course listings
  • Dive site CRUD: Manage dive site information with full create/update/delete
  • Blog platform: Post management with create, update, and delete operations
  • Contact form: Public-facing contact form for enquiries
  • Dive course request form: Users can request specific dive courses
  • Fun diving request form: Book fun diving sessions
  • Password reset: Reset via emailed tokens
  • Profile pictures: Upload with automatic image resizing (via Pillow)

Architecture

A modular MVC application built on Flask Blueprints:

BlueprintRole
mainCore pages and routing
postsBlog post management
usersAuthentication and user profiles
errorsCustom error handlers

The application is backed by an SQLAlchemy ORM over a SQLite database (migratable to PostgreSQL) for production. Passwords are hashed with Bcrypt, authentication is handled by Flask-Login, and emails are sent through Flask-Mail. Forms are validated with WTForms and rendered on the frontend with Bootstrap 4 and jQuery.


Tech Stack

LayerTechnology
FrameworkFlask (MVC, Blueprints)
ORMFlask-SQLAlchemy (SQLite → PostgreSQL)
AuthFlask-Login, Bcrypt
FormsWTForms
EmailFlask-Mail
ImagesPillow (auto-resize profile pictures)
FrontendBootstrap 4, jQuery, Jinja2