3 Revize d3ee3f916e ... ba39d9f1ff

Autor SHA1 Zpráva Datum
  ahmadnourallah ba39d9f1ff Update readme file před 6 roky
  ahmadnourallah ec3a39ee7f Use 'get' to fetch list elements před 6 roky
  ahmadnourallah 71d69a5ccf Update config file před 6 roky
3 změnil soubory, kde provedl 3 přidání a 2 odebrání
  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')