Git Product home page Git Product logo

findmereadme's Introduction

Hi there ๐Ÿ‘‹

findmereadme's People

Contributors

brodsa avatar

Watchers

 avatar

findmereadme's Issues

BUG: sever error 500

There is a server error 500 on production database after submitting the form to register the book

USER STORY: Form Validation

EPIC: Book registration

As a developer, I want to validate the user input, so that the inputs for database are correct and the page is not broken

ACCEPTANCE CRITERIA

  • The validations forms are title, year, description.
  • The user is inform about invalid input

TASKS

  • Add input validation into form.py

USER STORY: Search Book

EPIC: Registered User

As a user, I want to search on the page a book according to the book name.

ACCEPTANCE CRITERIA

  • There is search field where the user can search books based on book name.

** TASKS**

  • Create search input
  • Create a search function

BUG: Filter by user status

There is a bug in the logic which of setting up the use status. The logic as well as filter buttons were removed so that the code stays clean.
Related Issue: #25

Effected scripts, where the code was removed.
template/base.html

<script type="module" src="{% static 'js/script.js' %}"></script>

books/template/includes/search_book.html

    <div class="search__container ps-4 pe-4 ms-2 d-flex flex-column flex-lg-row align-items-center gap-lg-2">
        <p class="m-0 p-0 text-center">Filters</p>
        <div class="filter__buttons">
            <button class="btn book__button hero__button--primary book__button--active" id="btnAll" aria-label="Filter all books">
                All
            </button>
            <button class="btn book__button hero__button--primary" id="btnCreator"  aria-label="Filer books by creator">
                Created
            </button>
            <button class="btn book__button hero__button--primary" id="btnContributor" aria-label="Filter books by my contribution">
                Contributed
            </button>
        </div>
    </div>

books/template/books_list.html

<!-- data-book: creator or contributor -->

{% for item in book.get_user_status %}
{{ item }}
  {% if request.user|stringformat:"s" == item.user__username and book.title == item.title and item.book_contribution__user__username == item.user__username %}
  <a href="{% url 'book_detail' book.id %}" class="book" data-book="creator" aria-label="Click to see more details for {{ book.title }}">
  {% else %}
    {% if request.user|stringformat:"s" == item.book_contribution__user__username and book.title == item.title and item.book_contribution__user__username != item.user__username %}
    <a href="{% url 'book_detail' book.id %}" class="book" data-book="contributor" aria-label="Click to see more details for {{ book.title }}"> 
    {% endif %}
  {% endif %}
{% endfor %}
<!-- data-book: visitor -->
{% if request.user|stringformat:"s" not in book.get_contribution_users %}
 <a href="{% url 'book_detail' book.id %}" class="book" data-book="visitor" aria-label="Click to see more details for {{ book.title }}"> 

books/models.py

    def get_user_status(self):
        q = (
            Book
            .objects
            .select_related('user')
            .prefetch_related('book_contribution')
            .values(
                'title',
                'user__username',
                'book_contribution__user__username')
        )
        print(q)
        return q

statitic/js/script.js



const btnAll = document.querySelector('#btnAll');
const addListenerOnButtons = () => {
    // Function to filter the books based on the button which is clicked on
    // options are all, created, contributed
    const bookAll = document.querySelectorAll('.book');
    const bookContributor = document.querySelectorAll('[data-book="contributor"]');
    const bookCreator = document.querySelector('[data-book="creator"]');
    const bookVisitor = document.querySelector('[data-book="visitor"]');
    
    
    const btnContributor = document.querySelector('#btnContributor');
    const btnCreator = document.querySelector('#btnCreator');

    // Button All
    btnAll.addEventListener('click', (e)=>{
        // if all is active
        btnAll.classList.toggle('book__button--active');
        if (btnAll.classList.contains('book__button--active')){
            // display all books
            bookAll.forEach((book) => book.classList.remove('hidden'));
            // deactivate buttons for created and contributed 
            btnContributor.classList.remove('book__button--active');
            btnCreator.classList.remove('book__button--active');
        } else{
            bookAll.forEach((book) => book.classList.add('hidden'));
        }
        
        
    });

    // Button Contributor
    btnContributor.addEventListener('click', (e)=>{
        btnContributor.classList.toggle('book__button--active');
        // if the button Contributed is active
        if (btnContributor.classList.contains('book__button--active')){
            // display all contributed books
            if(bookContributor !=null ){
                if (Array.isArray(bookCreator)){
                    bookContributor.forEach((book) => book.classList.remove('hidden'));
                }else{
                    if (bookContributor.classList != null ){
                        bookContributor.classList.remove('hidden'); 
                    }
                }
            }else{
                bookAll.forEach((book) => book.classList.add('hidden'));
            }
            
            
            if (bookCreator != null){
                // hide creator
                if(Array.isArray(bookCreator)){
                    bookCreator.forEach((book) => book.classList.add('hidden'));
                }else{
                    if (! bookCreator.classList.contains('hidden')){
                        bookCreator.classList.add('hidden');
                    }
                    
                }
                
            }
            if (bookVisitor != null){
               // hide visitor
                if(Array.isArray(bookVisitor)){
                    bookVisitor.forEach((book) => book.classList.add('hidden'));
                }else{
                    if (! bookVisitor.classList.contains('hidden')){
                        bookVisitor.classList.add('hidden');
                    }
                    
                }                
            }
            
        }else{
            // show all
            bookAll.forEach((book) => book.classList.remove('hidden'));
        }
        

    });
    // Button Creator
    btnCreator.addEventListener('click', (e)=>{
        btnCreator.classList.toggle('book__button--active');
        // if the button Creator is active
        if (btnCreator.classList.contains('book__button--active')){
            // display all creator books
            if (bookCreator != null){
                if (Array.isArray(bookCreator)){
                    bookCreator.forEach((book) => book.classList.remove('hidden'));
                }else{
                    if(bookCreator.classList.contains('hidden')){
                        bookCreator.classList.remove('hidden');
                    }
                }
            }else{
                bookAll.forEach((book) => book.classList.add('hidden'));
            }
            
            if (bookContributor != null){
                // hide contributor
                if (Array.isArray(bookContributor)){
                    bookContributor.forEach((book) => book.classList.add('hidden'));
                }else{
                    if (bookContributor.classList != null){
                        bookContributor.classList.add('hidden');
                    }
                }  
            }
            if (bookVisitor != null){
                // hide visitor
                if(Array.isArray(bookVisitor)){
                    bookVisitor.forEach((book) => book.classList.add('hidden'));
                }else{
                    if (bookVisitor.classList != null){
                        bookVisitor.classList.add('hidden');
                    }
                    
                }                
            }
            
        }else{
            //show all
            bookAll.forEach((book) => book.classList.remove('hidden'));
        }

    });
};

if (btnAll != null){
    addListenerOnButtons();
}

USER STORY: Delete Contribution

EPIC: Book contribution

As a user, I want to have the possibility to delete my contribution, so that I can have a full control about the published details.

ACCEPTANCE CRITERIA

  • There is a button which redirects the user to the page where he/she can delete contribution information on the contributed book. Only user with status contributed can do it, nobody else.

** TASKS**

  • Create Delete Contribution Confirm template
  • Create view
  • Create url
  • Add link
  • Documentation
  • Testing

USER STORY: Search Book Key

EPIC: Book contribution

As a admin, I want that a book is identified based on its key which is inserted in the input field, so that the whole process is secured.

ACCEPTANCE CRITERIA

  • There is form to insert the book key for new contribution. Only registered user can do that via nav link

TASKS

  • Create Insert key template
  • Create view
  • Create url
  • Add link
  • Documentation
  • Testing

USER STORY: Final Deployment

EPIC: Deployment

As a developer, I wan to the final page is deployed, so that user can use all implemented features

ACCEPTANCE CRITERIA

  • The final webpage was deployed on Heroku
  • There are no comments in code.

** TASKS**

  • Final deployment
  • Delete all comments

USER STORY: Deleting User

EPIC: User Registration

As a user, I want to delete my user account information, so that I can unregister.

ACCEPTANCE CRITERIA

  • The user can delete his/her account, anyone else cannot do it

** TASKS**

  • Create Delete Profile template
  • Create view
  • Create url
  • Add link
  • Documentation
  • Testing
  • [ ]

USER STORY: Create messages on successful form submit

EPIC: Registered users

As a user I want to get a feedback when doing CRUD so that I know the changes were successfully made.

ACCEPTANCE CRITERIA

  • After CRUD, there is a toast message informing the user about the successful changes.

** TASKS**

  • add to all CRUD views a message.success in form_valid()

USER STORY: Contact Form

EPIC: Contact

As a developer, I want to provide users and visitors with a contact form, so that I can control what information they provide.

ACCEPTANCE CRITERIA

  • There is a contact form after clicking on contact in the navigation menu.

** TASKS**

  • Create Contact template
  • Create View
  • Create url
  • Add Link
  • Testing
  • Documentation

USER STORY: Book card basic

EPIC: Book Registrations

As a user, I want to know the book information so that I can have a better information about the book.

ACCEPTANCE CRITERIA

  • In each card there is book information

TASKS

  • Create Book View template
  • Create view
  • Create url
  • Add link
  • Documenting
  • Testing

USER STORY: Contact Link

EPIC: Contact

As a user, I want to have a possibility to contact a developer, so that I can provide my feedback

ACCEPTANCE CRITERIA

  • Any user can click on contact link, either in menu or footer.
  • The link will open contact form

** TASKS**

  • Create Model
  • Add Model in Admin Panel
  • Create Form
  • Add URL and Links
  • Testing
  • Document

USER STORY: Base Template

EPIC: General Information

As a developer, I need to create the base.html page and structure so that other pages can reuse the layout.

ACCEPTANCE CRITERIA

  • The base template is created.

** TASKS**

  • Create base template with nav and footer as placeholder.

USER STORY: Footer

EPIC: General Information

As a user, I want to know the social media links, so that I can follow the latest update

ACCEPTANCE CRITERIA

  • The webpage contains footer with the links to social media

TASKS

  • Create and style footer
  • Add social media links
  • Documentation
  • Testing

USER STORY: Book card detailed

EPIC: Book View

As a user I want see the details about the book, so that I can make a better picture about the book and its journey

ACCEPTANCE CRITERIA

  • There is additional information displayed such as cities, countries, comments in each book card

** TASKS**

  • List all countries, cities, and comments

USER STORY: Books ordering

EPIC: Registered User

As a user, I want to see the latest registered books, so that I am always up to date.

ACCEPTANCE CRITERIA

  • The books in the Books Section are displayed in descending order by the register date

** TASKS**

  • Specify the order by register date

USER STORY: Books overview

EPIC: Registered User

As a user, I want to see all books which are registered by me or others.

ACCEPTANCE CRITERIA

  • There is Books Section containing all registered books. Each book is displayed as card.
  • The all books can see only logged in users, not registered users can view only some.

** TASKS**

  • Create and style Book template
  • Create view
  • Create url
  • Add link
  • Document
  • Testing
  • [ ]

USER STORY: Book Data Model

EPIC: Book registration

As a developer, I want to have a full control of registered books, so that I can control the provided information

ACCEPTANCE CRITERIA

  • There is a database table called registered book
  • The admin sees it in the admin panel

** TASKS**

  • Create model
  • Documentation
  • Testing

USER STORY: Error 403

EPIC: Error Pages

As a developer, I need to implement a 403 error page to redirect unauthorized users to so that I can secure my views

ACCEPTANCE CRITERIA

  • There is 403.html with explained text for unauthorized actions

** TASKS**

  • Create and Style 403.html
  • Testing
  • Documenting
  • [ ]

USER STORY: Basic Homepage

EPIC: General Information

As a (first) user, I want to read some information on website, so that I can make a good picture about the platform.

ACCEPTANCE CRITERIA

  • The homepage contains Hero Section with the name of platform or slogan.

TASKS

  • Create and style Hero Section
  • Documentation
  • Testing

BUG: Unique constraint in BookContribution Model

A unique constraint on user, book field in BookContribution field causes problems when calling updateView. A user cannot edit the contribution, the error Page is shown, saying that the user has already contributed to the book.
Related to #23

USER STORY: Initial Setup

EPIC: Preparation & Planning

As a side owner, I want to setup my workspace so that I can develop and deploy the web app easily.

ACCEPTANCE CRITERIA

  • The initial packages are installed to run Django project.
  • The web app was deployed on Heroku with SQL Elephant as production database.

** TASKS**

  • Installation of all packages
  • Create and setup Django app
  • Setup Elephant SQL
  • Set up Environmental variables
  • Setup Heroku
  • First deployment
  • Documentation

USER STORY: Drop Down in Member Area

EPIC: Registered User

As a user I want to have all navigation links specific for registered user under Member Area, so that I have better overview.

ACCEPTANCE CRITERIA

  • There is a dropdown when clicking on Member Area for registered users.

TASKS

  • Add dropdown
  • Restructure menu for registered and unregistered users

USER STORY: Edit Book

EPIC: Book registration

As a user, I want to have the possibility to edit the provided information about my books anytime, so that I can have a full control of what I published.

ACCEPTANCE CRITERIA

  • Only registered users can edit the information about his/her registered book. Nobody else can do it.
  • There is a button on a book card which enables to edit the information.

** TASKS**

  • Create Edit Book template
  • Create view
  • Create url
  • Add link and button
  • Documentation
  • Testing

USER STORY: Book Key Generator

EPIC: Book registration

As a developer, I want to generate a unique code so that the book can be easily identified.

ACCEPTANCE CRITERIA

  • There is a logic which generates a unique and secured code for the book.
  • There is a page which displays a unique code after a book is registered.

TASKS

  • Add a key into the book model
  • Create a function
  • Create view
  • Add url
  • Testing
  • Documenting

USER STORY: Book registration

EPIC: Book Registration

As a user, I want to add a new book, so that it can start its journey.

ACCEPTANCE CRITERIA

  • The registered and logged in user can add new book
  • The unregistered user cannot register a book.

TASKS

  • Create and style New Book template
  • Create View (User input validation)
  • Create url
  • Add link
  • Documentation
  • Testing

USER STORY: Error 500

EPIC: Error Pages

As a developer, I need to implement a 500 error page to alert users when an internal server error occurs.

ACCEPTANCE CRITERIA

  • There is 505.html with explained text for internal errors

** TASKS**

  • Create and style 505.html
  • Documentation

USER STORY: Display current location

EPIC: Book Contribution

As a registered user I want to know where the book is so that I can find it if it is nearby

ACCEPTANCE CRITERIA

  • There is an information in the Book Page where the book is.

** TASKS**

  • Put information about current location in Book Page

USER STORY: Manual Testing

EPIC: Documentation and Testing

As a developer, I want to test the webpage, so that the webpage reacts appropriately on users request.

ACCEPTANCE CRITERIA

  • Testing is completed and documented

** TASKS**

  • Browser compatibility
  • Responsiveness
  • User Stories
  • Functionality

USER STORY: Deleting Book

EPIC: Book registration

As a user, I want to have the possibility to delete the registered book, so that I can stop the book journey anytime I want

ACCEPTANCE CRITERIA

  • Only registered users can delete his/her registered book. Nobody else can do it
  • There is a button on a book card which enables to delete the information

** ASKS**

  • Create Delete Book template
  • Create view
  • Create url
  • Add link and button
  • Documentation
  • Testing
  • [ ]

USER STORY: Contribution Data Model

EPIC: Book contribution

As a developer, I want to have a full control of book contributions so that I can control the provided information.

ACCEPTANCE CRITERIA

  • There is a database table called contribution which can be manage via admin panel

** TASKS**

  • Create mode
  • Documentation
  • Testing

USER STORY: Edit Contribution

EPIC: Book contribution

As a user, I want to edit my contribution, so that I can change or correct the provided information.

ACCEPTANCE CRITERIA

  • There is a button which redirects the user to the page where he/she can edit contribution information on the contributed book. Only user with status contributed can do it, nobody else.

** TASKS**

  • Create Edit Contribution template
  • Create view
  • Create url
  • Add link
  • Documentation
  • Testing

USER STORY: Book rating

EPIC: Registered User

As a user, I want to rate the book, so that I can give others a better impression about the book.

ACCEPTANCE CRITERIA

  • The user can give 1-3 stars to each book. The overall rating is displayed on the card book as the average.

** TASKS**

  • Create and style stars
  • Build the logic in backend

USER STORY: User Registration

EPIC: User Registration

The developer has an access to all users, so that he can modify or delete them via admin panel

ACCEPTANCE CRITERIA

  • The developer has an access to all users and can modify or delete them via admin panel

** TASKS**

  • Create user model

USER STORY: Planning

EPIC: Preparation & Planning

As a side owner, I want to plan the project carefully, so that the web app meets MVP.

ACCEPTANCE CRITERIA

  • A GitHub project is created with all user stories and corresponding prioritization.
  • A first mentor session was conducted.

** TASKS**

  • Create Project, Epics, User Stories, Labels, Iteration 1
  • Prioritize
  • Organized and prepare for the first mentor session
  • Create basic structure of README

USER STORY: Book Registration Go Back

EPIC: Book registration

As a user, I want to have the possibility to go back during the book registration step, so that I can change or read the provided details.

ACCEPTANCE CRITERIA

  • There buttons Go Back when registering the book

TASKS

  • Create buttons

USER STORY: Limited Access

EPIC: General Information

As a developer, I want that the first (not registered) user has limited access to the webpage content, so that I can encourage them to register

ACCEPTANCE CRITERIA

  • The unregistered user can only see How it works, latest four books in Books Page

TASKS

  • implement the to-be-registered requirement for other pages to be displayed (add jinja if statements and LoginRequiredMixin), Maybe: Add a new ListView, which will be only for visitors with limited access (using get_queryset() )
  • Documentation
  • Testing

USER STORY: Navigation Menu

EPIC: General Information

As a user, I want to easily navigate through the web pages, so that I can find the information fast and intuitively.

ACCEPTANCE CRITERIA

  • The webpage contains navigation menu.
  • The navigation menu is responsive, i.e. hamburger menu for mobile devices

** TASKS**

  • Create and style navigation menu
  • Add Links: Member Area, How it works, About, Contact
  • Add Logo
  • Documentation
  • Testing

USER STORY: Documentation

EPIC: Documentation and Testing

As a developer, I want to document the development of the webpage.

ACCEPTANCE CRITERIA

  • README File is complete

** TASKS**

  • finish documentation

USER STORY: Error 404

EPIC: Error Pages

As a developer, I need to implement a 404 error page to alert users when they have accessed a page that doesn't exist

ACCEPTANCE CRITERIA

  • There is 404.html with explained text for invalid url

** TASKS**

  • Create and Style 404.html
  • Testing
  • Documenting

USER STORY: Contribution

EPIC: Book Contribution

As a user, I want to contribute the registered book, so that I can share my state with others.

ACCEPTANCE CRITERIA

  • There is a button contribute which redirected the user to insert key section.
  • After inserting the correct key, a registered user can contribute to the book journey.

** TASKS**

  • Create Contribute Book Form
  • Create Contribute Book template
  • Create view
  • Create url
  • Add link
  • Documentation
  • Testing

USER STORY: Message after login

EPIC: User Registration

As a user, I want to be notified when I logged in so that I know my login was successful.

ACCEPTANCE CRITERIA

  • The user is informed with a short message when he/she logged in.

TASKS

  • add messages.success in valid_form for user authentication

USER STORY: Edit User

EPIC: User Registration

As a user, I want to edit my user account information, so that I can change some of it.

ACCEPTANCE CRITERIA

  • The registered and logged in user can edit the profile information.
  • The unregistered/unlogged user cannot do it.

** TASKS**

  • Create Edit Profile template
  • Create view
  • Create url
  • Add link
  • Documentation
  • Testing

USER STORY: User Login

EPIC: User Registration

As a user, I want to login with my username, so that I don't have to provide my private information.

ACCEPTANCE CRITERIA

  • User can login with username via navigation menu

TASKS

  • Create and style login template
  • Add links in navigation menu
  • Documentation
  • Testing

USER STORY: Books with owner status

EPIC:Registered User

As a user, I want to easily see my registered, contributed and all books, so that I have a good overview

ACCEPTANCE CRITERIA

  • There are buttons in the books page which can automatically filter all books, registered books, contributed book.
  • This page can only see logged in users.

** TASKS**

  • Create buttons
  • Create filter function

USER STORY: Code Validation

EPIC: Documentation and Testing

As a developer, I want to validate the code, so that it meets standard coding rules.

ACCEPTANCE CRITERIA

  • The web page was validated.
  • The validation is documented

TASKS

  • HTML Validation
  • CSS Validation
  • Python Validation
  • Accessiblity
  • Litghthouse
  • JS Validation

USER STORY: Extended Homepage

EPIC: General Information

As a first user, I want to read general information about the procedure.

ACCEPTANCE CRITERIA

  • Homepage contains How it works Section

** TASKS**

  • Add How it works template
  • Add view and url
  • Documentation
  • Testing

USER STORY: User Registration

EPIC: User Registration

As a user, I want to register with a username so that I can have a full access to the webpage content and be part of the community.

ACCEPTANCE CRITERIA

  • The user can registered with username via navigation menu
  • The registration is possible via button link in Hero Section

TASKS

  • Create and style registration template
  • Add Links in navigation menu and button
  • Documentation
  • Testing

USER STORY: Cities

EPIC: Book Contribution

As a want to find my city in the Contribution Form so that I can fill it.

ACCEPTANCE CRITERIA

  • In the dropdown, there is a large number of cities.
  • There is a prefilled table which can be manage via admin panel

TASKS

  • Find list of European cities
  • Connect the list with the Contribution Form.

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.