diff --git a/.gitignore b/.gitignore index 1054a296..c951871a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Dependency directories node_modules/ -vendor/ # Environment files .env diff --git a/plugin/django-hackathon/.gitignore b/plugin/django-hackathon/.gitignore new file mode 100644 index 00000000..e06c787e --- /dev/null +++ b/plugin/django-hackathon/.gitignore @@ -0,0 +1,28 @@ +venv +*.pyc +staticfiles +.env.* +/env +/pvenv +db.sqlite3 +.idea +/media +.vagrant +*.env +.vscode +geckodriver.exe +geckodriver.log +geckodriver +chromedriver +requirements.txt +*.code-workspace +*.log +*.exe +.vs +.qodo +ssl +google-credentials.json +ansible/inventory.yml +dist +blt_hackathon.egg-info +__pycache__ \ No newline at end of file diff --git a/plugin/django-hackathon/CONTRIBUTING.md b/plugin/django-hackathon/CONTRIBUTING.md new file mode 100644 index 00000000..64a5f5e7 --- /dev/null +++ b/plugin/django-hackathon/CONTRIBUTING.md @@ -0,0 +1,340 @@ +# Contributing to Hackathon Management + +Thank you for considering contributing to Django Hackathon Management! This document provides guidelines and instructions for contributing to the project. + +## Table of Contents + +- [Development Setup](#development-setup) +- [Making Changes](#making-changes) +- [Testing Your Changes](#testing-your-changes) +- [Submitting Changes](#submitting-changes) +- [Code Standards](#code-standards) +- [Reporting Issues](#reporting-issues) + +## Development Setup + +### Step 1: Clone the Repository + +```bash +git clone https://github.com/OWASP-BLT/BLT-Hackathon.git +cd BLT-Hackathon/plugin/django-hackathon +``` + +### Step 2: Create a Test Django Project + +Create a separate test project to develop and test the plugin: + +```bash +# Navigate to a suitable directory +cd /path/to/your/workspace + +# Create a test Django project +mkdir testproject +cd testproject +django-admin startproject testproj . + +# Create a templates directory +mkdir -p templates +``` + +### Step 3: Create Base Template + +Create `templates/base.html` with the following content: + +```django + + +
+ + ++ {% if hackathon.is_ongoing %} + Ongoing + {% elif hackathon.has_ended %} + Ended + {% else %} + Upcoming + {% endif %} +
+{{ hackathon.time_remaining }}
+{{ participant_count }}
+{{ pr_count }}
+{{ merged_pr_count }}
+{{ hackathon_views }}
+All-Time: {{ all_time_views }}
+{{ repo_data.repo.description }}
+ {% endif %} + +No repositories have been added to this hackathon yet.
+ {% endif %} +{{ prize.description }}
+ {% if prize.value %}${{ prize.value }}
{% endif %} + {% if prize.sponsor %} +No prizes have been announced yet.
+ {% endif %} +No contributions yet. Be the first to contribute!
+ {% endif %} +No sponsors yet.
+ {% endif %} + {% if hackathon.sponsor_note or hackathon.sponsor_link %} +Configure your hackathon details and settings
+Join coding competitions, collaborate with others, and win prizes!
+{{ upcoming_count }}
+{{ ongoing_count }}
+{{ past_count }}
+{{ hackathon.description|truncatechars:150 }}
+Add a prize to reward hackathon participants
+Add a sponsor to support the hackathon
+