Skip to content

This commit will resolve all issues #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

This commit will resolve all issues #69

wants to merge 2 commits into from

Conversation

harshit-soora
Copy link

@harshit-soora harshit-soora commented May 27, 2021

Fixes #68
This commit is for the issue that I have opened

Please follow the Pictures folder in my repo here to see the new changes

@kumaraditya303 kumaraditya303 self-assigned this May 28, 2021
@@ -1,14 +0,0 @@
FROM python:3.9.5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove Docker Image it is useful for deployment

@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LICENSE must be present

@@ -1,6 +1,6 @@
from flask_login import UserMixin

from Library_Management_System import db
from Library import db
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to rename the directory structure, the earlier one was more clear

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for that, you can keep the original

It was just the project folder have same name as a folder inside(that have most of code) it so I felt it a bit confusing every time I have to keep track which folder I am in actually

<div valign="bottom">
<hr style="border: 5px solid grey;border-radius: 5px;" />
<footer>
<p>&copy; {{ year }} - Library Management System - Harshit Soora</p>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add your name on your repo, let it be intact for this repo

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh sorry I should have removed that before committing

@@ -35,6 +38,18 @@ <h1 class='display-4 text-center'>Register</h1><br>
</div>
</div>
</div>

<div class="input-group mb-3">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not safe, it should be implemented using a cli

flash("Invalid Credentials!")
return redirect(url_for("main.admin"))


@main.route("/dashboard", methods=["GET"])
@login_required
def dashboard():
copies = Copy.query.filter_by(issued_by=current_user.id).all()
copies = db.session.query(Book.id, Book.name, Book.author, Copy.date_issued, Copy.date_return) \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this changes ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue book page don't show the Author name and Book name, so we need to join both the tables from Book and Copy, where we join the two tables by book_id and search by user id

class ShowStudentView(MethodView):
def get(self):
students = User.query.filter_by(admin = False).all()
print(students)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you are finished implementing remove all the print statements

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -1 +0,0 @@
web: gunicorn wsgi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required to deploy on heroku

@@ -1,120 +0,0 @@
from config import TestConfig
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the tests, instead you should add test for your change!

@harshit-soora
Copy link
Author

harshit-soora commented May 28, 2021 via email

@kumaraditya303
Copy link
Owner

kumaraditya303 commented May 28, 2021

Hey Aditya I just need the project to host it locally from my machine so I skipped the docker and procfile Thanks and Regards

On Fri, May 28, 2021 at 4:18 PM Kumar Aditya @.> wrote: @.* commented on this pull request. ------------------------------ In Dockerfile <#69 (comment)> : > @@ -1,14 +0,0 @@ -FROM python:3.9.5 Don't remove Docker Image it is useful for deployment — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#69 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPKEJR3JCSAXNO6RKNON33TP5YIRANCNFSM45UC7KDA .
-- Harshit Soora Final Year Department of Computer Science and Engineering IIT Kharagpur

Okay, then you can just ignore those and host it locally without docker, there isn't need to remove Dockerfile

@harshit-soora
Copy link
Author

harshit-soora commented May 28, 2021 via email

@kumaraditya303
Copy link
Owner

Okay @harshit-soora when you are done implementing then you can request for review from github and I would review, Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minor Bugs and Admin Toggle Feature
2 participants