-
Book Overview & Buying
-
Table Of Contents
Web Development with Django Cookbook - Second Edition
By :
Monkey patch or guerrilla patch is a piece of code that extends or modifies another piece of code at runtime. It is not recommended to use monkey patch often; however, sometimes, it is the only possible way to fix a bug in third-party modules without creating a separate branch of the module. Also, monkey patching might be used to prepare functional or unit tests without using complex database or file manipulations. In this recipe, you will learn how to exchange the default slugify() function with the one from the third-party awesome-slugify module, which handles German, Greek, and Russian words smarter and allows to create customized slugs for other languages. As a quick reminder, we uses the slugify() function to create a URL-friendly version of the object's title or the uploaded filename; it strips the leading and trailing whitespace, converts the text to lowercase, removes nonword characters, and converts spaces...
Change the font size
Change margin width
Change background colour