1515)
1616
1717routes = {
18- "demo" : {"graph_theory" : "/demo/graph-theory" },
19- "books_shelves" : {
20- "books_shelves_0" : "/books_shelves/books_shelves_0" ,
21- "books_shelves_1" : "/books_shelves/books_shelves_1" ,
22- "books_shelves_2" : "/books_shelves/books_shelves_2" ,
23- "books_shelves_3" : "/books_shelves/books_shelves_3" ,
18+ 'books_shelves' : {
19+ "books_shelves_0" : {
20+ 'display_name' : "Book Shelves" ,
21+ 'route' : "/books_shelves/books_shelves_0"
22+ },
23+ "books_shelves_1" : {
24+ 'display_name' : "Book Shelve" ,
25+ 'route' : "/books_shelves/books_shelves_1"
26+ },
27+ "books_shelves_2" : {
28+ 'display_name' : "Book Shelve" ,
29+ 'route' : "/books_shelves/books_shelves_2"
30+ },
31+ "books_shelves_3" : {
32+ 'display_name' : "Book Shelve" ,
33+ 'route' : "/books_shelves/books_shelves_3"
34+ },
2435 },
25- "comp2804" : {
26- "bitstrings-of-length" : "/comp2804/bitstrings-of-length" ,
27- "set-theory-question" : "/comp2804/set-theory" ,
28- "num-of-functions" : "/comp2804/num-of-functions" ,
36+ 'demo' : {
37+ 'graph_theory' : {
38+ 'display_name' : "Graph Theory" ,
39+ 'route' : "/demo/graph-theory"
40+ }
2941 },
42+ 'comp2804' : {
43+ 'bitstrings-of-length' : {
44+ 'display_name' : "Bitstrings of Length" ,
45+ 'route' : "/comp2804/bitstrings-of-length"
46+ },
47+ 'set-theory-question' : {
48+ 'display_name' : "Set Theory" ,
49+ 'route' : "/comp2804/set-theory"
50+ },
51+ 'num-of-functions' : {
52+ 'display_name' : "Number of Functions" ,
53+ 'route' : "/comp2804/num-of-functions"
54+ }
55+ }
3056}
3157
3258
@@ -35,47 +61,44 @@ async def get_generators():
3561 return routes
3662
3763
38- @router .get (routes [" demo" ][ " graph_theory" ])
64+ @router .get (routes [' demo' ][ ' graph_theory' ][ 'route' ])
3965async def generate_graph_theory_question ():
4066 return graph_theory_question_generator .call ()
4167
4268
4369############___Books_Shelves_Questions___############
44- @router .get (routes ["books_shelves" ]["books_shelves_0" ])
70+ @router .get (routes ["books_shelves" ]["books_shelves_0" ][ 'route' ] )
4571async def generate_books_shelves_0_question ():
4672 return books_shelves_0_generator .call ()
4773
4874
49- @router .get (routes ["books_shelves" ]["books_shelves_1" ])
75+ @router .get (routes ["books_shelves" ]["books_shelves_1" ][ 'route' ] )
5076async def generate_books_shelves_1_question ():
5177 return books_shelves_1_generator .call ()
5278
5379
54- @router .get (routes ["books_shelves" ]["books_shelves_2" ])
80+ @router .get (routes ["books_shelves" ]["books_shelves_2" ][ 'route' ] )
5581async def generate_books_shelves_2_question ():
5682 return books_shelves_2_generator .call ()
5783
5884
59- @router .get (routes ["books_shelves" ]["books_shelves_3" ])
85+ @router .get (routes ["books_shelves" ]["books_shelves_3" ][ 'route' ] )
6086async def generate_books_shelves_3_question ():
6187 return books_shelves_3_generator .call ()
6288
6389
64- ######################################################
65-
66-
67- @router .get (routes ["comp2804" ]["set-theory-question" ])
90+ @router .get (routes ['comp2804' ]['set-theory-question' ]['route' ])
6891async def generate_set_theory_question ():
6992 return set_theory_question_generator .call ()
7093
7194
72- @router .get (routes [" comp2804" ][ " num-of-functions" ])
95+ @router .get (routes [' comp2804' ][ ' num-of-functions' ][ 'route' ])
7396async def generate_num_of_functions_question (
7497 lower_range : int = 0 , upper_range : int = 10
7598):
7699 return num_of_functions_generator .call (lower_range , upper_range )
77100
78101
79- @router .get (routes [" comp2804" ][ " bitstrings-of-length" ])
102+ @router .get (routes [' comp2804' ][ ' bitstrings-of-length' ][ 'route' ])
80103async def bitstrings_of_length_question ():
81104 return bitstrings_of_length_generator .call ()
0 commit comments