-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4ccc423
Showing
102 changed files
with
3,583 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Django-Automated-Testing | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run Tests | ||
run: | | ||
python manage.py test | ||
- name: Running Flake8 | ||
run: | | ||
python -m pip install flake8 | ||
flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
media/img/profile_avatars | ||
helper_images/ | ||
|
||
|
||
node_modules | ||
.idea/ | ||
|
||
#static file | ||
/static | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
node_modules/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Contributors | ||
|
||
Add your name in the given format. | ||
|
||
* [Shreya Yadav](https://github.com/hackko-20) | ||
* [Divyansh Upadhyay](https://github.com/DuP-491) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: gunicorn contrihub.wsgi --log-file - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# ContriHUB - 22 | ||
|
||
ContriHUB is an event where we are expecting to get more and more people involved in Open Source activities. | ||
|
||
|
||
## How to run locally? | ||
* [Install Python](https://www.wikihow.com/Install-Python) | ||
* Clone this repository | ||
``` | ||
git clone https://github.com/ContriHUB/ContriHUB-22.git | ||
``` | ||
* Create Virtual Environment | ||
``` | ||
python -m venv <env_name> | ||
``` | ||
* Activate the environment | ||
* On Windows, run: `<env_name>\Scripts\activate` | ||
* On Linux/Mac, run: `source <env_name>/bin/activate` | ||
* Install the dependencies | ||
``` | ||
pip install -r requirements.txt | ||
``` | ||
* Change directory to *ContriHUB-22* | ||
``` | ||
cd ContriHUB-22 | ||
``` | ||
* Create a **.env** file | ||
* In Windows, Right Click, Open Git Bash here, and run: `touch .env` | ||
* In Linux/Mac, run: `touch .env` | ||
* Fill the contents of **.env** by following the format given in *sample_env_file.txt* | ||
* You can use [this](https://stackoverflow.com/a/16630719/11671368) to generate **SECRET_KEY**, otherwise just remove that from **.env** file and it should work fine. | ||
* You will need to create a [Github OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) in order to fill **SOCIAL_AUTH_GITHUB_KEY** and **SOCIAL_AUTH_GITHUB_SECRET** fields. | ||
* Put both *Homepage URL* and *Authorization callback URL* as `http://127.0.0.1:8000/`. | ||
* If you want to work on Email Sending Issue, you also need to fill you Email (GMail) in **EMAIL_HOST_USER** and your Email password in **EMAIL_HOST_PASSWORD**. (*Now you know why you should never push .env file to remote*). | ||
* You will also need to **Allow Access to Less Secure Apps** in your GMail Account. | ||
* You can also create a new G-Mail account to avoid using your personal account. | ||
* To apply the migrations run, | ||
``` | ||
python manage.py migrate | ||
``` | ||
* Now to run the server, and visit `http://127.0.0.1:8000/`. | ||
``` | ||
python manage.py runserver | ||
``` | ||
* To access admin panel, you need to be superuser. Follow [this](https://www.geeksforgeeks.org/how-to-create-superuser-in-django/) link for instructions. | ||
# Maintainers | ||
- [Divyansh Upadhyay](https://github.com/DuP-491) | ||
- [Shreya Yadav](https://github.com/hackko-20) | ||
### CAUTION: Website is currently under development. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
let letters = | ||
"ABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZ"; | ||
letters = letters.split(""); | ||
|
||
let canvas = document.getElementById('matrix-canvas') | ||
|
||
const ctx = canvas.getContext("2d"); | ||
|
||
|
||
// canvas.width = window.innerWidth; | ||
// canvas.height = window.innerHeight; | ||
canvas.style.position = "absolute"; | ||
canvas.style.zIndex = -1; | ||
// document.body.style.background = "transparent"; | ||
|
||
let bw = document.getElementById('body').offsetWidth; | ||
let bh = document.getElementById('body').offsetHeight; | ||
canvas.width = (bw * 81) / 100; | ||
canvas.height = (bh * 71) / 100; | ||
|
||
// alert(canvas.width + " " + canvas.height); | ||
|
||
let fontSize = 10, | ||
columns = canvas.width / fontSize; | ||
|
||
// Setting up the drops | ||
let drops = []; | ||
for (var i = 0; i < columns; ++i) { | ||
drops.push(canvas.height * Math.random()); | ||
} | ||
|
||
const draw = () => { | ||
|
||
if ( | ||
canvas === null | ||
) | ||
return; | ||
ctx.fillStyle = "rgba(0, 0, 0, 0.1)"; | ||
ctx.fillRect(0, 0, canvas.width, canvas.height); | ||
for (let i = 0; i < drops.length; ++i) { | ||
let rand = Math.random(); | ||
let character = | ||
letters[Math.floor(Math.random() * letters.length)]; | ||
ctx.fillStyle = "#39FF14"; | ||
ctx.fillText(character, i * fontSize, drops[i] * fontSize); | ||
if ( | ||
drops[i] * fontSize > canvas.height && | ||
Math.random() > 0.95 | ||
) { | ||
drops[i] = 0; | ||
} | ||
++drops[i]; | ||
} | ||
}; | ||
let intervalId = setInterval(draw, 40); | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
ASGI config for contrihub project. | ||
It exposes the ASGI callable as a module-level variable named ``application``. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ | ||
""" | ||
|
||
import os | ||
|
||
from django.core.asgi import get_asgi_application | ||
|
||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'contrihub.settings') | ||
|
||
application = get_asgi_application() |
Oops, something went wrong.