GithubHelp home page GithubHelp logo

scottevansdbca / prs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dbca-wa/prs

0.0 1.0 0.0 759 KB

Planning Referral System corporate application

License: Apache License 2.0

Dockerfile 0.09% Python 68.59% JavaScript 2.48% HTML 28.39% CSS 0.44%

prs's Introduction

Planning Referral System

Build Status

This project is the Department of Biodiversity, Conservation and Attractions Planning Referral System corporate application.

Installation

Create a new virtualenv and install required libraries using pip:

pip install -r requirements.txt

Environment variables

This project uses django-confy to set environment variables (in a .env file). The following variables are required for the project to run:

DATABASE_URL="postgis://USER:PASSWORD@HOST:5432/DATABASE_NAME"

Variables below may also need to be defined (context-dependent):

SECRET_KEY="ThisIsASecretKey"
DEBUG=True
ALLOWED_DOMAINS=".dbca.wa.gov.au,localhost"
CSRF_COOKIE_SECURE=False
SESSION_COOKIE_SECURE=False
EMAIL_HOST="email.host"
EMAIL_PORT=25
REFERRAL_EMAIL_HOST="outlook.office365.com"
REFERRAL_EMAIL_USER="[email protected]"
REFERRAL_EMAIL_PASSWORD="password"
REFERRAL_ASSIGNEE_FALLBACK="admin"
PLANNING_EMAILS="[email protected],[email protected]"
ASSESSOR_EMAILS="[email protected],[email protected]"
SITE_URL="prs.dbca.wa.gov.au"
GEOSERVER_WMS_URL="//kmi.dpaw.wa.gov.au/geoserver/gwc/service/wms"
GEOSERVER_WFS_URL="//kmi.dpaw.wa.gov.au/geoserver/ows"
PRS_USER_GROUP="PRS user"
PRS_PWUSER_GROUP="PRS power user"
BORGCOLLECTOR_API="https://borg.dpaw.wa.gov.au/api/"
SLIP_USERNAME="slip_username"
SLIP_PASSWORD="slip_password"
SLIP_WFS_URL="https://wfs.slip.url.au/endpoint"
SLIP_DATASET="slip:LGATE-001"

Running

Use runserver to run a local copy of the application:

python manage.py runserver 0.0.0.0:8080

Run console commands manually:

python manage.py shell_plus

Testing

Run unit tests for the referral app as follows:

python manage.py test prs2.referral -k -v2

To run tests for e.g. models only:

python manage.py test prs2.referral.test_models -k -v2

To obtain coverage reports:

coverage run --source='.' manage.py test -k -v2
coverage report -m

Docker image

To build a new Docker image from the Dockerfile:

docker image build -t dbcawa/prs .

prs's People

Contributors

ropable avatar dbca-asi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.