-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Store Pageviews in DB #6121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ericholscher
merged 30 commits into
readthedocs:master
from
dojutsu-user:search-pageviews-sorting
May 19, 2020
Merged
Store Pageviews in DB #6121
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
0998e8a
initial work
dojutsu-user 3e8a99a
fix arguments
dojutsu-user f5c82cf
update migration file
dojutsu-user e1e954c
Merge branch 'master' into search-pageviews-sorting
dojutsu-user 9b03012
show top 10 viewed page to the users.
dojutsu-user 152aff0
Merge branch 'master' into search-pageviews-sorting
dojutsu-user f389476
initial work for showing graphs to the user
dojutsu-user 1717cfc
Merge branch 'master' into search-pageviews-sorting
dojutsu-user a19823f
show pageviews for a specific page
dojutsu-user af056c8
Merge branch 'master' into search-pageviews-sorting
dojutsu-user a1d0a9b
change view to class based view
dojutsu-user 82b3182
Merge branch 'master' into search-pageviews-sorting
dojutsu-user 415a3b3
fix lint
dojutsu-user 2073a82
fix more lint
dojutsu-user b263c1b
Merge branch 'master' into search-pageviews-sorting
dojutsu-user 3ec59dc
store page_slug instead of page_path
dojutsu-user 108fd5f
little refactor
dojutsu-user ddc96d9
update test
dojutsu-user 8da0f93
fix tests
dojutsu-user d0e1317
add test for search tasks
dojutsu-user 3946398
use F expression
dojutsu-user b06d599
Merge branch 'master' into search-pageviews-sorting
dojutsu-user 11eb6ac
fix tests
dojutsu-user 95e7ee7
Merge branch 'master' into search-pageviews-sorting
dojutsu-user 67d4885
Merge branch 'master' into search-pageviews-sorting
dojutsu-user 9cb2310
Merge branch 'master' into search-pageviews-sorting
davidfischer 3ce38c8
Index and refactor page view counting
davidfischer 46747b0
Feedback updates and renames for clarity
davidfischer 7e5a1f0
Merge branch 'master' into search-pageviews-sorting
davidfischer b530bbc
Move pageview models to the analytics app
davidfischer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
31 changes: 31 additions & 0 deletions
31
readthedocs/search/migrations/0002_create_page_views_model.py
This file contains hidden or 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,31 @@ | ||
# Generated by Django 2.2.12 on 2020-05-07 23:32 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('projects', '0048_remove_version_privacy_field'), | ||
('builds', '0019_migrate_protected_versions_to_hidden'), | ||
('search', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='PageView', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('path', models.CharField(max_length=4096)), | ||
('view_count', models.PositiveIntegerField(default=0)), | ||
('date', models.DateField(db_index=True, default=datetime.date.today)), | ||
('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='page_views', to='projects.Project')), | ||
('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='page_views', to='builds.Version', verbose_name='Version')), | ||
], | ||
options={ | ||
'unique_together': {('project', 'version', 'path', 'date')}, | ||
}, | ||
), | ||
] |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea what this view is. It doesn't appear to be used or valid.