minor fixes + update version number
This commit is contained in:
parent
722ceb4724
commit
a8b24f2765
2 changed files with 3 additions and 9 deletions
|
|
@ -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).
|
||||
|
|
|
|||
7
app.py
7
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", '</p><p>').replace('\n', '<br />')
|
||||
return Markup(text)
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def homepage():
|
||||
page_limit = _getconf("appearance","items_per_page",20,cast=int)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue