如何集成HTML,Python和postgreSQl [英] how to do integrate HTML, Python and postgreSQl

查看:57
本文介绍了如何集成HTML,Python和postgreSQl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目是员工注册表格

用户界面是 HTML,

编程语言是 PYTHON

,数据库是 PostgreSQL



这是我的代码...



< html>

< head>

< style type =text / css>

body {color:green; font-family:Arial,Sans-Serif;}

#container {width:500px;

背景:#F0F0F0;

保证金:25px;

填充:15px;

边框:5px实心灰色;

}

表格标签{display:inline-block; width:160px;}

form .line {clear:both;}

form .line_submit {text-align:right;}

#提交{color:red;}

#reset {color:orange;}

#edit {color:348838d;}

#age {宽度:40px;}

#address {height:100px;}

#pincode {width:90px;}

#mobile {width: 120px;}

#doj {width:80px;}

#dob {width:80px;}

#tit {

text-align:center;

color:330000;

text-shadow:2px 2px #ffff00;

font-size :30px;

}



< / style>

< / head>

< body>



< form>

员工注册




< label for =username>用户名:< / label>< input type = textid =username>




< label for =gender>性别:< / label>< ; input type =radioid =male>男性< input type = radioid =female>女




< label for =dob> DOB:< / label> < input type =textid =dob>




< label for =age>年龄:< ; / label>< input type =textid =age>




< label for =address> ;地址:< / label>< input type =textid =address>




< label for = pincode> PIN码:< / label>< input type =textid =pincode>




< label for =mobile>移动:< / label>< input type =textid =mobile>




< label for =doj>加入的数量:< / label>< input type =textid =doj>




< input type =submitvalue =Addid =submit>

< input type =submitvalue =重置id =reset>

< input type =submitvalue =编辑id =编辑>



< / form>



< / body>

< / html>





它工作正常,但我想知道在哪里可以从文本字段中输入用户输入的python代码?请给一段 编码




结果

结果
结果
结果
结果


解决方案

如果你不知道你正在使用哪个基于Python的Web框架,以及支持的是什么你的托管,不清楚你为什么要问Python。是的,我认为基于Python的Web开发是非常有价值的事情,但是你需要有一些动力,至少对你主机上可用的内容有所了解。 (您有一些托管服务提供商吗?您是否与他们交谈或阅读他们的文档?)



看看有多少基于Python的Web框架可用,并且,请注意你,至少还不完整:

http://en.wikipedia.org/wiki / Comparison_of_web_application_frameworks #Python [ ^ ]。



这些天最着名和最常用的平台是Django: http://en.wikipedia.org/wiki/Django_(web_framework) [ ^ ]。



-SA


my project is employee registration form,
the user interface is HTML,
programming language is PYTHON
and the database is PostgreSQL

This is my code...

<html>
<head>
<style type="text/css">
body {color:green;font-family:Arial, Sans-Serif;}
#container {width:500px;
background:#F0F0F0;
margin:25px;
padding:15px;
border:5px solid gray;
}
form label{display:inline-block; width:160px;}
form .line{clear:both;}
form .line_submit{text-align:right;}
#submit{color:red;}
#reset{color:orange;}
#edit{color:348838d;}
#age{width:40px;}
#address{height:100px;}
#pincode{width:90px;}
#mobile{width:120px;}
#doj{width:80px;}
#dob{width:80px;}
#tit{
text-align:center;
color:330000;
text-shadow: 2px 2px #ffff00;
font-size:30px;
}

</style>
</head>
<body>


<form>

Employee Registration



<label for="username">User Name:</label><input type="text" id="username">



<label for="gender">Gender:</label><input type="radio" id="male">Male <input type="radio" id="female">Female



<label for="dob">DOB:</label><input type="text" id="dob">



<label for="age">Age:</label><input type="text" id="age">



<label for="address">Address:</label><input type="text" id="address">



<label for="pincode">Pin Code:</label><input type="text" id="pincode">



<label for="mobile">Mobile:</label><input type="text" id="mobile">



<label for="doj">Dote of Joining:</label><input type="text" id="doj">



<input type="submit" value="Add" id="submit" >
<input type="submit" value="Reset" id="reset" >
<input type="submit" value="Edit" id="edit" >


</form>


</body>
</html>


its working properly, but i want to know where i can put python code for user input from text field? please give a piece of codings










解决方案

If you don't know which Python-based Web framework you are using, and what is supported by your hosting, it's not clear why are you asking about Python at all. Yes, I think Python-based Web development is very valuable thing, but you need to have some motivation and at least have any idea of what is available at your hosting. (Do you have some hosting provider? did you talk to them or read their documentation?)

Look how many different Web frameworks based on Python are available, and, mind you, this least is not quite complete:
http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Python[^].

Perhaps the most known and used platform these days is Django: http://en.wikipedia.org/wiki/Django_(web_framework)[^].

—SA


这篇关于如何集成HTML,Python和postgreSQl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆