迁移数据库为postgresql
This commit is contained in:
@@ -10,7 +10,12 @@
|
||||
<br>
|
||||
<a href="{{ url_for('blog.home') }}">返回首页</a>__<a href="{{ url_for('blog.sitemap') }}">网页地图</a>
|
||||
<hr id="hr_2">
|
||||
本站建立于大概2025年8月前后<br>
|
||||
数据库迁移至postgresql
|
||||
<br>
|
||||
<p>2026.07.11</p>
|
||||
<br>
|
||||
<hr id="hr_2">
|
||||
本站建立于大概2025年8月前后<br>
|
||||
差不多是个人博客多次重建后的成果<br>
|
||||
如今我已经成长很多<br>
|
||||
<br>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% for posts in posts %}
|
||||
<title>{{ posts['title'] }}</title>
|
||||
<link rel="icon" type="image/x-icon" href="/static/icon/original.ico">
|
||||
<meta property="og:title" content="{{ posts['title'] }}">
|
||||
@@ -8,19 +8,20 @@
|
||||
<meta property="og:image" content="https://ww3.tw/static/img/open-ww3-project.png">
|
||||
<meta property="og:url" content="https://ww3.tw/blog/posts/{{ posts['id']}}/">
|
||||
<meta property="og:type" content="website">
|
||||
</head>
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body>
|
||||
<a href="/blog">返回主页</a>
|
||||
<br>
|
||||
<h1>{{ posts['title'] }}</h1>
|
||||
<br>
|
||||
<br>
|
||||
{{ posts['content'].replace('&a&a','<style>a{text-decoration: none;}</style>') | safe}}
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
最后修改时间: 【{{ posts['update_time'].replace('.', '-') }}】
|
||||
{% for posts in posts %}
|
||||
{{ posts['content'].replace('&a&a','<style>a{text-decoration: none;}</style>') | safe}}
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
最后修改时间: 【{{ posts['update_time'].replace('.', '-') }}】
|
||||
{% endfor %}
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<h2>留言区: </h2>
|
||||
@@ -45,6 +46,7 @@
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: rgb(175, 223, 255);
|
||||
@@ -74,4 +76,4 @@
|
||||
el.innerText = formatted;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
21
templates/study/bbs.html
Normal file
21
templates/study/bbs.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>bbs</title>
|
||||
<script>
|
||||
// alert("数据库连接没问题!!!\n并且这是一个测试页面")
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p style="text-align: right;"><a href="./register">注册</a> | <a href="./login">登录</a></p>
|
||||
<p style="font-size: 66px; transform: translate(0px, -120px); width: 25%;" >bbs</p>
|
||||
<div style="transform: translate(0px, -120px);">
|
||||
发送内容:
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
所有内容:
|
||||
<hr>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
19
templates/study/login.html
Normal file
19
templates/study/login.html
Normal file
@@ -0,0 +1,19 @@
|
||||
登录页面
|
||||
<br>
|
||||
<form method="post" action="./">
|
||||
用户名:
|
||||
<br>
|
||||
<input type="text" name="username" id="lower" required>
|
||||
<br>
|
||||
密码:
|
||||
<br>
|
||||
<input type="password" name="passwd" required>
|
||||
<br>
|
||||
<button type="submit">登录</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
document.getElementById('lower').addEventListener('input', function() {
|
||||
this.value = this.value.toLowerCase();
|
||||
});
|
||||
</script>
|
||||
23
templates/study/register.html
Normal file
23
templates/study/register.html
Normal file
@@ -0,0 +1,23 @@
|
||||
在这里可以注册为临时用户用于管理您所发布过的文章和回复
|
||||
<form method="post" action="./">
|
||||
<br>
|
||||
用户名
|
||||
<br>
|
||||
<input type="text" name="username" id="lower" required>
|
||||
<br>
|
||||
密码( 不建议使用中文 )
|
||||
<br>
|
||||
<input type="password" name="passwd" pattern="[^\u4E00-\u9FA5]+" oninput="value=value.replace(/[\u4E00-\u9FA5]/g,'')" required>
|
||||
<br>
|
||||
年龄
|
||||
<br>
|
||||
<input type="number" name="age" min="1" max="100" step="1" required>
|
||||
<br>
|
||||
<button type="submit">注册</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
document.getElementById('lower').addEventListener('input', function() {
|
||||
this.value = this.value.toLowerCase();
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user