GithubHelp home page GithubHelp logo

hit07 / flask-wtf-bs Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

This repository features two Flask projects: LoginForm and Cafe, showcasing advanced forms with Flask-WTF, Bootstrap-Flask integration, and CSV manipulation. Explore Flask-WTF for form validation and Bootstrap for enhanced user experience.

Python 42.19% HTML 54.30% CSS 3.50%
bootstrap flask-wtforms

flask-wtf-bs's Introduction

Flask Projects:

This repository contains two Flask projects: LoginForm and Cafe. Each project focuses on different functionalities but shares a common Flask backend.

LoginForm

Goals

The primary goal of this project is to build advanced forms using Flask-WTF extension. This project introduces Flask developers to Flask-WTF for easy form validation, less code, and built-in CSRF protection.

Secrets

The end result of this project is a website that holds some secrets. Access to these secrets is restricted by requiring the correct username and password.

Cafe

Goals

This project aims to utilize Flask-WTF, Bootstrap-Flask, and Bootstrap classes to enhance the user experience of a website displaying cafe information. It also involves revising CSV manipulation skills.

Requirements

  1. The home page should resemble the provided style using the css/styles.css.
  2. The /cafes route should render a page (cafes.html) with a Bootstrap table displaying data from cafe-data.csv.
  3. The location URL should be rendered as an anchor tag within the table.
  4. Clicking "Show Me!" on the home page should navigate to cafes.html.
  5. The secret route /add should render add.html.
  6. Use Flask-WTF's render_form to create a form in add.html with validation for the location URL.
  7. Upon successful form submission, data should be appended to cafe-data.csv.

Additional Notes

  • Ensure all navigation links within the website are functional.
  • Read more about Flask-WTF here.
  • Bootstrap-Flask documentation can be found here.
  • For URL validation, refer to WTForms validators documentation.
  • Switch off client-side validation with quick_forms as per this Stack Overflow post.

How to Run

  1. Clone the repository.
  2. Navigate to the project directory (LoginForm or Cafe).
  3. Install dependencies (pip install -r requirements.txt).
  4. Run the Flask application (python app.py).

flask-wtf-bs's People

Contributors

hit07 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.