Coder Social home page Coder Social logo

viktoriussuwandi / flask-csv Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 49.05 MB

This is a Full Stack Web Development Project using Flask, WTF Form Jinja 2, CSV File

Home Page: https://replit.com/@ViktoriusSuwand/AppBrewery-Day-62-CSV-WTF-Form-Bootstrap

Python 97.59% Nix 0.01% CSS 0.01% HTML 0.09% PowerShell 0.05% Shell 0.02% Cython 0.67% C++ 0.26% JavaScript 0.01% C 1.28% Fortran 0.01% Nu 0.02%
csv-files csv-import flask-application flask-backend flask-server jinja2 jinja2-templates python3 form-validation wtforms-flask

flask-csv's Introduction

Web Development using Flask, WTF Form Jinja 2, CSV File

This is a website with WTF form, and CSV file management.

Documentation can be found on : https://github.com/viktoriussuwandi/Flask-CSV

Technology and Features :

* Bootstrap as Front-End CSS Framework
* python Flask as Back-End Framework
* Jinja 2 for data transfer with Front-End and Back-End
* CSV file to load and save data

Development

  1. The home page should use the css/styles.css file to look like this: HINT: Think about bootstrap blocks and super blocks

    Home Page

  2. The /cafes route should render the cafes.html file. This file should contain a Bootstrap table which displays all the data from the cafe-data.csv HINT: A object called cafes is passed to cafes.html from the /cafes route. Try putting it in a <p> to see what the data in cafes look like.

    Cafe Page

  3. The location URL should be rendered as an anchor tag <a> in the table instead of the full link. It should have the link text Maps Link and the href should be the actual link. HINT: All location links have the first 4 characters as http.

    Google map Page

  4. Clicking on the Show Me! button on the home page should take you to the cafes.html page.

    Cafe Page

  5. There should be a secret route /add which doesn't have a button, but those in the know should be able to access it and it should take you to the add.html file.

    Form Page

  6. Use what you have learnt about WTForms to create a quick_form in the add.html page that contains all the fields you can see in the demo below:

    HINT: https://flask-wtf.readthedocs.io/en/stable/quickstart.html https://pythonhosted.org/Flask-Bootstrap/forms.html

    Form Page

  7. Make sure that the location URL field has validation that checks the data entered is a valid URL:

    HINT: https://wtforms.readthedocs.io/en/2.3.x/validators/

    How to switch off client-side (browser) validation with quick_forms: https://stackoverflow.com/a/61166621/10557313

    Form Page

  8. When the user successfully submits the form on add.html, make sure the data gets added to the cafe-data.csv. It needs to be appended to the end of the csv file. The data from each field need to be comma-separated like all the other lines of data in cafe-data.csv

    HINT: https://www.w3schools.com/python/python_file_write.asp

Form Page

  1. Make sure all the navigation links in the website work.

    All Page

flask-csv's People

Contributors

viktoriussuwandi avatar

Stargazers

 avatar  avatar  avatar  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.