Configuring a development environment for the project can be non-obvious. This WIP patch updates the readme and includes example dev settings in "dev_settings.py" which can be used (hopefully) in a general case to get new contributors into a development environment quickly.
Signed-off-by: Diana Thayer <garba...@gmail.com> --- README | 11 +++++++++++ dev_settings.py | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 dev_settings.py diff --git a/README b/README index 62f739d..d4da2c8 100644 --- a/README +++ b/README @@ -199,6 +199,17 @@ doesn't have the same name, so the update_classic_status.py script wouldn't be able to pick it up. +Using Custom Settings +--------------------- + +You will need to modify settings.py to run layerindex-web in either development or production. As an example of development settings, you can use dev_settings.py. It uses SQLite3 as a database and a console backend for email, so that sent emails show up in your terminal rather than being sent anywhere. + +Then, to use these settings in with `manage.py`, do this: + +```bash +python3 manage.py runserver --settings=dev_settings +``` + Maintenance ----------- diff --git a/dev_settings.py b/dev_settings.py new file mode 100644 index 0000000..cf04623 --- /dev/null +++ b/dev_settings.py @@ -0,0 +1,22 @@ +import os +import hashlib +import random +from settings import * + +WORKDIR = os.path.dirname(os.path.realpath(__file__)) + +SECRET_KEY = hashlib.md5(str(random.random()).format(10).encode('utf-8')).hexdigest() + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + ('admin', 'ad...@example.com'), +) + +DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3' +DATABASES['default']['NAME'] = os.sep.join([WORKDIR, 'layerindex-sql']) + +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' + +LAYER_FETCH_DIR = os.sep.join([WORKDIR, "layers"]) -- 2.7.4 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto