Giter VIP home page Giter VIP logo

kvnbbg / cookie-sess Goto Github PK

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

This project demonstrates the difference between cookies and sessions in a Flask web app. It includes a form to generate random user data stored in a session and features dynamic, recursive comments.

Home Page: https://cookie-sess-ca0a3d208bdf.herokuapp.com/

License: MIT License

Python 51.12% CSS 22.06% HTML 26.47% Procfile 0.35%
cookie data-science flask generate session

cookie-sess's Introduction

Cookie & Session Difference by Kvnbbg (Kevin MARVILLE)

This project demonstrates the difference between cookies and sessions in a Python web application using Flask. It includes a simple form to generate random user data, which is then stored in a session. The project also features dynamic, recursive comments to simulate real-world interactions.

Features

  • Generate random user data
  • Store data in session (server-side)
  • Display data with flash messages
  • Responsive design for mobile devices
  • Dynamic, recursive comments

Screenshots

Mobile View 1 Mobile View 2

Setup

  1. Ensure you have the necessary packages installed:

    pip install flask flask-wtf
  2. Run the Flask application:

    python main.py
  3. Access the application in your web browser:

    • Navigate to http://127.0.0.1:5000/.

Code Overview

main.py

This is the main file for the Flask application. It sets up routes for generating and displaying random user data, and includes functionality for recursive flash messages.

templates/index.html

This file contains the HTML template for the index page, where users can generate random data.

templates/show_data.html

This file contains the HTML template for displaying the generated data and dynamic comments.

static/styles.css

This file contains the CSS for styling the application, including responsive design for mobile devices.

License

This project is licensed under the MIT License. See the LICENSE file for details.

cookie-sess's People

Contributors

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