<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ернар </title>
    <description>The latest articles on DEV Community by Ернар  (@pywebguide).</description>
    <link>https://dev.to/pywebguide</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4280827%2Fdf96ba0c-c864-419e-b4d0-44fd9208c679.png</url>
      <title>DEV Community: Ернар </title>
      <link>https://dev.to/pywebguide</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pywebguide"/>
    <language>en</language>
    <item>
      <title>I built a free Python course where Flask runs in the browser (no backend, just GitHub Pages)</title>
      <dc:creator>Ернар </dc:creator>
      <pubDate>Thu, 03 Dec 2026 14:11:48 +0000</pubDate>
      <link>https://dev.to/pywebguide/i-built-a-free-python-course-where-flask-runs-in-the-browser-no-backend-just-github-pages-20e</link>
      <guid>https://dev.to/pywebguide/i-built-a-free-python-course-where-flask-runs-in-the-browser-no-backend-just-github-pages-20e</guid>
      <description>&lt;p&gt;I'm a student in Kazakhstan, and I built a free course for people who have never written a line of code. It goes from &lt;code&gt;print()&lt;/code&gt; to a to-do app in Flask or Django and then puts it online. No sign-up, nothing to install, and it's in English, Russian and Kazakh.&lt;/p&gt;

&lt;p&gt;The site is plain HTML, CSS and JavaScript on GitHub Pages. There is no backend. Still, Python runs right on the page, exercises check themselves, and you can click through the Flask app from the course before you install anything.&lt;/p&gt;

&lt;p&gt;Here's how it works, plus a few things I learned along the way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Site:&lt;/strong&gt; &lt;a href="https://pywebguide.github.io/en/" rel="noopener noreferrer"&gt;pywebguide.github.io/en&lt;/a&gt; · &lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/pywebguide/pywebguide.github.io" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; (MIT)&lt;/p&gt;

&lt;h2&gt;
  
  
  What's inside
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;13 Python lessons for complete beginners, every example has a Run button&lt;/li&gt;
&lt;li&gt;78 exercises with automatic checking, hints and solutions&lt;/li&gt;
&lt;li&gt;How a website works: requests and routes, templates and forms, SQL, sign-in, REST APIs, tests, Git&lt;/li&gt;
&lt;li&gt;A first project, a to-do list in Flask or Django, step by step, with the terminal output and a &lt;code&gt;.zip&lt;/code&gt; of the code after every step&lt;/li&gt;
&lt;li&gt;More projects: a blog API in Flask, relations and class-based views in Django, a first API in FastAPI, then deploying to PythonAnywhere&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Python in the browser: Pyodide in a Web Worker
&lt;/h2&gt;

&lt;p&gt;Python comes from &lt;a href="https://pyodide.org/" rel="noopener noreferrer"&gt;Pyodide&lt;/a&gt;, CPython compiled to WebAssembly. The core is about 5 MB, so nothing loads until the learner presses Run for the first time.&lt;/p&gt;

&lt;p&gt;It runs in a Web Worker. On the main thread, a beginner's first &lt;code&gt;while True:&lt;/code&gt; would freeze the whole tab. I didn't want a separate worker file, so the worker source is a string turned into a Blob:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;WORKER_SOURCE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="s1"&gt;'importScripts("'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="no"&gt;PYODIDE&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;'pyodide.js");'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'const ready = loadPyodide({ indexURL: "'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="no"&gt;PYODIDE&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;'" });'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="c1"&gt;// ... onmessage: run the learner's code, post output back&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"\n"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;WORKER_SOURCE&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"text/javascript"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;worker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Worker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output is streamed back in messages, so a long loop prints as it goes, not all at the end.&lt;/p&gt;

&lt;h3&gt;
  
  
  Infinite loops vs. GitHub Pages
&lt;/h3&gt;

&lt;p&gt;Pyodide can interrupt running code through a &lt;code&gt;SharedArrayBuffer&lt;/code&gt;. But that only works on cross-origin isolated pages, which need the &lt;code&gt;Cross-Origin-Opener-Policy&lt;/code&gt; and &lt;code&gt;Cross-Origin-Embedder-Policy&lt;/code&gt; headers. GitHub Pages doesn't let you set headers.&lt;/p&gt;

&lt;p&gt;So the solution is blunt, and it works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// starts once packages are loaded and the learner's code is running&lt;/span&gt;
&lt;span class="n"&gt;timer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;worker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;terminate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;worker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// a fresh worker is created on the next Run&lt;/span&gt;
  &lt;span class="nf"&gt;finish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"The code ran for more than 10 seconds and was stopped. It may contain an endless loop."&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After a stop, Python loads again, but from the browser cache, so it's quick. For exercises that finish in milliseconds, it's a fine trade-off.&lt;/p&gt;

&lt;h3&gt;
  
  
  Errors in plain words
&lt;/h3&gt;

&lt;p&gt;A Python traceback scares a beginner more than the bug does. So errors go through a table of a few dozen patterns, each a regex for the last line of the traceback plus an explanation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;/^&lt;/span&gt;&lt;span class="nc"&gt;TemplateNotFound&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;$&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="s2"&gt;"Flask could not find the template {x}. The file must be in the templates folder next to app.py, ..."&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The traceback is still shown, but trimmed to the learner's own code. In CI, a script triggers every error in the table with real Python and checks that the pattern still matches and that the explanation exists in all three languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Flask without a server
&lt;/h2&gt;

&lt;p&gt;This is my favorite part. In the first project, learners can try the finished Flask to-do app right on the page.&lt;/p&gt;

&lt;p&gt;Flask isn't part of the Pyodide distribution, but it's pure Python, so &lt;code&gt;micropip&lt;/code&gt; installs it on the first &lt;code&gt;import flask&lt;/code&gt;. With Python it comes to about 15 MB, and the "Try it in the browser" button says so.&lt;/p&gt;

&lt;p&gt;There's no socket in a browser. Flask has &lt;code&gt;test_client&lt;/code&gt;, though, which sends a request through the whole app — routes, Jinja templates, &lt;code&gt;redirect&lt;/code&gt;, &lt;code&gt;url_for&lt;/code&gt;, form handling — without a network. The app code runs once in its own namespace and stays alive between requests, so added tasks don't disappear:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# runs in the worker for every request from the mini-browser&lt;/span&gt;
&lt;span class="n"&gt;__r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;__client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__req&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;__req&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;__req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"form"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;__r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"location"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;__r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Location"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;__r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;__r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;as_text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The page draws a small browser window: an address bar showing &lt;code&gt;127.0.0.1:5000&lt;/code&gt;, a Back button and an &lt;code&gt;&amp;lt;iframe sandbox="allow-same-origin allow-forms"&amp;gt;&lt;/code&gt;. The Flask response goes into &lt;code&gt;srcdoc&lt;/code&gt;. Links and form submissions inside the iframe are intercepted and become requests to the worker. When Flask answers with a redirect, which it always does after a POST in the project, the mini-browser follows it like a real one and shows the chain under the window: &lt;code&gt;POST /add → 302, GET / → 200&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the SQLite step, the database lives in Pyodide's in-memory file system. The worker sets &lt;code&gt;__file__&lt;/code&gt; for the app, so the course code works unchanged.&lt;/p&gt;

&lt;p&gt;To be clear, this is not a server in the browser. It's real Flask with requests handed to it directly. For learning the form → POST → redirect → GET loop, that's enough, and learners still install Python later. The course walks them through that.&lt;/p&gt;

&lt;h2&gt;
  
  
  A tutorial that tests itself
&lt;/h2&gt;

&lt;p&gt;The worst thing a tutorial can do is show output that doesn't match what the learner sees. So nothing gets deployed unless CI is green, and CI goes through the tutorial the way a learner would:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every runnable example&lt;/strong&gt; is executed with real Python in all three languages (126 runs). Every other Python block gets a syntax check.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every exercise&lt;/strong&gt; is checked against its reference solution by the same &lt;code&gt;checker.py&lt;/code&gt; the browser uses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Django and FastAPI projects&lt;/strong&gt; are replayed step by step in real projects. Files come from the code blocks, commands from the "Terminal" blocks, and the output is compared with the "Expected result" on the page. The &lt;code&gt;manage.py shell&lt;/code&gt; session is typed line by line, so the transcript on the page matches a real one:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;console&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;InteractiveConsole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# same auto-imports as manage.py shell&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;LINES&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;splitlines&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"... "&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;more&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s2"&gt;"&amp;gt;&amp;gt;&amp;gt; "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;more&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The &lt;code&gt;.zip&lt;/code&gt; after every step&lt;/strong&gt; is built from the page, and CI unpacks each one and runs it. The zips are byte-for-byte reproducible (fixed timestamps, stable order), so git never shows noise diffs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Three languages from one source
&lt;/h2&gt;

&lt;p&gt;The Russian pages are the source. The Kazakh and English pages are built by a script from translation memories, fragment by fragment, and a test makes sure the translation keeps the original markup. Code samples, terminal output, screenshots and the downloadable zips are translated too, and the translated code goes through the same CI.&lt;/p&gt;

&lt;p&gt;Kazakh brought a couple of surprises:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fonts.&lt;/strong&gt; The display font has no Kazakh letters (ә, ғ, қ, ң, ө, ұ, ү, һ, і), so Kazakh pages use a different one for headings, both on the site and on the social preview images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sorting.&lt;/strong&gt; A Django model sorts categories by name. In Russian, "Дом" (Home) comes before "Учёба" (Study). In Kazakh, "Оқу" (Study, О = U+041E) comes before "Үй" (Home, Ү = U+04AE). The order in &lt;code&gt;Category.objects.all()&lt;/code&gt; and in the drop-down flipped. CI compares the output on the page with a real run, so it can't drift.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One page was too heavy
&lt;/h2&gt;

&lt;p&gt;Lighthouse on mobile showed one page lagging behind: "Python from scratch" had 13 lessons, 4 mini-projects and 28 exercises on a single page. That's over 3,000 elements, and the first screen waited for the browser to lay out all of them.&lt;/p&gt;

&lt;p&gt;I first tried &lt;code&gt;content-visibility: auto&lt;/code&gt; on the lessons. It barely moved the numbers, and it would have broken the code block's full-screen mode (&lt;code&gt;position: fixed&lt;/code&gt; inside a contained element), so I reverted it. The real fix was to split the course into four pages of about 900 elements each. Progress is stored under the same key, so nobody lost their checkmarks, and old links like &lt;code&gt;start.html#lesson-7&lt;/code&gt; redirect to the right part.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First load is heavy:&lt;/strong&gt; about 5 MB for Python and about 15 MB with Flask. That's why nothing loads until you press Run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It depends on a CDN.&lt;/strong&gt; Pyodide comes from jsDelivr. If that's blocked, Python won't start, but the rest of the course still works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's not a real server&lt;/strong&gt;, as above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Translations:&lt;/strong&gt; the Kazakh and English versions were translated with AI help. If you're a native speaker and something reads oddly, an issue would be very welcome.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Feedback welcome
&lt;/h2&gt;

&lt;p&gt;I'd love feedback, especially from people who teach programming or are just starting out. Where would a beginner get stuck? What's missing?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Site: &lt;a href="https://pywebguide.github.io/en/" rel="noopener noreferrer"&gt;pywebguide.github.io/en&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Code: &lt;a href="https://github.com/pywebguide/pywebguide.github.io" rel="noopener noreferrer"&gt;github.com/pywebguide/pywebguide.github.io&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Issues: &lt;a href="https://github.com/pywebguide/pywebguide.github.io/issues" rel="noopener noreferrer"&gt;github.com/pywebguide/pywebguide.github.io/issues&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>flask</category>
      <category>webassembly</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
