diff options
author | luxagraf <sng@luxagraf.net> | 2025-04-07 16:38:45 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2025-04-07 16:38:45 -0500 |
commit | 17a5f9bd32a1552c3402a9f1168a4926b6398cef (patch) | |
tree | 917f3d780ae83c43a0e9107b2240b8e91bfae037 | |
parent | 514c54dc0667519454df050c1beb76e663d43681 (diff) |
notes: added current tag to selected
-rw-r--r-- | app/notes/templates/note_list.html | 2 | ||||
-rw-r--r-- | app/notes/views.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/notes/templates/note_list.html b/app/notes/templates/note_list.html index 7b6d717..727c21d 100644 --- a/app/notes/templates/note_list.html +++ b/app/notes/templates/note_list.html @@ -11,7 +11,7 @@ <select class="form-control" style="margin-top: 2%;" onchange="go_from_select(this.options[this.selectedIndex].value)"> <option value="">All Projects</option>{% for object in tags %} - <option {% if object.Tag == project %}selected="selected" {%endif%}value="?tag={{object}}">{{object}}</option>{%endfor%} + <option {% if current == object.name %}selected="selected" {%endif%}value="?tag={{object}}">{{object}}</option>{%endfor%} </select> </div> <div class="note-list">{% for object in object_list %}<article> diff --git a/app/notes/views.py b/app/notes/views.py index b160bed..1be3f4b 100644 --- a/app/notes/views.py +++ b/app/notes/views.py @@ -61,7 +61,7 @@ class LuxNoteListView(ListView): def get_context_data(self, **kwargs): context = super(LuxNoteListView, self).get_context_data(**kwargs) context['tags'] = LuxNote.tags.all().order_by('name') - #context['project'] = self.request.GET.get("project", False) + context['current'] = self.request.GET.get("tag", False) return context |