2014-03-03 28 views
1

我正在制作我的第一个django网络应用程序。位置:将用户信息保存在HTML python中任何地方

http://joebuty.pythonanywhere.com/

CODE:

<!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网站教程创建页面演示了一个电子邮件提交按钮。现在的问题是,我实际上想将用户信息保存到数据库,我不知道如何。

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

让我知道你是否对我的问题有任何疑问。

欢呼

+1

你应该检查Django的教程:https://docs.djangoproject.com/en/dev/intro/tutorial01/ –

+0

好像你应该做的更多的教程,如果你有*特定的*问题,然后问这个网站。 – MikeSmithDev

+0

@mikesmithDev我曾问过一个具体的问题。如何让我的按钮将信息存储到数据库中! –

回答

2

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

+0

谢谢!我会检查出来,让我知道如果我得到它的工作 –

相关问题