How To Fix IndentationError: Unindent Does Not Match Any Outer Indentation Level Error In Python

When I run my python script code, I meet an error like this IndentationError: unindent does not match any outer indentation level. This error is so strange and hard to find the reason. After some investigation, I finally find the solution.

How To Fix IndentationError: Unindent Does Not Match Any Outer Indentation Level Error In Python Read More »

How To Enable Or Disable CSRF Validation In Django Web Application

Django has provided a feature that can help you to avoid csrf attacks on your Django application. But sometimes especially in your development environment, you do not want this feature when sending post requests to your web server use curl in the command line, if this feature is enabled, you will get errors. This article

How To Enable Or Disable CSRF Validation In Django Web Application Read More »

How To Fix Django: TemplateSyntaxError: Could Not Parse The Remainder Error In Template File

When I develop my Django app example, I meet an error with TemplateSyntaxError: Could Not Parse The Remainder error message like below. This error is so strange but so simple to fix, but it cost me a lot of time. So I want to write down the solution here for the reader to fix it

How To Fix Django: TemplateSyntaxError: Could Not Parse The Remainder Error In Template File Read More »

How To Return Html File As Django View Response

Morden web application are all designed with MVC( Model, View, Controller ) pattern. But in django, the pattern name is MTV( Model, Template, View Function ). So in django, template html is the view, and view function plays the role of controller. This article will tell you how to create template and view function in

How To Return Html File As Django View Response Read More »

How To Use Django url Tag And reverse() Function To Avoid Url Hard Coded

Hard coded url in your Django template html files or views.py file is a bad practice. Because it is difficult to maintain url changes. If you change one url, you may need to change that url in a lot of pages. So Django provide template url tag and reverse function for you to avoid hard

How To Use Django url Tag And reverse() Function To Avoid Url Hard Coded Read More »

How To Install Python Package Numpy, Pandas, Scipy, Matplotlib On Windows, Mac And Linux

If you want to do data analysis in python, you always need to use python packages like Numpy, Pandas, Scipy and Matplotlib, etc. All those python packages are so powerful and useful to do Base N-dimensional array computing( Numpy ), Data structures & analysis ( Pandas ), scientific computing ( Scipy ), and Comprehensive 2D

How To Install Python Package Numpy, Pandas, Scipy, Matplotlib On Windows, Mac And Linux Read More »