add the category list to all the views

Since the categories are part of the navigation I think they should be
visible from everywhere.
This commit is contained in:
Andreas Zweili 2018-01-28 20:25:35 +01:00
parent faba1a597d
commit 3dbb614bbb
1 changed files with 4 additions and 1 deletions

View File

@ -68,12 +68,15 @@ def article_details(request, article_id):
@login_required
def profile(request):
category_list = get_categories()
person = Person.objects.get(user=request.user)
return render(request, 'registration/profile.html',
{'person': person})
{'person': person,
'category_list': category_list})
def registration(request):
category_list = get_categories()
if request.method == 'POST':
profile_form = RegistrationForm(request.POST)
user_form = UserCreationForm(request.POST)