3 Commitit d3ee3f916e ... ba39d9f1ff

Tekijä SHA1 Viesti Päivämäärä
  ahmadnourallah ba39d9f1ff Update readme file 6 vuotta sitten
  ahmadnourallah ec3a39ee7f Use 'get' to fetch list elements 6 vuotta sitten
  ahmadnourallah 71d69a5ccf Update config file 6 vuotta sitten
3 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 1 0
      README.md
  2. 1 1
      config.py
  3. 1 1
      wiki/views/wiki.py

+ 1 - 0
README.md

@@ -106,6 +106,7 @@ UPLOAD_FOLDER = join(dirname(abspath(__file__)), 'wiki/static/') # Upload folder
 WEBSITE_LOGO = gettext('images/logo-e.png')
 WEBSITE_NAME = gettext('Uruk Wiki')
 WEBSITE_KEYWORDS = gettext('uruk, wiki, uruk wiki, uruk project, uruk linux, linux, URUK, URUK PROJECT') # Website Keywords (for SEO)
+FRONT_PAGE = gettext('index') # Front Page url, set to False if none
 ```
 
 Also, project must have a config file in *instance* directory. Create *instance/config.py* and fill it with the below template:

+ 1 - 1
config.py

@@ -27,4 +27,4 @@ UPLOAD_FOLDER = join(dirname(abspath(__file__)), 'wiki/static/') # Upload folder
 WEBSITE_LOGO = gettext('images/logo-e.png')
 WEBSITE_NAME = gettext('Uruk Wiki')
 WEBSITE_KEYWORDS = gettext('uruk, wiki, uruk wiki, uruk project, uruk linux, linux, URUK, URUK PROJECT') # Website Keywords (for SEO)
-FRONT_PAGE = gettext('index') # Front Page name, set to False if none
+FRONT_PAGE = gettext('index') # Front Page url, set to False if none

+ 1 - 1
wiki/views/wiki.py

@@ -18,7 +18,7 @@ wiki = Blueprint('wiki', __name__)
 @wiki.route('/')
 @nocache
 def index():
-	if app.config['FRONT_PAGE']:
+	if app.config.get('FRONT_PAGE'):
 		frontpage = WikiPostDB.query.filter_by(default_lang=session['lang'], url=gettext(app.config['FRONT_PAGE'])).first()
 		if frontpage:
 			content = macro_compiler(frontpage.content, 'macros.html')