Views

class tom_targets.views.TargetCreateView(**kwargs)

View for creating a Target

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

get_context_data(**kwargs)

Inserts certain form data into the context dict.

Returns

Dictionary with the following keys:

type_choices: tuple: Tuple of 2-tuples of strings containing available target types in the TOM

extra_form: FormSet: Django formset with fields for arbitrary key/value pairs

get_default_target_type()

Returns the user-configured target type specified in settings.py, if it exists, otherwise returns sidereal

Returns

User-configured target type or global default

Return type

str

get_form_class()

Return the form class to use in this view.

get_initial()

Returns the initial data to use for forms on this view.

Returns

Dictionary with the following keys:

type: str: Type of the target to be created

groups: QuerySet<Group> Groups available to the current user

Return type

dict

model

alias of tom_targets.models.Target