DEV Community

Cover image for My Experience With Django
Mujeeb Ishaque
Mujeeb Ishaque

Posted on

My Experience With Django

It's been quite sometime after leaving Laravel. I didn't want to do website development for a short interval of time and in that particular timeframe, I started working with Python.

Motivation

I had a software project and I know C#/WPF, so before starting to code the software, It came to my mind that you're learning Python, wouldn't it be cool if you can complete your software in python too? So I did. Python+PyQt5 and it was easy and helped me learn a couple of more things.

All sorts of questions were answered by the same answer, "Python". You want to work with images, data, machine learning, website development, you can do all of this and more with Python programming language.

Experience

At this point, I'd left laravel and php completely. I was reading the Django official documentation and the words that were captivating to me were, "Rapid Application Development" in the Django documentation. I made my first project of todo app, had to write little code for doing most of the things. Another boost came when I learned about Django's auto admin panel and that boost went away when I realized it's really hard to customize the look and feel of the Django admin. Some people even advised me to prefer making my own admin panel if you need all sorts of customizations. I didn't even realize that not everyone asks for customizations. Most common things like header, site_title and the way you interact with your model in the admin panel, can be modified with fewer lines of code.

Working with forms

man, I'd been creating forms in the templates for so long. Got introduced to ModelForm and oooh boi!. I mean like you literally have a form ready for your model just by like 5 lines of code? And wait, not only that, it does validation too and that too, automatically.

MTV architectural pattern

Easy to learn, nothing hard. It's not completely different from MVC either.

Django messages (alerts)

Got introduced to Django messages framework. Is there anything more easy to work with? yeah, I had trouble memorizing the debug_levels but it's not difficult and certainly doesn't take much time to learn.

Hosting

If you follow the docs correctly, it's a breeze. For Example, I forgot to include the static root in the settings.py, read the docs again and corrected my mistake. Ran the app and that's it.

Conclusion

So far, I've loved Django. Everything is simple, easy to follow but sometimes you'd have to dig deep down to understand how Django do certain things and by then you'd have gained enough experience so you won't stress about it.

Top comments (5)

Collapse
 
mujeebishaque profile image
Mujeeb Ishaque

1 - Django is easy to learn but hard to master whereas my learning curve with Laravel was linear.

2 - It has a built-in database(SQLite) for quick learning projects which I think is awesome.

3 - Auto admin panel.

4 - Working with forms is nice and easy etc.

Collapse
 
davidmm1707 profile image
David MMπŸ‘¨πŸ»β€πŸ’»

Yeah, I started my web dev learning four years ago using PHP and I dabbled in Laravel a bit. Learnt Java, I liked it better than PHP but when I saw Python I knew it was going to be my main language.

On my first job, they required me to learn Django and I absolutely loved it.

The admin panel, the shell, the clear MVT model, the scaffold, everything. It took me a while, more than other frameworks, to understand it, but I'm going to change Django for nothing.

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

It's awesome I kind of miss the structure of Django when I'm developing in Flask now.

Collapse
 
boringdev profile image
β € • Edited

I had to work on one middleware system using Flask. I used Flask Restful and organized the project in Django way.

Also the main system is in Django so writing this makes new ppl from main to middleware easier to adapt. My approach may not be everyone cup of tea but suitable for my situation

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

Yeah, I sort of did the same thing as well. While I was building APIs with Flask.