File tree 2 files changed +2
-36
lines changed
2 files changed +2
-36
lines changed Original file line number Diff line number Diff line change @@ -55,20 +55,10 @@ def get_queryset(self):
55
55
self .tag = get_object_or_404 (Tag , slug = self .kwargs .get ('tag' ))
56
56
queryset = queryset .filter (tags__slug__in = [self .tag .slug ])
57
57
58
- if self .kwargs .get ('username' ):
59
- self .user = get_object_or_404 (
60
- User ,
61
- username = self .kwargs .get ('username' ),
62
- )
63
- queryset = queryset .filter (user = self .user )
64
- else :
65
- self .user = None
66
-
67
58
return queryset
68
59
69
60
def get_context_data (self , ** kwargs ):
70
61
context = super ().get_context_data (** kwargs )
71
- context ['person' ] = self .user
72
62
context ['tag' ] = self .tag
73
63
return context
74
64
Original file line number Diff line number Diff line change 4
4
{% load pagination_tags %}
5
5
6
6
{% block title %}
7
- {% if person %}
8
- {% if tag %}
9
- {% blocktrans with person.username as username and tag.name as tag %}Projects by {{ username }} tagged with {{ tag }}{% endblocktrans %}
10
- {% else %}
11
- {% blocktrans with person.username as username %}Projects by {{ username }}{% endblocktrans %}
12
- {% endif %}
13
- {% else %}
14
- {% if tag %}
15
- {% blocktrans with tag.name as tag %}Projects tagged with {{ tag }}{% endblocktrans %}
16
- {% else %}
17
- {% trans "Projects" %}
18
- {% endif %}
19
- {% endif %}
7
+ {% blocktrans with tag.name as tag %}Projects tagged with {{ tag }}{% endblocktrans %}
20
8
{% endblock %}
21
9
22
10
{% block nav-browse %}class="active"{% endblock %}
23
11
24
12
{% block content-header %}
25
- {% if person %}
26
- {% if tag %}
27
- < h1 > {% blocktrans with person.username as username and tag.name as tag %}Projects by {{ username }} tagged with {{ tag }}{% endblocktrans %}</ h1 >
28
- {% else %}
29
- < h1 > {% blocktrans with person.username as username %}Projects by {{ username }}{% endblocktrans %}</ h1 >
30
- {% endif %}
31
- {% else %}
32
- {% if tag %}
33
- < h1 > {% blocktrans with tag.name as tag %}Projects tagged with {{ tag }}{% endblocktrans %}</ h1 >
34
- {% else %}
35
- < h1 > {% trans "Projects" %}</ h1 >
36
- {% endif %}
37
- {% endif %}
13
+ < h1 > {% blocktrans with tag.name as tag %}Projects tagged with {{ tag }}{% endblocktrans %}</ h1 >
38
14
{% endblock %}
39
15
40
16
{% block content %}
You can’t perform that action at this time.
0 commit comments