---
title: "Discussion on \"When plans go astray: my unsuccessful journey of migrating a large Django project to Mypy\" | Hashnode"
description: "Discussion on \"When plans go astray: my unsuccessful journey of migrating a large Django project to Mypy\". Learn about my failed attempt at migrating a large Django project to Mypy. We'll talk typed dicts, generics, peps, and more."
url: "https://hashnode.com/posts/my-unsuccessful-journey-of-migrating-a-large-django-project-to-mypy/64abf2e7395b682e51ab94c5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [When plans go astray: my unsuccessful journey of migrating a large Django project to Mypy](https://blog.derlin.ch/my-unsuccessful-journey-of-migrating-a-large-django-project-to-mypy?utm_source=hashnode&utm_medium=feed)

Learn about my failed attempt at migrating a large Django project to Mypy. We'll talk typed dicts, generics, peps, and more.

Jul 10, 2023 · 12 min read · blog.derlin.ch  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#django](https://hashnode.com/tag/django)
-   [#type-checking](https://hashnode.com/tag/type-checking)
-   [#mypy](https://hashnode.com/tag/mypy)

## Written by

[Lucy Linder](https://hashnode.com/@derlin)

@derlin · Switzerland

  
[View profile](https://hashnode.com/@derlin)

Software Engineer / SRE

I am a passionate woman fond of octopuses 🐙🐙 It took me a while to find my path, but as soon as I started programming, I knew it would define me for the rest of my life. I love everything that challenges my brain and can keep it interested. I was involved in projects in numerous domains, from quantum computing for particle physics to retail store interfaces. I don't know what I enjoy the most (as long as I can crunch code), so I try everything I come up with. Currently working as a software engineer / SRE, I always have ongoing side projects and try to give back to the community through open-source and tech platforms (dev.to, StackOverflow). Aside from my work, I love reading (especially time travel fiction) and spending time with other passionate people. To make the latter even easier, I co-founded the GDG Fribourg, which I hope you will check out if you are in Switzerland.

## Responses 2

Markdown supported · ⌘↵ to post

[Attila Gulyas](https://hashnode.com/@toraritte)

[Sep 15, 2023](https://hashnode.com/posts/my-unsuccessful-journey-of-migrating-a-large-django-project-to-mypy/64abf2e7395b682e51ab94c5/comment/650493a0dbce26f1baf9ee53)

This is great writing: It's

-   concise
-   unbiased
-   no-nonsense, yet not overly dry
-   well structured
-   references galore
-   clear introduction to the problems faced (love the up-front summaries) **and** showing workarounds (with just enough code to demonstrate both)
-   superb conclusion section

To think that I almost gave up my research before stumbling upon this article.. Thank you!

(Thank you also for saving us at least a month! Inherited a legacy (undocumented) Django 2 project running in production, and bringing it up to date took almost 2 weeks, so we were thinking about adding static type checking. After reading your thorough write-up though, I think we should be happy that the upgrade and subsequent migration went well..:)

[Pierre](https://hashnode.com/@bktero)

[Sep 14, 2023](https://hashnode.com/posts/my-unsuccessful-journey-of-migrating-a-large-django-project-to-mypy/64abf2e7395b682e51ab94c5/comment/6502bc9efb3b16e3da3cff85)

Very interesting!

I have started to massively use type hints in 2023 (after almost 11 years of coding with Python). I couldn't agree more with these 2 sentences:

> a Python project should be developed with type checks in mind from the start

and:

> I can't help but feel the types revolution will drastically change how we code in Python

I am still using the integrated feature of PyCharm for checking type hints. I haven't tried MyPy yet, but I will try one day!

[Lucy Linder](https://hashnode.com/@derlin)

[Sep 14, 2023](https://hashnode.com/posts/my-unsuccessful-journey-of-migrating-a-large-django-project-to-mypy/64abf2e7395b682e51ab94c5/comment/6502bc9efb3b16e3da3cff85#reply-6502d36ffb3b16e3da3d0322)

Happy you liked it! And thank you for leaving a comment, it made my day.

Type hints are still in their infancy, but I believe it will become a no brainier soon, given all the PEPs related to type hints.

Pycharm is powerful, but only relying on an IDE is risky, as a wrong type hint is worst than none. I did the same on one of my projects (pycharm only) and was surprised how many mistakes I made when I turned on mypy.

If you like the subject, have a look at my latest article discussing changes to type annotations [blog.derlin.ch/python-type-hints-and-future-annot…](https://blog.derlin.ch/python-type-hints-and-future-annotations)
