From 1d8258f3d1e70d05f1b1b5225ca023b07fceea5f Mon Sep 17 00:00:00 2001 From: zerasul Date: Fri, 21 Feb 2020 20:56:14 +0100 Subject: [PATCH] updating documentation --- README.md | 3 ++- posts/examples.md | 2 ++ posts/index.md | 1 + posts/install.md | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a918b7e..8c8faa7 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ postDir = "posts" defaultLayout = "template.html" staticDir = "static" title = "Blask | A Simple Blog Engine Based on Flask" +errors= { 404: "404"} ``` For last, to Run Blask, use the next Code: @@ -35,7 +36,7 @@ For last, to Run Blask, use the next Code: if __name__ == '__main__': b = BlaskApp(templateDir=settings.templateDir, postDir=settings.postDir , defaultLayout=settings.defaultLayout, - staticDir=settings.staticDir, title=settings.title) + staticDir=settings.staticDir, title=settings.title, errors={404:'404'}) b.run() ``` diff --git a/posts/examples.md b/posts/examples.md index c302757..5c70367 100644 --- a/posts/examples.md +++ b/posts/examples.md @@ -25,6 +25,8 @@ First if you need to run Blask, need to see the `settings.py` file and set the p # Website title title = 'Blask | A Simple Blog Engine Based on Flask' + # custom Error handlers + errors = { 404 : "404"} Next you need to run the next code: diff --git a/posts/index.md b/posts/index.md index 81267f7..689030a 100644 --- a/posts/index.md +++ b/posts/index.md @@ -51,6 +51,7 @@ We also have some [examples](/examples) available. Here are the release notes of each Blask version: +* [0.1.4](/0.1.4) * [0.1.3](/0.1.3) * [0.1.2](/0.1.2) * [0.1.1](/0.1.1) diff --git a/posts/install.md b/posts/install.md index 1f41334..5aefd53 100644 --- a/posts/install.md +++ b/posts/install.md @@ -24,6 +24,7 @@ After that, you need to configure Blask, create a file called _settings.py_ file defaultLayout = "template.html" staticDir = path.join(BASE_DIR, "static") title = "Blask" + errors = { 404:"404"} You can export a environment variable that point to this file: @@ -38,7 +39,7 @@ You can run the application using this code: if __name__ == '__main__': b = BlaskApp(templateDir=settings.templateDir, postDir=settings.postDir - , defaultLayout=settings.defaultLayout, staticDir=settings.staticDir, title=settings.title) + , defaultLayout=settings.defaultLayout, staticDir=settings.staticDir, title=settings.title, errors={404 : "404"}) b.run() If you use the environment Variable you can run Blask without arguments: