August 2016
Beginner to intermediate
717 pages
15h 24m
English
Since Django 1.7, you can use an extensible System Check Framework, which replaces the old validate management command. In this recipe, you will learn how to create a check if the ADMINS setting is set. Similarly, you will be able to check whether different secret keys or access tokens are set for the APIs that you are using.
Let's start with the viral_videos app that we created in the Using database query expressions recipe and extended in the previous recipe.
To use System Check Framework, follow these simple steps:
checks.py file with the following content:
# viral_videos/checks.py # -*- coding: UTF-8 -*- from __future__ import unicode_literals from django.core.checks import ...Read now
Unlock full access