More than 10,000 readers have followed the Django blog tutorials since they were published. Some learners have successfully completed the construction of their personal blogs, but they have been constantly receiving comments, QQ messages, emails and other information for help from readers. They are stuck with some problems in development and do not know how to solve them. As more and more people read the tutorial, I received more and more requests for help. One person’s power is always limited, and I personally can’t answer all the questions of those who ask for help. To that end, I’d like to share with you some of the effective advice I learned when I encountered problems with Django, some easier ways to find a solution, and some Django resources you can refer to.

Help preference: Django official documentation

Seventy percent of the questions I encounter, and many of the questions I receive from newbies, are answered through Django’s official documentation. But why do so many people still ask questions that can be answered in official documents? Because they are not familiar with official documents. The official documentation is the most comprehensive and authoritative source for learning Django development. My advice is to spend a fair amount of time starting to read through the official documentation after a brief introduction to Django. Maybe you’re afraid of too much content, but we have to do is to read through the document, and to know which part of the document about a problem, the django documentation of the involved components have a bird’s eye view of master, so you can think of when a problem is encountered this problem had discussed in part of a document, so you can quickly locate the document of the relevant parts, Find a solution to a problem. Similarly, documentation is still the first recourse for third-party libraries you are working with.

Of course, I understand that the reason most people don’t want to read official documents is not because of the sheer volume of content, but because of the English language. However, in today’s technological environment, reading technical documents and books in English is one of the skills required to be a qualified developer. If English is a big challenge for you, you should make a long-term plan for learning English instead of trying to quickly master a developed technology. If your project is urgent, you might want to start with some Chinese translations, such as Django’s 1.8 Chinese version. (I won’t post the address, but hopefully you’ve learned some tips on how to find materials after reading this article.) But note that most of the English document translation is contributed by enthusiastic netizens. One is that the document is updated slowly and the translation is incomplete. The other is that there are many translators and mistakes are inevitable.

Turn to a search engine

Use the community and search engines to help you solve problems that inevitably arise during development. Do not a person closed the door and the problem dead knock, sometimes stuck you can not solve the problem for a few days, may be reminded by others a word will be to make you understand. Here’s what I usually do when I have a problem.

The first and most important thing is to get rid of Baidu. From my experience, most questions about Django development are hard to find on Baidu. Compared with Google, I usually use Google to search for problems and use the keyword Django + to describe the problems in short English. More than 90% of the problems can be found in Google’s search results, with almost no recourse to others. If you don’t have a proper scientific way to surf the Web, you can use Yahoo search or Bing search instead.

Of course, I know that a lot of people don’t want to use Google, but they don’t know how to express the corresponding keywords in English. Again, in today’s technological environment, reading technical documents and books in English is one of the necessary skills to be a qualified developer. If English is a big challenge for you, you should make a long-term plan for learning English. In case of emergency, you can also try some translation software. One of the great things about Google search is that it automatically corrects grammar errors. Once, for example, a friend asked me how Django should display images. Obviously, it’s easier to get a faster and better answer if you ask this question to Google than if you ask me. Just type in the search box: How to display pictures in Django, youll see that the top ones are basically the answers you need.

Reach out to the developer q&A community

People who don’t know that StackOverflow developers are not good developers, there is a phrase called programming for StackOverflow, and there are even people who publish the process from how to copy code for StackOverflow to project launch. It’s easy to see how important StackOverflow is to developers. Usually, the answers we find using the search engine mentioned in step 2 come from StackOverflow. But if you run into a problem that search engines can’t solve, you can try asking a question on StackOverflow, and as long as the question is well described (see below on how to ask the right question), you’ll almost certainly get an answer from an enthusiastic developer from around the world.

I can still see why a lot of people don’t want to use StackOverflow, but again, it’s important to say it three times: in today’s technology environment, reading technical documents and books in English is one of the skills required to be a qualified developer. If English is a big challenge for you, you should make a long-term plan for learning English.

In the short term, look for local q&A communities. For example, you can think of a SegmentFault as the domestic version of StackOverflow, although it may not be as time-sensitive to get solutions as StackOverflow. There is also the Python section of v2EX, a technical community in China, which is also a relatively active place with a large number of talents. Instead of stupid questions, discuss valuable questions. Also, in order to solve the problems of Django developers, I have set up a forum called pythonzhcn. I recommend Posting your problems in some of the above places and Posting them to the forum. Some friends (including me) will be able to provide you with answers when they are available.

Ask an experienced developer for help

If you can’t find a solution to your problem using the above methods, then you have a challenging problem. You can ask some experienced people, or you are welcome to send questions to me. If I have the ability and time, I will discuss this problem with you. But make sure you ask the right questions, the clearer the questions are and the more complete the information is, so that the respondents can use their experience to find a solution for you as quickly as possible, otherwise a lot of time will be wasted in the back-and-forth communication (see below for the correct questions).

How to Ask questions correctly

The right way to ask questions is to ensure that they are purposeful, complete, clear, specific, and informative. Of course, it’s hard to find an appropriate standard for distinguishing a good question from a bad one, so let’s define the problem in the opposite direction. Here are some questions that I’m sure you can tell when they’re wrong, but I still get these questions all the time:

I’m running the development server, but I keep getting an error and it won’t work. What should I do?

I am running the program after XX exception, this is what happened?

I’ve written the code, but I can’t see what you’re talking about.

How do I create a file and write to it on the server?

Such, in brief the common fault of the above problem is the incomplete information, or only a question of general description, or only one exception error information of the program, I believe that this kind of question is very difficult to answer I am afraid, even was the founder of the relevant technology, not to mention me this only learned a little bit more than you old rookie.

Read the article on Effective Questions to Solve problems


Finally, if you have any Python or Django questions, feel free to discuss them with me, provided that you have followed the instructions in this article.

My personal blog: the blog of dreamers