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 pull request HackAssistant#102 from hackupc/revert-101-revert-1…
…00-to_hackupc Revert "Revert "To hackupc""
- Loading branch information
Showing
12 changed files
with
119 additions
and
12 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
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 |
---|---|---|
|
@@ -12,7 +12,12 @@ | |
# This description will be used on the html and sharing meta tags | ||
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', 'localhost:8000') | ||
HACKATHON_DOMAIN = os.environ.get('DOMAIN', None) | ||
HEROKU_APP_NAME = os.environ.get('HEROKU_APP_NAME', None) | ||
if HEROKU_APP_NAME and not HACKATHON_DOMAIN: | ||
HACKATHON_DOMAIN = '%s.herokuapp.com' % HEROKU_APP_NAME | ||
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 = '[email protected]' | ||
# Hackathon logo url, will be used on all emails | ||
|
@@ -106,3 +111,5 @@ | |
|
||
# Enable dubious separate pipeline (disabled by default) | ||
DUBIOUS_ENABLED = True | ||
|
||
SUPPORTED_RESUME_EXTENSIONS = [] |
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.28 on 2020-03-22 01:14 | ||
from __future__ import unicode_literals | ||
|
||
import applications.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('applications', '0018_auto_20190725_0437'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='application', | ||
name='resume', | ||
field=models.FileField(blank=True, null=True, upload_to='resumes', validators=[applications.validators.validate_file_extension]), | ||
), | ||
migrations.AlterField( | ||
model_name='application', | ||
name='status', | ||
field=models.CharField(choices=[('P', 'Under review'), ('R', 'Wait listed'), ('I', 'Invited'), ('LR', 'Last reminder'), ('C', 'Confirmed'), ('X', 'Cancelled'), ('A', 'Attended'), ('E', 'Expired'), ('D', 'Dubious'), ('IV', 'Invalid')], default='P', max_length=2), | ||
), | ||
] |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import os | ||
from django.core.exceptions import ValidationError | ||
from django.conf import settings | ||
|
||
|
||
def validate_file_extension(value): | ||
(_, ext) = os.path.splitext(value.name) | ||
valid_extensions = getattr(settings, 'SUPPORTED_RESUME_EXTENSIONS', None) | ||
if valid_extensions and not ext.lower() in valid_extensions: | ||
raise ValidationError('Unsupported file extension.') |
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
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
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