from django.shortcuts import render
def muscle_growth(request):
context = {
'title': 'Muscle Growth',
'heading': 'Welcome to the Muscle Growth Guide',
'content': "Muscle growth, also known as hypertrophy, is the process of increasing the size of muscle fibers. It occurs when the muscle is subjected to a greater amount of stress than it is used to, causing micro-tears in the muscle fibers. The body then repairs these tears and adds more muscle fibers to the area, increasing the size of the muscle.
There are several factors that contribute to muscle growth, including proper exercise, nutrition, and rest. Here are some tips to help you achieve muscle growth:"
}
return render(request, 'muscle_growth.html', context)
The view takes a 'request' parameter, which is the HTTP request object that Django passes to your view. In this case, we're not using any specific information from the request, so we can just pass the 'request' object to the 'render()' function.
The 'render()' function is a Django shortcut that takes a request and a template, and returns an HttpResponse object with the rendered template. The 'context' variable is a dictionary that contains variables that you want to pass to your template. In this case, we're passing a 'title', 'heading', and 'content' variable to the template.