Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Installing the Jochre Search Frontend application

Assaf Urieli edited this page Jan 18, 2019 · 1 revision

The following instructions enable you to install the Jochre Search front-end Django application. They assume you have been given the address to a Jochre Search back-end application.

First, install the python3 libraries.

sudo apt install python3-pip python3-dev
sudo -H pip3 install --upgrade pip
sudo -H pip3 install virtualenv

Navigate to the parent directory where you would like to install Jochre:

cd [parent-dir]

Retrieve all of Jochre from github:

git clone [email protected]:urieli/jochre.git

Navigate to the subdirectory containing the Jochre Search front-end application, create a virtual environment, enter it, and install requirements:

cd jochre/jochre_search_django
virtualenv jochreenv
source jochreenv/bin/activate
pip3 install -r requirements.txt

Now it's time to modify the configuration using your favorite text editor (vim below):

cp jochre_search_django/settings_local_yi.py jochre_search_django/settings_local.py
vim jochre_search_django/settings_local.py

Let's assume the back-end address is https://example.org/jochreSearch/search Two lines need to be updated in settings_local.py:

JOCHRE_SEARCH_URL='https://example.org/jochreSearch/search'
JOCHRE_SEARCH_EXT_URL='https://example.org/jochreSearch/search'

Let's assume your username is myuser. You need to create the directory which will contain the Django logs:

sudo mkdir /var/log/jochreSearchDjango
sudo chown myuser:myuser /var/log/jochreSearchDjango

Also, you need to generate a header-local.html file. This file can later be modified to contain the header you would like to see on top of the screen:

touch jochre/templates/header-local.html

Now, setup Django to run correctly.

python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py createsuperuser
python3 manage.py collectstatic

Finally, you can start your front-end application:

python3 manage.py runserver

At this point, you should be able to navigate to http://localhost:8000.

When you're finished, you can exit your virtual environment with:

deactivate
Clone this wiki locally