<s> from django import template <EOL> from templatetag_sugar . register import tag <EOL> from templatetag_sugar . parser import Name , Variable , Constant , Optional , Model <EOL> from django_histograms . utils import Histogram <EOL> register = template . Library ( ) <EOL> @ tag ( register , [ Model ( ) , Variable ( ) , Optional ( [ Variable ( ) , Variable ( ) ] ) ] ) <EOL> def histogram_for ( context , model , attname , months = <NUM_LIT:2> , day_labels = True ) : <EOL> return Histogram ( model , attname , months = months ) . render ( css = True , day_labels = day_labels ) <EOL> @ tag ( register , [ Model ( ) , Variable ( ) , Optional ( [ Variable ( ) , Variable ( ) ] ) ] ) <EOL> def histogram_for_days ( context , model , attname , days = <NUM_LIT> , day_labels = True ) : <EOL> return Histogram ( model , attname , days = days ) . render ( css = True , day_labels = day_labels ) </s>
