Giter Club home page Giter Club logo

legaldb's Introduction

legaldb

MIT license Code style: black

CC Legal Database: curated repository of Case Law and Scholarship data from around the world in a Django based website.

legaldb.creativecommons.org

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Contributing

See CONTRIBUTING.md. It contains some general instructions that should be followed when contributing to any of the Creative Commons open-source repositories.

Development setup

Copy .env.template and set environment variables (like DJANGO_DEBUG_ENABLED=True for local development and testing) and secret keys in a .env file.

cp .env.template .env

Using Pipenv

To follow these instructions, Python 3 and Pipenv are required.

Install dependencies with pipenv.

pipenv install --dev

Run the migrations to create the database (we use Postgresql in this case).

pipenv run python manage.py migrate

The next step is to create an admin account for Django admin.

pipenv run python manage.py createsuperuser

Finally you can start a development server with:

pipenv run python manage.py runserver

and see a local version of the website at 127.0.0.1:8000.

Using Docker-Compose

Ensure that you have Docker and Docker Compose installed on your system For installation instructions refer: Get Docker | Docker Documentation

Start (and Build) the Servers

Start Django server (backed by PostgreSQL server ) at 127.0.0.1:8000:

docker-compose up

Run Migrations

Run the migrations to create database schema (we use Postgresql in this case):

docker-compose run app sh -c "python manage.py migrate"

(Required after initial build)

Execute Commands

To execute any commands inside the app docker container, follow this format:

docker-compose run app sh -c "command here"

Examples:

  • Create a Super User:
    docker-compose run app sh -c "python manage.py createsuperuser"
  • Collect static files:
    docker-compose run app sh -c "python manage.py collectstatic"

Webpack

Open another terminal and navigate to webpack folder using:

cd webpack

To install webpack dependencies use:

npm install

or alternatively to install from package-lock.json use:

npm ci

If you want to make changes to scss files during development run:

npm run watch

otherwise run the following command

npm run build

After made code changes and before commit, check code style from main directory using.

Code Style

After making changes in code and before commit, check code style.

pipenv run black .
pipenv run flake8

Development Blog Posts

Posts in the Outreachy May 2020 round: CC Legal Database series

Deploy to Heroku

See deploy_to_heroku.md.

License

legaldb's People

Contributors

krysal avatar timidrobot avatar pratikdaigavane avatar kgodey avatar darkshredder avatar cc-creativecommons-github-io-bot avatar peterspdx avatar saurabhagarwala avatar aakash2408 avatar mzeinstra avatar p1yu5h-50n1 avatar sp35 avatar kylolexweb avatar alexiaokarabi 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.