-
Clone project
$ git clone [email protected]:Liefbase/api.git
-
Create and activate a virtual environment
$ pip3 install virtualenv
$ python3 -m virtualenv venv
or whatever name you want instead of venv.$ source venv/bin/activate
-
Install python dependencies
$ pip3 install -r requirements.txt
-
Install GeoDjango Libraries
$ sudo apt-get install binutils libproj-dev gdal-bin
-
Install postgresql
$ sudo apt-get install postgresql
$ sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install postgis
-
Create project database
$ sudo -i -u postgres
$ psql
postgres=# create database <database_name>;
postgres=# \connect <database_name>;
<database_name>=# create extension postgis;
-
Create development user
<database_name>=# create user <username> password <password> with superuser;
-
Create secret_settings.py under /liefbase, example below
SECRET_KEY = '<secret_key>' DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': '<database_name>', 'USER': '<username>', 'PASSWORD': '<password>', 'HOST': 'localhost', 'PORT': '', } } DEBUG = True
-
Populate initial data
$ python3 manage.py populate
-
Run the server
$ python manage.py runserver
-
Or run the tests
$ python manage.py test
-
Notifications
You must be signed in to change notification settings - Fork 0
kradical/liefbase-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
The backend for a relief resource management tool.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published