models.py | úprava funkce verejne u ročníku

This commit is contained in:
Aneta Pokorná 2020-11-10 22:02:21 +01:00
parent 45a4c8143a
commit a7b1a2b9d2
17 changed files with 1397 additions and 13 deletions

View file

@ -0,0 +1 @@
,anet,erebus,25.03.2020 22:21,file:///home/anet/.config/libreoffice/4;

BIN
seminar/lisak.pdf Normal file

Binary file not shown.

View file

@ -743,12 +743,17 @@ class Problem(SeminarModelBase,PolymorphicModel):
return '<Není zadaný>'
def verejne(self):
# FIXME: Tohle se liší podle typu problému, má se udělat polymorfně.
# Zatím je tu jen dummy fail-safe default: nic není veřejné.
# Doporučené řešení: dělat tohle podle stavu problému a veřejnosti čísla, ve kterém je
return False
# FIXME: Tohle je blbost
return (self.cislo_zadani and self.cislo_zadani.verejne())
# aktuálně podle stavu problému
# FIXME pro některé problémy možná chceme override
stav_verejny = False
if self.stav == 'zadany' or self.stav == 'vyreseny':
stav_verejny = True
cislo_verejne = False
if (self.cislo_zadani and self.cislo_zadani.verejne()):
cislo_verejne = True
return (stav_verejny and cislo_verejne)
verejne.boolean = True
def verejne_url(self):

View file

@ -0,0 +1,548 @@
ncalls tottime percall cumtime percall filename:lineno(function)
214448 0.097 0.000 0.325 0.000 <frozen importlib._bootstrap>:1009(_handle_fromlist)
1 0.000 0.000 21.087 21.087 <string>:1(<module>)
193106 0.083 0.000 0.147 0.000 <string>:1(__new__)
115 0.000 0.000 0.000 0.000 __init__.py:1001(get_internal_type)
1130 0.000 0.000 0.000 0.000 __init__.py:1078(get_internal_type)
444 0.000 0.000 0.000 0.000 __init__.py:1219(get_internal_type)
14 0.000 0.000 0.000 0.000 __init__.py:133(__init__)
8 0.000 0.000 0.000 0.000 __init__.py:1351(get_internal_type)
347 0.000 0.000 0.001 0.000 __init__.py:1361(debug)
6 0.000 0.000 0.000 0.000 __init__.py:1551(get_internal_type)
347 0.000 0.000 0.000 0.000 __init__.py:1619(isEnabledFor)
1 0.000 0.000 0.000 0.000 __init__.py:1821(get_prep_value)
238 0.000 0.000 0.000 0.000 __init__.py:1827(get_internal_type)
345 0.000 0.000 0.000 0.000 __init__.py:2083(get_internal_type)
19646 0.008 0.000 0.039 0.000 __init__.py:235(localize)
42417 0.138 0.000 0.311 0.000 __init__.py:376(get_col)
3452 0.000 0.000 0.000 0.000 __init__.py:390(select_format)
45869 0.037 0.000 0.047 0.000 __init__.py:495(__eq__)
19349 0.010 0.000 0.013 0.000 __init__.py:507(__hash__)
39066 0.200 0.000 0.241 0.000 __init__.py:548(__init__)
78132 0.123 0.000 0.240 0.000 __init__.py:617(update)
346 0.001 0.000 0.002 0.000 __init__.py:634(db_type_parameters)
346 0.001 0.000 0.003 0.000 __init__.py:649(db_type)
4055 0.001 0.000 0.002 0.000 __init__.py:706(get_db_converters)
38769 0.012 0.000 0.012 0.000 __init__.py:711(unique)
18 0.000 0.000 0.000 0.000 __init__.py:768(get_internal_type)
154911 0.046 0.000 0.070 0.000 __init__.py:775(get_prep_value)
1 0.000 0.000 0.000 0.000 __init__.py:781(get_db_prep_value)
1622 0.000 0.000 0.000 0.000 __init__.py:940(get_internal_type)
10 0.000 0.000 0.000 0.000 __init__.py:955(rel_db_type)
58321 0.038 0.000 0.145 0.000 __init__.py:961(get_db_prep_value)
97061 0.198 0.000 0.386 0.000 __init__.py:967(get_prep_value)
101931 0.036 0.000 0.103 0.000 abc.py:137(__instancecheck__)
347 0.000 0.000 0.000 0.000 base.py:148(queries_logged)
2 0.000 0.000 0.000 0.000 base.py:181(_base_objects)
135 0.000 0.000 0.001 0.000 base.py:1822(model_unpickle)
347 0.000 0.000 0.000 0.000 base.py:213(ensure_connection)
347 0.001 0.000 0.003 0.000 base.py:221(_prepare_cursor)
347 0.001 0.000 0.006 0.000 base.py:232(_cursor)
347 0.000 0.000 0.001 0.000 base.py:240(create_cursor)
347 0.000 0.000 0.006 0.000 base.py:254(cursor)
19646 0.011 0.000 0.164 0.000 base.py:37(<lambda>)
111 0.000 0.000 0.000 0.000 base.py:371(_base_manager)
347 0.001 0.000 0.089 0.000 base.py:379(execute)
19601 0.004 0.000 0.004 0.000 base.py:381(__get__)
347 0.000 0.000 0.014 0.000 base.py:389(convert_query)
63396 0.265 0.000 1.616 0.000 base.py:401(__init__)
347 0.000 0.000 0.000 0.000 base.py:435(validate_no_broken_transaction)
63396 0.085 0.000 1.715 0.000 base.py:505(from_db)
347 0.001 0.000 0.001 0.000 base.py:519(allow_thread_sharing)
1316563 1.004 0.000 2.164 0.000 base.py:524(__eq__)
138 0.000 0.000 0.000 0.000 base.py:534(__hash__)
347 0.001 0.000 0.001 0.000 base.py:534(validate_thread_sharing)
135 0.000 0.000 0.002 0.000 base.py:539(__reduce__)
135 0.000 0.000 0.000 0.000 base.py:545(__getstate__)
135 0.000 0.000 0.002 0.000 base.py:549(__setstate__)
2749511 0.758 0.000 1.039 0.000 base.py:567(_get_pk_val)
347 0.001 0.000 0.001 0.000 base.py:574(make_debug_cursor)
349 0.000 0.000 0.001 0.000 compiler.py:1037(deferred_to_columns)
347 0.005 0.000 0.052 0.000 compiler.py:1047(get_converters)
38980 0.048 0.000 0.178 0.000 compiler.py:1070(apply_converters)
347 0.001 0.000 0.053 0.000 compiler.py:1081(results_iter)
347 0.000 0.000 0.000 0.000 compiler.py:1086(<listcomp>)
347 0.003 0.000 0.738 0.002 compiler.py:1105(execute_sql)
1317 0.002 0.000 0.287 0.000 compiler.py:1539(cursor_iter)
1317 0.003 0.000 0.285 0.000 compiler.py:1545(<lambda>)
347 0.006 0.000 0.055 0.000 compiler.py:191(get_select)
3/1 0.000 0.000 0.000 0.000 compiler.py:243(get_select_from_parent)
347 0.001 0.000 0.003 0.000 compiler.py:261(get_order_by)
347 0.001 0.000 0.002 0.000 compiler.py:27(__init__)
347 0.000 0.000 0.000 0.000 compiler.py:373(get_extra_select)
8008 0.007 0.000 0.011 0.000 compiler.py:383(quote_name_unless_alias)
4881/4175 0.008 0.000 0.263 0.000 compiler.py:400(compile)
347 0.002 0.000 0.057 0.000 compiler.py:42(setup_query)
693 0.000 0.000 0.000 0.000 compiler.py:43(<genexpr>)
347 0.005 0.000 0.317 0.001 compiler.py:464(as_sql)
347 0.002 0.000 0.067 0.000 compiler.py:48(pre_sql_setup)
347 0.000 0.000 0.000 0.000 compiler.py:62(get_group_by)
349 0.007 0.000 0.025 0.000 compiler.py:626(get_default_columns)
347 0.000 0.000 0.000 0.000 compiler.py:670(get_distinct)
18/10 0.000 0.000 0.001 0.000 compiler.py:694(find_ordering_name)
12 0.000 0.000 0.000 0.000 compiler.py:712(<genexpr>)
14 0.000 0.000 0.000 0.000 compiler.py:723(<listcomp>)
18 0.000 0.000 0.001 0.000 compiler.py:725(_setup_joins)
347 0.001 0.000 0.003 0.000 compiler.py:738(get_from_clause)
3/1 0.000 0.000 0.000 0.000 compiler.py:772(get_related_selections)
2 0.000 0.000 0.000 0.000 compiler.py:806(get_related_klass_infos)
270 0.000 0.000 0.000 0.000 compiler.py:837(<lambda>)
3 0.000 0.000 0.000 0.000 compiler.py:856(<listcomp>)
675 0.001 0.000 0.001 0.000 config.py:167(get_model)
555/111 0.001 0.000 0.003 0.000 copy.py:132(deepcopy)
222 0.000 0.000 0.000 0.000 copy.py:190(_deepcopy_atomic)
111 0.000 0.000 0.001 0.000 copy.py:210(_deepcopy_list)
111 0.000 0.000 0.001 0.000 copy.py:219(_deepcopy_tuple)
111 0.000 0.000 0.001 0.000 copy.py:220(<listcomp>)
222 0.000 0.000 0.000 0.000 copy.py:252(_keep_alive)
1164 0.003 0.000 0.009 0.000 copy.py:268(_reconstruct)
1302 0.005 0.000 0.021 0.000 copy.py:66(copy)
1029 0.001 0.000 0.003 0.000 copyreg.py:87(__newobj__)
38758 0.082 0.000 0.325 0.000 datastructures.py:106(relabeled_clone)
58025 0.035 0.000 0.047 0.000 datastructures.py:119(equals)
9 0.000 0.000 0.003 0.000 datastructures.py:12(__init__)
58025 0.033 0.000 0.080 0.000 datastructures.py:128(__eq__)
38758 0.034 0.000 0.359 0.000 datastructures.py:131(demote)
38956 0.017 0.000 0.017 0.000 datastructures.py:153(__init__)
347 0.000 0.000 0.000 0.000 datastructures.py:157(as_sql)
346 0.001 0.000 0.001 0.000 datastructures.py:266(__init__)
9 0.000 0.000 0.000 0.000 datastructures.py:27(__iter__)
9 0.000 0.000 0.000 0.000 datastructures.py:33(__bool__)
96768 0.138 0.000 0.537 0.000 datastructures.py:43(__init__)
15 0.000 0.000 0.000 0.000 datastructures.py:61(as_sql)
19646 0.038 0.000 0.038 0.000 dateparse.py:119(<dictcomp>)
19646 0.062 0.000 0.150 0.000 dateparse.py:97(parse_datetime)
222 0.001 0.000 0.001 0.000 dbapi2.py:63(convert_date)
20369 0.038 0.000 0.046 0.000 deconstruct.py:14(__new__)
126792 0.085 0.000 1.277 0.000 dispatcher.py:152(send)
63396 0.069 0.000 0.973 0.000 dispatcher.py:174(<listcomp>)
63396 0.092 0.000 0.183 0.000 dispatcher.py:223(_live_receivers)
111 0.000 0.000 0.000 0.000 encoding.py:51(force_text)
2286 0.001 0.000 0.002 0.000 enum.py:284(__call__)
2286 0.001 0.000 0.001 0.000 enum.py:526(__new__)
14 0.000 0.000 0.000 0.000 expressions.py:1123(__init__)
14 0.000 0.000 0.000 0.000 expressions.py:1137(set_source_expressions)
14 0.000 0.000 0.000 0.000 expressions.py:1140(get_source_expressions)
14 0.000 0.000 0.000 0.000 expressions.py:1143(as_sql)
14 0.000 0.000 0.000 0.000 expressions.py:1160(as_sqlite)
19981 0.008 0.000 0.008 0.000 expressions.py:154(__init__)
374 0.000 0.000 0.001 0.000 expressions.py:158(__getstate__)
4 0.000 0.000 0.000 0.000 expressions.py:163(get_db_converters)
362 0.000 0.000 0.000 0.000 expressions.py:170(get_source_expressions)
360 0.000 0.000 0.000 0.000 expressions.py:173(set_source_expressions)
2 0.000 0.000 0.000 0.000 expressions.py:211(contains_aggregate)
2 0.000 0.000 0.000 0.000 expressions.py:213(<genexpr>)
374/360 0.001 0.000 0.009 0.000 expressions.py:223(resolve_expression)
374/360 0.000 0.000 0.000 0.000 expressions.py:241(<listcomp>)
4 0.000 0.000 0.000 0.000 expressions.py:300(convert_value)
38955 0.033 0.000 0.271 0.000 expressions.py:317(get_lookup)
374 0.000 0.000 0.007 0.000 expressions.py:331(copy)
4 0.000 0.000 0.000 0.000 expressions.py:687(__init__)
4 0.000 0.000 0.000 0.000 expressions.py:696(as_sql)
19977 0.026 0.000 0.034 0.000 expressions.py:725(__init__)
3808 0.005 0.000 0.015 0.000 expressions.py:735(as_sql)
3448 0.004 0.000 0.009 0.000 expressions.py:745(get_db_converters)
111 0.000 0.000 0.001 0.000 fields.py:241(__set__)
111 0.000 0.000 0.000 0.000 fields.py:31(country_to_text)
111 0.000 0.000 0.000 0.000 fields.py:315(get_internal_type)
111 0.000 0.000 0.001 0.000 fields.py:337(get_clean_value)
111 0.000 0.000 0.000 0.000 files.py:208(__set__)
111 0.000 0.000 0.000 0.000 files.py:274(get_internal_type)
111 0.000 0.000 0.000 0.000 files.py:332(__set__)
111 0.000 0.000 0.000 0.000 files.py:405(update_dimension_fields)
1046/698 0.001 0.000 0.004 0.000 functional.py:72(__get__)
14 0.000 0.000 0.000 0.000 hashable.py:4(make_hashable)
1146 0.000 0.000 0.001 0.000 inspect.py:158(isfunction)
567 0.002 0.000 0.006 0.000 inspect.py:1799(_signature_bound_method)
573 0.006 0.000 0.016 0.000 inspect.py:2117(_signature_from_function)
1140/573 0.004 0.000 0.029 0.000 inspect.py:2198(_signature_from_callable)
2286 0.003 0.000 0.006 0.000 inspect.py:2467(__init__)
3987 0.000 0.000 0.000 0.000 inspect.py:2517(name)
1701 0.000 0.000 0.000 0.000 inspect.py:2521(default)
2835 0.000 0.000 0.000 0.000 inspect.py:2529(kind)
1140 0.005 0.000 0.007 0.000 inspect.py:2750(__init__)
2859 0.001 0.000 0.001 0.000 inspect.py:2799(<genexpr>)
573 0.001 0.000 0.029 0.000 inspect.py:2829(from_callable)
1140 0.000 0.000 0.000 0.000 inspect.py:2835(parameters)
567 0.001 0.000 0.004 0.000 inspect.py:2843(replace)
573 0.001 0.000 0.030 0.000 inspect.py:3081(signature)
573 0.001 0.000 0.001 0.000 inspect.py:484(unwrap)
573 0.000 0.000 0.000 0.000 inspect.py:504(_is_wrapper)
573 0.001 0.000 0.031 0.000 inspect.py:62(func_supports_parameter)
63396 0.018 0.000 0.025 0.000 inspect.py:72(isclass)
14 0.000 0.000 0.000 0.000 itercompat.py:1(is_iterable)
346 0.000 0.000 0.000 0.000 lookups.py:116(contains_aggregate)
346 0.002 0.000 0.016 0.000 lookups.py:152(process_lhs)
346 0.002 0.000 0.236 0.001 lookups.py:161(as_sql)
337 0.000 0.000 0.000 0.000 lookups.py:168(get_rhs_op)
346 0.001 0.000 0.110 0.000 lookups.py:179(get_db_prep_lookup)
38955 0.070 0.000 1.236 0.000 lookups.py:18(__init__)
9 0.013 0.001 0.109 0.012 lookups.py:185(<listcomp>)
9 0.027 0.003 0.050 0.006 lookups.py:198(get_prep_lookup)
38613 0.071 0.000 0.077 0.000 lookups.py:222(resolve_expression_parameter)
9 0.015 0.002 0.210 0.023 lookups.py:230(batch_process_rhs)
38622 0.010 0.000 0.087 0.000 lookups.py:237(<genexpr>)
336 0.001 0.000 0.003 0.000 lookups.py:248(process_rhs)
1 0.000 0.000 0.000 0.000 lookups.py:300(get_prep_lookup)
9 0.000 0.000 0.214 0.024 lookups.py:320(process_rhs)
9 0.000 0.000 0.000 0.000 lookups.py:348(get_rhs_op)
9 0.000 0.000 0.216 0.024 lookups.py:351(as_sql)
9 0.000 0.000 0.109 0.012 lookups.py:38(batch_process_rhs)
38946 0.057 0.000 0.174 0.000 lookups.py:66(get_prep_lookup)
346 0.001 0.000 0.011 0.000 lookups.py:76(process_lhs)
337 0.001 0.000 0.002 0.000 lookups.py:82(process_rhs)
19265 0.009 0.000 0.013 0.000 lookups.py:97(rhs_is_direct_value)
81884 0.130 0.000 0.130 0.000 manager.py:117(_set_creation_counter)
655 0.001 0.000 0.009 0.000 manager.py:125(db_manager)
679 0.000 0.000 0.000 0.000 manager.py:131(db)
38820 0.082 0.000 0.516 0.000 manager.py:139(get_queryset)
43376 0.023 0.000 0.090 0.000 manager.py:146(all)
768 0.001 0.000 0.002 0.000 manager.py:174(__get__)
82539 0.105 0.000 0.131 0.000 manager.py:20(__new__)
81884 0.181 0.000 0.311 0.000 manager.py:26(__init__)
229 0.002 0.000 0.159 0.001 manager.py:81(manager_method)
136 0.000 0.000 0.003 0.000 managers.py:35(get_queryset)
525 0.001 0.000 0.001 0.000 mixins.py:10(get_cached_value)
135 0.000 0.000 0.000 0.000 mixins.py:19(is_cached)
19871 0.014 0.000 0.021 0.000 mixins.py:22(set_cached_value)
540 0.000 0.000 0.001 0.000 models.py:104(get_for_id)
111 0.000 0.000 0.000 0.000 models.py:123(plne_jmeno)
135 0.000 0.000 0.005 0.000 models.py:143(get_real_concrete_instance_class_id)
540 0.000 0.000 0.002 0.000 models.py:154(model_class)
274 0.000 0.000 0.006 0.000 models.py:181(__init__)
139 0.000 0.000 0.000 0.000 models.py:25(_get_opts)
139 0.000 0.000 0.000 0.000 models.py:30(_get_from_cache)
111 0.000 0.000 0.000 0.000 models.py:307(get_titul)
111 0.000 0.000 0.155 0.001 models.py:326(__str__)
139 0.000 0.000 0.000 0.000 models.py:34(get_for_model)
2 0.000 0.000 0.000 0.000 models.py:384(druhy_rok)
3 0.000 0.000 0.000 0.000 models.py:682(kod_v_rocniku)
405 0.001 0.000 0.010 0.000 models.py:97(get_real_instance_class)
384/346 0.005 0.000 0.025 0.000 operations.py:116(_quote_params_for_last_executed_query)
347 0.003 0.000 0.028 0.000 operations.py:143(last_executed_query)
3863 0.002 0.000 0.003 0.000 operations.py:161(quote_name)
346 0.000 0.000 0.000 0.000 operations.py:184(field_cast_sql)
3452 0.006 0.000 0.007 0.000 operations.py:239(get_db_converters)
19646 0.027 0.000 0.093 0.000 operations.py:256(convert_datetimefield_value)
346 0.000 0.000 0.000 0.000 operations.py:257(lookup_cast)
444 0.000 0.000 0.000 0.000 operations.py:264(convert_datefield_value)
9 0.000 0.000 0.000 0.000 operations.py:265(max_in_list_size)
6 0.000 0.000 0.000 0.000 operations.py:276(get_decimalfield_converter)
19376 0.013 0.000 0.030 0.000 operations.py:283(converter)
19483 0.006 0.000 0.006 0.000 operations.py:297(convert_booleanfield_value)
347 0.000 0.000 0.000 0.000 operations.py:323(compiler)
14 0.000 0.000 0.000 0.000 operations.py:42(check_expression_support)
19372 0.003 0.000 0.003 0.000 operations.py:455(validate_autopk_value)
3452 0.000 0.000 0.000 0.000 operations.py:557(get_db_converters)
768 0.000 0.000 0.000 0.000 options.py:322(swapped)
271699 0.143 0.000 0.143 0.000 options.py:544(get_field)
8 0.000 0.000 0.000 0.000 options.py:569(get_base_chain)
77335 0.054 0.000 0.054 0.000 options.py:597(get_ancestor_link)
6 0.000 0.000 0.000 0.000 options.py:617(get_path_to_parent)
3 0.000 0.000 0.000 0.000 query.py:1000(prefetch_related)
38955 0.036 0.000 0.062 0.000 query.py:1020(resolve_lookup_value)
38955 0.132 0.000 1.515 0.000 query.py:1040(solve_lookup_type)
274 0.001 0.000 0.003 0.000 query.py:105(__init__)
57849 0.041 0.000 0.083 0.000 query.py:1058(check_query_object_type)
333 0.001 0.000 0.009 0.000 query.py:1068(order_by)
38955 0.037 0.000 0.127 0.000 query.py:1069(check_related_objects)
4 0.000 0.000 0.000 0.000 query.py:1087(extra)
38955 0.140 0.000 1.693 0.000 query.py:1089(build_lookup)
7 0.000 0.000 0.000 0.000 query.py:1140(using)
38955 0.557 0.000 8.105 0.000 query.py:1154(build_filter)
627 0.001 0.000 0.002 0.000 query.py:1165(db)
138 0.000 0.000 0.004 0.000 query.py:117(_clone)
38955 0.015 0.000 0.015 0.000 query.py:1203(<setcomp>)
39305 0.047 0.000 0.840 0.000 query.py:1214(_chain)
39305 0.144 0.000 0.779 0.000 query.py:1226(_clone)
44029/44010 0.034 0.000 17.618 0.000 query.py:1240(_fetch_all)
19376 0.005 0.000 0.005 0.000 query.py:1246(_next_is_sticky)
38955 0.161 0.000 10.104 0.000 query.py:1278(add_q)
38617 0.020 0.000 0.047 0.000 query.py:1288(_add_hints)
38955 0.014 0.000 0.014 0.000 query.py:1289(<setcomp>)
39066/38955 0.328 0.000 9.842 0.000 query.py:1298(_add_q)
77932 0.843 0.000 2.091 0.000 query.py:1361(names_to_path)
38977 0.395 0.000 1.997 0.000 query.py:1457(setup_joins)
38956 0.303 0.000 0.332 0.000 query.py:147(__init__)
7 0.000 0.000 0.000 0.000 query.py:1481(__init__)
14 0.000 0.000 0.000 0.000 query.py:1495(final_transformer)
14 0.000 0.000 0.000 0.000 query.py:1508(get_current_prefetch_to)
14 0.000 0.000 0.000 0.000 query.py:1511(get_current_to_attr)
7 0.000 0.000 0.000 0.000 query.py:1517(get_current_queryset)
10 0.000 0.000 0.000 0.000 query.py:1529(normalize_prefetch_lookups)
3 0.009 0.003 15.991 5.330 query.py:1541(prefetch_related_objects)
38969 0.309 0.000 0.572 0.000 query.py:1559(trim_joins)
38624 0.035 0.000 0.035 0.000 query.py:1578(<setcomp>)
38624 0.014 0.000 0.014 0.000 query.py:1579(<setcomp>)
38621 0.031 0.000 0.031 0.000 query.py:1582(<dictcomp>)
77242 0.019 0.000 0.019 0.000 query.py:1583(<genexpr>)
136 0.001 0.000 0.054 0.000 query.py:163(_filter_or_exclude)
7 0.000 0.000 0.000 0.000 query.py:1667(get_prefetcher)
7 0.232 0.033 15.978 2.283 query.py:1714(prefetch_one_level)
39625 0.018 0.000 0.018 0.000 query.py:1719(can_filter)
7 0.000 0.000 0.000 0.000 query.py:1746(<listcomp>)
333 0.000 0.000 0.000 0.000 query.py:1793(add_ordering)
333 0.000 0.000 0.000 0.000 query.py:1818(clear_ordering)
2 0.000 0.000 0.000 0.000 query.py:1829(__init__)
1 0.000 0.000 0.000 0.000 query.py:1844(add_select_related)
2 0.000 0.000 0.000 0.000 query.py:1860(<listcomp>)
4 0.000 0.000 0.000 0.000 query.py:1860(add_extra)
270 0.001 0.000 0.006 0.000 query.py:1875(populate)
78261 0.170 0.000 0.502 0.000 query.py:189(__init__)
349/347 0.000 0.000 0.000 0.000 query.py:1891(get_related_populators)
3 0.000 0.000 0.000 0.000 query.py:1941(get_loaded_field_names)
364 0.000 0.000 0.000 0.000 query.py:2022(annotation_select)
4442 0.001 0.000 0.001 0.000 query.py:2041(extra_select)
38632 0.052 0.000 0.106 0.000 query.py:2126(is_nullable)
28 0.000 0.000 0.000 0.000 query.py:2145(get_order_dir)
39066 0.066 0.000 0.307 0.000 query.py:2184(__init__)
39066 0.042 0.000 0.245 0.000 query.py:2199(add_votes)
39066 0.151 0.000 0.746 0.000 query.py:2206(update_join_types)
331 0.000 0.000 0.000 0.000 query.py:236(extra)
147 0.000 0.000 0.000 0.000 query.py:242(annotations)
347 0.000 0.000 0.000 0.000 query.py:252(base_table)
746 0.001 0.000 0.223 0.000 query.py:255(__len__)
43283/43271 0.032 0.000 17.437 0.000 query.py:259(__iter__)
347 0.001 0.000 0.004 0.000 query.py:284(get_compiler)
117595 0.032 0.000 0.032 0.000 query.py:291(get_meta)
39305 0.264 0.000 0.498 0.000 query.py:299(clone)
2 0.002 0.001 0.026 0.013 query.py:317(_get_real_instances)
39305 0.058 0.000 0.568 0.000 query.py:345(chain)
1 0.000 0.000 0.000 0.000 query.py:35(__iter__)
333 0.002 0.000 0.290 0.001 query.py:394(get)
347 0.000 0.000 0.000 0.000 query.py:40(__init__)
136 0.000 0.000 0.037 0.000 query.py:41(_polymorphic_iterator)
2 0.000 0.000 0.000 0.000 query.py:446(<dictcomp>)
2 0.000 0.000 0.000 0.000 query.py:478(<listcomp>)
63473 0.084 0.000 2.785 0.000 query.py:49(__iter__)
347 0.001 0.000 0.001 0.000 query.py:61(<listcomp>)
350 0.000 0.000 0.000 0.000 query.py:633(deferred_to_data)
347 0.000 0.000 0.000 0.000 query.py:65(<listcomp>)
38955 0.033 0.000 0.405 0.000 query.py:65(_get_col)
1 0.000 0.000 0.000 0.000 query.py:66(<listcomp>)
96962 0.098 0.000 0.119 0.000 query.py:719(table_alias)
362 0.000 0.000 0.000 0.000 query.py:744(ref_alias)
38993 0.022 0.000 0.022 0.000 query.py:748(unref_alias)
39066 0.034 0.000 0.034 0.000 query.py:752(promote_joins)
3 0.001 0.000 15.992 5.331 query.py:769(_prefetch_related_objects)
78021 0.161 0.000 0.564 0.000 query.py:786(demote_joins)
347 0.001 0.000 0.001 0.000 query.py:805(reset_refcounts)
2 0.000 0.000 0.000 0.000 query.py:880(all)
38955 0.075 0.000 11.368 0.000 query.py:887(filter)
39314 0.696 0.000 0.915 0.000 query.py:896(get_initial_alias)
38955 0.167 0.000 11.291 0.000 query.py:901(_filter_or_exclude)
96966 0.297 0.000 0.579 0.000 query.py:916(join)
96966 0.069 0.000 0.149 0.000 query.py:939(<listcomp>)
3448 0.001 0.000 0.001 0.000 query.py:964(join_parent_model)
1 0.000 0.000 0.000 0.000 query.py:978(select_related)
136 0.000 0.000 0.000 0.000 query_translate.py:103(<listcomp>)
136 0.000 0.000 0.000 0.000 query_translate.py:108(_translate_polymorphic_filter_definition)
136 0.001 0.000 0.001 0.000 query_translate.py:28(translate_polymorphic_filter_definitions_in_kwargs)
136 0.000 0.000 0.000 0.000 query_translate.py:89(translate_polymorphic_filter_definitions_in_args)
38955 0.045 0.000 0.054 0.000 query_utils.py:156(_get_lookup)
38955 0.096 0.000 0.237 0.000 query_utils.py:166(get_lookup)
25 0.000 0.000 0.000 0.000 query_utils.py:221(select_related_descend)
57849 0.021 0.000 0.035 0.000 query_utils.py:270(check_rel_lookup_compatibility)
57849 0.014 0.000 0.014 0.000 query_utils.py:277(check)
39177 0.080 0.000 0.171 0.000 query_utils.py:58(__init__)
111 0.000 0.000 0.003 0.000 query_utils.py:61(_combine)
111 0.000 0.000 0.004 0.000 query_utils.py:81(__and__)
347 0.000 0.000 0.001 0.000 re.py:232(compile)
347 0.001 0.000 0.001 0.000 re.py:271(_compile)
675 0.000 0.000 0.000 0.000 registry.py:127(check_apps_ready)
1350 0.000 0.000 0.000 0.000 registry.py:137(check_models_ready)
675 0.000 0.000 0.001 0.000 registry.py:147(get_app_config)
675 0.001 0.000 0.003 0.000 registry.py:185(get_model)
38752 0.157 0.000 0.778 0.000 related.py:1466(_get_path_info)
38752 0.032 0.000 0.810 0.000 related.py:1495(get_reverse_path_info)
77500 0.092 0.000 0.161 0.000 related.py:1511(_get_m2m_attr)
77500 0.061 0.000 0.110 0.000 related.py:1529(_get_m2m_reverse_attr)
111 0.001 0.000 0.006 0.000 related.py:343(get_reverse_related_filter)
111 0.000 0.000 0.000 0.000 related.py:350(<dictcomp>)
38752 0.024 0.000 0.024 0.000 related.py:421(related_query_name)
20420 0.003 0.000 0.003 0.000 related.py:440(get_cache_name)
623548 0.200 0.000 0.299 0.000 related.py:616(related_fields)
38756 0.037 0.000 0.075 0.000 related.py:622(reverse_related_fields)
38756 0.018 0.000 0.018 0.000 related.py:624(<listcomp>)
62665 0.118 0.000 0.154 0.000 related.py:626(local_related_fields)
125330 0.013 0.000 0.013 0.000 related.py:628(<genexpr>)
367263 0.798 0.000 1.095 0.000 related.py:630(foreign_related_fields)
734526 0.124 0.000 0.124 0.000 related.py:632(<genexpr>)
38592 0.021 0.000 0.126 0.000 related.py:634(get_local_related_value)
77222 0.076 0.000 0.715 0.000 related.py:637(get_foreign_related_value)
115814 0.188 0.000 0.317 0.000 related.py:640(get_instance_value_for_fields)
96768 0.182 0.000 0.345 0.000 related.py:662(get_joining_columns)
193536 0.057 0.000 0.057 0.000 related.py:664(<genexpr>)
38756 0.027 0.000 0.202 0.000 related.py:666(get_reverse_joining_columns)
111 0.000 0.000 0.000 0.000 related.py:669(get_extra_descriptor_filter)
15 0.000 0.000 0.000 0.000 related.py:684(get_extra_restriction)
154344 0.293 0.000 0.842 0.000 related.py:698(get_path_info)
58463 0.024 0.000 0.122 0.000 related.py:876(target_field)
38756 0.123 0.000 0.174 0.000 related.py:880(get_reverse_path_info)
38612 0.022 0.000 0.096 0.000 related.py:939(get_db_prep_value)
10 0.000 0.000 0.001 0.000 related.py:962(db_type)
603 0.001 0.000 0.001 0.000 related.py:973(get_db_converters)
39224 0.072 0.000 0.381 0.000 related.py:979(get_col)
111 0.000 0.000 0.005 0.000 related_descriptors.py:108(get_queryset)
111 0.001 0.000 0.150 0.001 related_descriptors.py:142(get_object)
525 0.001 0.000 0.155 0.000 related_descriptors.py:147(__get__)
19372 0.050 0.000 0.093 0.000 related_descriptors.py:194(__set__)
111 0.000 0.000 0.151 0.001 related_descriptors.py:281(get_object)
81889 0.157 0.000 1.610 0.000 related_descriptors.py:514(__get__)
43134 0.085 0.000 0.248 0.000 related_descriptors.py:551(__init__)
19238 0.168 0.000 5.178 0.000 related_descriptors.py:566(_apply_rel_filters)
43131 0.113 0.000 5.597 0.000 related_descriptors.py:605(get_queryset)
3 0.014 0.005 1.183 0.394 related_descriptors.py:612(get_prefetch_queryset)
3 0.004 0.001 0.267 0.089 related_descriptors.py:621(<dictcomp>)
38748 0.398 0.000 1.075 0.000 related_descriptors.py:803(__init__)
19372 0.057 0.000 6.092 0.000 related_descriptors.py:871(_apply_rel_filters)
38744 0.084 0.000 6.445 0.000 related_descriptors.py:886(get_queryset)
4 0.000 0.000 0.254 0.064 related_descriptors.py:893(get_prefetch_queryset)
4 0.000 0.000 0.000 0.000 related_descriptors.py:914(<dictcomp>)
24069 0.022 0.000 0.130 0.000 related_descriptors.py:919(<lambda>)
48138 0.012 0.000 0.020 0.000 related_descriptors.py:920(<genexpr>)
19372 0.041 0.000 0.269 0.000 related_descriptors.py:923(<lambda>)
38744 0.029 0.000 0.179 0.000 related_descriptors.py:924(<genexpr>)
19240 0.098 0.000 0.578 0.000 related_lookups.py:103(get_prep_lookup)
3 0.000 0.000 0.000 0.000 related_lookups.py:119(as_sql)
57849 0.165 0.000 0.520 0.000 related_lookups.py:26(get_normalized_value)
7 0.000 0.000 0.446 0.064 related_lookups.py:47(get_prep_lookup)
7 0.014 0.002 0.295 0.042 related_lookups.py:50(<listcomp>)
7 0.011 0.002 0.102 0.015 related_lookups.py:59(<listcomp>)
7 0.000 0.000 0.216 0.031 related_lookups.py:62(as_sql)
38756 0.026 0.000 0.228 0.000 reverse_related.py:136(get_joining_columns)
6 0.000 0.000 0.000 0.000 reverse_related.py:139(get_extra_restriction)
43244 0.042 0.000 0.042 0.000 reverse_related.py:152(get_accessor_name)
38756 0.029 0.000 0.838 0.000 reverse_related.py:169(get_path_info)
43244 0.021 0.000 0.064 0.000 reverse_related.py:172(get_cache_name)
6 0.000 0.000 0.000 0.000 reverse_related.py:213(get_related_field)
111 0.001 0.000 0.003 0.000 sourcegroups.py:104(post_init_receiver)
222 0.000 0.000 0.000 0.000 sourcegroups.py:108(<genexpr>)
222 0.000 0.000 0.000 0.000 sourcegroups.py:112(<genexpr>)
63396 0.837 0.000 0.904 0.000 sourcegroups.py:27(receiver)
111 0.001 0.000 0.001 0.000 sourcegroups.py:64(init_instance)
111 0.000 0.000 0.001 0.000 sourcegroups.py:80(get_source_fields)
222 0.000 0.000 0.000 0.000 sourcegroups.py:85(<genexpr>)
19646 0.006 0.000 0.009 0.000 timezone.py:238(is_aware)
19646 0.012 0.000 0.054 0.000 timezone.py:264(make_aware)
195570 0.144 0.000 0.144 0.000 tree.py:21(__init__)
39305 0.041 0.000 0.070 0.000 tree.py:29(_new_instance)
111 0.000 0.000 0.002 0.000 tree.py:50(__deepcopy__)
78132 0.032 0.000 0.032 0.000 tree.py:60(__bool__)
116976 0.129 0.000 0.171 0.000 tree.py:78(add)
347 0.000 0.000 0.000 0.000 utils.py:16(__init__)
97176 0.072 0.000 0.125 0.000 utils.py:194(__getitem__)
2011 0.002 0.000 0.003 0.000 utils.py:22(__getattr__)
19863 0.032 0.000 0.037 0.000 utils.py:248(_route_db)
19372 0.006 0.000 0.006 0.000 utils.py:269(allow_relation)
2011 0.000 0.000 0.000 0.000 utils.py:65(__enter__)
347 0.001 0.000 0.092 0.000 utils.py:66(execute)
2011 0.000 0.000 0.000 0.000 utils.py:68(__exit__)
347 0.001 0.000 0.091 0.000 utils.py:72(_execute_with_wrappers)
347 0.001 0.000 0.090 0.000 utils.py:78(_execute)
1317 0.000 0.000 0.000 0.000 utils.py:91(__call__)
1317 0.002 0.000 0.279 0.000 utils.py:94(inner)
347 0.004 0.000 0.124 0.000 utils.py:96(execute)
270 0.000 0.000 0.003 0.000 version.py:18(get_version)
270 0.000 0.000 0.001 0.000 version.py:42(get_main_version)
1080 0.000 0.000 0.000 0.000 version.py:46(<genexpr>)
540 0.001 0.000 0.001 0.000 version.py:49(get_complete_version)
1 0.000 0.000 0.000 0.000 views_all.py:378(sloupec_s_poradim)
138 0.000 0.000 0.000 0.000 views_all.py:431(hlavni_problem)
1 0.000 0.000 0.018 0.018 views_all.py:437(hlavni_problemy_cisla)
1 0.000 0.000 0.000 0.000 views_all.py:441(<listcomp>)
1 0.000 0.000 0.000 0.000 views_all.py:442(<listcomp>)
3 0.000 0.000 0.000 0.000 views_all.py:455(<lambda>)
1 0.307 0.307 20.294 20.294 views_all.py:461(body_resitelu_odjakziva)
1 0.001 0.001 0.211 0.211 views_all.py:489(body_resitelu_za_rocnik)
111 0.000 0.000 0.001 0.000 views_all.py:646(__init__)
24110 0.060 0.000 0.079 0.000 views_all.py:658(pricti_body)
1 0.004 0.004 21.086 21.086 views_all.py:669(spocti_vysledkovku_cisla)
111 0.000 0.000 0.000 0.000 views_all.py:722(<lambda>)
1 0.000 0.000 0.000 0.000 views_all.py:729(<listcomp>)
1 0.000 0.000 0.074 0.074 views_all.py:730(<listcomp>)
126792 0.046 0.000 0.064 0.000 weakref.py:432(get)
63507 0.047 0.000 0.047 0.000 weakref.py:66(__call__)
39305 0.062 0.000 0.133 0.000 where.py:142(clone)
693/347 0.001 0.000 0.003 0.000 where.py:162(_contains_aggregate)
693 0.000 0.000 0.002 0.000 where.py:165(<genexpr>)
347 0.000 0.000 0.003 0.000 where.py:168(contains_aggregate)
347 0.000 0.000 0.004 0.000 where.py:32(split_having)
347 0.002 0.000 0.239 0.001 where.py:65(as_sql)
335126 0.111 0.000 0.111 0.000 {built-in method __new__ of type object at 0x8228a0}
101931 0.067 0.000 0.067 0.000 {built-in method _abc._abc_instancecheck}
39066 0.037 0.000 0.037 0.000 {built-in method _collections._count_elements}
347 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident}
347 0.000 0.000 0.000 0.000 {built-in method builtins.all}
349/347 0.000 0.000 0.002 0.000 {built-in method builtins.any}
1140 0.000 0.000 0.000 0.000 {built-in method builtins.callable}
1 0.000 0.000 21.087 21.087 {built-in method builtins.exec}
3327406/3230526 0.443 0.000 1.351 0.000 {built-in method builtins.getattr}
1834380 0.569 0.000 0.569 0.000 {built-in method builtins.hasattr}
19612/19501 0.003 0.000 0.003 0.000 {built-in method builtins.hash}
1683 0.000 0.000 0.000 0.000 {built-in method builtins.id}
2373545 0.428 0.000 0.512 0.000 {built-in method builtins.isinstance}
293997 0.050 0.000 0.050 0.000 {built-in method builtins.issubclass}
107053 0.021 0.000 0.021 0.000 {built-in method builtins.iter}
685350/682020 0.078 0.000 0.300 0.000 {built-in method builtins.len}
136 0.000 0.000 0.010 0.000 {built-in method builtins.next}
224 0.003 0.000 0.003 0.000 {built-in method builtins.print}
426400/407028 0.069 0.000 0.158 0.000 {built-in method builtins.setattr}
39178 0.045 0.000 0.045 0.000 {built-in method builtins.sorted}
356 0.000 0.000 0.000 0.000 {built-in method from_iterable}
9 0.003 0.000 0.003 0.000 {built-in method fromkeys}
573 0.000 0.000 0.000 0.000 {built-in method sys.getrecursionlimit}
694 0.000 0.000 0.000 0.000 {built-in method time.time}
729 0.091 0.000 0.092 0.000 {function SQLiteCursorWrapper.execute at 0x7f70385cc7b8}
1164 0.002 0.000 0.004 0.000 {method '__reduce_ex__' of 'object' objects}
97112 0.011 0.000 0.011 0.000 {method 'add' of 'set' objects}
347 0.000 0.000 0.000 0.000 {method 'append' of 'collections.deque' objects}
517017 0.070 0.000 0.070 0.000 {method 'append' of 'list' objects}
1076 0.000 0.000 0.000 0.000 {method 'close' of 'sqlite3.Cursor' objects}
39305 0.024 0.000 0.024 0.000 {method 'copy' of 'collections.OrderedDict' objects}
197379 0.067 0.000 0.067 0.000 {method 'copy' of 'dict' objects}
78748 0.018 0.000 0.018 0.000 {method 'copy' of 'set' objects}
14 0.000 0.000 0.000 0.000 {method 'count' of 'str' objects}
19376 0.004 0.000 0.004 0.000 {method 'create_decimal_from_float' of 'decimal.Context' objects}
729 0.002 0.000 0.002 0.000 {method 'cursor' of 'sqlite3.Connection' objects}
19646 0.003 0.000 0.003 0.000 {method 'decode' of 'bytes' objects}
3 0.000 0.000 0.000 0.000 {method 'difference' of 'set' objects}
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
4 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects}
237775 0.038 0.000 0.038 0.000 {method 'extend' of 'list' objects}
1317 0.113 0.000 0.277 0.000 {method 'fetchmany' of 'sqlite3.Cursor' objects}
382 0.001 0.000 0.001 0.000 {method 'fetchone' of 'sqlite3.Cursor' objects}
4 0.000 0.000 0.000 0.000 {method 'find' of 'str' objects}
359/248 0.002 0.000 0.157 0.001 {method 'format' of 'str' objects}
406280 0.091 0.000 0.091 0.000 {method 'get' of 'dict' objects}
14 0.000 0.000 0.000 0.000 {method 'group' of 're.Match' objects}
19646 0.018 0.000 0.018 0.000 {method 'groupdict' of 're.Match' objects}
2 0.000 0.000 0.000 0.000 {method 'index' of 'list' objects}
2286 0.000 0.000 0.000 0.000 {method 'isidentifier' of 'str' objects}
38624 0.009 0.000 0.009 0.000 {method 'issubset' of 'set' objects}
96970 0.015 0.000 0.015 0.000 {method 'items' of 'collections.OrderedDict' objects}
162672 0.026 0.000 0.026 0.000 {method 'items' of 'dict' objects}
1741 0.002 0.000 0.002 0.000 {method 'join' of 'str' objects}
137 0.000 0.000 0.000 0.000 {method 'keys' of 'collections.OrderedDict' objects}
19646 0.003 0.000 0.003 0.000 {method 'ljust' of 'str' objects}
675 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects}
19646 0.022 0.000 0.022 0.000 {method 'match' of 're.Pattern' objects}
20020 0.004 0.000 0.004 0.000 {method 'pop' of 'dict' objects}
135696 0.055 0.000 0.055 0.000 {method 'pop' of 'list' objects}
19376 0.013 0.000 0.013 0.000 {method 'quantize' of 'decimal.Decimal' objects}
19646 0.031 0.000 0.031 0.000 {method 'replace' of 'datetime.datetime' objects}
347 0.000 0.000 0.000 0.000 {method 'replace' of 'str' objects}
14 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects}
6 0.000 0.000 0.000 0.000 {method 'scaleb' of 'decimal.Decimal' objects}
14 0.000 0.000 0.000 0.000 {method 'search' of 're.Pattern' objects}
43308 0.007 0.000 0.007 0.000 {method 'setdefault' of 'dict' objects}
1 0.000 0.000 0.000 0.000 {method 'sort' of 'list' objects}
222 0.000 0.000 0.000 0.000 {method 'split' of 'bytes' objects}
39024 0.023 0.000 0.023 0.000 {method 'split' of 'str' objects}
3863 0.001 0.000 0.001 0.000 {method 'startswith' of 'str' objects}
347 0.013 0.000 0.013 0.000 {method 'sub' of 're.Pattern' objects}
4 0.000 0.000 0.000 0.000 {method 'update' of 'collections.OrderedDict' objects}
79152 0.041 0.000 0.041 0.000 {method 'update' of 'dict' objects}
77917 0.029 0.000 0.029 0.000 {method 'update' of 'set' objects}
19646 0.003 0.000 0.003 0.000 {method 'utcoffset' of 'datetime.datetime' objects}
567 0.000 0.000 0.000 0.000 {method 'values' of 'mappingproxy' objects}

BIN
seminar/restats Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,97 @@
{% extends "seminar/archiv/base_cisla.html" %}
{# {% block content %}
<div>
<h1>
{% block nadpis1a %}{% block nadpis1b %}
Číslo {{ cislo }}
{% endblock %}{% endblock %}
</h1>
{% if cislo.pdf %}
<p><a href='{{ cislo.pdf.url }}'>Číslo v pdf</a>
{% endif %}
<p><a href='{{ cislo.rocnik.verejne_url }}'>Ročník {{ cislo.rocnik }}</a>
{% if v_cisle_zadane %}
<h2>Zadané problémy</h2>
<ul>
{% for p in v_cisle_zadane %}
<li{% if user.is_staff and not cislo.verejne %} class='mam-org-only'{% endif %}>
{% if user.is_staff or cislo.verejne %}
<a href='{{ p.verejne_url }}'>{% endif %}{{ p.kod_v_rocniku }} {{ p.nazev }} {{ p.body_v_zavorce }}{% if user.is_staff or cislo.verejne %}</a>{% endif %}
{% endfor %}
</ul>
{% endif %}
{% if resene_problemy %}
<h2>Řešené problémy</h2>
<ul>
{% for p in resene_problemy %}
<li{% if user.is_staff and not cislo.verejne %} class='mam-org-only'{% endif %}>
{% if user.is_staff or cislo.verejne %}
<a href='{{ p.verejne_url }}'>{% endif %}{{ p.kod_v_rocniku }} {{ p.nazev }} {{ p.body_v_zavorce }}{% if user.is_staff or cislo.verejne %}</a>{% endif %}
{% endfor %}
</ul>
{% endif %}
{% if user.is_staff %}
<div class="mam-org-only">
<h2> Orgovské odkazy </h2>
<ul>
<li><a href="obalky.pdf">Obálky (PDF)</a></li>
<li><a href="tituly.tex">Tituly (TeX)</a></li>
<li><a href="vysledkovka.tex">Výsledkovka (TeX)</a></li>
<li><a href="obalkovani">Obálkování</a></li>
</ul>
</div>
{% endif %}
{% if cislo.verejna_vysledkovka %}
<h2>Výsledkovka</h2>
{% else %}
{% if user.is_staff %}
<div class='mam-org-only'>
<h2>Výsledkovka (neveřejná)</h2>
{% endif %}
{% endif %}
{% if cislo.verejna_vysledkovka or user.is_staff %}
<table class='vysledkovka'>
<tr class='border-b'>
<th class='border-r'>#
<th class='border-r'>Jméno #}
{# problémy by měly být veřejné, když je veřejná výsledkovka #}
{# {% for p in problemy %}
<th class='border-r'><a href="{{ p.verejne_url }}">{{ p.kod_v_rocniku }}</a>
{% endfor %}
<th class='border-r'>Za číslo</sup>
<th class='border-r'>Za ročník
<th class='border-r'>Odjakživa
{% for rv in radky_vysledkovky %}
<tr>
<td class='border-r'>{% autoescape off %}{{ rv.poradi }}{% endautoescape %}
<th class='border-r'>
{% if rv.resitel.titul != "" %}
{{ rv.resitel.titul }}<sup>MM</sup>
{% endif %}
{{ rv.resitel.osoba.plne_jmeno }}
{% for b in rv.hlavni_problemy_body %}
<td class='border-r'>{{ b }}
{% endfor %}
<td class='border-r'>{{ rv.body_cislo }}
<td class='border-r'><b>{{ rv.body_rocnik }}</b>
<td class='border-r'>{{ rv.body_celkem_odjakziva }}
</tr>
{% endfor %}
</table>
{% endif %}
{% if not cislo.verejna_vysledkovka and user.is_staff %}
</div>
{% endif %}
</div>
{% endblock content %} #}

View file

@ -0,0 +1,19 @@
{% extends "seminar/archiv/problem.html" %}
{% block problem %}
<h1>
{% block nadpis1a %}{% block nadpis1b %}
{{ problem.nazev_typu }} {{ problem.kod_v_rocniku }}: {{ problem.nazev }}
{% endblock %}{% endblock %}
</h1>
<h2>Zadání</h2>
{{ problem.text_zadani |safe }}
{% if problem.text_reseni %}
<h2>Řešení</h2>
{{ problem.text_reseni |safe }}
{% endif %}
{# TODO vysledkovka tematu #}
{% endblock %}

View file

@ -0,0 +1,23 @@
{% extends "seminar/archiv/problem.html" %}
{% block problem %}
<h1>
{% block nadpis1a %}{% block nadpis1b %}
{{ problem.nazev_typu }} {{ problem.kod_v_rocniku }}: {{ problem.nazev }} {{ problem.body_v_zavorce }}
{% endblock %}{% endblock %}
</h1>
{% if problem.cislo_zadani %}
<p>Zadáno v čísle <a href='{{ problem.cislo_zadani.verejne_url }}'>{{ problem.cislo_zadani.kod }}</a>.
{% endif %}
{% if problem.cislo_reseni %}
<p>Řešeno v čísle <a href='{{ problem.cislo_reseni.verejne_url }}'>{{ problem.cislo_reseni.kod }}</a>.
{% endif %}
<h2>Zadání</h2>
{{ problem.text_zadani |safe }}
{% if problem.text_reseni %}
<h2>Řešení</h2>
{{ problem.text_reseni |safe }}
{% endif %}
{% endblock %}

View file

@ -9,13 +9,20 @@ class PermissionMixin(object):
""" Redefines get_permissions so that only organizers can make changes. """
def get_permissions(self):
permission_classes = []
print("get_permissions have been called.")
if self.action in ["create", "update", "partial_update", "destroy"]:
permission_classes = [AllowWrite] # speciální permission na zápis - orgové
else:
permission_classes = [AllowAny] # návštěvník nemusí být zalogován, aby si prohlížel obsah
return [permission() for permission in permission_classes]
permission_classes = []
print("get_permissions have been called.")
if self.action in ["create", "update", "partial_update", "destroy"]:
permission_classes = [AllowWrite] # speciální permission na zápis - orgové
else:
permission_classes = [AllowAny]
# návštěvník nemusí být zalogován, aby si prohlížel obsah
return [permission() for permission in permission_classes]
def has_object_permission(self, request, view, obj):
if obj.verejne:
return True
else:
return False
class ReadWriteSerializerMixin(object):