<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jonathan Biemond</title><link href="https://jonathanbiemond.com/" rel="alternate"/><link href="https://jonathanbiemond.com/feed.xml" rel="self"/><id>https://jonathanbiemond.com/</id><updated>2026-11-26T08:04:00+01:00</updated><entry><title>Django: quickstart</title><link href="https://jonathanbiemond.com/posts/django-quickstart.html" rel="alternate"/><published>2026-11-26T08:04:00+01:00</published><updated>2026-11-26T08:04:00+01:00</updated><author><name>Jonathan Biemond</name></author><id>tag:jonathanbiemond.com,2026-11-26:/posts/django-quickstart.html</id><summary type="html">&lt;p&gt;The basics of starting a new Django project.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Initialize a new Django project, starting from an empty directory with just the bare minimum steps and no fluff.&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;You must have these installed to begin.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.python.org/downloads/"&gt;Python installed&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.astral.sh/uv/getting-started/installation/"&gt;uv installed&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: If this is your first Django project, begin with a tutorial instead.
The &lt;a href="https://docs.djangoproject.com/en/dev/intro/tutorial01/"&gt;official Django tutorial&lt;/a&gt; covers everything below and more in detail.&lt;/p&gt;
&lt;h2&gt;Initialize Python Project&lt;/h2&gt;
&lt;p&gt;Starting from an empty directory for your new project, initialize the Python project.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;uv&lt;span class="w"&gt; &lt;/span&gt;init&lt;span class="w"&gt; &lt;/span&gt;--no-package&lt;span class="w"&gt; &lt;/span&gt;--app&lt;span class="w"&gt; &lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;No need for the &lt;code&gt;main.py&lt;/code&gt; file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;rm&lt;span class="w"&gt; &lt;/span&gt;main.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Install Django.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;uv&lt;span class="w"&gt; &lt;/span&gt;add&lt;span class="w"&gt; &lt;/span&gt;django
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Initialize Django Project&lt;/h2&gt;
&lt;p&gt;Create the Django project files, using &lt;code&gt;project&lt;/code&gt; as the folder name.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;uv&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;django-admin&lt;span class="w"&gt; &lt;/span&gt;startproject&lt;span class="w"&gt; &lt;/span&gt;project&lt;span class="w"&gt; &lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Create a Django app called "core".&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;uv&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;manage.py&lt;span class="w"&gt; &lt;/span&gt;startapp&lt;span class="w"&gt; &lt;/span&gt;core
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Add core to &lt;code&gt;INSTALLED_APPS&lt;/code&gt; in &lt;code&gt;project/settings.py&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;INSTALLED_APPS&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;&amp;quot;core&amp;quot;&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;Running the development server should now display the Django launch page at &lt;a href="http://127.0.0.1:8000/"&gt;http://127.0.0.1:8000/&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;uv&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;manage.py&lt;span class="w"&gt; &lt;/span&gt;runserver
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Create a View&lt;/h2&gt;
&lt;p&gt;Add a new view to &lt;code&gt;core/views.py&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;django.http&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HttpResponse&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;HttpResponse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Hello World!&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Route view to be the front page in &lt;code&gt;core/urls.py&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;django.urls&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;core&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;


&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;index&amp;quot;&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;Include core url patterns in &lt;code&gt;project/urls.py&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;django.urls&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;include&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;


&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;admin/&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;core.urls&amp;quot;&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;With &lt;code&gt;runserver&lt;/code&gt; still running, refresh &lt;a href="http://127.0.0.1:8000/"&gt;http://127.0.0.1:8000/&lt;/a&gt; to see your new view.&lt;/p&gt;
&lt;h2&gt;Next Steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Edit &lt;code&gt;pyproject.toml&lt;/code&gt; with project name and description.&lt;/li&gt;
&lt;li&gt;Pick a database.&lt;/li&gt;
&lt;li&gt;Configure a &lt;a href="https://docs.djangoproject.com/en/dev/topics/auth/customizing/#substituting-a-custom-user-model"&gt;custom user&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Run migrations.&lt;/li&gt;
&lt;li&gt;Add your favourite third-party Django packages.&lt;/li&gt;
&lt;li&gt;Install and configure linters and formatters.&lt;/li&gt;
&lt;li&gt;Add a &lt;code&gt;base.html&lt;/code&gt; template.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Getting Help&lt;/h2&gt;
&lt;p&gt;For help with starting your project visit the wonderful community in the &lt;a href="https://forum.djangoproject.com/"&gt;Django Forum&lt;/a&gt; or the &lt;a href="https://discord.gg/django-856567261900832808"&gt;Django Discord Server&lt;/a&gt; (I like to hang out here).&lt;/p&gt;</content><category term="posts"/><category term="Django"/></entry><entry><title>Making This Site</title><link href="https://jonathanbiemond.com/posts/this-site.html" rel="alternate"/><published>2025-04-08T21:48:00+02:00</published><updated>2025-04-08T21:48:00+02:00</updated><author><name>Jonathan Biemond</name></author><id>tag:jonathanbiemond.com,2025-04-08:/posts/this-site.html</id><summary type="html">&lt;p&gt;How I made this website.&lt;/p&gt;</summary><content type="html">&lt;p&gt;This static site is made with &lt;a href="https://getpelican.com/"&gt;Pelican&lt;/a&gt; and hosted on &lt;a href="https://pages.cloudflare.com/"&gt;CloudFlare Pages&lt;/a&gt;.
There are many great technical blogs I enjoy reading. I hope that by sharing some posts myself, I may
write something someone finds useful and along the way improve my writing skills. For this project I shamelessly copied &lt;a href="https://duarteocarmo.com/"&gt;Duarte O.Carmo's site&lt;/a&gt;,
you should check it out, it's great. More than just engaging writing, Duarte's site caught my eye for its clean design,
and since it is powered by Pelican, which I knew I wanted to use, it was a natural starting point.
Finally, it introduced me to CloudFlare Pages, which I must say has been an absolute pleasure to use.&lt;/p&gt;
&lt;h2&gt;Pelican&lt;/h2&gt;
&lt;p&gt;This site is rendered from some Markdown files and HTML templates using &lt;a href="https://getpelican.com/"&gt;Pelican&lt;/a&gt;. We're not wanting for choice
when it comes to static-site generators, Pelican stands out because of it's ease-of-use, good reputation, and, for me,
it is built using Python. So far it's been a joy to work with, notably due to the ample, high quality documentation.&lt;/p&gt;
&lt;h2&gt;Deployment&lt;/h2&gt;
&lt;p&gt;I deployed the site to &lt;a href="..."&gt;CloudFlare Pages&lt;/a&gt;. This was really quite simple, I chose my GitHub repo, accepted the
default settings, and it started to build. I didn't get it right on the first try though, because I was missing a
&lt;code&gt;requirements.txt&lt;/code&gt;. Frustratingly, this wasn't documented anywhere that I could find. Hopefully CloudFlare will support &lt;code&gt;pylock.toml&lt;/code&gt; files in the future. Once the dependencies were installed
everything was smooth sailing. No GitHub Action to set up, any new commits to the &lt;code&gt;main&lt;/code&gt; branch are live a minute later.
Since I also purchased my domain from CloudFlare, DNS record registration was just a simple click.&lt;/p&gt;
&lt;p&gt;You can find the source on GitHub: &lt;a href="https://github.com/jonbiemond/personal-site"&gt;https://github.com/jonbiemond/personal-site&lt;/a&gt;&lt;/p&gt;</content><category term="posts"/><category term="Meta"/></entry><entry><title>A Clean Slate</title><link href="https://jonathanbiemond.com/posts/clean-slate.html" rel="alternate"/><published>2025-03-16T11:29:00+01:00</published><updated>2025-03-16T11:29:00+01:00</updated><author><name>Jonathan Biemond</name></author><id>tag:jonathanbiemond.com,2025-03-16:/posts/clean-slate.html</id><summary type="html">&lt;p&gt;Welcome to my new website.&lt;/p&gt;</summary><content type="html">&lt;p&gt;I suppose it is high time to have my own website.&lt;/p&gt;
&lt;p&gt;Welcome to my first post. I'm Jonathan. A developer and data person from the West Coast of Canada.
I look forward to sharing my interests and other learnings in future posts.&lt;/p&gt;</content><category term="posts"/><category term="Meta"/></entry></feed>