From 774fb2898132a48164f263136f497e8a39072b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 7 Sep 2020 07:18:12 +0800 Subject: [PATCH] Revised the README. --- README.md | 73 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index fd36cde..7a6918a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # mia-accounting -The Mia! Accounting Application Built on Python Django +The Mia! Accounting Django Application ``` Copyright (c) 2020 imacat. @@ -21,64 +21,89 @@ The Mia! Accounting Application Built on Python Django ## Live Demonstration https://accounting.imacat.idv.tw/accounting -* Username: admin -* Password: 12345 +* Username: `admin` +* Password: `12345` ## Installation ### Requirements -Installs the following requirements with pip: +`mia-accounting` requires Python 3.6 or above to work. + +Install the required packages with `pip`. + +``` +pip install django django-dirtyfields titlecase django-decorator-include +``` -* Python 3.6 or above -* Django 3.0 or above -* django-dirtyfields -* django-decorator-include -* titlecase ### Download -Clones the project from GitHub +The Mia! Accounting project is hosted on GitHub. + +https://github.com/imacat/mia-accounting + +You can download or clone +the project from from GitHub ``` git clone git@github.com:imacat/mia-accounting.git ``` -Moves the accounting and mia_core directories into your Django project root +Move the `accounting` and `mia_core` directories into your Django project root directory. -### Configure Your settings.py +### `settings.py` -Adds these two applications into your INSTALL_APPS. +Add these two applications in the `INSTALL_APPS` section of your `settings.py`. ``` -'mia_core.apps.MiaCoreConfig' -'accounting.apps.AccountingConfig' +INSTALLED_APPS = [ + 'mia_core.apps.MiaCoreConfig', + 'accounting.apps.AccountingConfig', + ... +] ``` -Adds the locale middleware if it is not added yet. +Make sure the locale middleware is in the `MIDDLEWARE` section of your +`settings.py`, and add it if it is not added yet. ``` -'django.middleware.locale.LocaleMiddleware' +MIDDLEWARE = [ + ... + 'django.middleware.locale.LocaleMiddleware', + ... +] ``` -### Configure Your urls.py: +### `urls.py` -Adds this line into your urls.py: +Add the `accounting` application in the `urlpatterns` of your `urls.py`. ``` -path('accounting/', decorator_include(login_required, 'accounting.urls')), +urlpatterns = [ + ... + path('accounting/', decorator_include(login_required, 'accounting.urls')), + ... +] ``` -Ensures these two lines are also in your urls.py, if they are not yet: +Make sure `i18n` and `jsi18n` are also in the `urlpatterns` of your `urls.py`, +and add them if they are not added yet. ``` -path('i18n/', include("django.conf.urls.i18n")), -path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'), +urlpatterns = [ + ... + path('i18n/', include("django.conf.urls.i18n")), + path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'), + ... +] ``` -### Restarts Your Web Project +### Restart Your Web Project ## Bugs and Supports Address all bugs and support requests to imacat@mail.imacat.idv.tw. + +2020/9/7