registration package

Submodules

registration.admin module

class registration.admin.DivisionAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

get_form(request, obj=None, **kwargs)[source]

Return a Form class for use in the admin add view. This is used by add_view and change_view.

get_queryset(request)[source]

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

inlines = (<class 'registration.admin.PersonInline'>,)
list_display = ['__str__', 'num_participants', 'event', 'gender', 'start_age', 'stop_age', 'start_rank', 'stop_rank']
list_editable = ['event', 'gender', 'start_age', 'stop_age', 'start_rank', 'stop_rank']
list_filter = ['event', 'gender', 'start_age', 'start_rank']
media
num_participants(obj)[source]
class registration.admin.DivisionInline(parent_model, admin_site)[source]

Bases: django.contrib.admin.options.TabularInline

extra = 1
media
model

alias of registration.models.EventLink

class registration.admin.PersonAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

formfield_overrides = {<class 'django.db.models.fields.related.ManyToManyField'>: {'widget': <class 'django.forms.widgets.CheckboxSelectMultiple'>}}
inlines = (<class 'registration.admin.DivisionInline'>,)
list_display = ['full_name', 'gender', 'age', 'rank', 'paid']
list_filter = ['gender', 'age', 'rank', 'paid']
media
search_fields = ('first_name', 'last_name', 'instructor')
class registration.admin.PersonInline(parent_model, admin_site)[source]

Bases: django.contrib.admin.options.TabularInline

extra = 0
formfield_for_foreignkey(db_field, request, **kwargs)[source]

Get a form Field for a ForeignKey.

media
model

alias of registration.models.EventLink

readonly_fields = ['person', 'event']
class registration.admin.RankAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

list_display = ['__str__', 'name', 'order']
list_editable = ('name', 'order')
media
model

alias of registration.models.Rank

registration.admin.get_age(obj)[source]

registration.apps module

class registration.apps.RegistrationConfig(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

name = 'registration'

registration.forms module

class registration.forms.ManualEventLinkForm(division=None, **kwargs)[source]

Bases: django.forms.models.ModelForm

__init__(division=None, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

clean()[source]

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.

clean_manual_name()[source]
media
class registration.forms.PersonCheckinForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.models.ModelForm

media
class registration.forms.PersonFilterForm(*args, **kwargs)[source]

Bases: django.forms.forms.Form

Form fields:

  • name: Name (CharField)

  • confirmed: Confirmed (TypedChoiceField)

  • paid: Paid (TypedChoiceField)

__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

filter(qs)[source]
media
class registration.forms.PersonForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.models.ModelForm

media
class registration.forms.PersonPaidForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.models.ModelForm

media
class registration.forms.TeamAssignForm(division=None, **kwargs)[source]

Bases: django.forms.forms.Form

Form fields:

  • src: Src (ModelChoiceField)

  • tgt: Tgt (ModelChoiceField)

__init__(division=None, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

clean()[source]

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.

clean_src()[source]
clean_tgt()[source]
media
prefix = 'assign'

registration.models module

Module responsible for defining the events in which people can compete and registration. The rules used to run each event are provided by other modules.

  • An Event defines an area in which you can compete, e.g. Kata or Kumite.

  • A Division defines a range of ages, belt ranks, and genders who compete against eachother in an Event.

  • A Person stores the registration information for a competetor.

  • For each Person, an EventLink is created for each Event in which they register.

  • A Rank is a utility table for populating the belt rank choices.

class registration.models.Division(*args, **kwargs)[source]

Bases: django.db.models.base.Model

A division is a group of people who will compete against eachother in a single event.

Parameters
  • id (AutoField) – Id

  • event (ForeignKey to Event) – Event

  • name (CharField) – Name

  • gender (CharField) – Gender

  • start_age (PositiveSmallIntegerField) – Start age

  • stop_age (PositiveSmallIntegerField) – Stop age

  • start_rank (ForeignKey to Rank) – Start rank

  • stop_rank (ForeignKey to Rank) – Stop rank

  • state (CharField) – State

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

class State[source]

Bases: djchoices.choices.DjangoChoices

attributes = {'1': 'ready', '4': 'running', '7': 'done'}
choices = (('1', 'ready'), ('4', 'running'), ('7', 'done'))
done = '7'
labels = {'done': 'done', 'ready': 'ready', 'running': 'running'}
ready = '1'
running = '4'
validator = <djchoices.choices.ChoicesValidator object>
values = {'1': 'ready', '4': 'running', '7': 'done'}
build_format()[source]
claim()[source]

Put people into this division.

If all members of a team move to the same division, they stay in a team. If some of the members move to a new division, only the members that stay in the original division will stay in a team.

event

Model field: event, accesses the Event model.

event_id

Model field: event

Model field: division, accesses the M2M EventLink model.

Return QuerySet of EventLink that should be in this division.

gender

Model field: gender

get_absolute_url()[source]

Returns the :class:`.EventLink`s that will participate in the division.

For individual events, the EventLinks for confirmed people and EventLinks that are manually added are returned.

For team events, the EventLinks that are teams are returned.

get_format()[source]
get_gender_display(*, field=<django.db.models.fields.CharField: gender>)

Autogenerated: Shows the label of the gender

Returns the :class:`.EventLink`s that will NOT participate in the division.

For individual events, the EventLinks with confirmed=False are returned.

For team events, the EventLinks that are not assigned to teams are returned.

get_num_registered()[source]
get_state_display(*, field=<django.db.models.fields.CharField: state>)

Autogenerated: Shows the label of the state

id

Model field: ID

katabracket_set

Model field: division, accesses the M2M KataBracket model.

name

Model field: name

objects = <django.db.models.manager.Manager object>
save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

start_age

Model field: start age

start_rank

Model field: start rank, accesses the Rank model.

start_rank_id

Model field: start rank

state

Model field: state

status
stop_age

Model field: stop age

stop_rank

Model field: stop rank, accesses the Rank model.

stop_rank_id

Model field: stop rank

registration.models.Division_post_delete(sender, instance, **kwargs)[source]
registration.models.Division_pre_delete(sender, instance, **kwargs)[source]
class registration.models.Event(*args, **kwargs)[source]

Bases: django.db.models.base.Model

The events at the tournament in which you can compete. E.g. Kata or Kumite.

The events define the options that are presented to the users when they register. They also determine which the scoring rules used for each division.

Parameters
  • id (AutoField) – Id

  • name (CharField) – Name

  • format (CharField) – Format

  • is_team (BooleanField) – Is team

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

class EventFormat[source]

Bases: djchoices.choices.DjangoChoices

attributes = {'A': 'kata', 'B': 'elim1'}
choices = (('A', 'kata'), ('B', 'elim1'))
elim1 = 'B'
kata = 'A'
labels = {'elim1': 'elim1', 'kata': 'kata'}
validator = <djchoices.choices.ChoicesValidator object>
values = {'A': 'kata', 'B': 'elim1'}
exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

division_set

Model field: event, accesses the M2M Division model.

Model field: event, accesses the M2M EventLink model.

format

Model field: format

get_format_class(n_people)[source]
get_format_display(*, field=<django.db.models.fields.CharField: format>)

Autogenerated: Shows the label of the format

id

Model field: ID

is_team

Model field: is team

name

Model field: name

objects = <django.db.models.manager.Manager object>
person2

Model field: events, accesses the M2M Person model.

save(**kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

Bases: django.db.models.base.Model

A person participating in a Division.

If a person participates in multiple divisions, there will be multiple EventLinks.

Usually an EventLink links back to a Person registration. To support less sophisticated configurations or persons registering at ring-side, the EventLink may be created with only a name (manual_name) and no linked Person.

An EventLink can represent a team of people participating in an event. In this case, there will be a EventLink for each person (with is_team=False), each of which has a team field that points to a shared EventLink (with is_team=True).

Parameters
  • id (AutoField) – Id

  • person (ForeignKey to Person) – Person

  • manual_name (CharField) – Manual name

  • event (ForeignKey to Event) – Event

  • division (ForeignKey to Division) – Division

  • locked (BooleanField) – Locked

  • disqualified (BooleanField) – Disqualified

  • is_team (BooleanField) – Is team

  • team (ForeignKey to EventLink) – Team

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

clean()[source]

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

disqualified

Model field: disqualified

division

Model field: division, accesses the Division model.

division_id

Model field: division

event

Model field: event, accesses the Event model.

event_id

Model field: event

Model field: team, accesses the M2M EventLink model.

static get_disqualified_singleton(event)[source]
id

Model field: ID

is_manual
is_team

Model field: is team

katamatch_set

Model field: eventlink, accesses the M2M KataMatch model.

kumitematchperson_set

Model field: eventlink, accesses the M2M KumiteMatchPerson model.

locked

Model field: locked

manual_name

Model field: manual name

name
objects = <django.db.models.manager.Manager object>
person

Model field: person, accesses the Person model.

person_id

Model field: person

save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

team

Model field: team, accesses the EventLink model.

team_id

Model field: team

update_division()[source]
class registration.models.Person(id, first_name, last_name, gender, age, rank, instructor, phone_number, email, parent, teammates, reg_date, paid, paidDate, confirmed, notes)[source]

Bases: django.db.models.base.Model

Parameters
  • id (AutoField) – Id

  • first_name (CharField) – First name

  • last_name (CharField) – Last name

  • gender (CharField) – Gender

  • age (PositiveSmallIntegerField) – Age

  • rank (ForeignKey to Rank) – Rank

  • instructor (CharField) – Instructor

  • phone_number (CharField) – Phone number

  • email (EmailField) – Email

  • parent (CharField) – Parent or guardian (if under 18)

  • teammates (CharField) – Teammates

  • reg_date (DateTimeField) – Date registered

  • paid (BooleanField) – Paid

  • paidDate (DateField) – Date paid

  • confirmed (BooleanField) – Checked in

  • notes (TextField) – Notes

  • events (ManyToManyField) – Events

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

age

Model field: age

clean()[source]

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.

confirmed

Model field: Checked in

email

Model field: email

Model field: person, accesses the M2M EventLink model.

events

Model field: events, accesses the M2M Person model.

first_name

Model field: first name

full_name()[source]
gender

Model field: gender

get_absolute_url()[source]
get_gender_display(*, field=<django.db.models.fields.CharField: gender>)

Autogenerated: Shows the label of the gender

get_next_by_reg_date(*, field=<django.db.models.fields.DateTimeField: reg_date>, is_next=True, **kwargs)

Autogenerated: Finds next instance based on reg_date.

get_previous_by_reg_date(*, field=<django.db.models.fields.DateTimeField: reg_date>, is_next=False, **kwargs)

Autogenerated: Finds previous instance based on reg_date.

id

Model field: ID

instructor

Model field: instructor

last_name

Model field: last name

notes

Model field: notes

objects = <django.db.models.manager.Manager object>
paid

Model field: paid

paidDate

Model field: Date paid

parent

Model field: Parent or Guardian (if under 18)

phone_number

Model field: phone number

rank

Model field: rank, accesses the Rank model.

rank_id

Model field: rank

reg_date

Model field: Date registered

save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

teammates

Model field: teammates

class registration.models.Rank(*args, **kwargs)[source]

Bases: django.db.models.base.Model

A belt rank.

By default, kyu grades are stored with order having a value of -kyu and dan grades are stored with order having a value of dan.

Standard Karate ranks will be prepopulated in the database by the migration.

Parameters
  • id (AutoField) – Id

  • order (SmallIntegerField) – Order

  • name (CharField) – Name

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

static build_default_fixture(stream=None)[source]

Create a fixture file to populate the Rank table with default data.

If no output stream is provided, the fixture data is saved to fixtures/rank.json. The data is loaded automatically as part of the database migration. Alternatively, it can be loaded by calling:

./manage.py loaddata rank.json
Args:

stream (optional): Stream where the data will be written.

static get_dan(dan)[source]
static get_kyu(kyu)[source]
id

Model field: ID

name

Model field: name

objects = <django.db.models.manager.Manager object>
order

Model field: order

static parse(s)[source]

Parse a string

person_set

Model field: rank, accesses the M2M Person model.

registration.models.create_divisions()[source]
registration.models.export_registrations(f)[source]

Export registration data as a csv file.

Usage:
with open(“filename.csv”, “w”, newline=’‘’‘) as f:

export_registrations(f)

registration.models.import_registrations(f)[source]

Import registration data from Google Forms csv.

Usage

f = open(‘my_data.csv’, newline=’‘) import_registrations(f)

The date of the last registration is cached in the SIGNUP_IMPORT_LAST_TSTAMP setting to make it safe to repeatedly import the same data without creating duplicate registrations.

Input stream should be opened with newline=’’ or muti-line entries will not be parsed correctly.

Todo

Pay attention to timezones when parsing dates. See https://docs.djangoproject.com/en/1.11/topics/i18n/timezones/

registration.test_views module

class registration.test_views.ConsoleTestCase_0(methodName='runTest')

Bases: registration.test_views.ConsoleTestCase

browser = <common.selenium.Env.cases.<locals>.Browser object>
test_console()
class registration.test_views.DivisionDetailTestCase(methodName='runTest')[source]

Bases: django_webtest.WebTest

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_assign_team_form()[source]
class registration.test_views.PersonListTestCase(methodName='runTest')[source]

Bases: django_webtest.WebTest

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_person_confirmed_form()[source]
test_person_confirmed_inline()[source]
test_person_filter()[source]
test_person_paid_form()[source]
test_person_paid_inline()[source]

registration.tests module

class registration.tests.DivisionTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_claim()[source]
test_claim_teams()[source]
class registration.tests.EventLinkTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_clean()[source]
test_manual()[source]
test_team()[source]
class registration.tests.EventTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_get_format()[source]
class registration.tests.ImportExportRegistrationTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_export_registration()[source]
test_export_registration_fields()[source]

Look for any new fields that might need to be added.

test_import_error()[source]
test_import_registration()[source]
class registration.tests.PersonTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_required_parent()[source]
class registration.tests.RankTestCase(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

test_build_default_fixture()[source]

Check that default entries have been populated.

The rank fixture should have been automatically loaded by DB migration. Check that it is populated and that it matches the generation function and the saved fixture.

test_get_dan()[source]
test_get_kyu()[source]
test_parse()[source]

registration.urls module

registration.views module

class registration.views.DetailView(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.detail.DetailView

model

alias of registration.models.Person

permission_required = 'accounts.view'
class registration.views.DivisionAddManualPerson(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.detail.SingleObjectMixin, django.views.generic.edit.FormView

dispatch(request, *args, **kwargs)
form_class

alias of registration.forms.ManualEventLinkForm

form_valid(form)[source]

If the form is valid, redirect to the supplied URL.

get_context_data(**kwargs)[source]

Insert the single object into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

get_template_names()[source]

Return a list of template names to be used for the request. Must return a list. May not be called if render_to_response() is overridden.

model

alias of registration.models.Division

permission_required = 'accounts.edit'
post(request, *args, **kwargs)[source]

Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.

class registration.views.DivisionBuild(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.detail.SingleObjectMixin, django.views.generic.base.View

dispatch(request, *args, **kwargs)
model

alias of registration.models.Division

permission_required = 'accounts.edit'
post(request, *args, **kwargs)[source]
class registration.views.DivisionDeleteManaualPerson(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.DeleteView

delete(request, *args, **kwargs)[source]

Call the delete() method on the fetched object and then redirect to the success URL.

dispatch(request, *args, **kwargs)
get_object()[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

get_success_url()[source]
model

alias of registration.models.EventLink

permission_required = 'accounts.edit'
template_name = 'registration/division_detail.html'
class registration.views.DivisionInfo(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.detail.DetailView

get_context_data(**kwargs)[source]

Insert the single object into the context dict.

get_template_names()[source]

Return a list of template names to be used for the request. May not be called if render_to_response() is overridden. Return the following list:

  • the value of template_name on the view (if provided)

  • the contents of the template_name_field field on the object instance that the view is operating upon (if available)

  • <app_label>/<model_name><template_name_suffix>.html

model

alias of registration.models.Division

permission_required = 'accounts.view'
class registration.views.DivisionList(**kwargs)[source]

Bases: django.views.generic.list.ListView

get_context_data(**kwargs)[source]

Get the context for this view.

model

alias of registration.models.Division

orderby = ('event', 'start_age', 'start_rank__order')
class registration.views.IndexView(*args, **kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.list.ListView, django.views.generic.edit.FormMixin

Main view for displaying the registered competetors.

Related to IndexViewTable and IndexViewTableRow which are used to redraw parts of this view dynamically. Views PersonPaid and PersonCheckin are called by clicking buttons in this view.

__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

form_class

alias of registration.forms.PersonFilterForm

get(request, *args, **kwargs)[source]
get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

model

alias of registration.models.Person

permission_required = 'accounts.view'
class registration.views.IndexViewTable(*args, **kwargs)[source]

Bases: registration.views.IndexView

template_name = 'registration/person_list_table.html'
class registration.views.IndexViewTableRow(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.detail.DetailView

model

alias of registration.models.Person

permission_required = 'accounts.view'
template_name = 'registration/person_list_table_row.html'
class registration.views.MessageDemoView(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.base.TemplateView

get(request, *args, **kwargs)[source]
permission_required = 'accounts.view'
template_name = 'registration/message_demo.html'
class registration.views.PersonCheckin(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.UpdateView

dispatch(request, *args, **kwargs)[source]
form_class

alias of registration.forms.PersonCheckinForm

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

inline = False
model

alias of registration.models.Person

permission_required = 'accounts.edit'
class registration.views.PersonCreate(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.CreateView

form_class

alias of registration.forms.PersonForm

form_valid(form)[source]

If the form is valid, save the associated model.

model

alias of registration.models.Person

permission_required = 'accounts.edit'
class registration.views.PersonDelete(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.DeleteView

model

alias of registration.models.Person

permission_required = 'accounts.admin'
success_url = '/registration/'
class registration.views.PersonPaid(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.UpdateView

dispatch(request, *args, **kwargs)[source]
form_class

alias of registration.forms.PersonPaidForm

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

inline = False
model

alias of registration.models.Person

permission_required = 'accounts.edit'
class registration.views.PersonUpdate(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.UpdateView

form_class

alias of registration.forms.PersonForm

form_valid(form)[source]

If the form is valid, save the associated model.

model

alias of registration.models.Person

permission_required = 'accounts.edit'
class registration.views.TeamAssignView(**kwargs)[source]

Bases: registration.views.DivisionInfo, django.views.generic.edit.FormView

dispatch(request, *args, **kwargs)
form_class

alias of registration.forms.TeamAssignForm

form_valid(form)[source]

If the form is valid, redirect to the supplied URL.

get_context_data(**kwargs)[source]

Insert the single object into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

permission_required = 'accounts.edit'
post(request, *args, **kwargs)[source]

Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.

registration.views.add_division_info_context_data(view, context, **kwargs)[source]

Module contents