Skip to content

Commit

Permalink
fix search bar bug
Browse files Browse the repository at this point in the history
connect mongoDB server
  • Loading branch information
Jiankun0830 committed Nov 19, 2019
1 parent 8b47155 commit f5c052d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions mongoService.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

class Mg:
def __init__(self):
self.con = MongoClient("mongodb://localhost:27017/")["book_metadata"]["metadata"]
self.log = MongoClient("mongodb://localhost:27017/")["book_log"]["log"]
self.con = MongoClient("mongodb://db_grp7_test:[email protected]/book_log")["book_metadata"]["metadata"]
self.log = MongoClient("mongodb://db_grp7_test:[email protected]/book_log")["book_log"]["log"]
# self.con = MongoClient("mongodb://localhost:27017/")["book_metadata"]["metadata"]
# self.log = MongoClient("mongodb://localhost:27017/")["book_log"]["log"]

def get_bestsellers(self):
a=self.con.find({"salesRank":{'$exists': 1}})
Expand Down
12 changes: 6 additions & 6 deletions templates/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='stars.css') }}">
<!-- <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='stars.css') }}"> -->
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='review.css') }}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
Expand Down Expand Up @@ -55,15 +55,15 @@ <h6 class="card-title"> Overall Rating </h6>
<form action="{{ url_for('info', asin=book_info.asin) }}" method="post">
<fieldset>
<input type="radio" id="st1" name="rating" value="5" checked="checked" />
<label for="st1"></label>
<label for="st1">1 </label>
<input type="radio" id="st2" name="rating" value="4" />
<label for="st2"></label>
<label for="st2">2 </label>
<input type="radio" id="st3" name="rating" value="3" />
<label for="st3"></label>
<label for="st3">3 </label>
<input type="radio" id="st4" name="rating" value="2" />
<label for="st4"></label>
<label for="st4">4 </label>
<input type="radio" id="st5" name="rating" value="1" />
<label for="st5"></label>
<label for="st5">5 </label>
</fieldset>
<textarea class="form-control" name="title" rows="1" placeholder="Title" required maxlength="20"></textarea>
<textarea class="form-control" name="comment" rows="3" placeholder="Comment here ..." required maxlength="150"></textarea>
Expand Down

0 comments on commit f5c052d

Please sign in to comment.