跳到正文
cccskills
免费在 GitHub 公开

verify

Run this Django app locally against a throwaway database and drive its pages over HTTP to observe a change working. Use when verifying student/cadmin page behavior end-to-end.

中文简介正在准备中。当前显示原文说明。

集成工具Playwright
查看安装方法

包含的文件(1)

  • SKILL.md2.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Verifying changes in this app

Django server-rendered app. The surface is HTTP + rendered HTML, so verify by running the server and fetching pages — not by running the test suite.

Throwaway database (never touch the dev db)

DATABASE_URL overrides the default sqlite:///db/db.sqlite3. Point it at a scratch file so seeding doesn't mutate the real dev data:

export DATABASE_URL="sqlite:///$SCRATCH/verify.sqlite3"
uv run python manage.py migrate
uv run python manage.py shell < seed.py     # create Course/Homework/Question
uv run python manage.py runserver 8971 --noreload

Health check to confirm it's up: curl http://127.0.0.1:8971/api/health/

URL shapes

Homework pages are /<course_slug>/homework/<homework_slug> — no /course/ prefix and no trailing slash. Check courses/urls.py before guessing; a wrong path returns a 404 page that greps as "no output" and looks like a failed feature.

Authenticating in a browser

Login is allauth OAuth only — there is no username/password form to fill, so Playwright can't log in through the UI. Mint a session cookie instead:

from django.contrib.sessions.backends.db import SessionStore
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY
s = SessionStore()
s[SESSION_KEY] = str(user.pk)
s[BACKEND_SESSION_KEY] = "allauth.account.auth_backends.AuthenticationBackend"
s[HASH_SESSION_KEY] = user.get_session_auth_hash()
s.create()

ModelBackend is commented out in AUTHENTICATION_BACKENDS — using it makes the session silently unauthenticated. Then ctx.add_cookies([{"name": "sessionid", "value": key, "domain": "127.0.0.1", "path": "/"}]).

Gotchas

  • Homework/project open-vs-closed is driven by state (OPEN/CLOSED/SCORED), not by due_date. A passed deadline alone does not close a form.
  • Submitting a homework URL performs a real network check on the repo. Use a genuine public repo (e.g. https://github.com/DataTalksClub/llm-zoomcamp); fake URLs are rejected with "does not exist".
  • "Deadline passed" / time-left text is rendered client-side by courses/static/time_left.js, so it will not appear in curl output — use a browser to see it.
  • Badges use app-badge-upper (CSS uppercase), so Playwright inner_text() returns "NOT SUBMITTED" while the template source says "Not submitted".
  • Playwright + chromium are already installed (uv run python, ~/.cache/ms-playwright).

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

api

免费

How to reach the platform REST API — where prod and dev live, where the API token is (.env), how to authenticate with curl, and how to fetch the OpenAPI spec listing every endpoint. Use whenever you need to read or edit course/homework/project/registration data, or inspect real prod data while debugging.

中文简介正在准备中。当前显示原文说明。

DataTalksClub/course-management-platform862026年10月19日 更新

Investigate and resolve Course Management Platform CloudWatch alert issues end to end. Use when Codex is asked to inspect a CMP GitHub alert issue, pull dev or production AWS logs, diagnose 5xx responses or failed background work, fix an incident with test-driven development, validate a fix in dev, or deploy and verify an authorized production fix.

中文简介正在准备中。当前显示原文说明。

DataTalksClub/course-management-platform862026年10月19日 更新

查看 DataTalksClub 的全部技能

报告此技能的问题