Build website with only Python
Project description
Litchi
Litchi,a framework to build website with only python.
介绍
- Litchi,可以让您在丝毫不写html、js、css的情况下,只用python代码,轻松编写动态网页。
- 与Illumine结合时,您可以使用Litchi的静态页面生成功能,愉快地编写网页。
- 就算您是开发纯静态前端页面的开发者,用Litchi,您能有一种新的开发方式,又有什么损失呢?
- Litchi受到Kivy的深度影响,并使用Flask驱动
安装
现在您可以通过
pip install litchi-web
来安装
更新
- 增加Brython支持
- 增加Session支持(测试)
实例
from litchi.app import App
from litchi.uix.button import Button
class IndexApp(App):
def press(self):
return "Oh,do not press me!!"
def build(self):
self.button = Button(text="Hello,litchi!", on_pressed=self.press, id = "Button1")
IndexApp().run(model='server')
技术
jQuery ajax() 方法
jQuery AJAX 方法 jQuery AJAX 方法
实例
使用 AJAX 请求改变
元素的文本:
$("button").click(function(){
$.ajax({url:"demo_test.txt",success:function(result){
$("#div1").html(result);
}});
});
定义和用法 ajax() 方法用于执行 AJAX(异步 HTTP)请求。
所有的 jQuery AJAX 方法都使用 ajax() 方法。该方法通常用于其他方法不能完成的请求。
语法 $.ajax({name:value, name:value, ... }) 该参数规定 AJAX 请求的一个或多个名称/值对。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
litchi_web-0.2.5.2021810-1.tar.gz
(18.7 kB
view hashes)
Built Distribution
Close
Hashes for litchi_web-0.2.5.2021810-1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a394c6ee50ee49814ae949987dbb287c79e4c69c6c2715913ef945d62c6361bc |
|
MD5 | 729641d0acae7d164ff093ee62bcc424 |
|
BLAKE2b-256 | bd89f068654ececa56dc1229c797f4aa65d239cc91fbf464d27a02c8bb398e5b |
Close
Hashes for litchi_web-0.2.5.2021810.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd9f2a39bffb375db9d98006632330a3458ab6bc6b4fbfc6fb1278ef9cc51b2 |
|
MD5 | c2bc8a0b5e31b98976802998b93eec00 |
|
BLAKE2b-256 | e4556830fb5efee523fbeb12907d62320f46bde8963a68b6741f85310b55d50e |