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:
parent
faba1a597d
commit
3dbb614bbb
|
@ -68,12 +68,15 @@ def article_details(request, article_id):
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def profile(request):
|
def profile(request):
|
||||||
|
category_list = get_categories()
|
||||||
person = Person.objects.get(user=request.user)
|
person = Person.objects.get(user=request.user)
|
||||||
return render(request, 'registration/profile.html',
|
return render(request, 'registration/profile.html',
|
||||||
{'person': person})
|
{'person': person,
|
||||||
|
'category_list': category_list})
|
||||||
|
|
||||||
|
|
||||||
def registration(request):
|
def registration(request):
|
||||||
|
category_list = get_categories()
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
profile_form = RegistrationForm(request.POST)
|
profile_form = RegistrationForm(request.POST)
|
||||||
user_form = UserCreationForm(request.POST)
|
user_form = UserCreationForm(request.POST)
|
||||||
|
|
Loading…
Reference in New Issue