diff --git a/README.md b/README.md index 6e75ebb..10dae33 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,49 @@ -Autotest - Instant test results +Autotest - Instant Programming contest framework =============================== -Getting Started +This project is used for creating fully automated programming contests -1. Install the virtual environment -2. Run pip install -r requirements.txt into the new environment +It has 5 roles +1. Superuser: it is like a root user, super user can do following actions. + 1. Create contest + 2. Delete contest + 3. create test admins + 4. create test creators +2. Test Creator: this role can select questions for context from existing questions. +3. Test Admins: This role can do following actions + 1. start contest + 2. stop contest + 3. see leader board +4. Students: This role can do following actions + 1. view questions + 2. submit answers + 3. see result of submissions + +### System Requirements: + 1. python 2.7.16 :If you don't have python 2.7 as default, install pyenv and then install pyton 2.7 +https://realpython.com/intro-to-pyenv/#installing-pyenv + 2. Mongodb + 3. AWS + +### Local setup: +1. Create virtual environment + ```shell script + virutalenv venv -p `which python` + source venv/bin/activate + ``` +2. Install Requirements + ```shell script + pip install -r requirements.txt + ``` +3. Run django server + ```shell script + cd webui + python manage.py runserver + ``` + +### Limitations +In local you can test the following roles +1. Super user +2. Test Creator + +Test Admin:To Start the contest you need AWS setup. \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 04bcf05..44c9a72 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -pymongo -Django -celery - +setuptools==44.1.1 +pymongo==3.6 +Django==1.8 +celery==4.4.0 +boto==2.49.0 \ No newline at end of file diff --git a/webui/vrautotest/settings.py b/webui/vrautotest/settings.py index 3d34c10..3d5fd68 100644 --- a/webui/vrautotest/settings.py +++ b/webui/vrautotest/settings.py @@ -26,7 +26,7 @@ db1 = client[DB_NAME] if 'DB_USER' in os.environ: db1.authenticate(os.environ.get('DB_USER'), os.environ.get('DB_PASSWORD')) -on_aws = True #"ON_AWS" in os.environ +on_aws = os.environ.get('ON_AWS','False')=='True' #"ON_AWS" in os.environ if on_aws: if not botoconfig.has_section('Credentials'):