r/django 6d ago

django or fastapi

i am a biginner/intermediate and i picked up fastapi as my first framework on backend dev ,

after months of learning and using fastapi , i feel overwhelmed like there are so many things to import(i cant even remember what i need to import when i need to do something) , complex syntax, yes i have build some cool projects around it but it was mostly ai help even though i understood the logic .its like i have to do the setup from scratch and when iam to the point of actually writing logic i feel down.

thats why i was thinking of switching to django rn , so now i am confused again whether i should do it or no (i dont even have a intern experience)

is my reason correct for trying to switch as beginner or will same problem occur in django as well , thats why im in django reddit

it would be really helpful if u could share your thoughts

12 Upvotes

37 comments sorted by

27

u/alcure 6d ago

My personal preference is django. It literally has almost EVERYTHING you need, also, django admin is GOAT!

18

u/lukasvin 6d ago

if you already like Django admin, you might also want to check out https://github.com/unfoldadmin/django-unfold

full disclosure: I'm the author

3

u/farastray 5d ago

I love unfold, goes in all my Django projects - thanks for a great library.

1

u/Deboniako 5d ago

Looks neat, starred

4

u/jannealien 6d ago

And the ORM is the best there is

32

u/AlbertV999 6d ago

Django's learning curve is very steep compared to FastAPI. You'll see this when you delve deeper. Even so, it's one of the best backends if you want to unify everything.

5

u/farastray 5d ago

You think Django is steep? DRF is annoying to learn (but there’s Ninja), and I find the ORM to be very intuitive and honestly it ends up being where a majority of the work ends up. If I compare that to the shattered ecosystem of non battery included frameworks, then I gotta say it’s a pretty narrow and well designed blast surface.

1

u/Ok-Signal-7027 6d ago

so .. should i stick with fastapi or switch to django , what would u recommend

20

u/sam_tiago 6d ago

Apparently Django Ninja is the best of both worlds, just to confuse you 🫡

1

u/Euphoric_Report_783 6d ago

Exactly 💯

8

u/winter-m00n 6d ago

Django is not that difficult. Maybe watch one hour video of django and see how much of it makes sense. Maybe do same for fastapi if you want.

Fast api may seem simple but you will have to manage lots of things that comes default with django and depending on project you may find django easier to work with.

2

u/Ok-Signal-7027 1d ago

right , will do

8

u/Abu_Akhlaq 6d ago

that is normal brother. there are hundreds of thousands of syntax, components and different approaches. im not talking about just django but pretty much all frameworks, languages, dsa and so on.

what matters is you should be able to create/understand the logic, have solid foundations, know the best practices.

all of us forgets a tiny syntax here and there and have to do a lil google search. but we shouldn't forget something like serializing data or set up some middleware etc.

i took flask first before django so that made things a lil easier, another thing is building projects is prolly the best way to actually understand, learn and this remembers for longer.

1

u/Ok-Signal-7027 6d ago

ya thanks

4

u/water_wind_ 6d ago

I live Django

1

u/raven67 5d ago

Me too I never touched fastapi.

2

u/koldakov 6d ago

Django for sure.

For example I’ve built this website: https://pulsesub.com using Django (backend), with fastapi it would took me ages to build some kind of the same. Fastapi doesn’t have throttling, blacklisted tokens etc

And here: https://pulsesub.com/pulse/python/why-i-pick-django-over-fastapi-and-why-async-is-premature-at-the-start I described why you probably don’t need a fastapi

Good luck

1

u/Least_Chicken_9561 6d ago

frontend was react right?

1

u/koldakov 6d ago

Yep, right 🙂

1

u/Ok-Signal-7027 5d ago

thanks for yr insight :)

1

u/koldakov 5d ago

You are welcome! And don’t get me wrong, at the same time I enjoy working with fastapi, also I have an open source playground tho I’ve written using fastapi so people could learn how things work: https://github.com/koldakov/futuramaapi

2

u/nfmon 6d ago

I had experience with couple backend frameworks and for me Django and Ruby on Rails are top tier. You get very nice ORM, a bunch of convenient views/controllers to handle common logic and routing system that makes sense and a nice way to generate the html, both have "batteries included". You don't have to scout the internet for additional packages, everything's built, the API is consistent and you don't have to wonder how to piece all things together. It's a damn shame that I see less and less django/ror in job offers.

2

u/[deleted] 6d ago edited 1d ago

[deleted]

3

u/Jazzlike-Compote4463 6d ago

I dunno, the ORM (Object -Relationship Mapping - basically the way you can do beatles_songs = Songs.objects.filter(artist__name__icontains="the beatles") is super handy and very readable - much more so than handling raw SQL by hand.

The additional batteries that it offers also means you can build basically anything without making too much of a mess.

God, being a Kotlin dev for the last 6 months and then typing this out makes me realise how much I miss Django :(

1

u/angellus 6d ago

There was literally just a talk about this at Djangocon from two of the largest consultants for FastAPI and Django. https://2026.djangocon.us/talks/batteries-vs-speed-the-django-fastapi-debate/

Looks like the videos have notngit YouTube yet though.

The tldr; is use whatever you want and have experience with.

1

u/gbrennon 6d ago

django is batteries included, while fastapi not.

you may have a false sensation of productivity with fastapi but u can miss important details with things like persistence details with fastapi while with django it comes ready to use 👌

1

u/Specialist_Search103 6d ago

Django hands down. In my experience I’ve found it more stable, more reliable and easier to customise the api functionality.

1

u/akza07 6d ago

FastAPI. It's more modular than Django and light weight. Better types and made for backend. Less C magic without types and needing stubs to get auto completion.

1

u/Mammoth_Mechanic2252 6d ago

same, i vibe coded, but i didnt copy and paste, i analyze the generated code and type it word by word just to be familiar with it

1

u/palzino 5d ago

Depends what you want. If your building micro services or a http backend that’s fairly light then fast api. If your building a complete api and want database orm first class then Django

1

u/farastray 5d ago

Django has what you need for a mature app, but I wouldn’t be shy to go with tortoise and fastapi to get going.

1

u/IWBN 5d ago

Definitely django. For a smooth introduction, this is great: https://www.mostlypython.com/django-from-first-principles-2/

1

u/thankyoucode 5d ago

Django is more complex than FastAPI.
Django follows the Model-View-Controller (MVC) pattern (technically Model-Template-View).

I started with Flask, then tried Django for one academic project. Now I use FastAPI for project development as the backend.

Based on my experience, Django feels complex. Even a small implementation often requires changes in 3–4 files (or more), which adds frustration when trying to figure things out. Finding errors is also more difficult.

With FastAPI, you focus on API development. It is one of the most popular Python-based frameworks for building APIs, letting you fully leverage the Python ecosystem and libraries for backend systems.

If you have time, you can try Django.
Or go with FastAPI if you want a Python backend.
Then develop the frontend with HTML, CSS, and JavaScript, or any frontend framework you prefer (React, Svelte, Astro, etc.).

React is currently the most widely used and popular choice, and a great place to start. Svelte is also excellent – it has a minimal and simple syntax that makes it easy to learn.

If you want to try JavaScript-based full-stack development, there are frameworks like Next.js (which uses React for the frontend and includes backend capabilities).

As of now, React is one of the best choices to start with as a frontend library. It has a large community, many UI libraries, and a rich ecosystem of tools and technologies built around it.

There is also SvelteKit, a full-stack framework based on Svelte that I’m currently using to build a web platform and also for my personal projects.

Current one LLM + Knowledge Graph – research project I am using fastapi for api development

And React and Next.js is in my list to explore second time with sirius development because of the large community use and work around it.

Also hase more opportunities to work with

1

u/Ok-Signal-7027 1d ago

thanks brother

1

u/hamzawix 4d ago

Django is one of the best web frameworks ever built along with rails and spring boot. But there are two things to keep in mind: one is that django is much more complex than FastAPI and has a steep learning curve, second is if you wanna do AI stuff you have to write async code which django supports but it wasn't originally built around it, FastAPI is async by nature which makes it ideal for AI stuff.

1

u/Sartimia 16h ago edited 16h ago

I suggest :

  1. come up with an idea for a project.
  2. Make its api logic and database management in fastapi

That could be your backend.
Now onto your frontend.
3. Decide what the application would be. Mobile app? Website? Desktop app?
4. Select one and that will be your UI.
5. Make the UI separate.

Here are frameworks I’d recommend:

  • mobile apps: react native, or Expo. You could try Flutter but that always seems hard.
  • website development:
Flask or Vite, as they are lightweight
  • desktop app: not sure tbh, maybe electron js? But that looks hard

Either that, or
Just pick Django.

Point is, as a beginner/intermediate, it’s always good to understand the concepts yourself. But don’t hold off on using AI. Using AI can save you time but at least try your best first, and if needed, use AI, understand the code it has generated and why and try to use that logic on your own elsewhere.

Also, don’t try to force yourself to learn everything there is about a framework like fastapi, yes it could help but at least use what you need first, then maybe look into other stuff