News for hackers. Stuff that matters.
Re:Django 4.0 release candidate 1 released by traverseda on Monday November 22, 2021 @10:23AM (#29307281)
Python is a very popular language, and if you know Python Django is easy.
Re:Django 4.0 release candidate 1 released by sireat on Monday November 22, 2021 @01:33PM (#29309955)
Django seems to add too much magic for me. It is mostly manage.py this manage.py that.

I can't grok it completely. All the books that I read on it skipped the architecture part.

Maybe there is a good guide to Django architecture - the big picture?

PS I am rather experienced in Python (Numpy, Pandas, Plotly, Flask, SQLAlchemy, FastAPI, BeautifulSoup are my bread and butter)

Re:Django 4.0 release candidate 1 released by derekjdanserl on Monday November 22, 2021 @01:59PM (#29310273)
You list a bunch of libraries, but Django is not a library. It is a framework.

The Django file structure, for example, is not exactly optional in Django. Realize FastAPI follows in the footsteps of Flask. Neither FastAPI or Flask are frameworks. As a FastAPI user myself, I do think it’s closer to a happy medium, but it’s nothing remotely comparable to Django.

When using Django, the best advice I have is to dive all the way in. Follow the docs and the best practices first. Besides, manage.py is just like having a well-developed kit of shell scripts/ in your repo.

Re:Django 4.0 release candidate 1 released by sireat on Monday November 22, 2021 @02:53PM (#29310886)
I am well aware that Django is a framework and yes it is quite strict about the way you set it up.

That is a reasonable price to pay for the batteries included approach.

What I am saying that I do not grok the big picture of Django flow.

For some reason I got up to speed with Laravel much faster and I do not write much PHP.

The books that I skimmed (like recommended Two Scoops of Django) just go into various things you can do but do not show the big picture.

Re:Django 4.0 release candidate 1 released by traverseda on Monday November 22, 2021 @04:12PM (#29311617)
You write views, and they render templates. There's a file called `urls.py` where you import a view and attach it to an actual url.

So

    appconfig/urls.py depends on
    yourapp/views.py which renders html using a template at
    yourapp/templates/sometemplate.html
Presuming that you want to interact with the database `yourapp/views.py` probably also depends on models from `yourapp/models.py` or some other apps database model.