<?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: Kumar Vanshaj</title>
    <description>The latest articles on DEV Community by Kumar Vanshaj (@vanshaj2023).</description>
    <link>https://dev.to/vanshaj2023</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3843470%2Ffa000508-5c0c-4df0-93cd-a84ede1fc88b.png</url>
      <title>DEV Community: Kumar Vanshaj</title>
      <link>https://dev.to/vanshaj2023</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vanshaj2023"/>
    <language>en</language>
    <item>
      <title>Inside Wagtail's News Template - What Works, What's Broken, and What's Missing</title>
      <dc:creator>Kumar Vanshaj</dc:creator>
      <pubDate>Wed, 25 Mar 2026 19:45:02 +0000</pubDate>
      <link>https://dev.to/vanshaj2023/inside-wagtails-news-template-what-works-whats-broken-and-whats-missing-a1g</link>
      <guid>https://dev.to/vanshaj2023/inside-wagtails-news-template-what-works-whats-broken-and-whats-missing-a1g</guid>
      <description>&lt;p&gt;I spent several weeks reading the &lt;a href="https://github.com/wagtail/news-template" rel="noopener noreferrer"&gt;wagtail/news-template&lt;/a&gt; codebase for my Google Summer of Code application. This post shares what I found - what works, what is broken, and what could be better.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssgb3rkciigcy2ovesxl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssgb3rkciigcy2ovesxl.png" alt="wagtail/news-template homepage showing dark hero section with navigation" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The wagtail/news-template homepage - dark mode enabled by default&lt;/p&gt;

&lt;h2&gt;
  
  
  What the starter kit is
&lt;/h2&gt;

&lt;p&gt;The news-template is a Wagtail starter kit for news and media websites. It gives you article pages, topic filtering, pagination, search, and dark mode. Everything works out of the box. The design uses Tailwind CSS and is responsive.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does well
&lt;/h2&gt;

&lt;p&gt;The content model is solid. &lt;code&gt;ArticlePage&lt;/code&gt; supports authors, topics, publication dates, and hero images. The body is built from StreamField blocks. Editors can add sections, quotes, stats, and cards - no code needed.&lt;/p&gt;

&lt;p&gt;The block system is flexible. &lt;code&gt;FeaturedArticleBlock&lt;/code&gt; lets editors override an article's image, description, and CTA text. Topic filtering works via query parameters. It is a small but thoughtful detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is broken or missing
&lt;/h2&gt;

&lt;p&gt;Reading the code revealed several bugs.&lt;/p&gt;

&lt;p&gt;Newsletter signup never submitted. The email input had no &lt;code&gt;name&lt;/code&gt; attribute. The button was an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag with no connection to the input. Every visitor who tried to sign up got no result. I fixed this in &lt;a href="https://github.com/wagtail/news-template/pull/107" rel="noopener noreferrer"&gt;PR #107&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Mobile navigation links were broken. A regression left mobile nav links with empty &lt;code&gt;href=""&lt;/code&gt; attributes. Users were redirected back to the current page. Fixed in &lt;a href="https://github.com/wagtail/news-template/pull/101" rel="noopener noreferrer"&gt;PR #101&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;FeaturedArticleBlock had an empty template. The block defined five fields but its template was a stub. It rendered raw block data instead of HTML. Fixed in &lt;a href="https://github.com/wagtail/news-template/pull/103" rel="noopener noreferrer"&gt;PR #103&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Missing imports caused runtime errors. &lt;code&gt;slugify&lt;/code&gt; was not imported in &lt;code&gt;utils/models.py&lt;/code&gt;. Pagination exceptions were missing in &lt;code&gt;news/models.py&lt;/code&gt;. Both caused &lt;code&gt;NameError&lt;/code&gt; crashes.&lt;/p&gt;

&lt;p&gt;Form fields lacked label elements. Inputs had no &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; elements. This is a WCAG 2.1 AA accessibility violation. Fixed in &lt;a href="https://github.com/wagtail/news-template/pull/99" rel="noopener noreferrer"&gt;PR #99&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Test coverage was minimal. The project had three tests before my contribution. Core models, template tags, and views had no coverage at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  What could be added
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Author profile pages with bio and social links&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;RSS feed for articles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open Graph meta tags for social sharing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multilingual support&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;The starter kit is a strong foundation. The content model and block system are well thought out. But several core features were broken. Contributing fixes taught me more about Wagtail than any tutorial could.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>wagtail</category>
      <category>gsoc</category>
    </item>
    <item>
      <title>I Fixed a Silent Bug in an Open Source Project - Here's What I Learned</title>
      <dc:creator>Kumar Vanshaj</dc:creator>
      <pubDate>Wed, 25 Mar 2026 16:27:50 +0000</pubDate>
      <link>https://dev.to/vanshaj2023/i-fixed-a-silent-bug-in-an-open-source-project-heres-what-i-learned-9c0</link>
      <guid>https://dev.to/vanshaj2023/i-fixed-a-silent-bug-in-an-open-source-project-heres-what-i-learned-9c0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5so4vktwyqjemwgyrpd1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5so4vktwyqjemwgyrpd1.png" alt="Newsletter signup footer with working form" width="422" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The bug looked small. An email input in a footer. But it was completely broken.&lt;/p&gt;

&lt;p&gt;I was exploring the &lt;a href="https://github.com/wagtail/news-template" rel="noopener noreferrer"&gt;wagtail/news-template&lt;/a&gt; codebase as part of my Google Summer of Code (GSoC) application. I found the newsletter signup in the footer. You could type your email. You could click "Sign up". Nothing happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it broke
&lt;/h2&gt;

&lt;p&gt;The "Sign up" button was an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag. It linked to an external URL. It had no connection to the input field.&lt;/p&gt;

&lt;p&gt;The input also had no &lt;code&gt;name&lt;/code&gt; attribute. In HTML, form fields without a &lt;code&gt;name&lt;/code&gt; are never submitted. Even if a form existed, the value would be lost.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;I wrapped the input and button in a &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; element. I set the &lt;code&gt;action&lt;/code&gt; to the external signup URL. I used &lt;code&gt;method="get"&lt;/code&gt; so the email becomes part of the URL as a query parameter.&lt;/p&gt;

&lt;p&gt;I also added &lt;code&gt;name="email"&lt;/code&gt; and &lt;code&gt;required&lt;/code&gt; to the input.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"{{ signup_url }}"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"get"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Enter your email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Sign up&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three lines changed. The feature now works.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;Small bugs can break core features. This signup appeared on every page of the site. Every visitor who tried it got no result.&lt;/p&gt;

&lt;p&gt;Reading HTML carefully matters. You don't always need to run code to spot a problem. The structure tells you what will happen.&lt;/p&gt;

&lt;p&gt;Open source is a good place to practice this. Real codebases have real bugs. Fixing them teaches you more than tutorials.&lt;/p&gt;

&lt;p&gt;If you are new to open source, start by reading templates and forms. Look for missing attributes. Look for buttons that don't submit. These bugs are common and easy to fix once you know what to look for.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>wagtail</category>
      <category>gsoc</category>
    </item>
  </channel>
</rss>
