-
Notifications
You must be signed in to change notification settings - Fork 18
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
Conversation
@@ -1,14 +0,0 @@ | |||
FROM python:3.9.5 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>© {{ year }} - Library Management System - Harshit Soora</p> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this changes ?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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!
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 |
Hello Aditya
In Library/views.py
<#69 (comment)>
:
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) \
What does this changes ?
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
Thanks and Regards
…On Fri, May 28, 2021 at 4:24 PM Kumar Aditya ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In LICENSE
<#69 (comment)>
:
> @@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
LICENSE must be present
------------------------------
In Library/models.py
<#69 (comment)>
:
> @@ -1,6 +1,6 @@
from flask_login import UserMixin
-from Library_Management_System import db
+from Library import db
Any reason to rename the directory structure, the earlier one was more
clear
------------------------------
In Library/templates/admin_layout.html
<#69 (comment)>
:
> @@ -16,7 +16,9 @@
</head>
<body
- style="font-family: 'PT Sans', sans-serif;background-image: url(https://www.pixelstalk.net/wp-content/uploads/2016/08/Library-Desktop-Wallpaper-768x480.jpg);background-size: cover;">
+ style="font-family: 'PT Sans', sans-serif;">
+ <!-- background-image: url(https://www.pixelstalk.net/wp-content/uploads/2016/08/Library-Desktop-Wallpaper-768x480.jpg) -->
You can better remove the background image
------------------------------
In Library/templates/admin_layout.html
<#69 (comment)>
:
> {% block content %}{% endblock %}
- <hr style="border: 5px solid white;border-radius: 5px;" />
- <footer>
- <p>© {{ year }} - Library Management System - Kumar Aditya</p>
- </footer>
+ <div valign="bottom">
+ <hr style="border: 5px solid grey;border-radius: 5px;" />
+ <footer>
+ <p>© {{ year }} - Library Management System - Harshit Soora</p>
You can add your name on your repo, let it be intact for this repo
------------------------------
In Library/templates/register.html
<#69 (comment)>
:
> @@ -35,6 +38,18 @@ <h1 class='display-4 text-center'>Register</h1><br>
</div>
</div>
</div>
+
+ <div class="input-group mb-3">
This is not safe, it should be implemented using a cli
------------------------------
In Library/templates/show_students.html
<#69 (comment)>
:
> +
+{% if student %}
+
+<div class=' text-center container-fluid'>
+ <h1 class='display-4 text-center'>Students</h1><br>
+
+ <table class="table table-dark table-bordered">
+ <thead>
+ <th scope="col">Roll No</th>
+ <th scope="col">Name</th>
+ <th scope="col">Email</th>
+ </thead>
+ <tbody>
+ {% for stu in student %}
+ <tr>
+ <td scope='row'>{{ stu.id }}</td>
Naming it students would be better
------------------------------
In Library/views.py
<#69 (comment)>
:
> 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) \
What does this changes ?
------------------------------
In Library/views.py
<#69 (comment)>
:
> return render_template("admin_dashboard.html", year=datetime.now().year)
+class ShowStudentView(MethodView):
+ def get(self):
+ students = User.query.filter_by(admin = False).all()
+ print(students)
When you are finished implementing remove all the print statements
------------------------------
In Procfile
<#69 (comment)>
:
> @@ -1 +0,0 @@
-web: gunicorn wsgi
This is required to deploy on heroku
------------------------------
In tests/test_view.py
<#69 (comment)>
:
> @@ -1,120 +0,0 @@
-from config import TestConfig
Don't remove the tests, instead you should add test for your change!
—
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/AOPKEJXZBNJ7HPMVUZ26HRLTP5Y7JANCNFSM45UC7KDA>
.
--
Harshit Soora
Final Year
Department of Computer Science and Engineering
IIT Kharagpur
|
Okay @harshit-soora when you are done implementing then you can request for review from github and I would review, Thanks for your contribution. |
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