forked from HackAssistant/registration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into to_hackupc
- Loading branch information
Showing
214 changed files
with
6,327 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[flake8] | ||
exclude = build,.git,.tox,./django/utils/six.py,./django/conf/app_template/*,./tests/.env,./env,./app/settings.py,./*/migrations,./app/hackathon_variables.py | ||
ignore = W601,F403 | ||
max-line-length = 119 | ||
max-line-length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
<br> | ||
<p align="center"> | ||
<img alt="HackAssistant" src="https://avatars2.githubusercontent.com/u/33712329?s=200&v=4" width="200"/> | ||
<img alt="HackUPC Fall 2016" src="app/static/img/[email protected]" width="100%"/> | ||
</p> | ||
<br> | ||
|
||
|
||
[![Maintainability](https://api.codeclimate.com/v1/badges/dcf8e46541dbab5eb64f/maintainability)](https://codeclimate.com/github/HackAssistant/registration/maintainability) | ||
[![CircleCI](https://circleci.com/gh/HackAssistant/registration/tree/master.svg?style=svg)](https://circleci.com/gh/HackAssistant/registration/tree/master) | ||
|
||
📝 Hackathon registration server. Originally [HackUPC/backend](https://github.com/hackupc). With collaboration from [HackCU](https://github.com/hackcu). [Medium article](https://medium.com/hackcu/hackassistant-95d0f15c9199). [User Guide](USER_GUIDE.md) | ||
|
||
📝 Registration for hackathons. Forked from [HackAssistant/registration](https://github.com/HackAssistant/registration). Previously known as hackupc/backend. [Medium article](https://medium.com/hackcu/hackassistant-95d0f15c9199). [User Guide](USER_GUIDE.md) | ||
|
||
|
||
## Features | ||
|
||
|
@@ -28,13 +27,13 @@ | |
- (Optional) Automated slack invites on confirm #️⃣ | ||
- (Optional) MyMLH sign up 📥 | ||
|
||
**Demo**: http://registration.gerard.space (updated from master automatically. Running on Heroku free dyno) | ||
|
||
|
||
## Setup | ||
|
||
Needs: Python 3.X, virtualenv | ||
|
||
- `git clone https://github.com/hackassistant/registration && cd registration` | ||
- `git clone https://github.com/hackupc/registration && cd registration` | ||
- `virtualenv env --python=python3` | ||
- `source ./env/bin/activate` | ||
- `pip install -r requirements.txt` | ||
|
@@ -58,7 +57,12 @@ You can replace the email backend easily. See more [here](https://djangopackages | |
- **DOMAIN**(optional): Domain where app will be running. Default: localhost:8000 | ||
- **SL_TOKEN**(optional): Slack token to invite hackers automatically on confirmation. You can obtain it [here](https://api.slack.com/custom-integrations/legacy-tokens) | ||
- **SL_TEAM**(optional): Slack team name (xxx on xxx.slack.com) | ||
- **DROPBOX_OAUTH2_TOKEN**(optional): Enables Dropbox as file upload server instead of local computer. (See "Set up Dropbox storage for uploaded files" below) | ||
- **DROPBOX_OAUTH2_TOKEN**(optional): Enables DropBox as file upload server instead of local computer. (See "Set up Dropbox storage for uploaded files" below) | ||
- **SL_BOT_ID**(optional): Slack bot ID to send messages from. | ||
- **SL_BOT_TOKEN**(optional): Slack bot token to send messages. | ||
- **SL_BOT_CHANNEL**(optional): General channel to refer from the bot messages. | ||
- **SL_BOT_DIRECTOR1**(optional): User ID of one of the directors. | ||
- **SL_BOT_DIRECTOR2**(optional): User ID of the other director. | ||
- **MLH_CLIENT_SECRET**(optional): Enables MyMLH as a sign up option. Format is `client_id@client_secret` (See "Set up MyMLH" below) | ||
|
||
|
||
|
@@ -197,6 +201,7 @@ server { | |
location / { | ||
include proxy_params; | ||
proxy_pass http://unix:/home/user/project_folder/backend.sock; | ||
client_max_body_size 5MB; | ||
} | ||
|
@@ -268,6 +273,8 @@ You can use this for your own hackathon. How? | |
- Colors and presentation: [app/static/css/main.css](app/static/css/main.css). | ||
- Navbar & content/disposition: [app/templates/base.html](app/templates/base.html) | ||
- Email base template: [app/templates/base_email.html](app/templates/base_email.html) | ||
- Update favicon [app/static/](app/static/) | ||
|
||
|
||
### Content | ||
|
||
|
@@ -276,7 +283,7 @@ You can use this for your own hackathon. How? | |
You can update emails related to | ||
- Applications (application invite, event ticket, last reminder) at [applications/templates/mails/](applications/templates/mails/) | ||
- Reimbursements (reimbursement email, reject receipt) at [reimbursement/templates/mails/](reimbursement/templates/mails/) | ||
- User registration (email verification, password reset) at [reimbursement/templates/mails/](reimbursement/templates/mails/) | ||
- User registration (email verification, password reset) at [user/templates/mails/](user/templates/mails/) | ||
|
||
#### Update hackathon variables | ||
Check all available variables at [app/hackathon_variables.py.template](app/hackathon_variables.py.template). | ||
|
@@ -295,7 +302,7 @@ If you need extra labels for your hackathon, you can change the model and add yo | |
# Want to Contribute? | ||
Read these [guidelines](.github/CONTRIBUTING.md) carefully. | ||
|
||
By making a contribution, in any form (including, but not limited to, Issues and Pull Requests), you agree to abide by the [Code of Conduct](.github/CODE_OF_CONDUCT.md). Report any incidents to [email protected] and appropriate action will be taken against the offender after investigation. | ||
By making a contribution, in any form (including, but not limited to, Issues and Pull Requests), you agree to abide by the [Code of Conduct](.github/CODE_OF_CONDUCT.md). Report any incidents to [email protected] and appropriate action will be taken against the offender after investigation. | ||
|
||
# License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
# HACKATHON PERSONALIZATION | ||
import os | ||
|
||
from django.utils import timezone | ||
|
||
HACKATHON_NAME = 'HackAssistant' | ||
HACKATHON_NAME = 'HackUPC' | ||
# What's the name for the application | ||
HACKATHON_APPLICATION_NAME = 'HackAssistant registration' | ||
HACKATHON_APPLICATION_NAME = 'My HackUPC' | ||
# Hackathon timezone | ||
TIME_ZONE = 'MST' | ||
TIME_ZONE = 'CET' | ||
# This description will be used on the html and sharing meta tags | ||
HACKATHON_DESCRIPTION = 'HackAssistant is an organization to mantain ' \ | ||
'a few open-source projects related with hackathon management' | ||
HACKATHON_DESCRIPTION = 'Join us for BarcelonaTech\'s hackathon. 700 hackers. 36h. October 11th-13th.' | ||
# Domain where application is deployed, can be set by env variable | ||
HACKATHON_DOMAIN = os.environ.get('DOMAIN', None) | ||
HEROKU_APP_NAME = os.environ.get('HEROKU_APP_NAME', None) | ||
|
@@ -19,44 +19,55 @@ | |
elif not HACKATHON_DOMAIN: | ||
HACKATHON_DOMAIN = 'localhost:8000' | ||
# Hackathon contact email: where should all hackers contact you. It will also be used as a sender for all emails | ||
HACKATHON_CONTACT_EMAIL = 'contact@gerard.space' | ||
HACKATHON_CONTACT_EMAIL = 'contact@hackupc.com' | ||
# Hackathon logo url, will be used on all emails | ||
HACKATHON_LOGO_URL = 'https://avatars2.githubusercontent.com/u/33712329?s=200&v=4' | ||
HACKATHON_LOGO_URL = 'https://my.hackupc.com/static/logo.png' | ||
|
||
HACKATHON_OG_IMAGE = 'https://hackcu.org/img/hackcu_ogimage870x442.png' | ||
HACKATHON_OG_IMAGE = 'https://hackupc.com/assets/img/hackupc-ogimage@2x.png?v=2018' | ||
# (OPTIONAL) Track visits on your website | ||
# HACKATHON_GOOGLE_ANALYTICS = 'UA-7777777-2' | ||
# (OPTIONAL) Hackathon twitter user | ||
HACKATHON_TWITTER_ACCOUNT = 'casassaez' | ||
HACKATHON_GOOGLE_ANALYTICS = 'UA-69542332-2' | ||
# (OPTIONAL) Hackathon Twitter user | ||
HACKATHON_TWITTER_ACCOUNT = 'hackupc' | ||
# (OPTIONAL) Hackathon Facebook page | ||
HACKATHON_FACEBOOK_PAGE = 'casassaez' | ||
HACKATHON_FACEBOOK_PAGE = 'hackupc' | ||
# (OPTIONAL) Hackathon YouTube channel | ||
HACKATHON_YOUTUBE_PAGE = 'UCiiRorGg59Xd5Sjj9bjIt-g' | ||
# (OPTIONAL) Hackathon Instagram user | ||
HACKATHON_INSTAGRAM_ACCOUNT = 'hackupc' | ||
# (OPTIONAL) Hackathon Medium user | ||
HACKATHON_MEDIUM_ACCOUNT = 'hackupc' | ||
# (OPTIONAL) Github Repo for this project (so meta) | ||
HACKATHON_GITHUB_REPO = 'https://github.com/hackassistant/registration/' | ||
HACKATHON_GITHUB_REPO = 'https://github.com/hackupc/registration/' | ||
|
||
# (OPTIONAL) Applications deadline | ||
# HACKATHON_APP_DEADLINE = timezone.datetime(2018, 2, 24, 3, 14, tzinfo=timezone.pytz.timezone(TIME_ZONE)) | ||
HACKATHON_APP_DEADLINE = timezone.datetime(2019, 11, 6, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) | ||
# (OPTIONAL) When to arrive at the hackathon | ||
HACKATHON_ARRIVE = 'Registration opens at 3:00 PM and closes at 6:00 PM on Friday October 13th, ' \ | ||
'the opening ceremony will be at 7:00 pm.' | ||
HACKATHON_ARRIVE = 'Registration opens at 4:00PM and closes at 6:45PM on Friday October 11th, ' \ | ||
'the opening ceremony will be at 7:00PM.' | ||
|
||
# (OPTIONAL) When to arrive at the hackathon | ||
HACKATHON_LEAVE = 'Closing ceremony will be held on Sunday October 15th from 3:00 PM to 5:00 PM. ' \ | ||
'However the projects demo fair will be held in the morning from 10:30 AM to 1 PM.' | ||
HACKATHON_LEAVE = 'Closing ceremony will be held on Sunday October 13th from 3:00PM to 5:00PM. ' \ | ||
'However judging will be happenning in the morning from 10:30AM to 1:00PM.' | ||
# (OPTIONAL) Hackathon live page | ||
# HACKATHON_LIVE_PAGE = 'https://gerard.space/live' | ||
HACKATHON_LIVE_PAGE = 'https://hackupc.com/live' | ||
|
||
# (OPTIONAL) Regex to automatically match organizers emails and set them as organizers when signing up | ||
REGEX_HACKATHON_ORGANIZER_EMAIL = '^.*@gerard\.space$' | ||
REGEX_HACKATHON_ORGANIZER_EMAIL = '^.*@hackupc\.com$' | ||
|
||
# (OPTIONAL) Sends 500 errors to email whilst in production mode. | ||
HACKATHON_DEV_EMAILS = [] | ||
# (OPTIONAL) Send 500 errors to email while on production mode | ||
HACKATHON_DEV_EMAILS = ['[email protected]', ] | ||
|
||
# Baggage configuration | ||
BAGGAGE_ENABLED = True | ||
BAGGAGE_PICTURE = True | ||
|
||
# Reimbursement configuration | ||
REIMBURSEMENT_ENABLED = True | ||
CURRENCY = '$' | ||
DEFAULT_REIMBURSEMENT_AMOUNT = 100 | ||
CURRENCY = '€' | ||
REIMBURSEMENT_EXPIRY_DAYS = 5 | ||
REIMBURSEMENT_REQUIREMENTS = 'You have to submit a project and demo it during the event in order to be reimbursed.' | ||
REIMBURSEMENT_DEADLINE = timezone.datetime(2018, 2, 24, 3, 14, tzinfo=timezone.pytz.timezone(TIME_ZONE)) | ||
REIMBURSEMENT_REQUIREMENTS = 'You have to submit a project and demo it during the event in order to get reimbursed' | ||
REIMBURSEMENT_DEADLINE = timezone.datetime(2019, 9, 2, 3, 14, tzinfo=timezone.pytz.timezone(TIME_ZONE)) | ||
|
||
# (OPTIONAL) Max team members. Defaults to 4 | ||
TEAMS_ENABLED = True | ||
|
@@ -75,13 +86,26 @@ | |
|
||
# (OPTIONAL) Logged in cookie | ||
# This allows to store an extra cookie in the browser to be shared with other application on the same domain | ||
LOGGED_IN_COOKIE_DOMAIN = '.gerard.space' | ||
LOGGED_IN_COOKIE_KEY = 'hackassistant_logged_in' | ||
# LOGGED_IN_COOKIE_DOMAIN = '.gerard.space' | ||
# LOGGED_IN_COOKIE_KEY = 'hackassistant_logged_in' | ||
|
||
# Hardware configuration | ||
HARDWARE_ENABLED = False | ||
# Hardware request time length (in minutes) | ||
HARDWARE_ENABLED = True | ||
#Hardware request time length (in minutes) | ||
HARDWARE_REQUEST_TIME = 15 | ||
|
||
|
||
SLACK_BOT = { | ||
'id' : os.environ.get('SL_BOT_ID', None), | ||
'token' : os.environ.get('SL_BOT_TOKEN', None), | ||
'channel' : os.environ.get('SL_BOT_CHANNEL', None), | ||
'director1' : os.environ.get('SL_BOT_DIRECTOR1', None), | ||
'director2' : os.environ.get('SL_BOT_DIRECTOR2', None) | ||
} | ||
# Enable judging tab | ||
JUDGING_ENABLED = True | ||
|
||
# Can Hackers start a request on the hardware lab? | ||
# HACKERS_CAN_REQUEST = False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.