Beispiel #1
0
  def post(self):
    """Handles POST requests for the bulk create page.
    """
    form = BulkCreateForm(self.data.POST)

    if not form.is_valid():
      return self.get()

    bulk_create.spawnBulkCreateTasks(
        form.cleaned_data['task_data'], self.data.organization,
        self.data.profile)

    self.redirect.organization(self.data.organization)
    self.redirect.to('gci_bulk_create', validated=True)
Beispiel #2
0
  def post(self, data, check, mutator):
    """Handles POST requests for the bulk create page."""
    form = BulkCreateForm(data=data.POST)

    if not form.is_valid():
      # TODO(nathaniel): problematic self-call.
      return self.get(data, check, mutator)

    bulk_create.spawnBulkCreateTasks(
        form.cleaned_data['task_data'], data.organization,
        data.ndb_profile)

    # TODO(nathaniel): make this .organization call unnecessary.
    data.redirect.organization(organization=data.organization)

    return data.redirect.to(
        url_names.GCI_TASK_BULK_CREATE, validated=True)