python - 将用户信息保存在 HTML python 中的任何地方

标签 python html database django userform

<分区>

我正在制作我的第一个 Django 网络应用。

代码:

<!DOCTYPE html>

<head><style>
body{
    text-align:center;
    background:url("http://i.imgur.com/qv9As5Y.jpg");
    color: black;
    font-family: Helvetica;
    background-size: cover;
    background-position:center center;
    background-repeat: no-repeat;
    background-attachment:fixed;
}
p{
    font-size:24px;
}
input {
    border: 0;
    padding: 12px;
    font-size: 18px;
}
input[type="submit"] {
    background:limegreen;
    color:black;
}

</style>
</head>
<body>
<!-- I'm a comment. You won't actually see me on the web page.
     You should write your header in the line below me! -->


<img src="http://i.imgur.com/iAX7FpC.png" height="250" width="250">

<h1>Joe Buty</h1>
<h1>Data Science</h1>


<h2>    Hello,</h2>

<h3><p>    Welcome to my webpage. If you are reading this you might be the
first person to visit my website. So thanks.</p>
<p>    This page is constantly evolving.</p>


<h2>    <p>So if you would like to be in the loop enter your email. Thanks!</p>

<input type='email' placeholder="Email">
<input type='submit'> <!This button needs to do something!>
</body>

我在 codecademy 教程中创建页面演示时创建了一个提交电子邮件按钮。现在的问题是,我实际上想将用户信息保存到数据库中,但我不确定该怎么做。

我要去工作并可能会解决这个问题,但如果你能给我任何指导,我将不胜感激!

如果您对我的问题有任何疑问,请告诉我。

干杯

最佳答案

通常当您有一个网站时,将用户信息保存在数据库中是个好主意。 有很多方法可以做到这一点;其中最流行的是 SQL。 如果您有兴趣了解更多信息,请查看此类(class) https://www.udacity.com/course/cs253

关于python - 将用户信息保存在 HTML python 中的任何地方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22137866/

相关文章:

python - 在 Matplotlib 中删除楔形极坐标图周围的空间

html - 试图在标题中显示 Logo

html - 为 li 内的 anchor 标记应用 css

javascript - 在 if-else 条件下对 SVG 进行动画处理

mysql - c语言与mysql(如何将mySQL数据库包含到程序中)

python - 比较两个 Pandas 数据帧行的最快方法?

Python模数与余数相同?

mysql - 选择最新的行以及恰好 2 行具有一个条件的行和 2 行具有不同条件的行

sql - 使用计算值枚举两个日期之间的年份

python - 如何在本地机器上测试xmpp/jabber?