Posts

Scalability of a Django web application

  Scalability is one of the key concerns that you should take into account when you are planning to build a new application. Your application might start off small, but with time it might grow larger and you definitely want to avoid any kind of rewrite. Because of this, it is important to pick a framework that is easy to get going with, but that is also easy to scale. So what does “scaling” mean in the context of web applications? Obviously, it means that it can accept more visitors and requests. But it’s more to it than that. Can progressively scale from a low amount of users to a high amount of users. Have modular components that are decoupled and can be replaced if they are determined to be bottlenecks of the application. Have long term support for things such as bug fixes or security patches. Easily allow new team members to get up to speed with the application as you scale your company and its employees. As you can see, even if performance is a key part of what we determine to...

All Django Filters used in Templates

Image
  Django Template Engine provides filters which are used to transform the values of variables;es and tag arguments. We have already discussed major   Django Template Tags . Tags can’t modify value of a variable whereas filters can be used for incrementing value of a variable or modifying it to one’s own need. Syntax {{ variable_name | filter_name }} Filters can be “chained.” The output of one filter is applied to the next.  {{ text|escape|linebreaks }}  is a common idiom for escaping text contents, then converting line breaks to <p> tags. Example {{ value | length }} If value is  [‘a’, ‘b’, ‘c’, ‘d’] , the output will be  4 . Major Template Filters in Django This article revolves around various Django Template Filters one can use during a project. Filters transform the values of variables and tag arguments. Let’s check some major filters. add addslashes capfirst center cut date default dictsort divisibleby escape filesizeformat first join last length ...