oioioi.usercontests.admin¶
Module Contents¶
Classes¶
A formset for child objects related to a parent. |
|
Options for inline editing of |
|
Functions¶
|
Since the special usercontest version of Django admin has limited |
- oioioi.usercontests.admin.use_usercontest_admin_form(request)[source]¶
Since the special usercontest version of Django admin has limited functionality, we only want to use it for ‘regular’ users - that is users who otherwise couldn’t create their own contests. In essence, if the user can already create contests in some other way (or usercontests are disabled) this function should return False.
- class oioioi.usercontests.admin.UserRoundInlineFormset(data=None, files=None, instance=None, save_as_new=False, prefix=None, queryset=None, **kwargs)[source]¶
Bases:
oioioi.contests.admin.RoundInline.formsetA formset for child objects related to a parent.
- class oioioi.usercontests.admin.UserRoundInline(parent_model, admin_site)[source]¶
Bases:
oioioi.contests.admin.RoundInlineOptions for inline editing of
modelinstances.Provide
fk_nameto specify the attribute name of theForeignKeyfrommodelto its parent. This is required ifmodelhas more than oneForeignKeyto its parent.