Skip to content

Commit

Permalink
view registered students
Browse files Browse the repository at this point in the history
  • Loading branch information
divya-rathi committed May 1, 2020
1 parent 872ae72 commit 54f9559
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 25 deletions.
39 changes: 24 additions & 15 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def login():
global active
active = username
if active == 'admin@gmail.com': ##admin
applications = firebase.get('/application', None)
return render_template('home_admin.html', u = active, stream = cutoff, form = applications)
else:
print("logged")
Expand Down
2 changes: 1 addition & 1 deletion firebase_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#Firebase
from firebase import firebase
firebase = firebase.FirebaseApplication('https://cams-da440.firebaseio.com/', None)
credentials = firebase.get('/credentials', None)
credentials = firebase.get('/application', None)
print(credentials)
#db.child("credentials").child("CAMS0000").push({"EmailId":"admin@gmail.com" , "Password": "admin@123"})
# userId = "CAMS"
Expand Down
21 changes: 12 additions & 9 deletions templates/home_admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,19 +292,22 @@ <h2 class="greenh2">View Students who applied for admission</h2>
<th scope="col">Stream</th>
<th scope="col">Marks scored</th>
<th scope="col">Cut-Off for the Stream</th>
<th scope="col">Applied for Admission</th>
<th scope="col">Accept/Remove</th>
</tr>

{% for k,v in form.items() %}
<tr>
<td scope="row"></td>
<td scope="row"></td>
<td scope="row"></td>
<td scope="row"></td>
<td scope="row"></td>
<td scope="row"></td>
<td scope="row"></td>
<td scope="row">{{k}}</td>
<td scope="row">{{v['EmailId']}}</td>
<td class="row">{{v['BranchChosen']}}</td>
<td class="row">{{v['12thPercentage']}}</td>
{% for k1, v1 in stream.items() %}
{% if k1 == v['BranchChosen'] %}
<td class="row">{{v1['Current']}}</td>
{% endif %}
{% endfor %}
<td class="row"><a>Accept</a> <a>Remove</a></td>
</tr>
{% endfor %}

</table>
</div>
Expand Down

0 comments on commit 54f9559

Please sign in to comment.