Python Tutorial

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 Pass Parameters To View Via Url In Django

Pass parameters via URL in Django is not as same as java or Php which use a question mark and key-value pairs ( for example http://127.0.0.1:8080/login.jsp?username=jerry&password=12345678). Django uses a more clear, readable, and SEO-friendly way to pass parameters in URL like http://127.0.0.1:8080/login/jerry/12345678. The first section after login is the username, and the section after jerry

How To Pass Parameters To View Via Url In Django Read More »

How To Fix Django Url NoReverseMatch Error – Reverse For With Keyword Arguments Not Found

The Django Bootstrap3 Example article tells you how to develop a user, department, and employee management website using Django and bootstrap3. The example website provides a user, department, and employee list page. Now I want to add a link to the employee name on the employee list page. Then when the user clicks the employee

How To Fix Django Url NoReverseMatch Error – Reverse For With Keyword Arguments Not Found Read More »