Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/django-filter-24.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pushyamig authored Nov 11, 2024
2 parents 4bc55d2 + c026c7d commit 67370c4
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "0.2.0",
"configurations": [

{
"name": "IPT Django",
"type": "debugpy",
"request": "attach",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/code"
}
],
"connect": {
"port": 5020,
"host": "localhost",
},
"justMyCode": false
}
]
}
15 changes: 15 additions & 0 deletions backend/debugpy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import os
import debugpy
import logging

def config_to_bool(value):
return str(value).lower() in ('true', '1', 'yes', 'on')

def check_and_enable_debugpy():
debugpy_enable = config_to_bool(os.getenv('DEBUGPY_ENABLE', False))
debugpy_address = '0.0.0.0'
debugpy_port = 5020

if debugpy_enable:
logging.debug('DEBUGPY: Enabled Listening on ({0}:{1})'.format(debugpy_address, debugpy_port))
debugpy.listen((debugpy_address, debugpy_port))
4 changes: 4 additions & 0 deletions backend/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

from django.core.wsgi import get_wsgi_application

from backend.debugpy import check_and_enable_debugpy

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings')

check_and_enable_debugpy()

application = get_wsgi_application()
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
- ${HOME}/mylasecrets:/secrets
ports:
- "5000:5000"
- "5020:5020"
container_name: canvas_app_explorer
env_file:
- .env
Expand Down
8 changes: 5 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gunicorn==22.0.0
gunicorn==23.0.0
mysqlclient==2.1.1

# Django and related
Expand All @@ -19,11 +19,13 @@ drf-spectacular==0.22.1
markdown==3.4.1 # Markdown support for the browsable API

# LTI
pycryptodome==3.19.1 # For generating LTI keys
PyLTI1p3==1.12.1
pycryptodome==3.21.0 # For generating LTI keys
PyLTI1p3==2.0.0

# Canvas
canvasapi==3.3.0

debugpy==1.8.8

# Not in pypi https://github.com/Harvard-University-iCommons/django-canvas-oauth
https://github.com/Harvard-University-iCommons/django-canvas-oauth/archive/v1.1.1.tar.gz

0 comments on commit 67370c4

Please sign in to comment.