From a8b24f2765ea80f412c0322f421c84af95499669 Mon Sep 17 00:00:00 2001
From: Mattia Succurro
Date: Thu, 16 Mar 2023 14:52:55 +0100
Subject: [PATCH] minor fixes + update version number
---
README.md | 5 -----
app.py | 7 +++----
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 7fabd29..b8e5e23 100644
--- a/README.md
+++ b/README.md
@@ -46,11 +46,6 @@ directory = /path/to/database/
+ You can now access Salvi in your browser at port 5000.
-## Caveats
-
-+ All pages created are, as of now, viewable and editable by anyone, with no
- trace of users and/or passwords.
-
## License
[MIT License](./LICENSE).
diff --git a/app.py b/app.py
index 26375bb..edc53fd 100644
--- a/app.py
+++ b/app.py
@@ -29,7 +29,7 @@ from configparser import ConfigParser
import i18n
import gzip
-__version__ = '0.7-dev'
+__version__ = '0.7.0'
#### CONSTANTS ####
@@ -381,7 +381,7 @@ class PageLink(BaseModel):
def init_db():
database.create_tables([
- Page, PageText, PageRevision, PageTag, PageProperty, PageLink
+ User, Page, PageText, PageRevision, PageTag, PageProperty, PageLink
])
#### WIKI SYNTAX ####
@@ -454,7 +454,6 @@ login_manager = LoginManager(app)
login_manager.login_view = 'accounts_login'
-
#### ROUTES ####
@app.before_request
@@ -487,13 +486,13 @@ def _inject_variables():
def _inject_user(userid):
return User[userid]
-
@app.template_filter()
def linebreaks(text):
text = html.escape(text)
text = text.replace("\n\n", '
').replace('\n', '
')
return Markup(text)
+
@app.route('/')
def homepage():
page_limit = _getconf("appearance","items_per_page",20,cast=int)