{% extends 'base.html' %} {% block title %}创建任务 - {{ get_app_name() }}{% endblock %} {% block content %}

创建数据任务

请为您的数据回收任务设置一个描述性的标题
添加描述可以帮助您更好地管理和识别不同的任务
创建任务后,您将获得:
  • 一个唯一的提交URL,用于接收表单数据
  • 数据管理和分析工具
  • 导出数据功能
取消
使用指南
如何在您的网页中使用提交URL:
<!-- HTML表单示例 -->
<form action="您的提交URL" method="post">
    <!-- 表单字段 -->
    <input type="text" name="name" placeholder="姓名">
    <input type="email" name="email" placeholder="邮箱">
    <button type="submit">提交</button>
</form>
JavaScript提交示例:
// 使用fetch API提交数据
fetch('您的提交URL', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        name: '用户名',
        email: 'user@example.com',
        // 其他字段
    })
})
.then(response => response.json())
.then(data => console.log('提交成功:', data))
.catch(error => console.error('提交失败:', error));
Python提交示例:
import requests
import json

url = '您的提交URL'
data = {
    'name': '用户名',
    'email': 'user@example.com',
    # 其他字段
}

response = requests.post(url, json=data)
print('提交成功:', response.json())
{% endblock %}