Reputation: 153
Okay , I am not sure if that is a problem with my Django project logic or with my html tags , so here it goes
I am trying to make a link that lists all the groups created by a specific user
the template code
<h1>
<a href"{% url 'infrastructure:user-orgs-view' slug=request.user.slug%}"> Your Organizations </a>
</h1>
url.py part
path('accounts/<slug>/orgs', views.UserOrgsView, name='user-orgs-view' )
my view
def UserOrgsView(request, slug):
orgs = Profile.objects.get(slug=slug).organization_set
return render(request, 'user_orgs.html', { 'orgs' : orgs})
the only css I am using on this page
body {
text-align: center;
vertical-align: middle;
}
p *{
vertical-align: middle;
}
what happens is the tag appears as normal text , not clickable .. not linked .. nothing .. any idea why is that happening ?
Upvotes: 0
Views: 131
Reputation: 483
try:
<a href="{% url 'infrastructure:user-orgs-view' slug=request.user.slug%}"> Your Organizations </a>
Upvotes: 1