Updated tests to disable GPU and not use static screen sizes
This commit is contained in:
parent
64f38f3aa4
commit
403a4f1a6d
11 changed files with 88 additions and 316 deletions
5
.github/workflows/test-build.yml
vendored
5
.github/workflows/test-build.yml
vendored
|
|
@ -8,15 +8,10 @@ on:
|
|||
|
||||
jobs:
|
||||
test:
|
||||
environment: test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Write .env to build
|
||||
env:
|
||||
DOTENV: '${{ secrets.DOTENV }}'
|
||||
run: echo "$DOTENV" >> .env
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1,3 +1 @@
|
|||
from . import dev
|
||||
from . import prod
|
||||
from . import test
|
||||
from .dev import *
|
||||
|
|
|
|||
|
|
@ -1,31 +1,13 @@
|
|||
from pathlib import Path
|
||||
import os
|
||||
from django.contrib.messages import constants
|
||||
from dotenv import dotenv_values
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
DOTENV_FILE = BASE_DIR / '.env'
|
||||
CONFIG = dotenv_values(DOTENV_FILE)
|
||||
SECRET_KEY = "ut20oy+5(!p)lqg8p+986ua3f0b*h=q0o2*swea^pv74*#&w5z"
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
SECURE_SSL_REDIRECT = False
|
||||
SESSION_COOKIE_SECURE = False
|
||||
CSRF_COOKIE_SECURE = False
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
'localhost',
|
||||
'127.0.0.1',
|
||||
]
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
|
|
@ -42,10 +24,6 @@ INSTALLED_APPS = [
|
|||
'housewars.apps.HousewarsConfig'
|
||||
]
|
||||
|
||||
PASSWORD_HASHERS = [
|
||||
'django.contrib.auth.hashers.MD5PasswordHasher'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
|
|
@ -76,18 +54,6 @@ TEMPLATES = [
|
|||
|
||||
WSGI_APPLICATION = 'CollegiateHouseWars.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
|
||||
|
||||
|
|
@ -106,7 +72,6 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/4.0/topics/i18n/
|
||||
|
||||
|
|
@ -118,18 +83,16 @@ USE_I18N = True
|
|||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
STATIC_ROOT = BASE_DIR / 'staticfiles'
|
||||
STATIC_ROOT = '/var/www/collegiate-housewars/static/'
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
BASE_DIR / "static"
|
||||
]
|
||||
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
||||
|
||||
|
|
@ -1,145 +1,25 @@
|
|||
from pathlib import Path
|
||||
from django.contrib.messages import constants
|
||||
from dotenv import dotenv_values
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
||||
|
||||
from .defaults import *
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
DOTENV_FILE = BASE_DIR / '.env'
|
||||
CONFIG = dotenv_values(DOTENV_FILE)
|
||||
SECRET_KEY = "*9r50c74r58p#*tnfpadsw*cp&$(^sj585w1u@!y9*eowmwl1*"
|
||||
SECRET_KEY = '*9r50c74r58p#*tnfpadsw*cp&$(^sj585w1u@!y9*eowmwl1*'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
SECURE_SSL_REDIRECT = False
|
||||
SESSION_COOKIE_SECURE = False
|
||||
CSRF_COOKIE_SECURE = False
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
'localhost',
|
||||
'127.0.0.1',
|
||||
]
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
|
||||
'smart_selects',
|
||||
'formtools',
|
||||
|
||||
'housewars.apps.HousewarsConfig'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'CollegiateHouseWars.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [BASE_DIR / 'templates'],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'CollegiateHouseWars.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'dev',
|
||||
'USER': CONFIG.get('DATABASE_USERNAME'),
|
||||
'PASSWORD': CONFIG.get('DATABASE_PASSWORD'),
|
||||
'HOST': 'mysqldb',
|
||||
'PORT': '3306'
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/4.0/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
STATIC_ROOT = '/var/www/collegiate-housewars/static/'
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
BASE_DIR / "static"
|
||||
]
|
||||
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
|
||||
MESSAGE_TAGS = {constants.DEBUG: 'debug',
|
||||
constants.INFO: 'info',
|
||||
constants.SUCCESS: 'success',
|
||||
constants.WARNING: 'warning',
|
||||
constants.ERROR: 'danger', }
|
||||
|
||||
USE_DJANGO_JQUERY = True
|
||||
|
|
|
|||
12
CollegiateHouseWars/settings/docker.py
Normal file
12
CollegiateHouseWars/settings/docker.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from .dev import *
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'dev',
|
||||
'USER': 'root',
|
||||
'PASSWORD': 'passw0rd',
|
||||
'HOST': 'mysqldb',
|
||||
'PORT': '3306'
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +1,6 @@
|
|||
from pathlib import Path
|
||||
import os
|
||||
from django.contrib.messages import constants
|
||||
from dotenv import dotenv_values
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
||||
from .defaults import *
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||
|
|
@ -16,64 +8,12 @@ SECRET_KEY = os.environ.get('SECRET_KEY')
|
|||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
|
||||
SECURE_SSL_REDIRECT = False
|
||||
SESSION_COOKIE_SECURE = False
|
||||
CSRF_COOKIE_SECURE = False
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
'45.79.52.230',
|
||||
'housewars.c4thebomb101.com',
|
||||
'collegiate-housewars.herokuapp.com'
|
||||
]
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
|
||||
'smart_selects',
|
||||
'formtools',
|
||||
|
||||
'housewars.apps.HousewarsConfig'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'CollegiateHouseWars.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [BASE_DIR / 'templates'],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'CollegiateHouseWars.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||
|
||||
|
|
@ -87,61 +27,3 @@ DATABASES = {
|
|||
'PORT': '3306'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/4.0/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
STATIC_ROOT = BASE_DIR / "staticfiles"
|
||||
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
BASE_DIR / "static"
|
||||
]
|
||||
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
|
||||
MESSAGE_TAGS = {constants.DEBUG: 'debug',
|
||||
constants.INFO: 'info',
|
||||
constants.SUCCESS: 'success',
|
||||
constants.WARNING: 'warning',
|
||||
constants.ERROR: 'danger', }
|
||||
|
||||
USE_DJANGO_JQUERY = True
|
||||
|
|
|
|||
82
README.md
82
README.md
|
|
@ -1,46 +1,86 @@
|
|||
# Collegiate Housewars
|
||||
|
||||
Welcome to the repository for the Collegiate School of Medicine and Bioscience Housewars site. This repository is open-source, so feel free to download, play around, or contribute. Below is a guide detailing the basic usage of the site and instructions for installation of a local server. Enjoy!
|
||||
Welcome to the repository for the Collegiate School of Medicine and Bioscience House Wars site. This is a project that is completely made in the Python Django framework, and should contain all the features that are necessary to run House Wars (if it doesn't please let us know). This repository is open-source, so feel free to download, play around, and/or contribute. Below is a guide detailing the basic usage of the site and instructions for installation of a local development server. Enjoy!
|
||||
|
||||
| Table of Contents |
|
||||
| ------- |
|
||||
| [Usage](#Usage-Instructions) |
|
||||
| [Installation](#Installation) |
|
||||
| [Defining .env](#Defining-env) |
|
||||
| [Contributing](#Contributing) |
|
||||
| [Usage](#usage-instructions) |
|
||||
| [Setup](#setup) |
|
||||
| [Hosting](#hosting) |
|
||||
| [Contributing](#contributing) |
|
||||
|
||||
## Usage Instructions
|
||||
So far there are three primary pages on this site. They include the:
|
||||
1. Admin page - this is accessed through `/admin`, and contains the function for managing the activities in the latest housewars and managing points totals and student signups.
|
||||
2. Student signup form - this is accessed at `/`, and contains the form needed for students to signup for housewars activities.
|
||||
3. Teacher points form - this is accessed at `/points` and contains the form needed for teachers to add points to houses for activities.
|
||||
1. Student signup form - this is accessed at `/`, and contains the form for students to signup for House Wars activities.
|
||||
2. Teacher points form - this is accessed at `/points` and contains the form to award points for activities.
|
||||
3. Facilitator signup form - this is accessed at `/facilitator` and contains the form for volunteers to signup to facilitate activities.
|
||||
4. Admin - this is accessed through `/admin`, and contains the function for managing everything related to House Wars that the general population should not be able to see.
|
||||
|
||||
## Installation
|
||||
Welcome to the installation section of the guide. This will walk you through installing the site and spinning up a local development server.
|
||||
## Setup
|
||||
Welcome to the installation section of the guide. This will walk you through installing the site and spinning up a local development server. There are two methods to settings up the development server. One uses docker and the other just boots up a local development server. I would highly recommend setting up docker for contributing, it is used by very many other projects and is a great tool for development.
|
||||
- [With Docker](#setup-with-docker)
|
||||
- [Without Docker](#setup-without-docker)
|
||||
|
||||
### Prerequisites:
|
||||
### Setup with Docker:
|
||||
|
||||
#### Prerequisites:
|
||||
- `git` - You can test if you have git installed using the command `git -v`, which should output a version number. If you do not have git installed you can download it [here](https://git-scm.com/downloads).
|
||||
- `docker` - You can test if you have docker installed by typing `docker -v` in the terminal. The resulting output should be a version number. If you do not have docker installed, you can download it [here](https://www.docker.com/get-started/).
|
||||
|
||||
### Instructions
|
||||
#### Instructions
|
||||
1. Clone the repository into the desired directory using `git clone https://github.com/C4theBomb/collegiate-housewars.git`.
|
||||
2. Navigate into the repository using `cd collegiate-housewars`.
|
||||
3. Open Docker and run the command `docker compose up` in a shell.
|
||||
3. Open Docker and run the command `docker compose up -d` in a shell.
|
||||
4. In Docker, open the shell of the `app-1`.
|
||||
5. Run migrations and create a development database using `python manage.py migrate`.
|
||||
6. Server should be available to run. You can activate the server using `python manage.py runserver`. The site will be accessible using the [default url](http://localhost:8000).
|
||||
5. Server should be running automatically. The site will be accessible using the [default url](http://localhost:8000). Any changes made in the filesystem will update live on the local server.
|
||||
|
||||
## Defining .env
|
||||
The `.env` file is used to secure data and keep it from entering a cloud, open-acccess environment. Because of this, you will need to define a `.env` file yourself. The parameters that you will need are:
|
||||
- SECRET_KEY - This will contain the server key of your django local server. It can be generated using the command `python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'`.
|
||||
#### Relevant Commands:
|
||||
- `docker compose up`: This will run the docker server on the default url.
|
||||
- `-d`: Removed terminal output from the command (disconnected mode). AKA docker doesn't steal your terminal
|
||||
- `docker compose down`: This will stop the currently running containers and free up other ports for other apps (if you have them).
|
||||
- `-v`: Removes volumes as well. Docker volumes can get very large and this will wipe all data contained in your database. WARNING: IRREVERSIBLE.
|
||||
|
||||
### Setup without Docker:
|
||||
|
||||
#### Prerequisites:
|
||||
- `git` - You can test if you have git installed using the command `git -v`, which should output a version number. If you do not have git installed you can download it [here](https://git-scm.com/downloads).
|
||||
- `python` - You can test if you have docker installed by typing `docker -v` in the terminal. The resulting output should be a version number. If you do not have docker installed, you can download it [here](https://www.docker.com/get-started/).
|
||||
- `pip` - You can test if you have pip installed using `python -m pip --version`. If you do not have it installed then installation instructions can be found [here](https://pip.pypa.io/en/stable/installation/).
|
||||
|
||||
#### Instructions:
|
||||
1. Clone the repository into the desired directory using `git clone https://github.com/C4theBomb/collegiate-housewars.git`.
|
||||
2. Navigate into the repository using `cd collegiate-housewars`.
|
||||
3. Install virtualenv by running `python -m pip install virtualenv`.
|
||||
4. Create a virtualenv using the command `python -m virtualenv venv`.
|
||||
5. Activate the virtualenvironment using the command for your os:
|
||||
- Linux/Mac: `source ./venv/bin/activate`
|
||||
- Windows: `.\venv\Scripts\activate`
|
||||
6. Install dependencies using the command `pip install -r requirements.txt`.
|
||||
7. Run migrations using the command `python manage.py migrate`.
|
||||
8. Run the local development server using `python manage.py runserver`.
|
||||
|
||||
### Relevant Commands:
|
||||
- `python manage.py test`: Runs all tests for current features of the site. If something fails, your broke something, please fix it. If you think its not your fault, it probably is. However, if your REALLY think its not your fault, create an issue and we will try our best to resolve it as soon as possible.
|
||||
- `python manage.py makemigrations`: If you end up making any changes to the files in `housewars/models`, please run this command to log your changes. This will allow us to make the relevant changes to our production database and display the new features on the site.
|
||||
|
||||
## Hosting
|
||||
|
||||
### Options
|
||||
There are several options that you can use for hosting the site on a production server. My personal recommendation would either be Heroku or Linode, since it comes pre-configured with the website. Linode is very cheap at only $5 a month, while Heroku is completely free (albeit more restricted).
|
||||
|
||||
### Environment Variables
|
||||
The server environment variables are used to secure data and keep it from entering a cloud, open-acccess environment. Because of this, you will need to define a them file yourself. These are only needed in production and are completely unnecessary if you are using a local development server. The varaibles that you will need are:
|
||||
- SECRET_KEY - This will contain the secret encryption key of your django server. It can be generated using the command `python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'`.
|
||||
- DATABASE_USERNAME - This will be the username of your production database.
|
||||
- DATABASE_PASSWORD - This will be the password of your production database.
|
||||
- DATABASE_HOST - This will be the IP address of your production database.
|
||||
|
||||
## Contributing
|
||||
As an open-source school repository we welcome all contributors willing to help make our website better.
|
||||
As an open-source school repository we welcome all contributors willing to help make the House Wars website better (by hacking it or otherwise).
|
||||
|
||||
### Instructions
|
||||
1. Follow the [installation instructions above](#Installation) to install the required packages and run the local server. You will want to fork the repository before cloning it.
|
||||
1. Follow the [setup instructions above](#setup) to install the required dependencies and run the local server. You will want to fork the repository and clone your own repository.
|
||||
2. Commit your new features to your new forked repository.
|
||||
3. Create a pull request that details the changes/improvements that you have made.
|
||||
4. Wait for @C4theBomb to open discussion/merge your pull request.
|
||||
4. Wait for @C4theBomb (C4 Patino), @gywn9081 (Henry Bloch), or @Slayer121 (Dylan Fritz) to open discussion or merge your pull request.
|
||||
5. After your pull request is merged, it will automatically be uploaded into production code and will show up on the website.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ services:
|
|||
- housewars
|
||||
env_file: .env
|
||||
environment:
|
||||
DJANGO_SETTINGS_MODULE: "CollegiateHouseWars.settings.dev"
|
||||
DJANGO_SETTINGS_MODULE: "CollegiateHouseWars.settings.docker"
|
||||
depends_on:
|
||||
mysqldb:
|
||||
condition: service_healthy
|
||||
|
|
@ -29,7 +29,7 @@ services:
|
|||
networks:
|
||||
- housewars
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "${DATABASE_PASSWORD}"
|
||||
MYSQL_ROOT_PASSWORD: "passw0rd"
|
||||
MYSQL_DATABASE: dev
|
||||
healthcheck:
|
||||
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ class UserEntryCreatePageTest(StaticLiveServerTestCase):
|
|||
# Headless chrome driver test setup
|
||||
options = Options()
|
||||
options.add_argument('--headless')
|
||||
options.add_argument("--window-size=1280,800")
|
||||
options.add_argument('--start-maximized')
|
||||
options.add_argument('--disable-gpu')
|
||||
self.browser = Chrome(
|
||||
ChromeDriverManager().install(), chrome_options=options)
|
||||
self.url = self.live_server_url + reverse('housewars:facilitator')
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ class UserEntryCreatePageTest(StaticLiveServerTestCase):
|
|||
# Headless chrome driver test setup
|
||||
options = Options()
|
||||
options.add_argument('--headless')
|
||||
options.add_argument("--window-size=1280,800")
|
||||
options.add_argument('--start-maximized')
|
||||
options.add_argument('--disable-gpu')
|
||||
self.browser = Chrome(
|
||||
ChromeDriverManager().install(), chrome_options=options)
|
||||
self.url = self.live_server_url + reverse('housewars:add_points')
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ class UserEntryCreatePageTest(StaticLiveServerTestCase):
|
|||
# Headless chrome driver test setup
|
||||
options = Options()
|
||||
options.add_argument('--headless')
|
||||
options.add_argument("--window-size=1280,800")
|
||||
options.add_argument('--start-maximized')
|
||||
options.add_argument('--disable-gpu')
|
||||
self.browser = Chrome(
|
||||
ChromeDriverManager().install(), chrome_options=options)
|
||||
self.browser.maximize_window()
|
||||
self.url = self.live_server_url + reverse('housewars:signup')
|
||||
|
||||
# Initial data setup
|
||||
|
|
|
|||
Reference in a new issue