-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show recently viewed items on the index page
fixes #417
- Loading branch information
1 parent
083df2b
commit 9dc49ac
Showing
6 changed files
with
86 additions
and
21 deletions.
There are no files selected for viewing
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,27 @@ | ||
# Generated by Django 2.0.13 on 2019-03-20 15:02 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('editor', '0037_auto_20190320_1436'), | ||
('accounts', '0017_auto_20171018_0843'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='EditorItemViewed', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('date', models.DateTimeField(auto_now=True)), | ||
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='views', to='editor.EditorItem')), | ||
('userprofile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='last_viewed_items', to='accounts.UserProfile')), | ||
], | ||
options={ | ||
'ordering': ('-date',), | ||
}, | ||
), | ||
] |
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
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
<a href="{{item.get_absolute_url}}">{{item.editoritem.name}}</a> | ||
<a href="{{item.get_absolute_url}}"> | ||
{% if show_icon %}<span class="glyphicon glyphicon-{{item.icon}}"></span>{% endif %} | ||
{{item.editoritem.name}} | ||
</a> |
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