├── .dockerignore ├── .env_sample ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── build.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Pipfile ├── Pipfile.lock ├── README.md ├── accounts ├── __init__.py ├── admin.py ├── apps.py ├── decorators.py ├── fixtures │ ├── accounts.json │ ├── emailaddresses.json │ ├── groups.json │ ├── organisation.json │ └── profiles.json ├── forms.py ├── helpers.py ├── lists.py ├── management │ └── commands │ │ └── sync_slack.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20201022_1553.py │ ├── 0003_auto_20201023_1201.py │ ├── 0003_auto_20201023_2006.py │ ├── 0004_merge_20201025_1255.py │ ├── 0005_auto_20201026_1312.py │ ├── 0006_auto_20210111_2242.py │ ├── 0006_auto_20210113_2249.py │ ├── 0007_auto_20210115_1706.py │ ├── 0008_auto_20210116_1717.py │ ├── 0009_customuser_profile_image.py │ ├── 0010_remove_customuser_slack_display_name_is_public.py │ ├── 0011_merge_20210118_1524.py │ ├── 0012_auto_20210205_1300.py │ ├── 0013_auto_20210215_1505.py │ ├── 0014_auto_20210225_1727.py │ ├── 0015_remove_customuser_user_type.py │ ├── 0016_customuser_is_external.py │ ├── 0017_customuser_timezone.py │ ├── 0018_slacksitesettings.py │ ├── 0019_emailtemplate.py │ ├── 0020_auto_20230104_1655.py │ ├── 0021_auto_20250205_1138.py │ ├── 0022_auto_20250206_1702.py │ ├── 0022_auto_20250214_1439.py │ ├── 0023_merge_20250217_0913.py │ ├── 0024_customuser_dropoffs.py │ ├── 0025_customuser_dropped_off_hackathon.py │ └── __init__.py ├── models.py ├── templates │ └── accounts │ │ └── edit_profile.html ├── templatetags │ ├── __init__.py │ └── account_tags.py ├── urls.py └── views.py ├── assets └── images │ └── hackathon.jpeg ├── competencies ├── __init__.py ├── admin.py ├── apps.py ├── fixtures │ └── competencies.json ├── forms.py ├── helpers.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20220808_1029.py │ ├── 0003_auto_20221219_1421.py │ └── __init__.py ├── models.py ├── templates │ ├── competencies_self_assessment.html │ ├── competency_difficulty_form.html │ ├── competency_form.html │ └── list_competencies.html ├── tests.py ├── urls.py └── views.py ├── custom_slack_provider ├── __init__.py ├── adapter.py ├── helpers.py ├── models.py ├── provider.py ├── tests.py ├── urls.py └── views.py ├── docker-compose.yml ├── extract_staticfiles.sh ├── hackadmin ├── __init__.py ├── admin.py ├── apps.py ├── helpers.py ├── migrations │ └── __init__.py ├── models.py ├── templates │ ├── all_users.html │ ├── hackadmin_panel.html │ ├── hackadmin_participants.html │ ├── includes │ │ ├── add_judge.html │ │ ├── add_participant.html │ │ ├── back_button.html │ │ ├── list_awardees.html │ │ ├── list_judges.html │ │ ├── list_mentors.html │ │ ├── list_participants.html │ │ ├── list_teams.html │ │ └── remove_participant.html │ └── list_all_users.html ├── templatetags │ ├── __init__.py │ └── hackadmin_tags.py ├── tests.py ├── urls.py └── views.py ├── hackathon ├── __init__.py ├── admin.py ├── apps.py ├── fixtures │ ├── hackathons.json │ └── score_categories.json ├── forms.py ├── helpers.py ├── lists.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20201015_1936.py │ ├── 0003_auto_20201015_2020.py │ ├── 0004_auto_20201015_2224.py │ ├── 0005_auto_20201016_1951.py │ ├── 0006_auto_20201016_2050.py │ ├── 0007_auto_20201017_1148.py │ ├── 0008_auto_20201018_1301.py │ ├── 0008_auto_20201018_1459.py │ ├── 0008_hackprojectscorecategory_highest_score.py │ ├── 0009_auto_20201018_1515.py │ ├── 0009_auto_20201018_1829.py │ ├── 0010_merge_20201020_1944.py │ ├── 0010_merge_20201022_2224.py │ ├── 0011_auto_20201020_1948.py │ ├── 0011_auto_20201024_0035.py │ ├── 0012_remove_hackproject_created_by.py │ ├── 0013_remove_hackproject_mentor.py │ ├── 0014_auto_20201020_1953.py │ ├── 0015_auto_20201020_1955.py │ ├── 0016_merge_20201024_1240.py │ ├── 0017_auto_20201024_1431.py │ ├── 0017_auto_20201025_1211.py │ ├── 0017_auto_20201025_2140.py │ ├── 0017_auto_20201026_1312.py │ ├── 0018_auto_20201025_1933.py │ ├── 0018_hackathon_status.py │ ├── 0018_merge_20201026_1722.py │ ├── 0019_auto_20201025_2022.py │ ├── 0020_merge_20201026_2056.py │ ├── 0021_hackathon_participants.py │ ├── 0021_merge_20201029_1407.py │ ├── 0022_auto_20201028_2308.py │ ├── 0022_hackathon_judging_status.py │ ├── 0023_merge_20201103_2114.py │ ├── 0024_auto_20201103_2114.py │ ├── 0025_auto_20210111_2242.py │ ├── 0025_auto_20210113_2249.py │ ├── 0026_hackproject_technologies_used.py │ ├── 0026_hackprojectscorecategory_hackathon.py │ ├── 0027_auto_20210116_1652.py │ ├── 0027_auto_20210119_0045.py │ ├── 0028_auto_20210116_1653.py │ ├── 0028_auto_20210119_2352.py │ ├── 0029_auto_20210117_1352.py │ ├── 0030_auto_20210118_1220.py │ ├── 0031_merge_20210118_1524.py │ ├── 0032_merge_20210120_1141.py │ ├── 0033_auto_20210128_1736.py │ ├── 0034_hackathon_hackathon_image.py │ ├── 0035_auto_20210205_1300.py │ ├── 0036_remove_hackathon_judging_status.py │ ├── 0037_hackathon_teamsize.py │ ├── 0038_auto_20210224_1521.py │ ├── 0039_auto_20210224_1850.py │ ├── 0040_auto_20210225_1656.py │ ├── 0041_auto_20210301_1716.py │ ├── 0042_hackteam_communication_channel.py │ ├── 0043_hackathon_is_public.py │ ├── 0044_auto_20210717_1654.py │ ├── 0045_hackprojectscorecategory_is_active.py │ ├── 0046_auto_20220113_1350.py │ ├── 0047_auto_20221219_1421.py │ ├── 0048_auto_20221219_1655.py │ ├── 0049_hackathon_is_register.py │ ├── 0050_hackathon_google_registrations_form.py │ ├── 0051_auto_20240911_1306.py │ ├── 0052_auto_20240912_1324.py │ ├── 0053_auto_20240912_1527.py │ ├── 0054_event.py │ ├── 0055_remove_event_isreadonly.py │ ├── 0056_hackathon_badge_url.py │ └── __init__.py ├── models.py ├── queries │ └── scores.sql ├── static │ └── hackathon │ │ └── css │ │ └── hackathon.css ├── tasks.py ├── templates │ └── hackathon │ │ ├── assign_mentors.html │ │ ├── change_awards.html │ │ ├── change_event.html │ │ ├── create-event.html │ │ ├── enrolment_email.txt │ │ ├── final_score.html │ │ ├── hackathon_events.html │ │ ├── hackathon_list.html │ │ ├── hackathon_view.html │ │ ├── hackathon_view_public.html │ │ ├── includes │ │ ├── change_status.html │ │ ├── enroll_card.html │ │ ├── enrollpart.html │ │ ├── enrollstaff.html │ │ ├── hackathon_card.html │ │ ├── judge_team_display.html │ │ └── paginator.html │ │ ├── judge_teams.html │ │ └── judging.html ├── templatetags │ ├── __init__.py │ └── custom_tags.py ├── tests │ ├── __init__.py │ ├── test_models.py │ ├── test_views.py │ └── unit_tests.py ├── urls.py └── views.py ├── home ├── __init__.py ├── admin.py ├── apps.py ├── fixtures │ └── reviews.json ├── forms.py ├── helpers.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_partnershiprequestemailsitesettings.py │ ├── 0003_auto_20211009_1607.py │ └── __init__.py ├── models.py ├── templates │ ├── home │ │ └── index.html │ └── includes │ │ ├── hackathon_square.html │ │ ├── heading.html │ │ ├── link_square.html │ │ ├── partner_form.html │ │ ├── reviews_slider.html │ │ └── showcase_square.html ├── templatetags │ ├── __init__.py │ └── home_tags.py ├── tests.py ├── urls.py └── views.py ├── images ├── __init__.py ├── admin.py ├── apps.py ├── helpers.py ├── migrations │ └── __init__.py ├── models.py ├── urls.py └── views.py ├── left_to_do.txt ├── main ├── __init__.py ├── asgi.py ├── celery.py ├── models.py ├── settings.py ├── urls.py └── wsgi.py ├── manage.py ├── nginx └── nginx.conf ├── package-lock.json ├── package.json ├── profiles ├── __init__.py ├── apps.py ├── forms.py ├── migrations │ └── __init__.py ├── models.py ├── templates │ └── profiles │ │ └── profile.html ├── urls.py └── views.py ├── requirements.txt ├── resources ├── __init__.py ├── admin.py ├── apps.py ├── fixtures │ └── resources.json ├── forms.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_resource_description.py │ ├── 0003_auto_20201022_2010.py │ ├── 0004_auto_20201024_1833.py │ └── __init__.py ├── models.py ├── templates │ └── resources │ │ ├── add_resource.html │ │ ├── edit_resource.html │ │ └── resources.html ├── tests.py ├── urls.py └── views.py ├── scripts ├── docker_seed.sh ├── seed.bat ├── seed.sh ├── setup.bat └── setup.sh ├── showcase ├── __init__.py ├── admin.py ├── apps.py ├── fixtures │ ├── showcase.json │ └── showcase_site_settings.json ├── forms.py ├── lists.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_showcasesitesettings.py │ ├── 0003_showcase_hash.py │ ├── 0004_auto_20210907_1128.py │ ├── 0005_auto_20210907_1128.py │ └── __init__.py ├── models.py ├── templates │ ├── edit_showcase.html │ ├── showcases.html │ └── view_showcase.html ├── tests.py ├── urls.py └── views.py ├── static ├── css │ ├── allauthstyles.css │ ├── home.css │ ├── profile.css │ └── style.css ├── documentation │ ├── forking.md │ └── uat.md ├── img │ ├── ci-favicon.png │ ├── ci-hackathon--horizontal.png │ ├── ci-hackathon--square.png │ ├── ci-hacking-new-normal--horizontal-center.png │ ├── ci-hacking-new-normal--horizontal-left.png │ ├── ci-hacking-new-normal--square.png │ ├── ci-logo.svg │ ├── documentation │ │ ├── compare-and-pull.png │ │ ├── flow-chart.png │ │ ├── fork.PNG │ │ ├── hackathon-ERD.png │ │ ├── hackathon-use-case--judge.png │ │ ├── hackathon-use-case--organizer.png │ │ ├── hackathon-use-case--participant.png │ │ ├── hackathon_lifecycle.svg │ │ ├── issues-open.png │ │ ├── projects-to-do.png │ │ └── pull-request.png │ ├── hackathon-bg.png │ ├── hackathon_header.png │ ├── profiles │ │ ├── profile.png │ │ ├── profile_cat.png │ │ └── user-thumbnail.png │ ├── undraw_blank_canvas_3rbb.svg │ ├── undraw_server_down_s4lk.svg │ └── undraw_warning_cyit.svg ├── js │ ├── datetimepicker.js │ ├── script.js │ └── teams.js └── wireframes │ ├── hackathon-page--desktop.png │ ├── judging-page--desktop.png │ ├── langing-page--desktop.png │ ├── login-page--desktop.png │ ├── profile-page--desktop.png │ └── register-page--desktop.png ├── teams ├── __init__.py ├── admin.py ├── apps.py ├── forms.py ├── helpers.py ├── lists.py ├── migrations │ └── __init__.py ├── models.py ├── templates │ ├── change_teams.html │ ├── create_project.html │ ├── includes │ │ ├── anon_member.html │ │ ├── create_slack_private_channel.html │ │ ├── empty_project.html │ │ ├── member.html │ │ ├── menu.html │ │ ├── participant_label.html │ │ ├── project.html │ │ ├── project_not_visible.html │ │ ├── rename_team.html │ │ └── showcase_member.html │ ├── team.html │ ├── team_calendar.html │ └── team_competencies.html ├── templatetags │ ├── __init__.py │ └── teams_tags.py ├── tests.py ├── urls.py └── views.py ├── templates ├── 404.html ├── 500.html ├── allauth │ ├── account │ │ ├── account_inactive.html │ │ ├── base.html │ │ ├── email.html │ │ ├── email │ │ │ ├── email_confirmation_message.txt │ │ │ ├── email_confirmation_signup_message.txt │ │ │ ├── email_confirmation_signup_subject.txt │ │ │ ├── email_confirmation_subject.txt │ │ │ ├── password_reset_key_message.txt │ │ │ └── password_reset_key_subject.txt │ │ ├── email_confirm.html │ │ ├── login.html │ │ ├── logout.html │ │ ├── messages │ │ │ ├── cannot_delete_primary_email.txt │ │ │ ├── email_confirmation_sent.txt │ │ │ ├── email_confirmed.txt │ │ │ ├── email_deleted.txt │ │ │ ├── logged_in.txt │ │ │ ├── logged_out.txt │ │ │ ├── password_changed.txt │ │ │ ├── password_set.txt │ │ │ ├── primary_email_set.txt │ │ │ └── unverified_primary_email.txt │ │ ├── password_change.html │ │ ├── password_reset.html │ │ ├── password_reset_done.html │ │ ├── password_reset_from_key.html │ │ ├── password_reset_from_key_done.html │ │ ├── password_set.html │ │ ├── signup.html │ │ ├── signup_closed.html │ │ ├── snippets │ │ │ └── already_logged_in.html │ │ ├── verification_sent.html │ │ └── verified_email_required.html │ ├── base.html │ └── socialaccount │ │ ├── authentication_error.html │ │ ├── base.html │ │ ├── connections.html │ │ ├── login_cancelled.html │ │ ├── messages │ │ ├── account_connected.txt │ │ ├── account_connected_other.txt │ │ ├── account_connected_updated.txt │ │ └── account_disconnected.txt │ │ ├── signup.html │ │ └── snippets │ │ ├── login_extra.html │ │ ├── provider_list.html │ │ └── slack_signin.html ├── base.html ├── code-of-conduct.html ├── faq.html ├── includes │ ├── footer.html │ ├── messages.html │ └── navbar.html ├── plagiarism-policy.html ├── privacy-policy.html ├── registration │ └── login.html └── upload_image.html └── vscode_settings_sample.json /.dockerignore: -------------------------------------------------------------------------------- 1 | data/ 2 | -------------------------------------------------------------------------------- /.env_sample: -------------------------------------------------------------------------------- 1 | DEVELOPMENT=1 2 | SECRET_KEY="your_secret_key_here" 3 | SITE_NAME="localhost" 4 | SLACK_ENABLED=True 5 | SLACK_BOT_TOKEN="your_slack_bot_token_here" 6 | SLACK_WORKSPACE="example-workspace" 7 | SUPPORT_EMAIL = 'support@example.com' 8 | 9 | # dev only 10 | DBHOST=127.0.0.1 11 | DBPORT=3306 12 | DBNAME=hackathons 13 | DBUSER=hackthon_user 14 | DBPASS=gummyball 15 | 16 | # http for dev 17 | ACCOUNT_DEFAULT_HTTP_PROTOCOL=http 18 | 19 | # to be used with Mailhog 20 | EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend' 21 | EMAIL_PORT=1025 22 | EMAIL_HOST=smtp 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Expected Behavior 4 | 5 | 6 | 7 | 8 | ## Current Behavior 9 | 10 | 11 | 12 | 13 | ## Possible Solution 14 | 15 | 16 | 17 | 18 | ## Steps to Reproduce (for bugs) 19 | 20 | 21 | 22 | 23 | 1. 24 | 2. 25 | 3. 26 | 4. 27 | 28 | ## Context 29 | 30 | 31 | 32 | 33 | ## Your Environment (for bugs) 34 | 35 | 36 | 37 | - Version used: 38 | - Environment name and version (e.g. Chrome 39, node.js 5.4): 39 | - Operating System and version (desktop or mobile): -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | 4 | 5 | ## Pull request type 6 | 7 | - [ ] #M01 (Miscellaneous User Story #01) 8 | - [ ] #P02 (Participant User Story #02) 9 | - [ ] #S03 (Staff User Story #03) 10 | - [ ] #A04 (Admin User Story #04) 11 | - [ ] Bugfix 12 | - [ ] Feature 13 | - [ ] Code style update (formatting, renaming) 14 | - [ ] Refactoring 15 | - [ ] Build related changes 16 | - [ ] Documentation content changes 17 | - [ ] Other (please describe): 18 | 19 | ## Related Issue 20 | 21 | 22 | 23 | ## Configuration instructions 24 | 25 | 26 | 27 | ## Testing 28 | 29 | 30 | 31 | ## Screenshots 32 | 33 | 34 | 35 | ## Additional Information 36 | 37 | 38 | 39 | ## Does this introduce a breaking change 40 | 41 | - [ ] Yes 42 | - [] No 43 | 44 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Docker Image 2 | 3 | on: 4 | release: 5 | types: 6 | - created 7 | 8 | jobs: 9 | 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | 17 | - name: Docker Login 18 | run: AWS_DEFAULT_REGION=eu-west-1 AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws ecr get-login-password | docker login --username AWS --password-stdin 949266541515.dkr.ecr.eu-west-1.amazonaws.com/ci-hackathon-app 19 | 20 | - name: Build the Docker image 21 | run: docker build . --file Dockerfile --tag 949266541515.dkr.ecr.eu-west-1.amazonaws.com/ci-hackathon-app:${GITHUB_REF##*/} 22 | 23 | - name: Push Image to AWS Regristry 24 | run: docker push 949266541515.dkr.ecr.eu-west-1.amazonaws.com/ci-hackathon-app:${GITHUB_REF##*/} 25 | 26 | - name: Extract staticfiles folder from image 27 | run: ./extract_staticfiles.sh ${GITHUB_REF##*/} 28 | 29 | - name: Push staticfiles to S3 30 | run: AWS_DEFAULT_REGION=eu-west-1 AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY}} AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}} aws s3 cp --recursive --acl public-read staticfiles s3://codeinstitute-webpublic/hackathon_staticfiles/${GITHUB_REF##*/} 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # static/ 2 | # media/ 3 | __pycache__/ 4 | .venv/ 5 | .vscode/ 6 | .vs/ 7 | *.env 8 | env.py 9 | *.py[cod] 10 | *.sqlite3 11 | settings.json 12 | .gitpod.yml 13 | venv/ 14 | .idea/ 15 | MYNOTES.md 16 | staticfiles 17 | data/ 18 | todo.txt 19 | node_modules/ -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | RUN apt-get update -y 4 | RUN apt-get install python3 python3-pip libmysqlclient-dev mysql-client vim sqlite3 -y 5 | 6 | WORKDIR /hackathon-app 7 | COPY ./requirements.txt /hackathon-app/requirements.txt 8 | 9 | RUN pip3 install -r requirements.txt 10 | 11 | COPY ./accounts/ /hackathon-app/accounts/ 12 | COPY ./assets/ /hackathon-app/assets/ 13 | COPY ./competencies/ /hackathon-app/competencies/ 14 | COPY ./custom_slack_provider/ /hackathon-app/custom_slack_provider/ 15 | COPY ./hackathon/ /hackathon-app/hackathon/ 16 | COPY ./home/ /hackathon-app/home/ 17 | COPY ./images/ /hackathon-app/images/ 18 | COPY ./main/ /hackathon-app/main/ 19 | COPY ./profiles/ /hackathon-app/profiles/ 20 | COPY ./resources/ /hackathon-app/resources/ 21 | COPY ./showcase/ /hackathon-app/showcase/ 22 | COPY ./static/ /hackathon-app/static/ 23 | COPY ./teams/ /hackathon-app/teams/ 24 | COPY ./templates/ /hackathon-app/templates/ 25 | COPY ./hackadmin/ /hackathon-app/hackadmin/ 26 | COPY ./manage.py /hackathon-app/manage.py 27 | 28 | RUN python3 manage.py collectstatic 29 | 30 | EXPOSE 8000 31 | ENTRYPOINT ["gunicorn", "--workers=5", "--timeout=120", "--access-logfile=-",\ 32 | "--bind=0.0.0.0:8000", "--max-requests=1000", "main.wsgi:application"] 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Code Institute - Community projects 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | name = "pypi" 3 | url = "https://pypi.org/simple" 4 | verify_ssl = true 5 | 6 | [dev-packages] 7 | pylint = "*" 8 | pylint-django = "*" 9 | pep8 = "*" 10 | autopep8 = "*" 11 | 12 | [packages] 13 | asgiref = "==3.2.10" 14 | certifi = "==2020.6.20" 15 | chardet = "==3.0.4" 16 | defusedxml = "==0.6.0" 17 | django-allauth = "==0.42.0" 18 | django-crispy-forms = "==1.9.2" 19 | idna = "==2.10" 20 | oauthlib = "==3.1.0" 21 | python-dotenv = "==0.14.0" 22 | python3-openid = "==3.2.0" 23 | pytz = "==2020.1" 24 | requests = "==2.24.0" 25 | requests-oauthlib = "==1.3.0" 26 | sqlparse = "==0.3.1" 27 | urllib3 = "==1.25.10" 28 | Django = "==3.1.13" 29 | dj-database-url = "==0.5.0" 30 | 31 | [requires] 32 | python_version = "3.8" 33 | -------------------------------------------------------------------------------- /accounts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/accounts/__init__.py -------------------------------------------------------------------------------- /accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | name = 'accounts' 6 | -------------------------------------------------------------------------------- /accounts/fixtures/groups.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "model": "auth.group", 4 | "pk": 1, 5 | "fields": { 6 | "name": "FACILITATOR_ADMIN", 7 | "permissions": [] 8 | } 9 | }, 10 | { 11 | "model": "auth.group", 12 | "pk": 2, 13 | "fields": { 14 | "name": "FACILITATOR_JUDGE", 15 | "permissions": [] 16 | } 17 | }, 18 | { 19 | "model": "auth.group", 20 | "pk": 3, 21 | "fields": { 22 | "name": "FACILITATOR", 23 | "permissions": [] 24 | } 25 | }, 26 | { 27 | "model": "auth.group", 28 | "pk": 4, 29 | "fields": { 30 | "name": "STUDENT", 31 | "permissions": [] 32 | } 33 | }, 34 | { 35 | "model": "auth.group", 36 | "pk": 5, 37 | "fields": { 38 | "name": "EXTERNAL_USER", 39 | "permissions": [] 40 | } 41 | } 42 | ] 43 | -------------------------------------------------------------------------------- /accounts/fixtures/organisation.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "model": "accounts.organisation", 4 | "pk": 1, 5 | "fields": { 6 | "display_name": "Code Institute" 7 | } 8 | } 9 | ] 10 | -------------------------------------------------------------------------------- /accounts/management/commands/sync_slack.py: -------------------------------------------------------------------------------- 1 | from django.core.management.base import BaseCommand 2 | 3 | from accounts.helpers import sync_slack_users 4 | 5 | 6 | class Command(BaseCommand): 7 | help = 'Syncs all or specified users with the information on Slack' 8 | 9 | def add_arguments(self, parser): 10 | parser.add_argument('-u', '--users', nargs='+', 11 | help='Set users to be synced',) 12 | parser.add_argument('-k', '--keys', nargs='+', 13 | help='Set keys to be updated',) 14 | parser.add_argument('-i', '--interval', type=float, 15 | help='Set the sleep interval in between requests',) 16 | 17 | def handle(self, *args, **kwargs): 18 | users = kwargs.get('users') 19 | keys = kwargs.get('keys') 20 | interval = kwargs.get('interval', 0.0) or 0.0 21 | 22 | sync_slack_users(users, keys, interval) 23 | -------------------------------------------------------------------------------- /accounts/migrations/0002_auto_20201022_1553.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-22 15:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='customuser', 15 | name='current_lms_module', 16 | field=models.CharField(choices=[('', 'Select Learning Stage'), ('programme_preliminaries', 'Programme Preliminaries'), ('programming_paradigms', 'Programming Paradigms'), ('html_fundamentals', 'HTML Fundamentals'), ('css_fundamentals', 'CSS Fundamentals'), ('user_centric_frontend_development', 'User Centric Frontend Development'), ('javascript_fundamentals', 'Javascript Fundamentals'), ('interactive_frontend_development', 'Interactive Frontend Development'), ('python_fundamentals', 'Python Fundamentals'), ('practical_python', 'Practical Python'), ('data_centric_development', 'Data Centric Development'), ('full_stack_frameworks with django', 'Full Stack Frameworks with Django'), ('alumni', 'Alumni'), ('staff', 'Staff')], max_length=35, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0004_merge_20201025_1255.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-25 12:55 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0003_auto_20201023_2006'), 10 | ('accounts', '0003_auto_20201023_1201'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /accounts/migrations/0005_auto_20201026_1312.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-26 13:12 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('accounts', '0004_merge_20201025_1255'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Organisation', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('display_name', models.CharField(default='Code Institute', max_length=100)), 19 | ], 20 | ), 21 | migrations.AddField( 22 | model_name='customuser', 23 | name='organisation', 24 | field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='user_organisation', to='accounts.organisation'), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /accounts/migrations/0007_auto_20210115_1706.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-15 17:06 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0006_auto_20210113_2249'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='customuser', 15 | name='user_type', 16 | field=models.CharField(choices=[('', 'Select Post Category'), ('participant', 'Participant'), ('staff', 'Staff'), ('admin', 'Admin')], default='participant', max_length=20), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0008_auto_20210116_1717.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-16 17:17 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0007_auto_20210115_1706'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='customuser', 15 | name='email_is_public', 16 | field=models.BooleanField(default=False, help_text='Enabling this will let other users see your email address; profile needs to be set to public as well'), 17 | ), 18 | migrations.AddField( 19 | model_name='customuser', 20 | name='profile_is_public', 21 | field=models.BooleanField(default=False, help_text='Enabling this will let other users see your profile inlcuding your name, about, website, where you are on the course'), 22 | ), 23 | migrations.AddField( 24 | model_name='customuser', 25 | name='slack_display_name_is_public', 26 | field=models.BooleanField(default=False, help_text='Enabling this will let other users see your Slack display name; profile needs to be set to public as well'), 27 | ), 28 | migrations.AlterField( 29 | model_name='customuser', 30 | name='website_url', 31 | field=models.URLField(default='', help_text='Website, GitHub or Linkedin URL', max_length=255), 32 | ), 33 | ] 34 | -------------------------------------------------------------------------------- /accounts/migrations/0009_customuser_profile_image.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-16 18:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0008_auto_20210116_1717'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='customuser', 15 | name='profile_image', 16 | field=models.TextField(blank=True, default='', help_text='Text field to store base64 encoded profile image content.'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0010_remove_customuser_slack_display_name_is_public.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-18 12:20 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0009_customuser_profile_image'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='customuser', 15 | name='slack_display_name_is_public', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /accounts/migrations/0011_merge_20210118_1524.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-18 15:24 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0010_remove_customuser_slack_display_name_is_public'), 10 | ('accounts', '0006_auto_20210111_2242'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /accounts/migrations/0012_auto_20210205_1300.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-05 13:00 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('accounts', '0011_merge_20210118_1524'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='customuser', 16 | name='organisation', 17 | field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='accounts.organisation'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /accounts/migrations/0013_auto_20210215_1505.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-15 15:05 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0012_auto_20210205_1300'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='customuser', 15 | name='current_lms_module', 16 | field=models.CharField(choices=[('', 'Select Learning Stage'), ('programme_preliminaries', 'Programme Preliminaries'), ('programming_paradigms', 'Programming Paradigms'), ('html_essentials', 'HTML Essentials'), ('css_essentials', 'CSS Essentials'), ('user_centric_frontend_development', 'User Centric Frontend Development'), ('comparative_programming_languages_essentials', 'Comparative Programming Languages Essentials'), ('javascript_essentials', 'Javascript Essentials'), ('interactive_frontend_development', 'Interactive Frontend Development'), ('python_essentials', 'Python Essentials'), ('practical_python', 'Practical Python'), ('data_centric_development', 'Data Centric Development'), ('backend_development', 'Backend Development'), ('full_stack_frameworks_with_django', 'Full Stack Frameworks with Django'), ('alumni', 'Alumni'), ('staff', 'Staff')], default='', max_length=50), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0014_auto_20210225_1727.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-25 17:27 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0013_auto_20210215_1505'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='customuser', 15 | name='user_type', 16 | field=models.CharField(choices=[('', 'Select Post Category'), ('participant', 'Participant'), ('mentor', 'Mentor'), ('staff', 'Staff'), ('admin', 'Admin')], default='participant', max_length=20), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0015_remove_customuser_user_type.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.6 on 2021-03-19 17:05 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0014_auto_20210225_1727'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='customuser', 15 | name='user_type', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /accounts/migrations/0016_customuser_is_external.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.6 on 2021-03-19 17:19 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0015_remove_customuser_user_type'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='customuser', 15 | name='is_external', 16 | field=models.BooleanField(default=False, help_text='Set to True if a user signs up through an external registration link'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0018_slacksitesettings.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2022-12-19 14:45 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('accounts', '0017_customuser_timezone'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='SlackSiteSettings', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('enable_welcome_emails', models.BooleanField(default=True)), 19 | ('communication_channel_type', models.CharField(choices=[('slack_private_channel', 'Private Slack Channel'), ('other', 'Other')], default='slack_private_channel', max_length=50)), 20 | ('slack_admins', models.ManyToManyField(related_name='slacksitesettings', to=settings.AUTH_USER_MODEL)), 21 | ], 22 | options={ 23 | 'verbose_name': 'Slack Site Settings', 24 | 'verbose_name_plural': 'Slack Site Settings', 25 | }, 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /accounts/migrations/0019_emailtemplate.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2023-01-04 15:38 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0018_slacksitesettings'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='EmailTemplate', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('display_name', models.CharField(max_length=255)), 18 | ('description', models.TextField(blank=True, null=True)), 19 | ('template_name', models.CharField(max_length=255)), 20 | ('subject', models.CharField(max_length=1048)), 21 | ('plain_text_message', models.TextField()), 22 | ('html_message', models.TextField(blank=True, null=True)), 23 | ('is_active', models.BooleanField(default=True)), 24 | ], 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /accounts/migrations/0020_auto_20230104_1655.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2023-01-04 16:55 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0019_emailtemplate'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name='emailtemplate', 15 | options={'verbose_name': 'Email Template', 'verbose_name_plural': 'Email Templates'}, 16 | ), 17 | migrations.AlterField( 18 | model_name='emailtemplate', 19 | name='template_name', 20 | field=models.CharField(max_length=255, unique=True), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /accounts/migrations/0021_auto_20250205_1138.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2025-02-05 11:38 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0020_auto_20230104_1655'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='customuser', 15 | name='current_course', 16 | field=models.CharField(choices=[('', 'Select Current Course'), ('L3', 'The Level 3 Diploma in Software Development (L3)'), ('5P', 'The 5 project Diploma in Software Development Course (5P)'), ('4P', 'The 4 project Diploma in Software Development Course (4P)'), ('FSBC', 'The 16 Week Full Stack Developer Bootcamp (BC)'), ('DATABC', 'The 16 Week Data-Analytics Bootcamp (DBC)')], default='', max_length=50), 17 | ), 18 | migrations.AlterField( 19 | model_name='customuser', 20 | name='current_lms_module', 21 | field=models.CharField(choices=[('', 'Select Learning Stage'), ('no_coding_experience', 'No coding experience'), ('just_starting', 'Just starting the course'), ('mid_course', 'In the middle of the course'), ('end_course', 'At the end of the course'), ('graduated', 'Graduated'), ('dev_duties', 'Working with some development duties'), ('working_dev', 'Working as a developer'), ('guest_judge', 'Guest judge'), ('guest_facilitator', 'Guest facilitator'), ('staff', 'Staff')], default='', max_length=50), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /accounts/migrations/0022_auto_20250206_1702.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2025-02-06 17:02 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0021_auto_20250205_1138'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='customuser', 15 | name='current_course', 16 | field=models.CharField(choices=[('', 'Select Current Course'), ('L3', 'The Level 3 Diploma in Software Development (L3)'), ('5P', 'The 5 project Diploma in Software Development Course (5P)'), ('4P', 'The 4 project Diploma in Software Development Course (4P)'), ('FSBC', 'The 16 Week Full Stack Developer Bootcamp (BC)'), ('DATABC', 'The 16 Week Data-Analytics Bootcamp (DBC)'), ('external', 'Other/External')], default='', max_length=50), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0022_auto_20250214_1439.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2025-02-14 14:39 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0021_auto_20250205_1138'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='customuser', 15 | name='current_course', 16 | field=models.CharField(choices=[('', 'Select Current Course'), ('L3', 'The Level 3 Diploma in Software Development (L3)'), ('5P', 'The 5 project Diploma in Software Development Course (5P)'), ('4P', 'The 4 project Diploma in Software Development Course (4P)'), ('FSBC', 'The 16 Week Full Stack Developer Bootcamp (BC)'), ('DATABC', 'The 16 Week Data-Analytics Bootcamp (DBC)'), ('external', 'Other/External')], default='', max_length=50), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0023_merge_20250217_0913.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2025-02-17 09:13 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0022_auto_20250214_1439'), 10 | ('accounts', '0022_auto_20250206_1702'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /accounts/migrations/0024_customuser_dropoffs.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2025-02-17 12:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('accounts', '0023_merge_20250217_0913'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='customuser', 15 | name='dropoffs', 16 | field=models.IntegerField(default=0, help_text='Number of times a user has dropped off from a hackathon'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /accounts/migrations/0025_customuser_dropped_off_hackathon.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2025-02-19 14:54 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('hackathon', '0056_hackathon_badge_url'), 11 | ('accounts', '0024_customuser_dropoffs'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='customuser', 17 | name='dropped_off_hackathon', 18 | field=models.ForeignKey(blank=True, help_text='The hackathon that the user dropped off from', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dropped_off_users', to='hackathon.hackathon'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /accounts/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/accounts/migrations/__init__.py -------------------------------------------------------------------------------- /accounts/templates/accounts/edit_profile.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends 'profiles/profile.html' %} 3 | 4 | {% block title %}Edit User Profile{% endblock %} 5 | 6 | {% load static %} 7 | 8 | {% block css %} 9 | 10 | 11 | {% endblock %} 12 | 13 | {% block edit_profile %} 14 |

Edit Profile

15 |
16 |
17 | {% csrf_token %} 18 | {{ form.as_p }} 19 |
20 |
21 | 22 | 23 |
24 |
25 |
26 | {% endblock %} -------------------------------------------------------------------------------- /accounts/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/accounts/templatetags/__init__.py -------------------------------------------------------------------------------- /accounts/templatetags/account_tags.py: -------------------------------------------------------------------------------- 1 | from django.template import Library 2 | 3 | from accounts.models import UserType 4 | 5 | register = Library() 6 | 7 | 8 | @register.filter 9 | def is_type(user_type, enum_type): 10 | """ Checks if a user's user_type is of a specific UserType Enum """ 11 | try: 12 | return user_type == UserType[enum_type] 13 | except KeyError: 14 | return 15 | 16 | 17 | @register.filter 18 | def is_types(user_type, enum_types_str): 19 | """ Checks if a user's user_type is any of a specific UserType Enum """ 20 | try: 21 | enum_types = enum_types_str.split(',') 22 | return any([enum_type for enum_type in enum_types 23 | if user_type == UserType[enum_type]]) 24 | except KeyError: 25 | return 26 | -------------------------------------------------------------------------------- /accounts/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.views import LoginView 2 | from django.urls import path 3 | from . import views 4 | 5 | urlpatterns = [ 6 | path("edit_profile/", views.edit_profile, name="edit_profile"), 7 | path('external/', LoginView.as_view()), 8 | ] 9 | -------------------------------------------------------------------------------- /accounts/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from django.contrib.auth.decorators import login_required 3 | from django.contrib import messages 4 | 5 | from .forms import EditProfileForm 6 | 7 | 8 | @login_required 9 | def edit_profile(request): 10 | """ 11 | If the request is POST and the form is valid, save the form and 12 | redirect to profile. Otherwise, display current user instance in 13 | EditProfileForm on edit_profile.html. 14 | """ 15 | if request.method == 'POST': 16 | form = EditProfileForm(request.POST, instance=request.user) 17 | 18 | if form.is_valid(): 19 | form.save() 20 | messages.success(request, 'Profile updated successfully.') 21 | return redirect('profile') 22 | 23 | else: 24 | messages.error(request, 'Invalid entry, please try again.') 25 | return redirect('edit_profile') 26 | else: 27 | form = EditProfileForm(instance=request.user) 28 | return render(request, 'accounts/edit_profile.html', {'form': form}) 29 | -------------------------------------------------------------------------------- /assets/images/hackathon.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/assets/images/hackathon.jpeg -------------------------------------------------------------------------------- /competencies/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/competencies/__init__.py -------------------------------------------------------------------------------- /competencies/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from competencies.models import ( 4 | Competency, CompetencyDifficulty, 5 | CompetencyAssessment, CompetencyAssessmentRating) 6 | 7 | admin.site.register(CompetencyDifficulty) 8 | admin.site.register(Competency) 9 | admin.site.register(CompetencyAssessment) 10 | admin.site.register(CompetencyAssessmentRating) 11 | -------------------------------------------------------------------------------- /competencies/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CompetenciesConfig(AppConfig): 5 | name = 'competencies' 6 | -------------------------------------------------------------------------------- /competencies/helpers.py: -------------------------------------------------------------------------------- 1 | from django.core.exceptions import ObjectDoesNotExist 2 | 3 | from competencies.forms import CompetencyAssessmentForm 4 | from competencies.models import CompetencyAssessment 5 | 6 | 7 | def get_or_create_competency_assessment(data): 8 | try: 9 | existing_assessment = CompetencyAssessment.objects.get( 10 | user=data.get('user')) 11 | existing_assessment.is_visible = data.get('is_visible') == 'on' 12 | existing_assessment.save() 13 | return existing_assessment 14 | except ObjectDoesNotExist: 15 | # If no assessment exists, just continue 16 | pass 17 | 18 | form = CompetencyAssessmentForm(data) 19 | if form.is_valid(): 20 | return form.save() 21 | return 22 | 23 | 24 | def populate_competency_assessment_for_formset(competency_assessment, data): 25 | keys = [key for key in data.keys() 26 | if key.endswith('-competency')] 27 | 28 | for key in keys: 29 | assessment_key = key.replace('-competency', '-user_assessment') 30 | data[assessment_key] = competency_assessment.id 31 | -------------------------------------------------------------------------------- /competencies/migrations/0002_auto_20220808_1029.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2022-08-08 10:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('competencies', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='competencyassessmentrating', 15 | name='rating', 16 | field=models.CharField(blank=True, choices=[('no_knowledge', 'I have no knowledge'), ('want_to_know', 'Want to know about it'), ('learning', 'Learning about it right now'), ('know_it', 'I know about this')], default='', max_length=50, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /competencies/migrations/0003_auto_20221219_1421.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2022-12-19 14:21 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('competencies', '0002_auto_20220808_1029'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name='competencyassessment', 15 | options={'verbose_name': 'Competency Self Assessment', 'verbose_name_plural': 'Competency Self Assessments'}, 16 | ), 17 | migrations.AlterModelOptions( 18 | name='competencyassessmentrating', 19 | options={'verbose_name': 'Competency Self Assessment Rating', 'verbose_name_plural': 'Competency Self Assessment Ratings'}, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /competencies/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/competencies/migrations/__init__.py -------------------------------------------------------------------------------- /competencies/templates/competency_form.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load static %} 3 | 4 | {% block content %} 5 | 6 |
7 |
8 | 9 |
10 |
11 |
12 |

Create New Compentency for Participant Self-Assessment

13 |
14 |
15 | 16 |
17 | {% csrf_token%} 18 | {{form.display_name|as_crispy_field}} 19 | 20 |
21 | {{form.perceived_difficulty}} 22 | 23 | 24 | 25 |
26 | Back 27 | 28 |
29 | 30 |
31 |
32 |
33 | 34 |
35 |
36 | 37 | {% url 'create_competency_difficulty' as create_competency_difficulty_url %} 38 | 39 | 40 | {% endblock %} 41 | -------------------------------------------------------------------------------- /competencies/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from competencies import views 4 | 5 | 6 | 7 | urlpatterns = [ 8 | path('', views.self_assess_competencies, name="self_assess_competencies"), 9 | path('list', views.list_competencies, name="list_competencies"), 10 | path('create', views.create_competency, name="create_competency"), 11 | path('edit/', views.edit_competency, 12 | name="edit_competency"), 13 | path('difficulty/create', views.create_competency_difficulty, 14 | name="create_competency_difficulty"), 15 | path('difficulty/edit/', 16 | views.edit_competency_difficulty, name="edit_competency_difficulty"), 17 | ] 18 | -------------------------------------------------------------------------------- /custom_slack_provider/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/custom_slack_provider/__init__.py -------------------------------------------------------------------------------- /custom_slack_provider/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/custom_slack_provider/models.py -------------------------------------------------------------------------------- /custom_slack_provider/tests.py: -------------------------------------------------------------------------------- 1 | from allauth.socialaccount.tests import OAuth2TestsMixin 2 | from allauth.tests import MockedResponse, TestCase 3 | from allauth.socialaccount.tests import setup_app 4 | 5 | from .provider import SlackProvider 6 | from django.core.management import call_command 7 | 8 | 9 | class SlackOAuth2Tests(OAuth2TestsMixin, TestCase): 10 | provider_id = SlackProvider.id 11 | provider = SlackProvider 12 | def setUp(self): 13 | call_command('loaddata', 'organisation', verbosity=0) 14 | setup_app(self.provider) 15 | 16 | def get_mocked_response(self): 17 | return MockedResponse(200, """{ 18 | "ok": true, 19 | "url": "https:\\/\\/myteam.slack.com\\/", 20 | "team": {"name": "My Team", "id": "U0G9QF9C6"}, 21 | "user": {"id": "T0G9PQBBK"}, 22 | "team_id": "T12345", 23 | "user_id": "U12345" 24 | }""") # noqa 25 | -------------------------------------------------------------------------------- /custom_slack_provider/urls.py: -------------------------------------------------------------------------------- 1 | from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns 2 | 3 | from .provider import SlackProvider 4 | 5 | 6 | urlpatterns = default_urlpatterns(SlackProvider) 7 | -------------------------------------------------------------------------------- /extract_staticfiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -fr staticfiles 4 | 5 | container_id=$(docker create 949266541515.dkr.ecr.eu-west-1.amazonaws.com/ci-hackathon-app:$1) 6 | docker cp $container_id:/hackathon-app/static ./staticfiles 7 | docker rm -v $container_id 8 | 9 | -------------------------------------------------------------------------------- /hackadmin/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/hackadmin/__init__.py -------------------------------------------------------------------------------- /hackadmin/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /hackadmin/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HackadminConfig(AppConfig): 5 | name = 'hackadmin' 6 | -------------------------------------------------------------------------------- /hackadmin/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/hackadmin/migrations/__init__.py -------------------------------------------------------------------------------- /hackadmin/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /hackadmin/templates/includes/add_judge.html: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /hackadmin/templates/includes/back_button.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /hackadmin/templates/includes/remove_participant.html: -------------------------------------------------------------------------------- 1 |
2 | {% csrf_token %} 3 | 4 | 5 | 6 | 7 |
8 | -------------------------------------------------------------------------------- /hackadmin/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/hackadmin/templatetags/__init__.py -------------------------------------------------------------------------------- /hackadmin/templatetags/hackadmin_tags.py: -------------------------------------------------------------------------------- 1 | from django.template import Library 2 | 3 | from accounts.models import UserType 4 | 5 | register = Library() 6 | 7 | 8 | @register.filter 9 | def readable_user_type(user_type): 10 | return str(user_type).split('.')[-1] 11 | 12 | 13 | @register.filter 14 | def readable_lms_module(lms_module): 15 | return ' '.join(lms_module.split('_')) 16 | 17 | 18 | @register.simple_tag 19 | def split_string(**kwargs): 20 | string=kwargs['string'] 21 | delimiter=kwargs['delimiter'] 22 | index=kwargs['index'] 23 | return string.split(delimiter)[index] 24 | -------------------------------------------------------------------------------- /hackadmin/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /hackadmin/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import ( 3 | hackadmin_panel, 4 | hackathon_participants, 5 | all_users, 6 | remove_participant, 7 | add_participant, 8 | add_judge, 9 | ) 10 | 11 | urlpatterns = [ 12 | path('', hackadmin_panel, name='hackadmin_panel'), 13 | path('/participants/', hackathon_participants, 14 | name='hackathon_participants'), 15 | path('all_users/', all_users, name='all_users'), 16 | path('/remove_participant/', remove_participant, 17 | name='remove_participant'), 18 | path('/add_participant/', add_participant, 19 | name='add_participant'), 20 | path('add_judge/', add_judge, 21 | name='add_judge'), 22 | ] 23 | -------------------------------------------------------------------------------- /hackathon/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/hackathon/__init__.py -------------------------------------------------------------------------------- /hackathon/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import (Hackathon, 3 | HackAward, 4 | HackAwardCategory, 5 | HackTeam, 6 | HackProject, 7 | HackProjectScore, 8 | HackProjectScoreCategory, 9 | Event) 10 | 11 | 12 | # Register your models here. 13 | admin.site.register(Hackathon) 14 | admin.site.register(HackAward) 15 | admin.site.register(HackAwardCategory) 16 | admin.site.register(HackTeam) 17 | admin.site.register(HackProject) 18 | admin.site.register(HackProjectScore) 19 | admin.site.register(HackProjectScoreCategory) 20 | admin.site.register(Event) 21 | -------------------------------------------------------------------------------- /hackathon/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HackathonConfig(AppConfig): 5 | name = 'hackathon' 6 | -------------------------------------------------------------------------------- /hackathon/lists.py: -------------------------------------------------------------------------------- 1 | """ 2 | List of stauts types to be passed into dropdown of same name for each 3 | user selection. 4 | """ 5 | STATUS_TYPES_CHOICES = ( 6 | ('draft', 'Draft'), 7 | ('published', 'Published'), 8 | ('registration_open', 'Registration Open'), 9 | ('hack_prep', 'Hackathon Preparation'), 10 | ('hack_in_progress', 'Hackathon In Progress'), 11 | ('judging', 'Judging'), 12 | ('finished', 'Hackathon Finished'), 13 | ('deleted', 'Deleted'), 14 | ) 15 | 16 | AWARD_CATEGORIES = ['Best Project', 'Best Project (1st Runners Up)', 17 | 'Best Project (2nd Runners Up)', 'Most Innovative Project', 18 | 'Best Commercial Application', 'Most Creative Project'] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-15 19:02 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | import django.utils.timezone 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | initial = True 12 | 13 | dependencies = [ 14 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 15 | ] 16 | 17 | operations = [ 18 | migrations.CreateModel( 19 | name='Hackathon', 20 | fields=[ 21 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 22 | ('created', models.DateTimeField(default=django.utils.timezone.now)), 23 | ('updated', models.DateTimeField(auto_now=True)), 24 | ('display_name', models.CharField(default='', max_length=254)), 25 | ('description', models.TextField()), 26 | ('start_date', models.DateTimeField()), 27 | ('end_date', models.DateTimeField()), 28 | ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hackathon_created', to=settings.AUTH_USER_MODEL)), 29 | ('judges', models.ManyToManyField(blank=True, related_name='hackathon_judges', to=settings.AUTH_USER_MODEL)), 30 | ('organiser', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackathon_organiser', to=settings.AUTH_USER_MODEL)), 31 | ], 32 | ), 33 | ] -------------------------------------------------------------------------------- /hackathon/migrations/0002_auto_20201015_1936.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-15 19:36 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | import django.utils.timezone 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 13 | ('hackathon', '0001_initial'), 14 | ] 15 | 16 | operations = [ 17 | migrations.AlterField( 18 | model_name='hackathon', 19 | name='created_by', 20 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hackathon_created_by', to=settings.AUTH_USER_MODEL), 21 | ), 22 | migrations.CreateModel( 23 | name='HackAwardCategory', 24 | fields=[ 25 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 26 | ('created', models.DateTimeField(default=django.utils.timezone.now)), 27 | ('updated', models.DateTimeField(auto_now=True)), 28 | ('display_name', models.CharField(default='', max_length=254)), 29 | ('description', models.TextField()), 30 | ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hackawardcategory_created_by', to=settings.AUTH_USER_MODEL)), 31 | ], 32 | ), 33 | ] -------------------------------------------------------------------------------- /hackathon/migrations/0006_auto_20201016_2050.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-16 20:50 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0005_auto_20201016_1951'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='hackprojectscore', 15 | old_name='hackprojectscorecategory', 16 | new_name='hack_project_score_category', 17 | ), 18 | ] -------------------------------------------------------------------------------- /hackathon/migrations/0008_auto_20201018_1301.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-18 12:01 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0007_auto_20201017_1148'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='theme', 16 | field=models.CharField(max_length=264, null=True), 17 | ), 18 | migrations.AlterField( 19 | model_name='hackathon', 20 | name='description', 21 | field=models.TextField(null=True), 22 | ), 23 | migrations.AlterField( 24 | model_name='hackathon', 25 | name='display_name', 26 | field=models.CharField(default='', max_length=254, null=True), 27 | ), 28 | migrations.AlterField( 29 | model_name='hackathon', 30 | name='end_date', 31 | field=models.DateTimeField(null=True), 32 | ), 33 | migrations.AlterField( 34 | model_name='hackathon', 35 | name='start_date', 36 | field=models.DateTimeField(null=True), 37 | ), 38 | ] 39 | -------------------------------------------------------------------------------- /hackathon/migrations/0008_auto_20201018_1459.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-18 14:59 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0007_auto_20201017_1148'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='hackproject', 15 | old_name='collab_link', 16 | new_name='deployed_url', 17 | ), 18 | migrations.RenameField( 19 | model_name='hackproject', 20 | old_name='github_link', 21 | new_name='github_url', 22 | ), 23 | migrations.AddField( 24 | model_name='hackproject', 25 | name='share_permission', 26 | field=models.BooleanField(default=True), 27 | ), 28 | migrations.AddField( 29 | model_name='hackproject', 30 | name='speaker_name', 31 | field=models.CharField(default='', max_length=225), 32 | ), 33 | ] 34 | -------------------------------------------------------------------------------- /hackathon/migrations/0008_hackprojectscorecategory_highest_score.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-18 11:43 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0007_auto_20201017_1148'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackprojectscorecategory', 15 | name='highest_score', 16 | field=models.IntegerField(default=10), 17 | ), 18 | ] -------------------------------------------------------------------------------- /hackathon/migrations/0009_auto_20201018_1515.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-18 15:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0008_auto_20201018_1459'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='hackproject', 15 | name='created_by', 16 | ), 17 | migrations.RemoveField( 18 | model_name='hackproject', 19 | name='mentor', 20 | ), 21 | migrations.AlterField( 22 | model_name='hackproject', 23 | name='description', 24 | field=models.TextField(max_length=500), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /hackathon/migrations/0009_auto_20201018_1829.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-18 18:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0008_hackprojectscorecategory_highest_score'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='hackprojectscorecategory', 15 | old_name='highest_score', 16 | new_name='max_score', 17 | ), 18 | migrations.AddField( 19 | model_name='hackprojectscorecategory', 20 | name='min_score', 21 | field=models.IntegerField(default=1), 22 | ), 23 | ] -------------------------------------------------------------------------------- /hackathon/migrations/0010_merge_20201020_1944.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-20 19:44 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0009_auto_20201018_1829'), 10 | ('hackathon', '0009_auto_20201018_1515'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0010_merge_20201022_2224.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-22 21:24 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0009_auto_20201018_1829'), 10 | ('hackathon', '0008_auto_20201018_1301'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0011_auto_20201020_1948.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-20 19:48 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0010_merge_20201020_1944'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='hackproject', 18 | name='created_by', 19 | field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='hackprojects', to=settings.AUTH_USER_MODEL), 20 | preserve_default=False, 21 | ), 22 | migrations.AddField( 23 | model_name='hackproject', 24 | name='mentor', 25 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackproject_mentor', to=settings.AUTH_USER_MODEL), 26 | ), 27 | migrations.AlterField( 28 | model_name='hackprojectscore', 29 | name='created_by', 30 | field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='hackprojectscores', to=settings.AUTH_USER_MODEL), 31 | ), 32 | ] 33 | -------------------------------------------------------------------------------- /hackathon/migrations/0011_auto_20201024_0035.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-23 23:35 2 | 3 | from django.db import migrations, models 4 | import django.utils.timezone 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('hackathon', '0010_merge_20201022_2224'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='hackathon', 16 | name='description', 17 | field=models.TextField(default=''), 18 | preserve_default=False, 19 | ), 20 | migrations.AlterField( 21 | model_name='hackathon', 22 | name='display_name', 23 | field=models.CharField(default='', max_length=254), 24 | ), 25 | migrations.AlterField( 26 | model_name='hackathon', 27 | name='end_date', 28 | field=models.DateTimeField(default=django.utils.timezone.now), 29 | preserve_default=False, 30 | ), 31 | migrations.AlterField( 32 | model_name='hackathon', 33 | name='start_date', 34 | field=models.DateTimeField(default=django.utils.timezone.now), 35 | preserve_default=False, 36 | ), 37 | migrations.AlterField( 38 | model_name='hackathon', 39 | name='theme', 40 | field=models.CharField(default='', max_length=264), 41 | preserve_default=False, 42 | ), 43 | ] 44 | -------------------------------------------------------------------------------- /hackathon/migrations/0012_remove_hackproject_created_by.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-20 19:49 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0011_auto_20201020_1948'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='hackproject', 15 | name='created_by', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /hackathon/migrations/0013_remove_hackproject_mentor.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-20 19:52 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0012_remove_hackproject_created_by'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='hackproject', 15 | name='mentor', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /hackathon/migrations/0014_auto_20201020_1953.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-20 19:53 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0013_remove_hackproject_mentor'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AddField( 17 | model_name='hackproject', 18 | name='created_by', 19 | field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='hackproject', to=settings.AUTH_USER_MODEL), 20 | ), 21 | migrations.AddField( 22 | model_name='hackproject', 23 | name='mentor', 24 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackproject_mentor', to=settings.AUTH_USER_MODEL), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /hackathon/migrations/0015_auto_20201020_1955.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-20 19:55 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0014_auto_20201020_1953'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='hackproject', 18 | name='created_by', 19 | field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackproject', to=settings.AUTH_USER_MODEL), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /hackathon/migrations/0016_merge_20201024_1240.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-24 12:40 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0015_auto_20201020_1955'), 10 | ('hackathon', '0011_auto_20201024_0035'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0017_auto_20201024_1431.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-24 13:31 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0016_merge_20201024_1240'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='hackproject', 18 | name='created_by', 19 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackproject', to=settings.AUTH_USER_MODEL), 20 | ), 21 | migrations.AlterField( 22 | model_name='hackprojectscore', 23 | name='created_by', 24 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hackprojectscores', to=settings.AUTH_USER_MODEL), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /hackathon/migrations/0017_auto_20201025_1211.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-25 12:11 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0016_merge_20201024_1240'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='hackproject', 18 | name='created_by', 19 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackproject', to=settings.AUTH_USER_MODEL), 20 | ), 21 | migrations.AlterField( 22 | model_name='hackprojectscore', 23 | name='created_by', 24 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hackprojectscores', to=settings.AUTH_USER_MODEL), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /hackathon/migrations/0017_auto_20201025_2140.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-25 21:40 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0016_merge_20201024_1240'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='hackproject', 18 | name='created_by', 19 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackproject', to=settings.AUTH_USER_MODEL), 20 | ), 21 | migrations.AlterField( 22 | model_name='hackprojectscore', 23 | name='created_by', 24 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hackprojectscores', to=settings.AUTH_USER_MODEL), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /hackathon/migrations/0017_auto_20201026_1312.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-26 13:12 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('accounts', '0005_auto_20201026_1312'), 13 | ('hackathon', '0016_merge_20201024_1240'), 14 | ] 15 | 16 | operations = [ 17 | migrations.AlterField( 18 | model_name='hackathon', 19 | name='status', 20 | field=models.CharField(choices=[('draft', 'Draft'), ('published', 'Published'), ('deleted', 'Deleted')], default='draft', max_length=10), 21 | ), 22 | migrations.AlterField( 23 | model_name='hackproject', 24 | name='created_by', 25 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackproject', to=settings.AUTH_USER_MODEL), 26 | ), 27 | migrations.AlterField( 28 | model_name='hackprojectscore', 29 | name='created_by', 30 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hackprojectscores', to=settings.AUTH_USER_MODEL), 31 | ), 32 | ] 33 | -------------------------------------------------------------------------------- /hackathon/migrations/0018_auto_20201025_1933.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-25 19:33 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0017_auto_20201025_1211'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='hackprojectscore', 18 | name='judge', 19 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /hackathon/migrations/0018_hackathon_status.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-24 13:49 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0017_auto_20201024_1431'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='status', 16 | field=models.CharField(blank=True, max_length=50, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0018_merge_20201026_1722.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-26 17:22 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0017_auto_20201025_2140'), 10 | ('hackathon', '0017_auto_20201026_1312'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0019_auto_20201025_2022.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-25 20:22 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0018_hackathon_status'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='hackathon', 15 | name='status', 16 | field=models.CharField(blank=True, default='', max_length=50), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0020_merge_20201026_2056.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-26 20:56 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0018_merge_20201026_1722'), 10 | ('hackathon', '0019_auto_20201025_2022'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0021_hackathon_participants.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-28 22:34 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 11 | ('hackathon', '0020_merge_20201026_2056'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='hackathon', 17 | name='participants', 18 | field=models.ManyToManyField(blank=True, related_name='hackathon_participants', to=settings.AUTH_USER_MODEL), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /hackathon/migrations/0021_merge_20201029_1407.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-29 14:07 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0020_merge_20201026_2056'), 10 | ('hackathon', '0018_auto_20201025_1933'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0022_auto_20201028_2308.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-28 23:08 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0021_hackathon_participants'), 13 | ] 14 | 15 | operations = [ 16 | migrations.RemoveField( 17 | model_name='hackathon', 18 | name='judges', 19 | ), 20 | migrations.AddField( 21 | model_name='hackathon', 22 | name='judges', 23 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackathon_judges', to=settings.AUTH_USER_MODEL), 24 | ), 25 | migrations.RemoveField( 26 | model_name='hackathon', 27 | name='participants', 28 | ), 29 | migrations.AddField( 30 | model_name='hackathon', 31 | name='participants', 32 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackathon_participants', to=settings.AUTH_USER_MODEL), 33 | ), 34 | ] 35 | -------------------------------------------------------------------------------- /hackathon/migrations/0022_hackathon_judging_status.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-29 14:20 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0021_merge_20201029_1407'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='judging_status', 16 | field=models.CharField(choices=[('not_yet_started', "Hasn't started"), ('open', 'Open'), ('closed', 'Closed')], default='not_yet_started', max_length=16), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0023_merge_20201103_2114.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-11-03 21:14 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0022_auto_20201028_2308'), 10 | ('hackathon', '0022_hackathon_judging_status'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0024_auto_20201103_2114.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-11-03 21:14 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 11 | ('hackathon', '0023_merge_20201103_2114'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='hackathon', 17 | name='judges', 18 | ), 19 | migrations.AddField( 20 | model_name='hackathon', 21 | name='judges', 22 | field=models.ManyToManyField(blank=True, related_name='hackathon_judges', to=settings.AUTH_USER_MODEL), 23 | ), 24 | migrations.RemoveField( 25 | model_name='hackathon', 26 | name='participants', 27 | ), 28 | migrations.AddField( 29 | model_name='hackathon', 30 | name='participants', 31 | field=models.ManyToManyField(blank=True, related_name='hackathon_participants', to=settings.AUTH_USER_MODEL), 32 | ), 33 | ] 34 | -------------------------------------------------------------------------------- /hackathon/migrations/0025_auto_20210111_2242.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-11 22:42 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0024_auto_20201103_2114'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name='hackteam', 15 | options={'verbose_name': 'Hack Team', 'verbose_name_plural': 'Hack Teams'}, 16 | ), 17 | migrations.AlterField( 18 | model_name='hackathon', 19 | name='status', 20 | field=models.CharField(choices=[('draft', 'Draft'), ('published', 'Published'), ('registration_open', 'Registration Open'), ('hack_in_progress', 'Hackathon In Progress'), ('judging', 'Judging'), ('finished', 'Hackathon Finished'), ('deleted', 'Deleted')], default='draft', max_length=20), 21 | ), 22 | migrations.AlterUniqueTogether( 23 | name='hackteam', 24 | unique_together={('display_name', 'hackathon')}, 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /hackathon/migrations/0025_auto_20210113_2249.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-13 22:49 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0024_auto_20201103_2114'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name='hackteam', 15 | options={'verbose_name': 'Hack Team', 'verbose_name_plural': 'Hack Teams'}, 16 | ), 17 | migrations.AlterUniqueTogether( 18 | name='hackteam', 19 | unique_together={('display_name', 'hackathon')}, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /hackathon/migrations/0026_hackproject_technologies_used.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-15 17:06 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0025_auto_20210113_2249'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackproject', 15 | name='technologies_used', 16 | field=models.CharField(default='', max_length=1024), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0026_hackprojectscorecategory_hackathon.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-18 23:12 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('hackathon', '0025_auto_20210111_2242'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='hackprojectscorecategory', 16 | name='hackathon', 17 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackprojectscorecategories', to='hackathon.hackathon'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /hackathon/migrations/0027_auto_20210116_1652.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-16 16:52 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0026_hackproject_technologies_used'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackproject', 15 | name='project_image_url', 16 | field=models.URLField(blank=True, default='', help_text="URL for an image displayed on the team's page next to the project information."), 17 | ), 18 | migrations.AddField( 19 | model_name='hackproject', 20 | name='screenshot_image_url', 21 | field=models.URLField(blank=True, default='', help_text="URL for a project screenshot displayed on the team's page underneath the project information"), 22 | ), 23 | migrations.AddField( 24 | model_name='hackteam', 25 | name='header_image_url', 26 | field=models.URLField(blank=True, default='', help_text="URL for a header image displayed at the top of the team's page"), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /hackathon/migrations/0027_auto_20210119_0045.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-19 00:45 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('hackathon', '0026_hackprojectscorecategory_hackathon'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='hackawardcategory', 16 | name='winning_project', 17 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='hackathon.hackproject'), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /hackathon/migrations/0028_auto_20210116_1653.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-16 16:53 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0027_auto_20210116_1652'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='hackproject', 15 | old_name='screenshot_image_url', 16 | new_name='screenshot_url', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0028_auto_20210119_2352.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-19 23:52 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0027_auto_20210119_0045'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='hackprojectscorecategory', 15 | name='hackathon', 16 | ), 17 | migrations.AddField( 18 | model_name='hackathon', 19 | name='score_categories', 20 | field=models.ManyToManyField(blank=True, related_name='hackathon_score_categories', to='hackathon.HackProjectScoreCategory'), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /hackathon/migrations/0029_auto_20210117_1352.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-17 13:52 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0028_auto_20210116_1653'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='hackproject', 15 | name='project_image_url', 16 | ), 17 | migrations.RemoveField( 18 | model_name='hackproject', 19 | name='screenshot_url', 20 | ), 21 | migrations.RemoveField( 22 | model_name='hackteam', 23 | name='header_image_url', 24 | ), 25 | migrations.AddField( 26 | model_name='hackproject', 27 | name='project_image', 28 | field=models.TextField(blank=True, default='', help_text="Image displayed next to the project on the team's page."), 29 | ), 30 | migrations.AddField( 31 | model_name='hackproject', 32 | name='screenshot', 33 | field=models.TextField(blank=True, default='', help_text="Project screenshot displayed on the team's page underneath the project information"), 34 | ), 35 | migrations.AddField( 36 | model_name='hackteam', 37 | name='header_image', 38 | field=models.TextField(blank=True, default='', help_text="Image displayed at the top of the team's page."), 39 | ), 40 | ] 41 | -------------------------------------------------------------------------------- /hackathon/migrations/0030_auto_20210118_1220.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-18 12:20 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0029_auto_20210117_1352'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='hackproject', 15 | name='technologies_used', 16 | field=models.CharField(default='', help_text='Add any technologies that were used for this project', max_length=1024), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0031_merge_20210118_1524.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-18 15:24 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0030_auto_20210118_1220'), 10 | ('hackathon', '0025_auto_20210111_2242'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0032_merge_20210120_1141.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-20 11:41 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0028_auto_20210119_2352'), 10 | ('hackathon', '0031_merge_20210118_1524'), 11 | ] 12 | 13 | operations = [ 14 | ] 15 | -------------------------------------------------------------------------------- /hackathon/migrations/0034_hackathon_hackathon_image.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-01-29 00:23 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0033_auto_20210128_1736'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='hackathon_image', 16 | field=models.TextField(blank=True, default='', help_text='Hackathon image.'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0035_auto_20210205_1300.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-05 13:00 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('accounts', '0012_auto_20210205_1300'), 12 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 13 | ('hackathon', '0034_hackathon_hackathon_image'), 14 | ] 15 | 16 | operations = [ 17 | migrations.AddField( 18 | model_name='hackathon', 19 | name='organisation', 20 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hackathons', to='accounts.organisation'), 21 | ), 22 | migrations.AlterField( 23 | model_name='hackathon', 24 | name='organiser', 25 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='organised_hackathons', to=settings.AUTH_USER_MODEL), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /hackathon/migrations/0036_remove_hackathon_judging_status.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-08 15:13 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0035_auto_20210205_1300'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='hackathon', 15 | name='judging_status', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /hackathon/migrations/0037_hackathon_teamsize.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-09 13:57 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0036_remove_hackathon_judging_status'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='teamsize', 16 | field=models.IntegerField(default=3), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0038_auto_20210224_1521.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-24 15:21 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 11 | ('hackathon', '0037_hackathon_teamsize'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='hackathon', 17 | name='judges', 18 | field=models.ManyToManyField(blank=True, related_name='judged_hackathons', to=settings.AUTH_USER_MODEL), 19 | ), 20 | migrations.AlterField( 21 | model_name='hackathon', 22 | name='participants', 23 | field=models.ManyToManyField(blank=True, related_name='participated_hackathons', to=settings.AUTH_USER_MODEL), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /hackathon/migrations/0039_auto_20210224_1850.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-24 18:50 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0038_auto_20210224_1521'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='hackathon', 15 | old_name='teamsize', 16 | new_name='team_size', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0040_auto_20210225_1656.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-02-25 16:56 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0039_auto_20210224_1850'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='tag_line', 16 | field=models.CharField(default='', help_text='Short description which will be displayed in the Hackathon List view.', max_length=254), 17 | ), 18 | migrations.AlterField( 19 | model_name='hackathon', 20 | name='description', 21 | field=models.TextField(help_text='Longer description which will be displayed in the Hackathon Detail view. Usually includes schedule and other details.'), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /hackathon/migrations/0041_auto_20210301_1716.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-03-01 17:16 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 12 | ('hackathon', '0040_auto_20210225_1656'), 13 | ] 14 | 15 | operations = [ 16 | migrations.RemoveField( 17 | model_name='hackproject', 18 | name='mentor', 19 | ), 20 | migrations.AddField( 21 | model_name='hackteam', 22 | name='mentor', 23 | field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mentored_teams', to=settings.AUTH_USER_MODEL), 24 | ), 25 | migrations.AlterField( 26 | model_name='hackathon', 27 | name='status', 28 | field=models.CharField(choices=[('draft', 'Draft'), ('published', 'Published'), ('registration_open', 'Registration Open'), ('hack_prep', 'Hackathon Preparation'), ('hack_in_progress', 'Hackathon In Progress'), ('judging', 'Judging'), ('finished', 'Hackathon Finished'), ('deleted', 'Deleted')], default='draft', max_length=20), 29 | ), 30 | ] 31 | -------------------------------------------------------------------------------- /hackathon/migrations/0042_hackteam_communication_channel.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.3 on 2021-03-02 23:11 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0041_auto_20210301_1716'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackteam', 15 | name='communication_channel', 16 | field=models.CharField(blank=True, default='', help_text='Usually a link to the Slack group IM, but can be a link to something else.', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0043_hackathon_is_public.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.8 on 2021-05-21 15:38 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0042_hackteam_communication_channel'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='is_public', 16 | field=models.BooleanField(default=False), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0044_auto_20210717_1654.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.8 on 2021-07-17 16:54 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0043_hackathon_is_public'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='max_participants', 16 | field=models.IntegerField(blank=True, default=None, null=True), 17 | ), 18 | migrations.AlterField( 19 | model_name='hackathon', 20 | name='theme', 21 | field=models.CharField(default='', max_length=264), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /hackathon/migrations/0045_hackprojectscorecategory_is_active.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.12 on 2021-10-21 16:51 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0044_auto_20210717_1654'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackprojectscorecategory', 15 | name='is_active', 16 | field=models.BooleanField(default=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0046_auto_20220113_1350.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2022-01-13 13:50 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 11 | ('hackathon', '0045_hackprojectscorecategory_is_active'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='hackteam', 17 | name='participants', 18 | field=models.ManyToManyField(related_name='participated_hackteams', to=settings.AUTH_USER_MODEL), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /hackathon/migrations/0047_auto_20221219_1421.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2022-12-19 14:21 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0046_auto_20220113_1350'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='hackathon', 15 | name='is_public', 16 | field=models.BooleanField(default=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0048_auto_20221219_1655.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2022-12-19 16:55 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0047_auto_20221219_1421'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='hackteam', 15 | name='communication_channel', 16 | field=models.CharField(blank=True, default='', help_text='Usually a link to the Private Slack Channel, but can be a link to something else.', max_length=255), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0049_hackathon_is_register.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2024-09-11 08:30 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0048_auto_20221219_1655'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='is_register', 16 | field=models.BooleanField(default=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0050_hackathon_google_registrations_form.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2024-09-11 11:48 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0049_hackathon_is_register'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='google_registrations_form', 16 | field=models.URLField(blank=True, default='', help_text='Link to the Google Form for registrations.'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0051_auto_20240911_1306.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2024-09-11 13:06 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0050_hackathon_google_registrations_form'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='hackathon', 15 | old_name='google_registrations_form', 16 | new_name='google_registration_form', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0052_auto_20240912_1324.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2024-09-12 13:24 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0051_auto_20240911_1306'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='hackathon', 15 | old_name='google_registration_form', 16 | new_name='registration_form', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/0053_auto_20240912_1527.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2024-09-12 15:27 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0052_auto_20240912_1324'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='hackathon', 15 | name='is_register', 16 | ), 17 | migrations.AddField( 18 | model_name='hackathon', 19 | name='allow_external_registrations', 20 | field=models.BooleanField(default=False), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /hackathon/migrations/0054_event.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2024-10-04 15:52 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('hackathon', '0053_auto_20240912_1527'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Event', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('title', models.CharField(max_length=200)), 19 | ('start', models.DateTimeField()), 20 | ('end', models.DateTimeField()), 21 | ('body', models.TextField(default='', max_length=500)), 22 | ('isReadOnly', models.BooleanField(default=True)), 23 | ('webinar_link', models.URLField(blank=True, null=True)), 24 | ('webinar_code', models.CharField(blank=True, max_length=50, null=True)), 25 | ('hackathon', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to='hackathon.hackathon')), 26 | ], 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /hackathon/migrations/0055_remove_event_isreadonly.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2024-10-08 13:58 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0054_event'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='event', 15 | name='isReadOnly', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /hackathon/migrations/0056_hackathon_badge_url.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2025-02-14 14:39 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('hackathon', '0055_remove_event_isreadonly'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='hackathon', 15 | name='badge_url', 16 | field=models.URLField(blank=True, default='', help_text='Link to the badge image.'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /hackathon/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/hackathon/migrations/__init__.py -------------------------------------------------------------------------------- /hackathon/queries/scores.sql: -------------------------------------------------------------------------------- 1 | SELECT 2 | users.id AS judge_id, 3 | users.slack_display_name AS judge_name, 4 | teams.id AS team_id, 5 | teams.display_name AS team_name, 6 | projects.id AS project_id, 7 | projects.display_name AS project_name, 8 | SUM(scores.score) AS score 9 | FROM hackathon_hackprojectscore AS scores 10 | INNER JOIN accounts_customuser AS users 11 | ON users.id = scores.judge_id 12 | INNER JOIN hackathon_hackteam AS teams 13 | ON scores.project_id = teams.project_id 14 | INNER JOIN hackathon_hackproject AS projects 15 | ON scores.project_id = projects.id 16 | INNER JOIN ( 17 | SELECT 18 | judge_id, 19 | project_id, 20 | COUNT(*) AS num_scores 21 | FROM hackathon_hackprojectscore 22 | GROUP BY judge_id, project_id 23 | ) AS judge_counts 24 | ON scores.judge_id = judge_counts.judge_id 25 | AND scores.project_id = judge_counts.project_id 26 | WHERE teams.hackathon_id = %s 27 | GROUP BY 28 | users.id, 29 | users.slack_display_name, 30 | teams.id, 31 | teams.display_name, 32 | projects.id, 33 | projects.display_name 34 | ORDER BY teams.id, users.id; -------------------------------------------------------------------------------- /hackathon/templates/hackathon/hackathon_events.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

{{ hackathon.display_name }} - Webinars

5 | {% if events %} 6 |
7 |
8 |
    9 | {% for event in events %} 10 |
  • 11 |
    12 |
    {{ hackathon.display_name }} {{ event.title }}
    13 |

    {{ event.start }}

    14 |

    Webinar Link

    15 |

    {{ event.body | safe }}

    16 |
    17 |
    18 | Edit 19 | Delete 20 |
    21 |
  • 22 | {% endfor %} 23 |
24 |
25 |
26 | {% else %} 27 |

No events found. Add an event

28 | {% endif %} 29 | Add Event 30 | {% endblock %} -------------------------------------------------------------------------------- /hackathon/templates/hackathon/hackathon_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load static %} 3 | {% load account_tags %} 4 | 5 | {% block css %} 6 | 7 | {% endblock %} 8 | 9 | {% block content %} 10 |
11 | {% if hackathons %} 12 |

Hackathons

13 | {% for hackathon in hackathons %} 14 | {% with authorised_types='SUPERUSER,STAFF,FACILITATOR_ADMIN,FACILITATOR_JUDGE,PARTNER_ADMIN,PARTNER_JUDGE' %} 15 | {% if hackathon.organisation.id == 1 or hackathon.organisation.id == request.user.organisation.id or request.user.user_type|is_types:authorised_types %} 16 | {% if hackathon.status != 'draft' or request.user == hackathon.created_by %} 17 | {% if not hackathon.status == 'deleted' %} 18 | {% include 'hackathon/includes/hackathon_card.html' %} 19 | {% endif %} 20 | {% endif %} 21 | {% endif %} 22 | {% endwith %} 23 | {% endfor %} 24 | {% else %} 25 |

There aren't any Hackathons at the moment!

26 | {% endif %} 27 | 28 | 31 |
32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /hackathon/templates/hackathon/includes/change_status.html: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /hackathon/templates/hackathon/includes/enroll_card.html: -------------------------------------------------------------------------------- 1 | {% if not hackathon.max_participants_reached %} 2 |
3 | {% csrf_token %} 4 | 5 | 9 |
10 | {% endif %} 11 | -------------------------------------------------------------------------------- /hackathon/templates/hackathon/includes/judge_team_display.html: -------------------------------------------------------------------------------- 1 | {% load custom_tags %} 2 | 3 | {% if request.user in hackathon.judges.all %} 4 |
5 | 6 | {% with mentored_teams=request.user|get_mentored_team:hackathon %} 7 | {% if mentored_teams %} 8 | My Teams: 9 |
    10 | {% for mentored_team in mentored_teams %} 11 |
  • 12 | 13 | {{mentored_team}} 14 | 15 |
  • 16 | {% endfor %} 17 |
18 | {% else %} 19 | You currently don't have a team assigned to you. 20 | {% endif %} 21 | {% endwith %} 22 | 23 |
24 | {% endif %} 25 | -------------------------------------------------------------------------------- /hackathon/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/hackathon/templatetags/__init__.py -------------------------------------------------------------------------------- /hackathon/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/hackathon/tests/__init__.py -------------------------------------------------------------------------------- /home/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/home/__init__.py -------------------------------------------------------------------------------- /home/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Review, PartnershipRequest, \ 4 | PartnershipRequestEmailSiteSettings 5 | 6 | 7 | admin.site.register(PartnershipRequest) 8 | admin.site.register(PartnershipRequestEmailSiteSettings) 9 | admin.site.register(Review) 10 | -------------------------------------------------------------------------------- /home/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HomeConfig(AppConfig): 5 | name = 'home' 6 | -------------------------------------------------------------------------------- /home/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | from .models import PartnershipRequest 4 | 5 | 6 | class PartnershipRequestForm(forms.ModelForm): 7 | class Meta: 8 | model = PartnershipRequest 9 | fields = ['company', 'email', 'phone', 'contact_name', 'description'] 10 | -------------------------------------------------------------------------------- /home/migrations/0002_partnershiprequestemailsitesettings.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.12 on 2021-10-01 17:10 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('home', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='PartnershipRequestEmailSiteSettings', 15 | fields=[ 16 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 17 | ('from_email', models.CharField(max_length=255)), 18 | ('to_emails', models.TextField(default='[]', help_text='This should be a list of emails (e.g. ["email1", ...]. Default: []')), 19 | ('subject', models.CharField(max_length=255)), 20 | ], 21 | options={ 22 | 'verbose_name': 'Partnership Request Email Site Settings', 23 | 'verbose_name_plural': 'Partnership Request Email Site Settings', 24 | }, 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /home/migrations/0003_auto_20211009_1607.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.12 on 2021-10-09 16:07 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('home', '0002_partnershiprequestemailsitesettings'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='review', 15 | name='rating', 16 | field=models.FloatField(default=0.0), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /home/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/home/migrations/__init__.py -------------------------------------------------------------------------------- /home/templates/includes/hackathon_square.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 | {% if hackathon.hackathon_image %} 5 |
6 | {% else %} 7 |
8 | {% endif %} 9 | {% if request.user.is_authenticated %} 10 | 11 | {% else %} 12 | 13 | {% endif %} 14 |
15 |

{{hackathon.display_name}}

16 |
17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /home/templates/includes/heading.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{heading_text}}

4 |
5 |
6 | -------------------------------------------------------------------------------- /home/templates/includes/link_square.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /home/templates/includes/showcase_square.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 | {% if showcase.showcase_image %} 5 |
6 | {% else %} 7 | 15 |
16 | -------------------------------------------------------------------------------- /home/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/home/templatetags/__init__.py -------------------------------------------------------------------------------- /home/templatetags/home_tags.py: -------------------------------------------------------------------------------- 1 | from django.template import Library 2 | 3 | register = Library() 4 | 5 | 6 | @register.filter 7 | def convert_rating(rating): 8 | """ Converts a float rating (e.g 3.5) to the number of star and half star 9 | rating symbols from Font Awesome """ 10 | star = '' 11 | half_star = '' 12 | 13 | rating_split = [int(rating) for rating in str(rating).split('.')] 14 | return rating_split[0] * star + int(bool(rating_split[1])) * half_star 15 | -------------------------------------------------------------------------------- /home/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | 5 | urlpatterns = [ 6 | path("", views.home, name="home"), 7 | path("faq/", views.faq, name="faq"), 8 | path('codeofconduct/', views.codeofconduct, name="codeofconduct"), 9 | path("plagiarism_policy/", views.plagiarism_policy, 10 | name="plagiarism_policy"), 11 | path("privacy_policy/", views.privacy_policy, name="privacy_policy"), 12 | path("post_login/", views.index, name="post_login"), 13 | 14 | path("save_partnership_contact_form/", views.save_partnership_contact_form, 15 | name="save_partnership_contact_form"), 16 | path("500/", views.test_500), 17 | path("404/", views.test_404), 18 | 19 | ] 20 | -------------------------------------------------------------------------------- /images/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/images/__init__.py -------------------------------------------------------------------------------- /images/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /images/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ImagesConfig(AppConfig): 5 | name = 'images' 6 | -------------------------------------------------------------------------------- /images/helpers.py: -------------------------------------------------------------------------------- 1 | import base64 2 | 3 | 4 | def image_to_base64str(image): 5 | """ Converts an image file to base64 string """ 6 | file_bytes = image.file.read() 7 | base64_img_str = 'data:image;base64, ' 8 | base64_img_str += str(base64.b64encode(file_bytes), 'utf-8') 9 | return base64_img_str 10 | -------------------------------------------------------------------------------- /images/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/images/migrations/__init__.py -------------------------------------------------------------------------------- /images/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /images/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from .views import save_image 4 | 5 | urlpatterns = [ 6 | path("", save_image, name="save_image") 7 | ] 8 | -------------------------------------------------------------------------------- /left_to_do.txt: -------------------------------------------------------------------------------- 1 | - fix datetimepicker on hackathon_events 2 | - rename change_event template/view etc as its confusing. 3 | - fix calendar display on empty hackathon. -------------------------------------------------------------------------------- /main/__init__.py: -------------------------------------------------------------------------------- 1 | from .celery import app as celery_app 2 | 3 | __all__ = ['celery_app'] 4 | -------------------------------------------------------------------------------- /main/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for main project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /main/celery.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from celery import Celery 4 | 5 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings') 6 | 7 | app = Celery('main') 8 | 9 | app.config_from_object('django.conf:settings', namespace='CELERY') 10 | 11 | app.autodiscover_tasks() 12 | -------------------------------------------------------------------------------- /main/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class SingletonModel(models.Model): 5 | """ Singleton model for Showcases """ 6 | class Meta: 7 | abstract = True 8 | 9 | def save(self, *args, **kwargs): 10 | self.pk = 1 11 | super(SingletonModel, self).save(*args, **kwargs) 12 | 13 | def delete(self, *args, **kwargs): 14 | pass 15 | 16 | @classmethod 17 | def load(cls): 18 | obj, created = cls.objects.get_or_create(pk=1) 19 | return obj 20 | -------------------------------------------------------------------------------- /main/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | urlpatterns = [ 5 | path("", include("home.urls")), 6 | path("admin/", admin.site.urls), 7 | path("accounts/", include("allauth.urls")), 8 | path("accounts/", include("accounts.urls")), 9 | path("accounts/", include("custom_slack_provider.urls")), 10 | path("images/", include("images.urls")), 11 | path("profile/", include("profiles.urls")), 12 | path("resources/", include("resources.urls")), 13 | path("hackadmin/", include(("hackadmin.urls", "hackadmin"), 14 | namespace='hackadmin')), 15 | path("hackathon/", include(("hackathon.urls", "hackathon"), 16 | namespace='hackathon')), 17 | path("showcase/", include("showcase.urls")), 18 | path("teams/", include("teams.urls")), 19 | path("competencies/", include("competencies.urls")), 20 | ] 21 | -------------------------------------------------------------------------------- /main/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for main project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | from dotenv import load_dotenv 7 | 8 | ENV_FILE = os.getenv('ENV_FILE', 'secrets.env') 9 | 10 | if ENV_FILE: 11 | load_dotenv(ENV_FILE) 12 | 13 | 14 | def main(): 15 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings') 16 | try: 17 | from django.core.management import execute_from_command_line 18 | except ImportError as exc: 19 | raise ImportError( 20 | "Couldn't import Django. Are you sure it's installed and " 21 | "available on your PYTHONPATH environment variable? Did you " 22 | "forget to activate a virtual environment?" 23 | ) from exc 24 | execute_from_command_line(sys.argv) 25 | 26 | 27 | if __name__ == '__main__': 28 | main() 29 | -------------------------------------------------------------------------------- /nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name example.com; 4 | location / { 5 | return 301 https://example.com$request_uri; 6 | } 7 | 8 | location /.well-known/acme-challenge/ { 9 | root /var/www/certbot; 10 | } 11 | } 12 | 13 | server { 14 | listen 443 ssl; 15 | server_name example.com; 16 | 17 | ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; 18 | ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; 19 | 20 | include /etc/letsencrypt/options-ssl-nginx.conf; 21 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; 22 | 23 | location / { 24 | proxy_pass http://hackathon-app:8000; 25 | proxy_http_version 1.1; 26 | proxy_set_header Upgrade $http_upgrade; 27 | proxy_set_header Connection "Upgrade"; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@toast-ui/calendar": "^2.1.3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /profiles/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/profiles/__init__.py -------------------------------------------------------------------------------- /profiles/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ProfilesConfig(AppConfig): 5 | name = 'profiles' 6 | -------------------------------------------------------------------------------- /profiles/forms.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/profiles/forms.py -------------------------------------------------------------------------------- /profiles/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/profiles/migrations/__init__.py -------------------------------------------------------------------------------- /profiles/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /profiles/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path("", views.profile, name="profile"), 6 | path("/", views.profile, name="show_profile"), 7 | ] 8 | -------------------------------------------------------------------------------- /profiles/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, get_object_or_404 2 | from django.contrib.auth.decorators import login_required 3 | from django.conf import settings 4 | 5 | from accounts.models import CustomUser, UserType 6 | 7 | 8 | @login_required 9 | def profile(request, user_id=None): 10 | """ Display the user's profile. """ 11 | context = { 12 | 'is_owner': True, 13 | 'slack_enabled': settings.SLACK_ENABLED, 14 | } 15 | 16 | if user_id is not None: 17 | user = get_object_or_404(CustomUser, id=user_id) 18 | # If the user's org is CI then anybody can see them 19 | # If the user is in the same or as the request.user they can see them 20 | # Or if the request.user is staff they can see them 21 | if (user.organisation == 1 22 | or user.organisation == request.user.organisation 23 | or request.user.user_type == UserType.STAFF): 24 | context['user'] = user 25 | else: 26 | context['user'] = None 27 | context['is_owner'] = False 28 | 29 | template = "profiles/profile.html" 30 | return render(request, template, context) 31 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | appdirs==1.4.3 2 | asgiref==3.2.10 3 | backcall==0.2.0 4 | CacheControl==0.12.6 5 | celery==5.2.3 6 | certifi==2020.6.20 7 | chardet==3.0.4 8 | colorama==0.4.3 9 | contextlib2==0.6.0 10 | decorator==4.4.2 11 | defusedxml==0.6.0 12 | distlib==0.3.0 13 | distro==1.4.0 14 | dj-database-url==0.5.0 15 | Django==3.1.13 16 | django-allauth==0.42.0 17 | django-celery-beat==2.2.1 18 | django-celery-results==2.2.0 19 | django-crispy-forms==1.9.2 20 | django-extensions==3.1.0 21 | graphviz==0.16 22 | gunicorn==20.0.4 23 | html5lib==1.0.1 24 | idna==2.10 25 | ipaddr==2.2.0 26 | ipdb==0.13.4 27 | ipython==7.19.0 28 | ipython-genutils==0.2.0 29 | jedi==0.18.0 30 | lockfile==0.12.2 31 | msgpack==0.6.2 32 | mysqlclient==2.0.3 33 | numpy==1.20.1 34 | oauthlib==3.1.0 35 | packaging==20.4 36 | pandas==1.2.3 37 | parso==0.8.1 38 | pep517==0.8.2 39 | pexpect==4.8.0 40 | pickleshare==0.7.5 41 | progress==1.5 42 | prompt-toolkit==3.0.8 43 | ptyprocess==0.7.0 44 | Pygments==2.7.4 45 | pyparsing==2.4.6 46 | python-dateutil==2.8.1 47 | python-dotenv==0.14.0 48 | python3-openid==3.2.0 49 | pytoml==0.1.21 50 | pytz==2020.4 51 | redis==4.1.1 52 | requests==2.24.0 53 | requests-oauthlib==1.3.0 54 | retrying==1.3.3 55 | sentry-sdk==0.10.2 56 | six==1.15.0 57 | sqlparse==0.3.1 58 | traitlets==5.0.5 59 | urllib3==1.25.10 60 | wcwidth==0.2.5 61 | webencodings==0.5.1 62 | -------------------------------------------------------------------------------- /resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/resources/__init__.py -------------------------------------------------------------------------------- /resources/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from resources.models import Resource 3 | 4 | 5 | class ResourceAdmin(admin.ModelAdmin): 6 | list_display = ( 7 | 'name', 8 | 'link', 9 | ) 10 | 11 | 12 | admin.site.register(Resource, ResourceAdmin) 13 | -------------------------------------------------------------------------------- /resources/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ResourcesConfig(AppConfig): 5 | name = 'resources' 6 | -------------------------------------------------------------------------------- /resources/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import Resource 3 | 4 | 5 | class ResourceForm(forms.ModelForm): 6 | """Allows admin to add/edit resources""" 7 | 8 | class Meta: 9 | model = Resource 10 | fields = '__all__' 11 | 12 | def __init__(self, *args, **kwargs): 13 | super().__init__(*args, **kwargs) 14 | labels = { 15 | "name": "Resource's name", 16 | "link": "URL", 17 | "description": "Description", 18 | } 19 | for field in self.fields: 20 | self.fields[field].label = labels[field] 21 | self.fields['description'].widget.attrs['placeholder'] = ( 22 | "Please, provide few sentences about the resource") 23 | -------------------------------------------------------------------------------- /resources/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-16 18:56 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Resource', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=254)), 19 | ('link', models.URLField()), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /resources/migrations/0002_resource_description.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-22 18:21 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('resources', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='resource', 15 | name='description', 16 | field=models.TextField(blank=True, max_length=800, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /resources/migrations/0003_auto_20201022_2010.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-22 20:10 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('resources', '0002_resource_description'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='resource', 15 | name='description', 16 | field=models.TextField(default='', max_length=400), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /resources/migrations/0004_auto_20201024_1833.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.1 on 2020-10-24 18:33 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('resources', '0003_auto_20201022_2010'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='resource', 15 | name='name', 16 | field=models.CharField(max_length=50), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /resources/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/resources/migrations/__init__.py -------------------------------------------------------------------------------- /resources/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class Resource(models.Model): 5 | """Model representing a Resource that contains the resource's name, description 6 | and an external link to the resource. All the fields are required.""" 7 | name = models.CharField(max_length=50) 8 | link = models.URLField(max_length=200) 9 | description = models.TextField(max_length=400, default="") 10 | 11 | def __str__(self): 12 | return self.name 13 | -------------------------------------------------------------------------------- /resources/templates/resources/add_resource.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load static %} 3 | 4 | {% block content %} 5 | 6 |
7 |
8 |

Add a Resource

9 |
10 |
11 |
12 | 13 |
14 |
15 |
16 | {% csrf_token %} 17 | {% for field in form %} 18 | {{ field | as_crispy_field }} 19 | {% endfor %} 20 |
21 | Cancel 22 | 23 |
24 |
25 |
26 |
27 | {% endblock %} -------------------------------------------------------------------------------- /resources/templates/resources/edit_resource.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load static %} 3 | 4 | {% block content %} 5 | 6 |
7 |
8 |

Edit a Resource

9 |
10 |
11 |
12 | 13 |
14 |
15 |
16 | {% csrf_token %} 17 | {% for field in form %} 18 | {{ field | as_crispy_field }} 19 | {% endfor %} 20 |
21 | Cancel 22 | 23 |
24 |
25 |
26 |
27 | {% endblock %} -------------------------------------------------------------------------------- /resources/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | from .models import Resource 3 | 4 | 5 | class TestResourceModels(TestCase): 6 | """Tests for Resource models.""" 7 | 8 | def setUp(self): 9 | """Sets up the model for testing""" 10 | Resource.objects.create( 11 | name='Forking', 12 | link="https://www.youtube.com/watch?v=HbSjyU2vf6Y", 13 | description="lorem ipsum") 14 | Resource.objects.create( 15 | name='The Git Story', 16 | link="https://eventyret.github.io/the-git-story/", 17 | description="lorem ipsum") 18 | 19 | def test__str_method_returns_name(self): 20 | """Tests the string method on a resource.""" 21 | resource = Resource.objects.create( 22 | name='The Git Story', 23 | link="https://eventyret.github.io/the-git-story/", 24 | description="lorem ipsum") 25 | 26 | self.assertEqual(resource.__str__(), "The Git Story") 27 | -------------------------------------------------------------------------------- /resources/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path("", views.resources, name="resources"), 6 | path('add/', views.add_resource, name='add_resource'), 7 | path('delete//', views.delete_resource, 8 | name='delete_resource'), 9 | path('edit//', views.edit_resource, name='edit_resource'), 10 | ] 11 | -------------------------------------------------------------------------------- /scripts/docker_seed.sh: -------------------------------------------------------------------------------- 1 | echo "============================" 2 | echo "Seeding fixtures" 3 | echo "============================" 4 | docker compose exec hackathon-app python3 manage.py loaddata organisation 5 | docker compose exec hackathon-app python3 manage.py loaddata accounts 6 | docker compose exec hackathon-app python3 manage.py loaddata resources 7 | docker compose exec hackathon-app python3 manage.py loaddata profiles 8 | docker compose exec hackathon-app python3 manage.py loaddata emailaddresses 9 | docker compose exec hackathon-app python3 manage.py loaddata hackathons 10 | docker compose exec hackathon-app python3 manage.py loaddata showcase 11 | docker compose exec hackathon-app python3 manage.py loaddata showcase_site_settings 12 | docker compose exec hackathon-app python3 manage.py loaddata reviews 13 | -------------------------------------------------------------------------------- /scripts/seed.bat: -------------------------------------------------------------------------------- 1 | ECHO Seeding fixtures 2 | python manage.py loaddata organisation 3 | python manage.py loaddata accounts 4 | python manage.py loaddata resources 5 | python manage.py loaddata profiles 6 | python manage.py loaddata emailaddresses 7 | python manage.py loaddata hackathons 8 | python manage.py loaddata showcase 9 | python manage.py loaddata showcase_site_settings 10 | python manage.py loaddata reviews 11 | -------------------------------------------------------------------------------- /scripts/seed.sh: -------------------------------------------------------------------------------- 1 | echo "============================" 2 | echo "Seeding fixtures" 3 | echo "============================" 4 | python3 manage.py loaddata organisation 5 | python3 manage.py loaddata accounts 6 | python3 manage.py loaddata resources 7 | python3 manage.py loaddata profiles 8 | python3 manage.py loaddata emailaddresses 9 | python3 manage.py loaddata hackathons 10 | python3 manage.py loaddata showcase 11 | python3 manage.py loaddata showcase_site_settings 12 | python3 manage.py loaddata reviews 13 | -------------------------------------------------------------------------------- /scripts/setup.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | ECHO Gathering the force 3 | MKDIR .venv 4 | ECHO CREATING .env file 5 | ECHO DEVELOPMENT=1 >> .env 6 | ECHO SECRET_KEY="your_secret_key_here" >> .env 7 | ECHO SITE_NAME="*" >> .env 8 | ECHO Installing Python extension 9 | pip install pipenv 10 | CLS 11 | @ECHO OFF 12 | ECHO Installing requirements.txt 13 | pipenv install -r requirements.txt 14 | ECHO ============================ 15 | ECHO Setting up VSCode with Django Linting 16 | ECHO ============================ 17 | pipenv install --dev pylint pylint-django pep8 autopep8 18 | COPY vscode_settings_sample.json .vscode/settings.json 19 | ECHO ============================ 20 | ECHO Installing Python extension 21 | ECHO ============================ 22 | code --install-extension ms-python.python 23 | echo 24 | ECHO ============================ 25 | ECHO Please edit .env file and add your secret key 26 | ECHO Please make sure you select python intepreter from .venv 27 | ECHO Please restart VSCode if running 28 | ECHO ============================ 29 | -------------------------------------------------------------------------------- /scripts/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Gathering the force" 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | FILE="$DIR/Pipfile" 5 | randompass=`openssl rand -base64 16` 6 | mkdir .venv 7 | cp .env_sample .env && sed -i '' -e 's/localhost/*/g' .env 8 | sed -i '' -e "s/your_secret_key_here/$randompass/g" .env 9 | echo "Setting up pipenv" 10 | pip3 install pipenv 11 | 12 | if [ -e "$FILE " ] 13 | then 14 | echo "============================" 15 | echo "Using Pipefile for installing" 16 | echo "============================" 17 | pipenv install 18 | else 19 | echo "============================" 20 | echo "Using requirements.txt" 21 | echo "============================" 22 | pipenv install --three -r requirements.txt 23 | fi 24 | echo "============================" 25 | echo "Setting up VSCode with Django Linting" 26 | echo "============================" 27 | pipenv install --dev pylint pylint-django pep8 autopep8 28 | cp vscode_settings_sample.json .vscode/settings.json 29 | echo "============================" 30 | echo "Installing Python extension" 31 | echo "============================" 32 | code --install-extension ms-python.python 33 | clear 34 | echo "============================" 35 | echo "Please restart VSCode if running" 36 | echo "Please make sure you select python intepreter from .venv" 37 | echo "============================" -------------------------------------------------------------------------------- /showcase/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/showcase/__init__.py -------------------------------------------------------------------------------- /showcase/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Showcase, ShowcaseSiteSettings 4 | 5 | 6 | class ShowcaseAdmin(admin.ModelAdmin): 7 | readonly_fields = ('hash',) 8 | 9 | 10 | admin.site.register(Showcase, ShowcaseAdmin) 11 | admin.site.register(ShowcaseSiteSettings) 12 | -------------------------------------------------------------------------------- /showcase/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ShowcaseConfig(AppConfig): 5 | name = 'showcase' 6 | -------------------------------------------------------------------------------- /showcase/fixtures/showcase_site_settings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "model": "showcase.showcasesitesettings", 4 | "pk": 1, 5 | "fields": { 6 | "order_by_category": "-created", 7 | "spotlight_number": 5, 8 | "projects_per_page": 5, 9 | "hackathons": [], 10 | "featured_hackathons": [] 11 | } 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /showcase/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | from .models import Showcase 4 | from hackathon.models import HackTeam, HackProject 5 | 6 | 7 | class ShowcaseForm(forms.ModelForm): 8 | """ Form to create or update Showcase """ 9 | class Meta: 10 | model = Showcase 11 | fields = ['hack_project', 'showcase_participants', 'is_public', 12 | 'display_name'] 13 | 14 | def __init__(self,*args,**kwargs): 15 | team_id = kwargs.pop('team_id', None) 16 | team = HackTeam.objects.filter(id=team_id).first() 17 | # call standard __init__ 18 | super(ShowcaseForm, self).__init__(*args, **kwargs) 19 | self.fields['showcase_participants'] = forms.ModelMultipleChoiceField( 20 | queryset=team.participants.all(), 21 | widget=forms.SelectMultiple(attrs={ 22 | 'size': '7' 23 | }) 24 | ) 25 | 26 | self.fields['hack_project'].widget = forms.HiddenInput() 27 | -------------------------------------------------------------------------------- /showcase/lists.py: -------------------------------------------------------------------------------- 1 | ORDER_BY_CATEGORY_CHOICES = [ 2 | ('?', 'Random Order'), 3 | ('-created', 'Showcase Created Date in Descending Order'), 4 | ('created', 'Showcase Created Date in Ascending Order'), 5 | ('-updated', 'Showcase Updated Date in Descending Order'), 6 | ('updated', 'Showcase Updated Date in Ascending Order'), 7 | ('-display_name', 'Alphabetical by Project Name in Descending Order'), 8 | ('display_name', 'Alphabetical by Project Name in Ascending Order'), 9 | ] 10 | -------------------------------------------------------------------------------- /showcase/migrations/0003_showcase_hash.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.8 on 2021-09-07 11:27 2 | 3 | from django.db import migrations, models 4 | import uuid 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('showcase', '0002_showcasesitesettings'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='showcase', 16 | name='hash', 17 | field=models.UUIDField(default=uuid.uuid4, editable=False, null=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /showcase/migrations/0004_auto_20210907_1128.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.8 on 2021-09-07 11:28 2 | 3 | from django.db import migrations 4 | import uuid 5 | 6 | 7 | def gen_uuid(apps, schema_editor): 8 | Showcase = apps.get_model('showcase', 'Showcase') 9 | for row in Showcase.objects.all(): 10 | row.hash = uuid.uuid4() 11 | row.save(update_fields=['hash']) 12 | 13 | 14 | class Migration(migrations.Migration): 15 | 16 | dependencies = [ 17 | ('showcase', '0003_showcase_hash'), 18 | ] 19 | 20 | operations = [ 21 | migrations.RunPython(gen_uuid, reverse_code=migrations.RunPython.noop), 22 | ] 23 | -------------------------------------------------------------------------------- /showcase/migrations/0005_auto_20210907_1128.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.8 on 2021-09-07 11:28 2 | 3 | from django.db import migrations, models 4 | import uuid 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('showcase', '0004_auto_20210907_1128'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='showcase', 16 | name='hash', 17 | field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /showcase/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/showcase/migrations/__init__.py -------------------------------------------------------------------------------- /showcase/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /showcase/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import view_showcases, view_showcase 3 | from images.views import render_image 4 | 5 | urlpatterns = [ 6 | path("", view_showcases, name="view_showcases"), 7 | path("/", view_showcase, name="view_showcase"), 8 | path("/image//", render_image, 9 | name="render_showcase_image"), 10 | ] 11 | -------------------------------------------------------------------------------- /static/documentation/uat.md: -------------------------------------------------------------------------------- 1 | # User Acceptance Testing 2 | 3 | ## Test Scenarios 4 | 5 | 1. User Accounts 6 | - Signup a new user manually 7 | - Login with user 8 | - Follow "Forgot password" flow 9 | - Signup/login with Slack user 10 | 2. Hackathon (repeat for participant, staff and admin) 11 | - Create new hackathon 12 | - Edit hackathon 13 | - List all hackathons 14 | - New hackathon shows up on list 15 | - Status is correct 16 | - Edit Hackathon from list 17 | - Delete hackathon from list 18 | - Delete Hackathon 19 | - Hackathon detail view is displayed (when clicking on "Read More") 20 | - All details are displaying correctly 21 | 22 | TBC -------------------------------------------------------------------------------- /static/img/ci-favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/ci-favicon.png -------------------------------------------------------------------------------- /static/img/ci-hackathon--horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/ci-hackathon--horizontal.png -------------------------------------------------------------------------------- /static/img/ci-hackathon--square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/ci-hackathon--square.png -------------------------------------------------------------------------------- /static/img/ci-hacking-new-normal--horizontal-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/ci-hacking-new-normal--horizontal-center.png -------------------------------------------------------------------------------- /static/img/ci-hacking-new-normal--horizontal-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/ci-hacking-new-normal--horizontal-left.png -------------------------------------------------------------------------------- /static/img/ci-hacking-new-normal--square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/ci-hacking-new-normal--square.png -------------------------------------------------------------------------------- /static/img/documentation/compare-and-pull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/compare-and-pull.png -------------------------------------------------------------------------------- /static/img/documentation/flow-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/flow-chart.png -------------------------------------------------------------------------------- /static/img/documentation/fork.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/fork.PNG -------------------------------------------------------------------------------- /static/img/documentation/hackathon-ERD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/hackathon-ERD.png -------------------------------------------------------------------------------- /static/img/documentation/hackathon-use-case--judge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/hackathon-use-case--judge.png -------------------------------------------------------------------------------- /static/img/documentation/hackathon-use-case--organizer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/hackathon-use-case--organizer.png -------------------------------------------------------------------------------- /static/img/documentation/hackathon-use-case--participant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/hackathon-use-case--participant.png -------------------------------------------------------------------------------- /static/img/documentation/issues-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/issues-open.png -------------------------------------------------------------------------------- /static/img/documentation/projects-to-do.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/projects-to-do.png -------------------------------------------------------------------------------- /static/img/documentation/pull-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/documentation/pull-request.png -------------------------------------------------------------------------------- /static/img/hackathon-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/hackathon-bg.png -------------------------------------------------------------------------------- /static/img/hackathon_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/hackathon_header.png -------------------------------------------------------------------------------- /static/img/profiles/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/profiles/profile.png -------------------------------------------------------------------------------- /static/img/profiles/profile_cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/profiles/profile_cat.png -------------------------------------------------------------------------------- /static/img/profiles/user-thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/img/profiles/user-thumbnail.png -------------------------------------------------------------------------------- /static/wireframes/hackathon-page--desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/wireframes/hackathon-page--desktop.png -------------------------------------------------------------------------------- /static/wireframes/judging-page--desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/wireframes/judging-page--desktop.png -------------------------------------------------------------------------------- /static/wireframes/langing-page--desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/wireframes/langing-page--desktop.png -------------------------------------------------------------------------------- /static/wireframes/login-page--desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/wireframes/login-page--desktop.png -------------------------------------------------------------------------------- /static/wireframes/profile-page--desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/wireframes/profile-page--desktop.png -------------------------------------------------------------------------------- /static/wireframes/register-page--desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/static/wireframes/register-page--desktop.png -------------------------------------------------------------------------------- /teams/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/teams/__init__.py -------------------------------------------------------------------------------- /teams/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /teams/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class TeamsConfig(AppConfig): 5 | name = 'teams' 6 | -------------------------------------------------------------------------------- /teams/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | from hackathon.models import HackProject, HackTeam 4 | 5 | 6 | class HackProjectForm(forms.ModelForm): 7 | """ A form to create a new team project """ 8 | display_name = forms.CharField( 9 | label='Display name', 10 | required=True 11 | ) 12 | description = forms.CharField( 13 | widget=forms.Textarea(attrs={'rows': 4}), 14 | label='Description', 15 | required=True 16 | ) 17 | technologies_used = forms.CharField( 18 | label='Technologies used', 19 | required=True 20 | ) 21 | github_url = forms.URLField( 22 | label='GitHub url', 23 | required=False 24 | ) 25 | deployed_url = forms.URLField( 26 | label='Deployed url', 27 | required=False 28 | ) 29 | speaker_name = forms.CharField( 30 | label='Speaker name', 31 | required=False 32 | ) 33 | share_permission = forms.CharField( 34 | label='Grant permission to publicly share the project', 35 | widget=forms.CheckboxInput(), 36 | required=False 37 | ) 38 | 39 | class Meta: 40 | model = HackProject 41 | fields = ['display_name', 'description', 'technologies_used', 42 | 'github_url', 'deployed_url', 'speaker_name', 43 | 'share_permission', 44 | ] 45 | 46 | 47 | class EditTeamName(forms.ModelForm): 48 | class Meta: 49 | model = HackTeam 50 | fields = ['display_name'] 51 | -------------------------------------------------------------------------------- /teams/lists.py: -------------------------------------------------------------------------------- 1 | LMS_LEVELS = { 2 | "programme_preliminaries": 1, 3 | "programming_paradigms": 1, 4 | "html_essentials": 1, 5 | "css_essentials": 1, 6 | "user_centric_frontend_development": 1, 7 | "comparative_programming_languages_essentials": 2, 8 | "javascript_essentials": 2, 9 | "interactive_frontend_development": 2, 10 | "python_essentials": 3, 11 | "practical_python": 3, 12 | "data_centric_development": 3, 13 | "backend_development": 3, 14 | "full_stack_frameworks_with_django": 4, 15 | "alumni": 5, 16 | "staff": 6, 17 | } 18 | -------------------------------------------------------------------------------- /teams/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/teams/migrations/__init__.py -------------------------------------------------------------------------------- /teams/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /teams/templates/create_project.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% block content %} 3 | 4 |
5 |
6 |
7 |
8 |
9 |

Project Details

10 |
11 |
12 | 13 |
14 | {% csrf_token %} 15 | {{ form.display_name|as_crispy_field }} 16 | {{ form.description|as_crispy_field }} 17 | {{ form.technologies_used|as_crispy_field }} 18 | {{ form.github_url|as_crispy_field }} 19 | {{ form.deployed_url|as_crispy_field }} 20 | {{ form.speaker_name|as_crispy_field }} 21 | {{ form.share_permission|as_crispy_field }} 22 |
23 | 24 | Back 26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | 34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /teams/templates/includes/anon_member.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 |
Anonymous
5 | Profile Image 7 |
8 | -------------------------------------------------------------------------------- /teams/templates/includes/create_slack_private_channel.html: -------------------------------------------------------------------------------- 1 | {% if create_private_channel %} 2 | {% if request.user in team.participants.all or request.user == team.mentor or non_participant_superuser %} 3 | {% if team.communication_channel %} 4 | 5 | 6 | Go To Private Slack Channel 7 | 8 | {% else %} 9 |
10 | {% csrf_token %} 11 | 15 |
16 | {% endif %} 17 | {% endif %} 18 | {% endif %} 19 | -------------------------------------------------------------------------------- /teams/templates/includes/empty_project.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 |
5 |

Project: {{ team.project.display_name}}

6 |
7 |
8 | 9 |
10 |
11 |
12 |
13 | No Project submitted yet. 14 | {% if team.hackathon.status == 'hack_in_progress' %} 15 | {% if request.user in team.participants.all %} 16 | Add project details now! 17 |

18 | Project details can always be edited until the judging starts. 19 | {% endif %} 20 | {% endif %} 21 |

22 |
23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /teams/templates/includes/member.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 | 5 | 6 |
{{member.slack_display_name}} 7 | 8 | {% include 'includes/participant_label.html' with participant=member %} 9 | 10 |
11 |
12 | {% if member.profile_image %} 13 | Profile Image 15 | {% else %} 16 | 17 | Profile Image 19 | {% endif %} 20 |
21 | -------------------------------------------------------------------------------- /teams/templates/includes/menu.html: -------------------------------------------------------------------------------- 1 | {% load teams_tags %} 2 | 3 |
4 | 5 |
6 | {% csrf_token %} 7 | {% if edit %} 8 | 9 | {% else %} 10 | 11 | {% endif %} 12 | 13 | 14 | 15 |
16 |
17 | {% csrf_token %} 18 | 19 | 20 |
21 | Back To Hackathon 22 |
23 | -------------------------------------------------------------------------------- /teams/templates/includes/participant_label.html: -------------------------------------------------------------------------------- 1 | {% if participant.participant_label == 'Hackathon Newbie' %} 2 | 3 | {% elif participant.participant_label == 'Hackathon Enthusiast' %} 4 | 5 | {% else %} 6 | 7 | {% endif %} 8 | {{participant.participant_label}} 9 | 10 | -------------------------------------------------------------------------------- /teams/templates/includes/project_not_visible.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 |
5 |

Project: {{ team.project.display_name}}

6 |
7 |
8 | 9 |
10 |
11 |
12 |
13 | This team's project is not publicly viewable. 14 |
15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /teams/templates/includes/rename_team.html: -------------------------------------------------------------------------------- 1 | {% if rename_team_form %} 2 | 3 | 25 | 26 | {% endif %} 27 | -------------------------------------------------------------------------------- /teams/templates/includes/showcase_member.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 |
4 | {% if member.website_url %} 5 |
{{member.full_name}}
6 | {% else %} 7 |
{% if not member.full_name %}{{member.slack_display_name}}{% else %}{{member.full_name}}{% endif %}
8 | {% endif %} 9 | {% if member.profile_image %} 10 | Profile Image 12 | {% else %} 13 | 14 | Profile Image 16 | {% endif %} 17 |
18 | -------------------------------------------------------------------------------- /teams/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Code-Institute-Community/ci-hackathon-app/b81a4e1fb96886bfc676653aa6cd4be09bddafd9/teams/templatetags/__init__.py -------------------------------------------------------------------------------- /teams/templatetags/teams_tags.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | import json 3 | 4 | from django.template import Library 5 | from django.conf import settings 6 | from django.core.exceptions import ObjectDoesNotExist 7 | 8 | register = Library() 9 | 10 | 11 | @register.filter 12 | def calculate_team_level(team): 13 | return sum([member.get('level') for member in team]) 14 | 15 | 16 | @register.filter 17 | def format_team_name(team_name): 18 | if '_' not in team_name: 19 | return team_name 20 | return ' '.join([word[0].upper() + word[1:] for word in team_name.split('_')]) 21 | 22 | 23 | @register.filter 24 | def dump_json(teams): 25 | if isinstance(teams, dict): 26 | return json.dumps(teams) 27 | return teams 28 | 29 | 30 | @register.filter 31 | def modulo(num, val): 32 | return num % val == 0 33 | 34 | 35 | @register.filter 36 | def divided_by(num, val): 37 | return int(num / val) 38 | 39 | 40 | @register.filter 41 | def extract_userid(username): 42 | return username.split('_')[0] 43 | 44 | 45 | @register.filter 46 | def is_working_time(num): 47 | _num = int(num.split(':')[0]) 48 | return 8 <= _num <= 20 49 | 50 | 51 | @register.simple_tag 52 | def get_participant_rating(participant, competency): 53 | try: 54 | return competency.get_user_rating(participant).rating 55 | except (ObjectDoesNotExist, AttributeError): 56 | return 57 | -------------------------------------------------------------------------------- /teams/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | from showcase.views import create_or_update_showcase 5 | 6 | urlpatterns = [ 7 | path("/", views.view_team, 8 | name="view_team"), 9 | path("/project/", views.create_project, 10 | name="create_project"), 11 | path("/showcase/", 12 | create_or_update_showcase, name="create_or_update_showcase"), 13 | path("/create_private_channel/", views.create_private_channel, 14 | name="create_private_channel"), 15 | path("/rename/", views.rename_team, name="rename_team"), 16 | path("/calendar/", views.view_team_calendar, 17 | name="view_team_calendar"), 18 | path("/competencies/", views.view_team_competencies, 19 | name="view_team_competencies"), 20 | path("create/", views.create_teams, name="create_teams"), 21 | path("clear/", views.clear_teams, name="clear_teams"), 22 | ] 23 | -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load static %} 3 | 4 | {% block content %} 5 | 6 |
7 |
8 |
9 |
10 |
11 |

404 - The requested page was not found

12 |
13 |
14 | 404 Error Graphic 15 |
16 |
17 |
18 |
19 |
20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /templates/500.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load static %} 3 | 4 | {% block content %} 5 | 6 |
7 |
8 |
9 |
10 |
11 |

500 - An unexpected error occurred

12 |
13 |
14 | 500 Error Graphic 15 |
16 |
17 |
18 |
19 |
20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /templates/allauth/account/account_inactive.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Account Inactive" %}{% endblock %} 6 | 7 | {% load static %} 8 | 9 | {% block css %} 10 | 11 | 12 | {% endblock %} 13 | 14 | {% block allauth %} 15 |

{% trans "Account Inactive" %}

16 |

{% trans "This account is inactive." %}

17 | {% endblock %} 18 | 19 | {% block authhacklogo %} 20 |
21 | Code Institute Hackathon Logo 22 |
23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /templates/allauth/account/base.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% load static %} 4 | 5 | {% block css %} 6 | 7 | 8 | {% endblock %} 9 | 10 | {% block authhacklogo %} 11 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/email/email_confirmation_message.txt: -------------------------------------------------------------------------------- 1 | {% load account %} 2 | 3 | {% user_display user as user_display %} 4 | 5 | {% load i18n %} 6 | 7 | {% autoescape off %} 8 | 9 | {% blocktrans with site_name=current_site.name site_domain=current_site.domain %} 10 | Hello from {{ site_name }}! 11 | You're receiving this e-mail because user {{ user_display }} has given yours as an e-mail address to connect their account. 12 | To confirm this is correct, go to {{ activate_url }} 13 | {% endblocktrans %} 14 | 15 | {% blocktrans with site_name=current_site.name site_domain=current_site.domain %} 16 | Thank you from {{ site_name }}! 17 | {{ site_domain }} 18 | {% endblocktrans %} 19 | 20 | {% endautoescape %} 21 | -------------------------------------------------------------------------------- /templates/allauth/account/email/email_confirmation_signup_message.txt: -------------------------------------------------------------------------------- 1 | {% include "account/email/email_confirmation_message.txt" %} 2 | -------------------------------------------------------------------------------- /templates/allauth/account/email/email_confirmation_signup_subject.txt: -------------------------------------------------------------------------------- 1 | {% include "account/email/email_confirmation_subject.txt" %} 2 | -------------------------------------------------------------------------------- /templates/allauth/account/email/email_confirmation_subject.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% autoescape off %} 3 | {% blocktrans %}Please Confirm Your E-mail Address{% endblocktrans %} 4 | {% endautoescape %} 5 | -------------------------------------------------------------------------------- /templates/allauth/account/email/password_reset_key_message.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% autoescape off %} 4 | 5 | {% blocktrans with site_name=current_site.name site_domain=current_site.domain %} 6 | Hello from {{ site_name }}! 7 | You're receiving this e-mail because you or someone else has requested a password for your user account. 8 | It can be safely ignored if you did not request a password reset. Click the link below to reset your password. 9 | {% endblocktrans %} 10 | 11 | {{ password_reset_url }} 12 | 13 | {% if username %} 14 | {% blocktrans %} 15 | In case you forgot, your username is {{ username }}. 16 | {% endblocktrans %} 17 | {% endif %} 18 | 19 | {% blocktrans with site_name=current_site.name site_domain=current_site.domain %} 20 | Thank you for using {{ site_name }}! 21 | {{ site_domain }} 22 | {% endblocktrans %} 23 | 24 | {% endautoescape %} 25 | -------------------------------------------------------------------------------- /templates/allauth/account/email/password_reset_key_subject.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% autoescape off %} 4 | {% blocktrans %}Password Reset E-mail{% endblocktrans %} 5 | {% endautoescape %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | {% load account %} 5 | 6 | {% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %} 7 | 8 | {% load static %} 9 | 10 | {% block css %} 11 | 12 | 13 | {% endblock %} 14 | 15 | {% block allauth %} 16 |

{% trans "Confirm E-mail Address" %}

17 | {% if confirmation %} 18 | {% user_display confirmation.email_address.user as user_display %} 19 |

{% blocktrans with confirmation.email_address.email as email %}Please confirm that {{ email }} is an e-mail address 20 | for user {{ user_display }}.{% endblocktrans %}

21 |
22 | {% csrf_token %} 23 | 24 |
25 | {% else %} 26 | {% url 'account_email' as email_url %} 27 |

{% blocktrans %}This e-mail confirmation link expired or is invalid. Please issue a new e-mail confirmation request 28 | .{% endblocktrans %}

29 | {% endif %} 30 | {% endblock %} 31 | 32 | {% block authhacklogo %} 33 |
34 | Code Institute Hackathon Logo 35 |
36 | {% endblock %} 37 | -------------------------------------------------------------------------------- /templates/allauth/account/logout.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Sign Out" %}{% endblock %} 6 | 7 | {% load static %} 8 | 9 | {% block css %} 10 | 11 | 12 | {% endblock %} 13 | 14 | {% block allauth %} 15 |

{% trans "Sign Out" %}

16 |

{% trans 'Are you sure you want to sign out?' %}

17 | 18 |
19 | {% csrf_token %} 20 | {% if redirect_field_value %} 21 | 22 | {% endif %} 23 | 24 |
25 | 26 | {% endblock %} 27 | 28 | {% block authhacklogo %} 29 |
30 | Code Institute Hackathon Logo 31 |
32 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/messages/cannot_delete_primary_email.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | You cannot remove your primary e-mail address ({{email}}). 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/email_confirmation_sent.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | Confirmation e-mail sent to {{email}}. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/email_confirmed.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | You have confirmed {{email}}. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/email_deleted.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | Removed e-mail address {{email}}. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/logged_in.txt: -------------------------------------------------------------------------------- 1 | {% load account %} 2 | 3 | {% load i18n %} 4 | 5 | {% blocktrans %} 6 | Successfully signed in. 7 | {% endblocktrans %} 8 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/logged_out.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | You have signed out. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/password_changed.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | Password successfully changed. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/password_set.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | Password successfully set. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/primary_email_set.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | Primary e-mail address set. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/messages/unverified_primary_email.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | Your primary e-mail address must be verified. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/account/password_change.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Change Password" %}{% endblock %} 6 | 7 | {% load static %} 8 | 9 | {% block css %} 10 | 11 | 12 | {% endblock %} 13 | 14 | {% block allauth %} 15 |

{% trans "Change Password" %}

16 | 17 |
18 | {% csrf_token %} 19 | {{ form.as_p }} 20 | 21 |
22 | {% endblock %} 23 | 24 | {% block authhacklogo %} 25 |
26 | Code Institute Hackathon Logo 27 |
28 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/password_reset.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | {% load account %} 5 | 6 | {% block head_title %}{% trans "Password Reset" %}{% endblock %} 7 | 8 | {% load static %} 9 | 10 | {% block css %} 11 | 12 | 13 | {% endblock %} 14 | 15 | {% block allauth %} 16 |

{% trans "Password Reset" %}

17 | {% if user.is_authenticated %} 18 | {% include "account/snippets/already_logged_in.html" %} 19 | {% endif %} 20 |

{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}

21 | 22 |
23 | {% csrf_token %} 24 | {{ form.as_p }} 25 | 26 |
27 | 28 |

{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}

29 | {% endblock %} 30 | 31 | {% block authhacklogo %} 32 |
33 | Code Institute Hackathon Logo 34 |
35 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/password_reset_done.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | {% load account %} 5 | 6 | {% block head_title %}{% trans "Password Reset" %}{% endblock %} 7 | 8 | {% load static %} 9 | 10 | {% block css %} 11 | 12 | 13 | {% endblock %} 14 | 15 | {% block allauth %} 16 |

{% trans "Password Reset" %}

17 | {% if user.is_authenticated %} 18 | {% include "account/snippets/already_logged_in.html" %} 19 | {% endif %} 20 | 21 |

{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}

22 | {% endblock %} 23 | 24 | {% block authhacklogo %} 25 |
26 | Code Institute Hackathon Logo 27 |
28 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/password_reset_from_key.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | {% block head_title %}{% trans "Change Password" %}{% endblock %} 5 | 6 | {% load static %} 7 | 8 | {% block css %} 9 | 10 | 11 | {% endblock %} 12 | 13 | {% block allauth %} 14 |

{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}

15 | 16 | {% if token_fail %} 17 | {% url 'account_reset_password' as passwd_reset_url %} 18 |

{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a 19 | new password reset.{% endblocktrans %}

20 | {% else %} 21 | {% if form %} 22 |
23 | {% csrf_token %} 24 | {{ form.as_p }} 25 | 26 |
27 | {% else %} 28 |

{% trans 'Your password is now changed.' %}

29 | {% endif %} 30 | {% endif %} 31 | {% endblock %} 32 | 33 | {% block authhacklogo %} 34 |
35 | Code Institute Hackathon Logo 36 |
37 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/password_reset_from_key_done.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | {% block head_title %}{% trans "Change Password" %}{% endblock %} 5 | 6 | {% load static %} 7 | 8 | {% block css %} 9 | 10 | 11 | {% endblock %} 12 | 13 | {% block allauth %} 14 |

{% trans "Change Password" %}

15 |

{% trans 'Your password is now changed.' %} You can now Log In with your new password

16 | {% endblock %} 17 | 18 | {% block authhacklogo %} 19 |
20 | Code Institute Hackathon Logo 21 |
22 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/password_set.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Set Password" %}{% endblock %} 6 | 7 | {% load static %} 8 | 9 | {% block css %} 10 | 11 | 12 | {% endblock %} 13 | 14 | {% block allauth %} 15 |

{% trans "Set Password" %}

16 | 17 |
18 | {% csrf_token %} 19 | {{ form.as_p }} 20 | 21 |
22 | {% endblock %} 23 | 24 | {% block authhacklogo %} 25 |
26 | Code Institute Hackathon Logo 27 |
28 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/signup.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | {% load static %} 5 | 6 | {% block head_title %}{% trans "Signup" %}{% endblock %} 7 | 8 | {% block css %} 9 | 10 | 11 | {% endblock %} 12 | 13 | {% block allauth %} 14 |

{% trans "Sign Up" %}

15 |

{% blocktrans %}Already have an account? Then please sign in.{% endblocktrans %}

16 | 17 | 25 | 26 | {% endblock %} 27 | 28 | {% block authhacklogo %} 29 |
30 | Code Institute Hackathon Logo 31 |
32 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/signup_closed.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Sign Up Closed" %}{% endblock %} 6 | 7 | {% load static %} 8 | 9 | {% block css %} 10 | 11 | 12 | {% endblock %} 13 | 14 | {% block allauth %} 15 |

{% trans "Sign Up Closed" %}

16 |

{% trans "We are sorry, but the sign up is currently closed." %}

17 | {% endblock %} 18 | 19 | {% block authhacklogo %} 20 |
21 | Code Institute Hackathon Logo 22 |
23 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/snippets/already_logged_in.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% load account %} 3 | 4 | {% user_display user as user_display %} 5 |

6 | {% trans "Note" %}: {% blocktrans %}you are already logged in as {{ user_display }}.{% endblocktrans %} 7 |

8 | -------------------------------------------------------------------------------- /templates/allauth/account/verification_sent.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} 6 | 7 | {% load static %} 8 | 9 | {% block css %} 10 | 11 | 12 | {% endblock %} 13 | 14 | {% block allauth %} 15 |

{% trans "Verify Your E-mail Address" %}

16 |

{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not 17 | receive it within a few minutes.{% endblocktrans %}

18 | 19 | {% endblock %} 20 | 21 | {% block authhacklogo %} 22 |
23 | Code Institute Hackathon Logo 24 |
25 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/account/verified_email_required.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} 6 | 7 | {% load static %} 8 | 9 | {% block css %} 10 | 11 | 12 | {% endblock %} 13 | 14 | {% block allauth %} 15 |

{% trans "Verify Your E-mail Address" %}

16 | {% url 'account_email' as email_url %} 17 |

{% blocktrans %}This part of the site requires us to verify that 18 | you are who you claim to be. For this purpose, we require that you 19 | verify ownership of your e-mail address. {% endblocktrans %} 20 |

21 |

{% blocktrans %}We have sent an e-mail to you for 22 | verification. Please click on the link inside this e-mail. Please 23 | contact us if you do not receive it within a few minutes.{% endblocktrans %} 24 |

25 |

{% blocktrans %}Note: you can still change your e-mail address.{% endblocktrans %} 26 |

27 | 28 | {% endblock %} 29 | 30 | {% block authhacklogo %} 31 |
32 | Code Institute Hackathon Logo 33 |
34 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% block head_title %}{% endblock %} 5 | {% block extra_head %} 6 | {% endblock %} 7 | 8 | 9 | {% block body %} 10 | 11 | {% if messages %} 12 |
13 | Messages: 14 |
    15 | {% for message in messages %} 16 |
  • {{ message }}
  • 17 | {% endfor %} 18 |
19 |
20 | {% endif %} 21 | 22 |
23 | Menu: 24 | 33 |
34 | 35 | {% block allauth %} 36 | {% endblock %} 37 | 38 | {% block authhacklogo %} 39 | {% endblock %} 40 | 41 | {% endblock %} 42 | {% block extra_body %} 43 | {% endblock %} 44 | 45 | 46 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/authentication_error.html: -------------------------------------------------------------------------------- 1 | {% extends "socialaccount/base.html" %} 2 | {% load static %} 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Social Network Login Failure" %}{% endblock %} 6 | 7 | {% block allauth %} 8 |

{% trans "Social Network Login Failure" %}

9 |

{% trans "An error occurred while attempting to login via your social network account." %}

10 | {% endblock %} 11 | 12 | {% block authhacklogo %} 13 |
14 | Card image cap 15 |
16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/base.html: -------------------------------------------------------------------------------- 1 | {% extends "account/base.html" %} 2 | 3 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/login_cancelled.html: -------------------------------------------------------------------------------- 1 | {% extends "socialaccount/base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Login Cancelled" %}{% endblock %} 6 | 7 | {% block allauth %} 8 |

{% trans "Login Cancelled" %}

9 | {% url 'account_login' as login_url %} 10 |

{% blocktrans %}You decided to cancel logging in to our site using one of your existing accounts. If this was a mistake, please proceed to 11 | sign in.{% endblocktrans %}

12 | {% endblock %} 13 | 14 | {% block authhacklogo %} 15 |
16 | Card image cap 17 |
18 | {% endblock %} -------------------------------------------------------------------------------- /templates/allauth/socialaccount/messages/account_connected.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | The social account has been connected. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/messages/account_connected_other.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | The social account is already connected to a different account. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/messages/account_connected_updated.txt: -------------------------------------------------------------------------------- 1 | {% extends "socialaccount/messages/account_connected.txt" %} 2 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/messages/account_disconnected.txt: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% blocktrans %} 4 | The social account has been disconnected. 5 | {% endblocktrans %} 6 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/signup.html: -------------------------------------------------------------------------------- 1 | {% extends "socialaccount/base.html" %} 2 | 3 | {% load i18n %} 4 | {% load static %} 5 | 6 | {% block head_title %}{% trans "Signup" %}{% endblock %} 7 | 8 | {% block allauth %} 9 |

{% trans "Sign Up" %}

10 |

{% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your {{ provider_name }} account to login to 11 | {{ site_name }}. As a final step, please complete the following form:{% endblocktrans %}

12 | 13 | 21 | 22 | {% endblock %} 23 | 24 | {% block authhacklogo %} 25 |
26 | Card image cap 27 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/snippets/login_extra.html: -------------------------------------------------------------------------------- 1 | {% load socialaccount %} 2 | 3 | {% providers_media_js %} 4 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/snippets/provider_list.html: -------------------------------------------------------------------------------- 1 | {% load socialaccount %} 2 | 3 | {% get_providers as socialaccount_providers %} 4 | 5 | {% for provider in socialaccount_providers %} 6 | {% if provider.id == "openid" %} 7 | {% for brand in provider.get_brands %} 8 |
  • 9 | {{ brand.name }} 13 |
  • 14 | {% endfor %} 15 | {% endif %} 16 |
  • 17 | {{ provider.name }} 19 |
  • 20 | {% endfor %} 21 | -------------------------------------------------------------------------------- /templates/allauth/socialaccount/snippets/slack_signin.html: -------------------------------------------------------------------------------- 1 | {% load socialaccount %} 2 | 3 | {% get_providers as socialaccount_providers %} 4 | 5 | {% for provider in socialaccount_providers %} 6 | {% if provider.name == 'Custom Slack Provider' or provider.name == 'Slack' %} 7 | 9 | 10 | 11 | 18 | 22 | {% endif %} 23 | {% endfor %} 24 | -------------------------------------------------------------------------------- /templates/includes/messages.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | {% block css %} 4 | 5 | 6 | {% endblock %} 7 | 8 | 10 | {% if messages %} 11 |
    12 |
    13 | {% for message in messages %} 14 | 15 |
    16 |
    17 | {{ message.tags|title }} 18 | 21 |
    22 |
    23 | {{ message.message }} 24 |
    25 |
    26 | {% endfor %} 27 |
    28 |
    29 | {% endif %} 30 | -------------------------------------------------------------------------------- /templates/privacy-policy.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load static %} 3 | {% block content %} 4 | 5 |

    Privacy Policy

    6 | 7 | 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% block content %} 3 |

    External Login

    4 |
    5 | {% csrf_token %} 6 | {{form.as_p}} 7 | 8 | Forgot Your Password? 9 | 10 | 17 |
    18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /templates/upload_image.html: -------------------------------------------------------------------------------- 1 | 25 | -------------------------------------------------------------------------------- /vscode_settings_sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.terminal.activateEnvironment": true, 3 | "python.linting.enabled": true, 4 | "python.linting.pylintEnabled": true, 5 | "python.linting.pylintArgs": ["--load-plugins=pylint_django"], 6 | "files.autoSave": "onFocusChange" 7 | } 8 | --------------------------------------------------------------------------------