l.c.b.c.CodeImportNewView(CodeImportBaseView, CodeImportNameValidationMixin) : class documentation

Part of lp.code.browser.codeimport View In Hierarchy

The view to request a new code import.
Method initial_values Override this in your subclass if you want any widgets to have
Method context_is_product Undocumented
Method label Undocumented
Method cancel_url Cancel should take the user back to the root site.
Method setUpFields Undocumented
Method setUpWidgets Set up the widgets using the view's form fields and the context.
Method request_import_action Create the code_import, and subscribe the user to the branch.
Method getProduct If the context is a product, use that, otherwise get from data.
Method validate_widgets See LaunchpadFormView.
Method validate See LaunchpadFormView.
Method _getImportLocation Return the import location based on type.
Method _create_import Create the code import.

Inherited from CodeImportBaseView:

Method showOptionalMarker Don't show the optional marker for rcs locations.
Method setSecondaryFieldError Set the field error only if there isn't an error already.
Method _super_user Is the user an admin or member of vcs-imports?
Method _validateCVS If the user has specified cvs, then we need to make
Method _validateURL If the user has specified a url, we need to make sure that there

Inherited from LaunchpadFormView (via CodeImportBaseView):

Method __init__ Undocumented
Method initialize Undocumented
Method render Return the body of the response.
Method extendFields Allow subclasses to extend the form fields.
Method help_links Dictionary mapping field names to help links.
Method adapters Provide custom adapters for use when setting up the widgets.
Method action_url Set the default action URL for the form.
Method has_available_actions Does the view have any available actions that will render?
Method addError Add a form wide error.
Method getFieldError Get the error associated with a particular field.
Method setFieldError Set the error associated with a particular field.
Static Method validate_none Do not do any validation.
Method error_count Undocumented
Method ajax_failure_handler Called by the form if validate() finds any errors.
Method validate_cancel Noop validation in case we cancel.
Method focusedElementScript Helper function to construct the script element content.
Method isSingleLineLayout Undocumented
Method isMultiLineLayout Undocumented
Method isCheckBoxLayout Undocumented
Method _processNotifications Add any notification messages to the response headers.
Method _abort Abort the form edit.
Method _validate Check all widgets and perform any custom validation.

Inherited from CodeImportNameValidationMixin:

Method _setBranchExists Undocumented
@property
def initial_values(self):
Override this in your subclass if you want any widgets to have initial values.
@property
def context_is_product(self):
Undocumented
@property
def label(self):
Undocumented
@property
def cancel_url(self):
Cancel should take the user back to the root site.
def setUpFields(self):
Undocumented
def setUpWidgets(self):
Set up the widgets using the view's form fields and the context.

If no context is given, the view's context is used.

def _getImportLocation(self, data):
Return the import location based on type.
def _create_import(self, data, status):
Create the code import.
@action(_('Request Import'), 'request_import')
def request_import_action(self, action, data):
Create the code_import, and subscribe the user to the branch.
def getProduct(self, data):
If the context is a product, use that, otherwise get from data.
def validate_widgets(self, data, names=None):
See LaunchpadFormView.
def validate(self, data):
See LaunchpadFormView.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.