From 40d5036cd97328f8665b43afb1ff7fab497b7e56 Mon Sep 17 00:00:00 2001 From: JianweiGao Date: Tue, 2 Oct 2018 00:06:28 +0800 Subject: [PATCH 1/4] Update the Readme and settings.py --- README.md | 39 ++++++++++++++++++++++++++++++- apimanager/apimanager/settings.py | 15 ++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42ae8e0c..1bfba056 100644 --- a/README.md +++ b/README.md @@ -87,12 +87,15 @@ Execute the same steps as for development, but do not run the app. Edit `apimanager/apimanager/local_settings.py` for _additional_ changes to the development settings above: ```python + +import os # Disable debug DEBUG = False # Hosts allowed to access the app ALLOWED_HOSTS = ['127.0.0.1', 'localhost', ''] + # Directory to place static files in, defaults to `../static-collected` relative to this file -STATIC_ROOT = '' +STATIC_ROOT = '' # Admins to send e.g. error emails to ADMINS = [ ('Admin', 'admin@example.com') @@ -103,6 +106,40 @@ SERVER_EMAIL = 'apimanager@example.com' EMAIL_HOST = 'mail.example.com' # Enable email security EMAIL_TLS = True + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +# Used internally by Django, can be anything of your choice +SECRET_KEY = 'abc' +# API hostname, e.g. https://api.openbankproject.com +API_HOST = 'http://127.0.0.1:8080' +# Consumer key + secret to authenticate the _app_ against the API +OAUTH_CONSUMER_KEY = 'y3og05zrlhhy4fcunnzrdutumrw3rbc0sydsyw5e' +OAUTH_CONSUMER_SECRET = '42jfbpgfft3aviticlfdninl5wf5siz3hs1j1d3m' +# Database filename, default is `../db.sqlite3` relative to this file +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, '..', '..', 'db.sqlite3'), + } +} + +# Apps to exclude when request to OBP-API's api +EXCLUDE_APPS = [] +# Functions to exclude when request to OBP-API's api +EXCLUDE_FUNCTIONS = [] +# Url Patterns to exclude when reqeust to OBP-API's api +EXCLUDE_URL_PATTERN = [] + +# App Name to aggregate metrics +API_EXPLORER_APP_NAME = 'xxx' + +#Map Java: yyyy-MM-dd'T'HH:mm'Z' +API_DATETIMEFORMAT = '%Y-%m-%dT%H:%M:%SZ' +#Map Java: yyyy-MM-dd'T'HH:mm:ss.SSS'Z' +API_DATEFORMAT = '%Y-%m-%dT%H:%M:%S.000Z' + ``` ## Static files diff --git a/apimanager/apimanager/settings.py b/apimanager/apimanager/settings.py index f60eacf0..23c527c1 100644 --- a/apimanager/apimanager/settings.py +++ b/apimanager/apimanager/settings.py @@ -250,3 +250,18 @@ BOOTSTRAP4 = { 'include_jquery': True, } + +# Apps to exclude when request to OBP-API's api +EXCLUDE_APPS = [] +# Functions to exclude when request to OBP-API's api +EXCLUDE_FUNCTIONS = [] +# Url Patterns to exclude when reqeust to OBP-API's api +EXCLUDE_URL_PATTERN = [] +# App Name to aggregate metrics +API_EXPLORER_APP_NAME = 'xxx' + + + + + + From 2460508ad14a5f4098c8f8024f4d1f355729124e Mon Sep 17 00:00:00 2001 From: JianweiGao Date: Tue, 2 Oct 2018 15:16:38 +0800 Subject: [PATCH 2/4] Change the font size of some section caption --- apimanager/consumers/templates/consumers/index.html | 2 +- apimanager/users/templates/users/index.html | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apimanager/consumers/templates/consumers/index.html b/apimanager/consumers/templates/consumers/index.html index 2e75b2b4..fdd5e11e 100644 --- a/apimanager/consumers/templates/consumers/index.html +++ b/apimanager/consumers/templates/consumers/index.html @@ -42,7 +42,7 @@

Consumers

-

Statistics

+

Statistics

  • Total number of consumers: {{ statistics.consumers_num }}
  • Total number of unique developer email addresses: {{ statistics.unique_developer_email_num }}
  • diff --git a/apimanager/users/templates/users/index.html b/apimanager/users/templates/users/index.html index b7b1d928..5e304c65 100644 --- a/apimanager/users/templates/users/index.html +++ b/apimanager/users/templates/users/index.html @@ -8,6 +8,7 @@

    Users

    +

    Filters