Skip to content

isdmx/taskcamp

Repository files navigation

Taskcamp

This software is used for educational and demonstrative purposes. It's a simple project management tool powered by Django Framework

Configuring

echo DJANGO_SECRET_KEY=\'$(python3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())')\'  > .env
cat > .env << __EOF__
RABBITMQ_HOST=localhost
RABBITMQ_PORT=5672
RABBITMQ_DEFAULT_USER=admin
RABBITMQ_DEFAULT_PASS=adminsecret
RABBITMQ_DEFAULT_VHOST=celery

POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=taskcamp
POSTGRES_USER=taskcamp
POSTGRES_PASSWORD=secret

MEMCACHED_LOCATION=localhost:11211

EMAIL_HOST=localhost
EMAIL_PORT=1025
__EOF__
# if you need a debug be enabled
cat >>.env << __EOF__
DJANGO_DEBUG=True
__EOF__

#if you need to keep celery results 
>>.env << __EOF__
REDIS_RESULTS_BACKEND=redis://localhost:6379/0
__EOF__

Migration and superuser creation

python3 manage.py migrate --no-input
  1. compile messages
python3 manage.py compilemessages -i venv
  1. create superuser
python3 manage.py createsuperuser

Run test server

run application

python3 manage.py runserver 0:8000

run celery for emails and other async tasks

python3 -m celery -A worker worker
# or
celery -A worker worker

Run production server

  1. run migrations
python3 manage.py migrate --no-input
  1. compile messages
python3 manage.py compilemessages -i venv
  1. run server
uwsgi --ini uwsgi.ini

Testing

Run tests

  1. run all tests with details
python3 manage.py test --verbosity=2

Run tests with coverage

  1. run with coverage
coverage run manage.py test --verbosity=2
  1. print report with missing lines and fail with error in case it's not fully covered
coverage report -m --fail-under=100

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors