def post(self, *args, **kwargs): ''' Creates a new weapon system, and yes the form validation is shit ''' if self.validate_form(): weapon_system = WeaponSystem( name=unicode(self.name), ssh_user=unicode(self.ssh_user), ssh_key=unicode(self.ssh_key), ip_address=unicode(self.ip_address), ssh_port=self.ssh_port, service_port=self.listen_port, ) dbsession.add(weapon_system) dbsession.flush() weapon_system.initialize() self.render("admin/created_weaponsystem.html")