def begin(self, url=None, **attrs): """ Creates the opening <form> tags. By default URL will be current path. """ url = url or self.form.request.path multipart = attrs.pop('multipart', self.form.multipart) return tags.form(url, multipart=multipart, **attrs)
def begin(self, url=None, skip_csrf=False, **attrs): """ Return a ``form`` opening tag. """ url = url or self.form.request.path multipart = attrs.pop('multipart', self.form.multipart) tag = tags.form(url, multipart=multipart, **attrs) if not (self.form.skip_csrf or skip_csrf): tag += self.csrf_token() return tag
def begin(self): attr = self.element.get_attrs() action = attr.pop('action', '') self.output.inc(tags.form(action, **attr))
def begin(self, url=None, **attrs): """ Creates the opening <form> tag """ return tags.form(url, **attrs)