<?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: Jeff Sheffield</title>
    <description>The latest articles on DEV Community by Jeff Sheffield (@jeff_sheffield_77bc3b7cbb).</description>
    <link>https://dev.to/jeff_sheffield_77bc3b7cbb</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%2F3705912%2F9e173f63-30d8-429b-a9bc-4aa6d89bb0d8.png</url>
      <title>DEV Community: Jeff Sheffield</title>
      <link>https://dev.to/jeff_sheffield_77bc3b7cbb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeff_sheffield_77bc3b7cbb"/>
    <language>en</language>
    <item>
      <title>Your Models Know Their Own Schema. Let Them Show You.</title>
      <dc:creator>Jeff Sheffield</dc:creator>
      <pubDate>Tue, 21 Apr 2026 07:14:08 +0000</pubDate>
      <link>https://dev.to/jeff_sheffield_77bc3b7cbb/your-models-know-their-own-schema-let-them-show-you-5552</link>
      <guid>https://dev.to/jeff_sheffield_77bc3b7cbb/your-models-know-their-own-schema-let-them-show-you-5552</guid>
      <description>&lt;p&gt;Django already knows every model in your project, every field, every relationship — down to the last on_delete. So why are you drawing it by hand?&lt;/p&gt;

&lt;p&gt;You know the drill. Sprint planning is tomorrow and someone asks "can you send over the schema?" So you open your diagramming tool, spend two hours dragging boxes and drawing arrows, get it looking presentable — and three days later a migration lands and it's already wrong.&lt;/p&gt;

&lt;p&gt;That's not a documentation problem. That's a tooling problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;django-schematic exists because your Django project already knows its own schema.&lt;/strong&gt; Every model, every field, every relationship — it's all sitting in the model registry right now, precisely defined, perfectly up to date. The only question is why you'd ever draw that information by hand.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;django-schematic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add it to &lt;code&gt;INSTALLED_APPS&lt;/code&gt;, mount the URL, open your browser. In under two minutes you're looking at a live, interactive graph of your entire data model — every &lt;code&gt;ForeignKey&lt;/code&gt;, every &lt;code&gt;ManyToManyField&lt;/code&gt;, every abstract base class, laid out automatically and ready to explore.&lt;/p&gt;

&lt;p&gt;Not a screenshot. Not a PDF you'll forget to update. A living diagram that re-generates from your actual code every time you load it.&lt;/p&gt;

&lt;h2&gt;
  
  
  For the moments that actually matter
&lt;/h2&gt;

&lt;p&gt;When you're onboarding a new developer and they need to understand how &lt;code&gt;User&lt;/code&gt; connects to &lt;code&gt;SocialAccount&lt;/code&gt; which in turn connects to &lt;code&gt;Token&lt;/code&gt;, and &lt;code&gt;SocialApp&lt;/code&gt; — you don't send them a Notion page that was accurate in Q2. You send them a &lt;a href="https://storage.googleapis.com/jeffield-media/images/schematic2.original.png" rel="noopener noreferrer"&gt;PNG schema drawing&lt;/a&gt;.&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%2Fe0wo5jo5aax3tntah9ck.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%2Fe0wo5jo5aax3tntah9ck.png" alt="Example User Schema" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But this is no ordinary PNG. Embedded invisibly inside the image file are the model names, positions, and layout configuration from the exact view you were looking at. When your co-worker drops it into django-schematic, the app restores that view — same positions, same visible models, same layout. And here's the important part: it reads the &lt;code&gt;current&lt;/code&gt; model definitions from their own running Django project to populate the attributes. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The PNG carries the &lt;code&gt;where&lt;/code&gt;, your codebase supplies the &lt;code&gt;what&lt;/code&gt;. The diagram is always accurate, even if the schema has moved on since you exported it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That means you can attach schema PNGs directly to pull requests and GitHub issues, right alongside your code. Reviewers see a clear picture of the data model changes at a glance. And when the next PR lands and things shift, updating the diagram is trivial: import the PNG, show or hide any new relationships, adjust the layout if needed, and export again. Thirty seconds, not two hours.&lt;/p&gt;

&lt;p&gt;When you're mid-refactor and you need to see whether that cascade delete is going to ripple in three directions or ten — you don't reconstruct the graph in your head. You switch to Auto-Layout and see it.&lt;/p&gt;

&lt;p&gt;When a teammate asks "wait, does &lt;code&gt;UserProfile&lt;/code&gt; proxy &lt;code&gt;User&lt;/code&gt; or extend it?" — you don't dig through migrations. You glance at the schema, where proxy models are marked distinctly from abstract ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  It gets out of your way
&lt;/h2&gt;

&lt;p&gt;Filter down to just the billing app when the full graph is too noisy. Switch between hierarchical layout (for tracing relationships) and force-directed (for seeing which models cluster naturally). Export a PNG, share it, import it back — it restores your exact view. And by default, none of this is visible in production: &lt;code&gt;DEBUG=False&lt;/code&gt; and the route returns 404, no configuration required.&lt;/p&gt;

&lt;p&gt;The whole point is that you shouldn't have to think about it. It's there when you need it, accurate because it reads your code directly, and gone (from production) because you'd never expose it there anyway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop drawing. Start seeing.
&lt;/h2&gt;

&lt;p&gt;Your models change frequently. Your understanding of them should too. django-schematic means you're always looking at the truth — not a drawing of what the truth used to be.&lt;/p&gt;

&lt;p&gt;See it for yourself at the &lt;a href="https://jeffield.net/schema/" rel="noopener noreferrer"&gt;live demo&lt;/a&gt;, or jump in and &lt;a href="https://github.com/jsheffie/django-schematic" rel="noopener noreferrer"&gt;contribute on GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>devtools</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
