Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion challenge/templates/challenge_vote_reaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
</div>

<h1 style="text-align: center">Thanks you {{ request.user.name }}!</h1>
<h1 style="text-align: center">Thank you {{ request.user.name }}!</h1>
<div style="display:flex">
<div style="margin: 0 auto; width: 50%">
<img src="{{ reaction.image.url }}" width="100%">
Expand Down
48 changes: 48 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# The game

## Set up
Needs python 3.X and virtualenv

- `Git clone https://github.com/hackupc/thegame.git && cd thegame`
- `virtualenv env --python=python3`
- `source ./env/bin/activate`
- `pip install -r requirements.txt`
- (Optional) If using Postgres, set up the necessary environment variables for its usage before this step
- `python manage.py migrate`

## Features

- Admin page to create Challenges and more .
- Auto HTML templating for Challenges (Image, template, File, Audio, Video, None).
- MyHackUPC login (no passwords managed here).
- Auto admin user for organizers.
- Restriction on hacker submits (max X every 5 minutes).
- Ranking page with local time.
- Challenge stats and user attempts.
- Codes encrypted.
- Troll codes to redirect to urls with ChallengeTroll model.
- Votes and comment for each challenge and custom reactions images with VoteReaction model.

## Usage

### Challenge

- **name:** Challenge title
- **description:** Challenge description (HTML format optional).
- **order:** Challenge phase. User cannot see challenges if not completed all the challenges from previous phase (initial = 1).
- **file:** Challenge file image, video, audio and HTML (django tags can be used).
- **type:** Challenge type in order to render the file. If set to HTML, his url won't exist making it secret.
- **solution:** Challenge solution. WriteOnly field. Encrypted.
- **activation_date** Challenge activation date (UTC). Won't be accessible to hackers until this date.

### ChallengeTroll

- **challenge:** Challenge to add a troll code.
- **code:** Code that will trigger the redirection.
- **url:** Url to redirect if code was submitted.

### VoteReaction

- **challenge:** Challenge to add this reaction.
- **type:** Reaction can be happy (vote>5) or sad (vote<=5).
- **image:** Image to display when the hacker votes.