Skip to content
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

Removed All Option and all projects of year shown if Nothing Selected in Technology #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def home():
result = collection.find({"Year":year})
org = []

if('all' not in tags):
#if('all' not in tags):
if tags: #If tags not empty, use the list. Else, take all as default
for tag in tags:
for res in result:
if(tag in res['Tags']):
Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
DEBUG = True
FLASK_ENV = 'development'
SECRET_KEY = environ.get('SECRET_KEY')
MONGO_URI = os.getenv('MONGO_URI')
MONGO_URI = os.getenv('MONGO_URI')
2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
load_dotenv(dotenv_path=env_path)

import os
MONGO_URI = os.getenv("MONGO_URI")
MONGO_URI = os.getenv("MONGO_URI")
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<select name="tags" id="selectpicker multiselect1" class="selectpicker" data-live-search="true"
multiple="multiple">

<option value="all">all</option>
<!-- <option value="all">all</option> -->
{% for tag in tags %}
<option value={{tag}}>{{tag}}</option>
{% endfor %}
Expand Down Expand Up @@ -104,4 +104,4 @@ <h5 class="card-title">{{item.Name}}</h5>
</div>
</body>

</html>
</html>