{"slug": "i-couldn-t-grow-up-with-a-cat-so-i-made-a-django-package-to-fix-that", "title": "I Couldn't Grow Up with a Cat, So I Made a Django Package to Fix That", "summary": "A developer built a Django package called `django-doubao` that uses ByteDance's Doubao AI to merge childhood photos with cat images and generate videos of the two playing together. The reusable app, published on GitHub, provides two Django views for AI image fusion and image-to-video generation, requiring only an API key and minimal setup. The project was created to fulfill a lifelong wish of growing up with a cat by animating old photographs.", "body_md": "I always wanted a cat but never had one as a child. Decades later, I used Doubao API to merge my childhood photos with my cat's images, then built a reusable Django app (`django-doubao`\n\n) that does AI image fusion and image-to-video generation. Here's how it works and why I built it.\n\nWhen I was a kid, I longed for a cat. My mother wouldn't allow it. I pressed my face against the neighbour’s window, watching their tabby stretch and roll in the sun – a hollow ache in my chest.\n\nOnly after forty years did I finally get my own cat. But then a new sadness crept in: I couldn’t grow up with her.\n\nSo I devised a trick.\n\nOn Doubao (ByteDance’s AI platform), I took my old, faded childhood photos – gap-toothed, laughing – and merged them with my cat’s plump white face. Suddenly, we were playing together. Then I made videos: the child chasing the cat through a field of flowers, wind lifting our hair, years dissolving.\n\nEach creation sent ripples through my heart – from a quiet centre to the corners of my lips and eyes.\n\nI started on Doubao’s official website, but soon I thought: I’m a programmer. Why not build my own app?\n\nI got a Doubao API key, set up a Django project, and wrote a `utils.py`\n\n– not three hundred lines – that became the key to my own toy box.\n\n**My ritual:**\n\nI created **two Django views**:\n\nWhen I saw the boy and the cat move across the screen, something long empty inside me was gently filled.\n\nI packed the whole thing into a Python package, `django-doubao`\n\n, and published it on GitHub.\n\n`while`\n\nloops needed.\n\n```\ndjango-doubao/\n├── doubao/\n│   ├── models.py        # ImageGeneration, VideoGeneration\n│   ├── views.py         # generate_image_view, generate_video_view\n│   ├── urls.py          # routes with namespace\n│   ├── utils.py         # API calls: generate_image, submit_video_task, poll_video_result\n│   ├── templates/       # standalone Vue3 templates (no base.html required)\n│   └── migrations/\n├── tests/               # pytest + mock, 15 tests all green\n├── pyproject.toml\n└── README.md\n```\n\n**Key decisions**:\n\n`login_required`\n\nor `user_passes_test`\n\nyourself. Each project is different.`base.html`\n\n. You can override them.Install:\n\n```\npip install django-doubao\n```\n\nAdd to `INSTALLED_APPS`\n\n:\n\n```\nINSTALLED_APPS = [\n    ...\n    'doubao',\n]\n```\n\nSet your API key:\n\n```\nDOUBAO_API_KEY = \"your-key-here\"\n```\n\nInclude URLs:\n\n```\n# urls.py\npath('doubao/', include('doubao.urls')),\n```\n\nThen visit `/doubao/image/`\n\nto generate images, and `/doubao/video/`\n\nto turn them into videos.\n\nI could have kept using online tools. But as a programmer, I chose to build a small world with code – one where the child and the cat can finally run, daydream, and watch maple leaves fall together.\n\nIf you have a similar wish – to revive an old photograph or animate a memory – I hope `django-doubao`\n\nhelps you take fewer detours.\n\nCode is like bricks. The important thing isn’t how complex it is, but what you build with it.\n\n*The cat is purring beside me. The video loops on the screen. I turn off the light, leaving only the screen’s glow – and that old hollow feels truly filled.*\n\n**What do you think? Have you ever used AI to fill a childhood gap? Let me know in the comments.**", "url": "https://wpnews.pro/news/i-couldn-t-grow-up-with-a-cat-so-i-made-a-django-package-to-fix-that", "canonical_source": "https://dev.to/wandawwl/i-couldnt-grow-up-with-a-cat-so-i-made-a-django-package-to-fix-that-2ba0", "published_at": "2026-06-03 04:01:27+00:00", "updated_at": "2026-06-03 04:11:40.573781+00:00", "lang": "en", "topics": ["generative-ai", "computer-vision", "ai-products", "ai-tools"], "entities": ["Doubao", "ByteDance", "Django", "django-doubao"], "alternates": {"html": "https://wpnews.pro/news/i-couldn-t-grow-up-with-a-cat-so-i-made-a-django-package-to-fix-that", "markdown": "https://wpnews.pro/news/i-couldn-t-grow-up-with-a-cat-so-i-made-a-django-package-to-fix-that.md", "text": "https://wpnews.pro/news/i-couldn-t-grow-up-with-a-cat-so-i-made-a-django-package-to-fix-that.txt", "jsonld": "https://wpnews.pro/news/i-couldn-t-grow-up-with-a-cat-so-i-made-a-django-package-to-fix-that.jsonld"}}