Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. from django.views.generic.base import TemplateView
  3.  
  4.  
  5. class IndexView(TemplateView):
  6. template_name = "index.html"
  7.  
  8. def get_context_data(self, **kwargs):
  9. context = super(IndexView, self).get_context_data(**kwargs)
  10. context.update(
  11. {
  12. 'students_statistics': [
  13. {
  14. 'id': 1,
  15. 'fio': 'Someone',
  16. 'timp': 2,
  17. 'eis': 3,
  18. 'philosophy': 4,
  19. 'english': 5,
  20. 'sport': 2.3,
  21. 'average': 2.3,
  22. }
  23. ],
  24. 'excellent_students': 'Student A, Student B',
  25. 'bad_students': 'Student C, Student D'
  26. }
  27. )
  28. return context
  29.  
  30.  
  31. class Student:
  32.  
  33. pass
  34.  
  35.  
  36. class Statistics:
  37. # student_id, [Scores]
  38. pass
  39.  
  40.  
  41. class Subject:
  42.  
  43. pass
  44.  
  45.  
  46. class Score:
  47.  
  48. # Subject, Student, value
  49. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement