Sign inSign up

ovidner/blapp

By ovidner

•Updated almost 7 years ago

Foo

Image
0

1.2K

ovidner/blapp repository overview

⁠Blapp

Build Status Docker Repository

The Blapp is the LiTHe Blås App. It handles very important things.

⁠Installing dependencies

⁠macOS

Use Homebrew and Pipenv:

brew bundle install
pipenv install -d -e . (Don't leave out the period)

⁠Other platforms

Pull requests with instructions are welcome. The instructions above and the Brewfile will give you a hint of what's needed.

⁠Setting up a development environment

Copy the environment template, migrate the database and start an interactive Python shell:

cp .env.template .env
pipenv run django-admin migrate
pipenv run django-admin shell_plus

In the Python shell, with your own values, run the following and quit with Ctrl+D:

UserAccount.objects.create_superuser(
    first_name='Olle',
    last_name='Vidner',
    username='knulle',
    email='[email protected]',
    password='abcdefgh',
)

Now you're ready to run the development server:

pipenv run django-admin runserver

The development server should now be available at http://localhost:8000⁠.

⁠Running tests

pipenv run pytest

⁠Tips and tricks

  • If you prefer not to prefix commands with pipenv run, then start a subshell within the virtual environment with pipenv shell.

⁠Documented errors:

⁠Mac:

If the postgresql service isn't running. In that case, the following command should start it.

sudo brew services postgresql start

⁠Database:

If you get the error: "FATAL: role "blapp" does not exist", you may need to enter the postgres prompt and create the database blapp with an owner blapp. On mac, the following commands may be a possible solution (from the parent blapp directory). Don't leave out the semicolons.

psql -U postgres -h localhost
=# CREATE USER blapp SUPERUSER;
=# CREATE DATABASE blapp WITH OWNER blapp;
=# \q

After this, the migrate command should work.

Tag summary

Content type

Image

Digest

Size

308.2 MB

Last updated

almost 7 years ago

docker pull ovidner/blapp