Use the following prompts to instruct your AI coding agent to perform an update.
Replace Celery with [Django's task framework][django-tasks].I hereby claim:
To claim this, I am signing this object:
| import itertools | |
| from django.conf import settings | |
| from django.http import HttpResponse | |
| from django.template import engines | |
| from django.utils.module_loading import import_string | |
| import pytest | |
We want to attach a an ASGI app, like FastAPI, to an existing Django app, without any performance downsides.
In our example we are attaching an MCP server, including auto-loading.
You have an existing Django app, you serve via WSGI on a server like guinicorn. That's it!
| name: Development DB | |
| on: | |
| schedule: | |
| - cron: "0 4 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| dev-db: | |
| services: |
| function updateData () { | |
| /* Fetch project cards from GitHub project and insert into Google Sheet. */ | |
| const scriptProperties = PropertiesService.getScriptProperties() | |
| const spreadsheet = SpreadsheetApp.getActive() | |
| const sheetName = scriptProperties.getProperty('SHEET_NAME') | |
| const sheet = spreadsheet.getSheetByName(sheetName) | |
| const githubApiUrl = 'https://api.github.com/graphql' | |
| const githubAccessToken = scriptProperties.getProperty('GITHUB_ACCESS_TOKEN') | |
| const githubOrg = scriptProperties.getProperty('GITHUB_ORG') |
brew install geos gdal
# settings.py
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
| release: bin/release | |
| web: ... | |
| worker: ... |
| diff --git a/django/core/checks/security/base.py b/django/core/checks/security/base.py | |
| index c21725518b..ecd5f5e004 100644 | |
| --- a/django/core/checks/security/base.py | |
| +++ b/django/core/checks/security/base.py | |
| @@ -4,6 +4,8 @@ from django.conf import settings | |
| from django.core.exceptions import ImproperlyConfigured | |
| from .. import Error, Tags, Warning, register | |
| +from ...cache import caches | |
| +from ...cache.backends.filebased import FileBasedCache |
| #!/usr/bin/env sh | |
| set -exo pipefail | |
| # Usage: ./compress-video.sh input-video.mp4 [output-filename-no-ext] [bitrate] | |
| echo "Encode AV1..." | |
| ffmpeg -hide_banner -i "$1" -pass 1 -c:v libaom-av1 -cpu-used 4 -strict experimental -tile-columns 3 -b:v "${3:-"1.3M"}" -threads 8 -auto-alt-ref 1 -lag-in-frames 25 -g 128 -pix_fmt yuv420p -an -sn -y -f webm /dev/null && \ | |
| ffmpeg -hide_banner -i "$1" -pass 2 -c:v libaom-av1 -cpu-used 4 -strict experimental -tile-columns 3 -b:v "${3:-"1.3M"}" -threads 8 -auto-alt-ref 1 -lag-in-frames 25 -g 128 -pix_fmt yuv420p -an -sn -y -f webm "${2:-voiio-login-bg}.av1.webm" |