如何集成HTML,Python和postgreSQl

编程入门 行业动态 更新时间:2024-10-27 13:28:06
本文介绍了如何集成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框架可用,并且,请注意你,至少还不完整: en.wikipedia/wiki / Comparison_of_web_application_frameworks #Python [ ^ ]。 这些天最着名和最常用的平台是Django: en.wikipedia/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: en.wikipedia/wiki/Comparison_of_web_application_frameworks#Python[^]. Perhaps the most known and used platform these days is Django: en.wikipedia/wiki/Django_(web_framework)[^].
—SA

更多推荐

如何集成HTML,Python和postgreSQl

本文发布于:2023-10-20 08:53:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1510505.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:HTML   Python   postgreSQl

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!