Learning Django

Hi
I hope you are fine
I have some questions of learning django that I will thank to tell me your suggestions

Right now I have learned most of the basics of django from coding for entrepreneurs youtube tutorial and I am in the middle of the polls tutorial of django official website and I am learning it well

Due to I am busy I want to save my time and I really do not have time for reading books , ( after finishing polls tutorial ) is it a good idea to continue my learning by making projects besides reading the official document ?
Or you have a better suggestion ?

And by the way where can I learn the CRUD with postgresql in django ?
Because I did not see much about postgresql CRUD in django in django official website

Thanks
Kind regards

Once you get past the official tutorial, I tend to encourage people to start working a project of their own on a topic they’re interested in.

The entire Django Tutorial is a CRUD application. What are you looking to do that isn’t covered by it?

Hi dear Mr .Whitesell
I hope you are fine and thank you for your reply

Excuse me so it that enough to continue my learning with just reading the official documentation besides making projects for some years ?

I mean I want to do CRUD and see the stored data in the database because the the official website only works with the django admin and don’t use pgAdmin ( postgresql )

It depends. What’s your objective? What are you trying to achieve?

No, the full tutorial saves data to the database, maybe you just haven’t gotten far enough into it yet. By the time you’re done, you’ll have a full app.

Dear Mr .Whitesell , due to I want to save my time and I want to learn django , my goal until next year is to have a complete knowledge of django as I can and have the ability to make professional projects . Now what is your suggestion ?
Is my previous idea good ?

And by the way I use notpad++ text editor for python and django and I feel very well with that for some reasons.
Is it good to continue coding in that ?

If you’re setting a one-year timeframe for this, you’re going to want to find every resource available. This includes books, tutorials, other Django-based Open Source projects that you can study, and hopefully someone who can guide you along the way on a regular basis.

You’ll also want to learn everything you can about html and css, and how they work together to render pages. You’ll probably also want to learn some JavaScript, and possibly one of the mainstream JavaScript frameworks such as jQuery, Vue, React, Angular, etc.

The issue a lot of people have when working on their own is not having someone reviewing the code they write who can identify potential problems or bottlenecks that might be created. Programming is hard. Writing code is hard. Writing stable, reliable, maintainable, and sufficiently-performant code is harder. Someone can crank out some code and get it to a state where it’s working, but only someone with some experience is going to be able to look at that code and find areas for improvement.

If it works for you, I’m not going to argue against it. If you’re using it because it’s the only thing you’ve tried, then I would suggest you at least take a look at one or more of the more full-featured IDEs available, such as PyCharm or Visual Studio Code. (I know what works for me, and my choice has even changed over time for various reasons. But only you are going to know what works best for you.)

Thank you dear Mr .Whitesell .

So you are agree to making projects besides learning from official documentation ,
Is it correct ?

Yes until now I have tried a lot of editors also the two ide that you told but for reasons below i have chose that :

-leightweight and fast
-notepad++ is the fan of enviroment because it uses less electricity so produces less CO2 ( you can read from its official website )
-supporting persian
-and I want to debug my code myself without help of ide to improve my analytical power and make it faster

Yes, but not only that. Working on projects is a great way to learn, but it’s not sufficient for learning everything you need to know. You’ll also want to be exposed to situations that you wouldn’t otherwise think of yourself.

The official docs are great for informing you about what you can do in the framework. It doesn’t go so far as to tell you what you should do under any given set of circumstances. That’s something that really can only be addressed through a variety of other sources - books, videos, blog posts, and through the examination of other projects.

One of the best ways to aid your learning about how to write good Django code is to read other good Django code that people have written, and understand why some decisions were made in those specific contexts.

While I have no problem with you personally choosing Notepad++, I would hope it would be for the right reasons. To that end:

This is a subjective evaluation. While this may be true in some sense, the question becomes whether or not you see the difference while actually using them.

This might be true on an “instantaneous” basis, but if a task takes you twice as long using Notepad++ than using an IDE, aren’t you using more electricity overall?

Obviously important for you, and this alone may be the only reason you need. I can’t address that in any context regarding IDEs.

A full-featured IDE doesn’t inhibit your learning process, it enhances and accelerates it. You’ve set a limited time frame for this effort, anything you can do to improve the rate at which you learn is that much farther along you’re going to be at the end of your window.

Lets say that you have to move some wood from one town to another - call it 10 km. You can either walk, carrying it by hand, or you can use a truck. You can eventually move all that wood by hand - but in the same amount of time, you’re going to be able to move a lot more wood using the truck. (Now, if you’re only moving the wood 10m and not 10km, it’s a different decision - and that’s why I would never argue the use of any particular tools for any individual.) Using this analogy, the IDE is your truck. You’re still using your brain, and your muscles (after all, the truck will need to be loaded and unloaded). What you’re doing is removing the time spent in the middle. You still need to use your brain, knowing where to pick up and deliver the wood, and knowledge of how to drive the truck. The truck just lets you do more of it in the same period of time by removing the time spent performing unskilled work - walking.

1 Like

Hi Dear Mr.Whitesell , I hope you are fine
At first thank you about the things about ide that you told before and your comment is respected but I still have my own logical opinions and try to use notepad++ until when I am coding

By the way my question this time is more related to python and I want to ask you due to you are experienced in python .
I have made a python file that I created 2 physics function in it and I want to put that python file in pypi.org . I have searched but did not find suitable solutions , can you help me how can I do that ?
Thanks
Kind regards

I’m fine with you using Notepad++, that’s definitely a personal choice that I respect. You could just say, “that’s what I’m most comfortable using”.
However, you did mention that you’re working under a time limit, and have asked for ways to accelerate your learning. Becoming comfortable and proficient with an IDE is definitely an aid toward doing that.

I’ve never published anything to pypi, so I have no direct experience there. The relevant docs on packaging are on the python.org website, so that’s a good place to start. There are also about 300,000 examples available for you to examine and see how other people are doing it.

1 Like

Thank you very much dear Mr. Whitesell for giving me your advices

Hi dear Mr.Whitesell . I am Mohammad .
I hope you are fine .
The last time I have sent you message , I was in the middle of the polls tutorial , I have just finished it now .
I have 2 questions that I will thank if you answer them .
Thanks .
Kind regards .

  1. What does { ‘classes’ : ['collapse '] } in fieldsets mean ?

  2. Dear Mr.Whitesell , the previous time that I asked about my learning path , you told me that is very good to read and check other’s projects and learn from them besides making projects .
    But I have thought and understood that there are a lot a people that do not code django in standard way . So I decided to learn by a book + django official documention + making projects ( myself ) .
    ( Right now I am going to make a school project in django . )
    My question : Can you introduce me a django book that teaches django by making a beginner to intermediate level project and teaches also good tips ?

  1. See the docs on ModelAdmin.fieldsets.

  2. To take my prior answer in context:

Yes, there is a lot of code floating around out there of questionable quality. That’s why I suggested finding good Django code - look for the popular, well supported and well maintained projects for inspiration. Understanding how major projects like Django Rest Framework, or Wagtail, or Crispy, or whatever, work will give you a perspective not otherwise available.

There’s more than one way to implement just about any functionality you might need. Books, tutorials, blogs, etc can really only highlight one way of doing something - most topics are far too broad for any one author to cover in an encyclopedic manner. You don’t want to fall into the mindset of “This is the only way of doing that.” Being exposed to a wide variety of solution implementations is part of the learning process. It becomes more important when you join a development team and need to adapt to their standards and practices. It helps if you’ve seen their style before.

I don’t like making individual recommendations of tutorials or books for a variety of reasons. However, if you’d like a starting point, I would recommend looking at what’s listed at Awesome Django. There’s a section for books in there.

Thank you dear Mr. Whitesell
Best wishes

Hi Mohammad,

I haven’t built a site that was right-to-left and left-to-right language compatible, but CSS does support both. I found this resource online that looks like it might be useful: Right-to-left Styling

Theoretically you should be able to generate the elements as you have done, but apply a class to the body that would change the direction of the text and layouts of the page.

-Tim

1 Like