django模型的统计
django-statistic的Python项目详细描述
django安装django统计
install
----
django安装django统计
models
类作者(models.model):
名字=…..
姓氏=…..
在统计表
statistic.objects.add(book)
models
statistic\u for庘models=statistic.objects.get庘statistic庘for庘model([作者,书籍],限制=50,洗牌=true)
```````
settings.py
````````
relative庘for庘year=1庘get relative year(今天是2013年,示例get:2012.11,2012.12,2013.1)
relative庘for庘week=2庘get relative week(今天是一年的第13周,例如get:11、12、13周)
````
注意:对于大数据,必须使用cache/crontab。
install
----
django安装django统计
models
类作者(models.model):
名字=…..
姓氏=…..
在统计表
statistic.objects.add(book)
models
statistic\u for庘models=statistic.objects.get庘statistic庘for庘model([作者,书籍],限制=50,洗牌=true)
```````
settings.py
````````
relative庘for庘year=1庘get relative year(今天是2013年,示例get:2012.11,2012.12,2013.1)
relative庘for庘week=2庘get relative week(今天是一年的第13周,例如get:11、12、13周)
````
注意:对于大数据,必须使用cache/crontab。