LITRevu

Project information

  • GitHub URL: https://github.com/DoriDoro/LITRevu-project
  • create date: July 17, 2023
  • evaluation date: Oct. 11, 2023
  • Skills:

    Python

    Django

    Git

    GitHub

    SQLite

    SQL

    Vercel

    Flake8

    PEP8

    HTML5

    CSS3

    Authentication

    Create, Read, Update, and Delete operations (CRUD)

    Crispy-Forms

    Bootstrap


Introduction

In this project, I developed a web application from scratch using Django as the backend framework, integrating Bootstrap for styling and responsiveness. The process involved building the application from an initial Wireframe and database schema, ensuring that the design and functionality aligned with user needs.

Project Workflow:

    • Design with Wireframes: The project started with a wireframe and database schema, guiding the application structure and data flow.
    • Function-Based Views (FBVs): Built the application logic using FBVs to handle CRUD operations.
    • Crispy-Forms: Used crispy-forms with Bootstrap4 for clean and responsive forms.
    • Media and Static File Management: Implemented proper static file handling and media uploads for user content.
    • Custom Templatetags: Created reusable template tags, such as the stars.py tag for dynamic star ratings.
    • Image Handling: Used Pillow to resize uploaded images to a set width, ensuring consistency.
    • Feedback with Flash Messages: Created messages to provide user feedback on actions and operations.

This project showcases the use of Django’s flexibility in building a structured web application, with attention to clean code, user-friendly design, and dynamic content management.


Competences

    • create from scratch a web/Django application
    • use a Wireframe and a schema of the database to build the web application
    • SQLite database
    • create docstrings, use Flake8 and PEP8
    • function-based-views
    • crispy-forms
    • crispy-bootstrap4
    • use of staticfile and media
    • create messages
    • create a templatetag (stars.py https://github.com/DoriDoro/LITRevu-project/blob/main/review/templatetags/stars.py)
    • saving images at decided width (Pillow)
    • create a password validator
    • authentication: registration, login and logout
    • CRUD operation
    • follow other users


Learning Experience

1. Django Web Application

I built the entire web application using Django, leveraging its powerful tools for routing, templating, and database management. The project followed best practices by adhering to PEP8 standards, enforced with Flake8 for code quality. The application uses function-based views (FBVs) to handle different CRUD (Create, Read, Update, Delete) operations, providing a simple and effective way to structure the views.

2. SQLite Database

For data storage, I used SQLite, Django’s default database, to manage user and application data. The database schema was designed based on the wireframe, ensuring that all necessary relationships and data points were correctly mapped.

3. Crispy-Forms with Bootstrap

To enhance the user interface and streamline form handling, I implemented crispy-forms with Bootstrap4 for styling. This combination ensured that forms were well-styled and user-friendly, with Django’s form handling providing server-side validation. I also customized the form appearance and layout using crispy-bootstrap4, ensuring that all forms adhered to the project's visual design.

4. Static Files and Media Management

I integrated static files (such as CSS, JavaScript, and images) to enhance the website’s front-end design. For handling user-uploaded files (like images), the project included media file management, ensuring that files were stored in the designated directories and could be easily retrieved and displayed within the application.

5. Custom templatetags

To extend template functionality, I created custom templatetags. One example is the stars.py template tag, which I used to dynamically render star ratings based on user reviews. This tag was included in the templates to enhance user interactivity and display ratings in a user-friendly manner.

6. Image Resizing with pillow

The project also involved handling image uploads, and to ensure consistency, I used the pillow library to resize images to a predetermined width before saving them. This process maintained the quality and performance of the website by ensuring that large images did not slow down the page load times.

7. Flash Messages

To improve user experience, I implemented flash messages that provided feedback on user actions. Whether it was a successful form submission, a validation error, or any other CRUD operation, these messages kept users informed of the system’s state, improving usability and engagement.

Designed by BootstrapMade and modified by DoriDoro