---
title: "Django标签之divisibleby"
author: "androider"
date: "2008-12-11T11:48:21Z"
tags: []
slug: "django-divisibleby"
draft: false
lastmod: "2008-12-11T11:48:43Z"
id: 290547
url: "https://androider.iteye.com/blog/290547"
---

Example:

```python


{% if value|divisibleby:"2" %}
    Even!
{% else %}
    Odd!
{% else %}

```

Returns True if the value is divisible by the argument.