Improved Application/DB
Some checks failed
Build and Deploy Demo App / test (push) Failing after 1m14s
Build and Deploy Demo App / build (push) Has been skipped
Build and Deploy Demo App / scan (push) Has been skipped
Build and Deploy Demo App / deploy (push) Has been skipped

This commit is contained in:
2025-11-26 11:03:01 +03:30
parent c442b16a45
commit fcd328ca2b
9 changed files with 194 additions and 99 deletions

18
models.py Normal file
View File

@@ -0,0 +1,18 @@
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class Feature(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(100), nullable=False)
description = db.Column(db.String(200), nullable=False)
def seed_db():
if Feature.query.count() == 0: # Seed only if empty
features = [
Feature(title="Responsive Design", description="Adapts seamlessly to mobile, tablet, and desktop devices."),
Feature(title="Modern UI", description="Uses Bootstrap 5 for clean, professional styling."),
Feature(title="Easy Deployment", description="Containerized with Docker for quick setup on any server.")
]
db.session.bulk_save_objects(features)
db.session.commit()