From b7781c8863557602948c027481eb9ea3e80fea19 Mon Sep 17 00:00:00 2001 From: Erwan Rouchet <rouchet@teklia.com> Date: Tue, 12 Mar 2019 11:57:19 +0000 Subject: [PATCH] Add more explicit docs for the local ImageServer --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b6a75d6131..3fbc74e666 100644 --- a/README.md +++ b/README.md @@ -67,9 +67,19 @@ Arkindex splits up image URLs in their image server and the image path. For exam LOCAL_IMAGESERVER_ID = 999 ``` +Here is how to quickly create the ImageServer using the shell: + +``` +backend/arkindex$ ./manage.py shell +>>> from arkindex.images.models import ImageServer +>>> ImageServer.objects.create(id=1, display_name='local', url='https://ark.localhost/iiif') +``` + +Note that this local server will only work inside Docker. + ## Usage -###Â Makefile +### Makefile At the root of the repository is a Makefile that provides commands for common operations: @@ -107,7 +117,7 @@ Once your code appears to be working on a local server, a few checks have to be Use `./manage.py test module_name` to perform tests on a single module, if you wish to spend less time waiting for all tests to complete. * **Code linting:** Type `flake8` inside the `backend/arkindex` directory. Our Flake8 settings should allow 120 characters per line instead of PEP8's 80. -##Â Debugging tools +## Debugging tools Run `pip install ipython django-debug-toolbar django_extensions` to install all the available optional dev tools for the backend. -- GitLab