diff --git a/app.py b/app.py
index a468c2a..87b8aa7 100644
--- a/app.py
+++ b/app.py
@@ -22,6 +22,7 @@ def index(month=None):
""" Default / Home page of the application / tool. """
if month == None:
month = getCurrentMonth() # make month format human-readable
+ monthID = month
stats = getStatsFromDb(month)
submitters = getSubmitters(stats)
@@ -29,13 +30,13 @@ def index(month=None):
formatted = datetime.strptime(month, ("%Y-%m"))
if dbHasMonth(month) == True:
return render_template('index.html', stats = stats,
- month = formatted.strftime("%B, %Y"), submitters = submitters)
+ month = formatted.strftime("%B, %Y"), submitters = submitters, monthID = monthID)
else:
return render_template('loader.html', month = month, formatted = formatted.strftime("%B, %Y"))
-@app.route('/submitter/')
-def submitter(username):
+@app.route('/submitter//')
+def submitterPatchesByMonth(username, month):
""" REST endpoint for list of submitter patche(s). """
Submitter = Query()
db = getDb()
@@ -43,7 +44,7 @@ def submitter(username):
# filter by username
patches = db.search(Submitter.username == username)
- return render_template('submitter.html', patches = patches)
+ return render_template('submitter.html', patches = patches, monthID = month)
def getParticipants():
diff --git a/install-deps.sh b/install-deps.sh
index e34aa30..5206378 100755
--- a/install-deps.sh
+++ b/install-deps.sh
@@ -3,11 +3,15 @@
# Author: Derick Alangi
# Description: Check system and install deps
-# Checks if Python 3 is installed before executing
+# Checks if Python 3 and pip is installed before executing
if command -v python3 &>/dev/null; then
- echo Python 3 is installed, installing dependencies...
+ echo -e "\nPython 3 is installed, checking pip..."
+ echo -e "pip is installed, now installing dependencies...\n"
else
- echo Python 3 is not installed, aborting...
+ echo "Python 3 is not installed, aborting..."
+ exit 1
fi
pip install -r requirements.txt
+
+echo -e "\nYou can run the application now!"
diff --git a/templates/index.html b/templates/index.html
index 64f4a34..ab90176 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -14,7 +14,7 @@ {{submitter[0]['name']}}
{{submitter[0]['country']}}
-
+
View patches
diff --git a/templates/submitter.html b/templates/submitter.html
index 6c0eadb..74cf1bb 100644
--- a/templates/submitter.html
+++ b/templates/submitter.html
@@ -14,13 +14,15 @@ Stats for {{patches[0]['name']}}
{% for patch in patches %}
-
- {{loop.index}} |
- {{patch.project}} |
- {{patch.created|datetimeformat}} |
- {{patch.updated|datetimeformat}} |
- {{patch.status}} |
-
+ {% if monthID in patch.created %}
+
+ {{loop.index}} |
+ {{patch.project}} |
+ {{patch.created|datetimeformat}} |
+ {{patch.updated|datetimeformat}} |
+ {{patch.status}} |
+
+ {% endif %}
{% endfor %}