OSDG-IIITH / art-club-website

Art Club website at IIIT-H
3 stars 6 forks source link

Art Society

Art society was started in the summer of 2017 and hosted its first event in the monsoon 2017.

How to contribute

Rules

Forking the repo

Fork the repo

  1. Clone the repo:

    git clone <url of forked repo>
  2. Set upstream(new remote) to base repo so that you can keep your fork updated:

    git remote add upstream https://github.com/OSDG-IIITH/art-club-website
  3. Everytime you want to pull changes from base repo:

    git pull upstream <branch-name>

Submitting a pull request

Requirements

Instructions to run

Instructions to run

Activate virtual environment

cd src
source venv/bin/activate

Generate requirements file

pip3 freeze > requirements

Activate server

python3 manage.py runserver

Backend - Django

Migrations

Every time there is a change in the models, they need to be reflected to the database by running migrations.

python manage.py makemigrations backend
python manage.py migrate

Enabling/Disabling browseable API

Uncomment/Comment (respectively) the following lines in django_react/settings.py

REST_FRAMEWORK = {
    'DEFAULT_RENDERER_CLASSES': (
        'rest_framework.renderers.JSONRenderer',
    )
}

Testing

Make sure you're in the correct directory:

cd src

Running Tests:

coverage run --source='.' manage.py test

and generate the report:

coverage html

You'll see exactly what to test. If you prefer seeing the report on the command line run:

coverage report