WarwickTabletop / tgrsite

Warwick Tabletop Games and Role-Playing Society's website.
http://warwicktabletop.co.uk
ISC License
0 stars 2 forks source link

tgrsite

This is the repo for the Warwick Tabletop Games and Roleplaying Society website! You can find a live copy of it here.

There is also a document explaining the running of the website, How To Website Really Good, which you can use to find out how the website is used in practice and what areas for improvement it currently has.

How do I run a development copy of the website?

To run a local copy of the website for development, you'll need to install various bits, add the required configuration variables, and then create some bits required by Django. We'll go through each of those now.

1. Installing things

This step is fairly simple, particularly if you're familiar with Python projects.

  1. The website is currently tested on Python 3.6. As such, you'll need to have a Python environment running that version. It is recommended that you create a virtual environment for the app.
  2. Install required Python packages using pip install -r requirements.txt.

2. Environment configuration

The website utilises a variety of environment variables. These can be set in one of two ways:

  1. However you traditionally set environment variables on your system, e.g. via the export command in Bash. This is generally not recommended - it works, but the second method is preferred.
  2. Create a keys.py and a local_config.py file in the same directory as settings.py. keys.py should contain one definition, def secret(), which just returns a secret key (see the next section). local_config.py can then be filled with definitions for all other variables - just write them as you'd write a usual assignment in Python (e.g. DEBUG=False). These two files are loaded when Django is started, so the environment will be updated accordingly.

Environment variables

The following environment variables are mandatory:

The following fields are optional:

Again, if you're using local_config.py, you just write these as assignments like EMAIL_HOST=....

3. Running the website

The website needs a few more steps to set up the database and your superuser account for the first time. The following bullet points detail the steps you need to take.

Contributing

Contributions welcome, in the form of issue submissions, pull requests, and comments. If you want to add a feature, fork and branch the repo, and create a pull request into main.

If you do contribute, please format your code in pep8 style. A tool like autopep8 should be available for your IDE, which will do this for you.

If you have a great idea for a feature, please create an issue for it! Feel free to discuss issues as well within comment threads, or on the Tabletop Society Discord.