Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added field total_read_time to Pageview, which is also populated at s…
…ave().
- Loading branch information
1 parent
7906321
commit 51d0a56
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
aaltoanalytics/apps/analytics/migrations/0003_auto__add_field_pageview_total_read_time.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
import datetime | ||
from south.db import db | ||
from south.v2 import SchemaMigration | ||
from django.db import models | ||
|
||
|
||
class Migration(SchemaMigration): | ||
|
||
def forwards(self, orm): | ||
# Adding field 'Pageview.total_read_time' | ||
db.add_column('analytics_pageview', 'total_read_time', | ||
self.gf('django.db.models.fields.IntegerField')(default=0), | ||
keep_default=False) | ||
|
||
def backwards(self, orm): | ||
# Deleting field 'Pageview.total_read_time' | ||
db.delete_column('analytics_pageview', 'total_read_time') | ||
|
||
models = { | ||
'analytics.pageview': { | ||
'Meta': {'object_name': 'Pageview'}, | ||
'datetime': ('django.db.models.fields.DateTimeField', [], {}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'last_read_datetime': ('django.db.models.fields.DateTimeField', [], {}), | ||
'referrer': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | ||
'screen_height': ('django.db.models.fields.IntegerField', [], {}), | ||
'screen_width': ('django.db.models.fields.IntegerField', [], {}), | ||
'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['analytics.Service']"}), | ||
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | ||
'total_read_time': ('django.db.models.fields.IntegerField', [], {}), | ||
'url': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | ||
'user_id': ('django.db.models.fields.CharField', [], {'max_length': '8'}) | ||
}, | ||
'analytics.service': { | ||
'Meta': {'object_name': 'Service'}, | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | ||
'tracking_id': ('django.db.models.fields.CharField', [], {'max_length': '8'}) | ||
} | ||
} | ||
|
||
complete_apps = ['analytics'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters