I'm relatively new to Django and web development in general but have decent 
coding experience.
My questions are primarily related to how to work with models to create a 
ranking system.
Some background:
I'm an officer for an academic school team and am trying to implement a 
ranking system that determines who competes in meets. We essentially take 
tests (called TSTs) of varying lengths most weeks, obtain indices (index 
singular) for each test based on relative performance to each other, and 
for each meet our final index is a weighted average of our preceding TST 
indices. The computation is further complicated for one particular meet, in 
which each TST is split into different sub-tests, if you would. The scores 
for each sub-test will be inputted separately, with a weighted sum of the 
sub-tests contributing to a final score which is then used for computing 
indices for that particular TST. The final indices are still a weighted 
average of the preceding TST indices. Lastly, for each meet we have a 
specified number of "drops," in which the lowest n indices are not included 
in the final weighted average.
The score inputting will be done through a form for each TST/sub-test, the 
computation will likely be done in the views, staff members should be able 
to edit scores after the fact, and regular users be able to view their 
individual scores and the final rankings for everyone.
My confusion is in what models I should use. I'm thinking each User can 
have a JSONField as a dictionary mapping each TST to an score and another 
JSONField as a dictionary mapping each TST to an index, with index 
computations done after all scores have been inputted (for example, having 
a button that computes all indices).
I think there should also be a Contest model saying how many questions a 
particular TST has.
The form for inputting scores should have:
A typable drop-down menu to select the TST (with n questions)
A typable drop-down menu to select the user based on their username
A typable integer field to input the total score for the user, and
n typable integer fields to input the points the user received from each 
question
After submission, the scores should be stored and the form should go to the 
same form with the TST menu filled in.
After all submission are complete, there should be an "update" button that 
computes and assigned indices to each user based on their score. If they 
didn't participate in the TST (meaning nothing was filled in for them), 
their score and index corresponding to the TST should be 0.

The main problems with implementation are:
How to split the unique meet's TSTs into submission for each sub-test, and 
then recombine them into a final score.
Two of the sub-tests are team-based, meaning each user attending should 
also be assigned to a team. Will this require a new model?
Whether a new model, Rank, would be needed to perform the backend 
computation for each user.

I haven't seen anything similar to this in my research before asking for 
help here. Advice and/or suggestions would be great, preferably with code 
snippets! (I'm still not completely familiar with terminology, so seeing 
code snippets would help a lot).

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b34d79f8-cd0e-45b2-a429-6dfa4e7fd081%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to