Start implementing basic CMS functionality for main page
This commit is contained in:
@@ -11,7 +11,7 @@ from django.views.generic.edit import CreateView
|
||||
|
||||
from core.forms import NewUserForm
|
||||
from core.lib.products import assemble_plan_map
|
||||
from core.models import Plan, Session
|
||||
from core.models import ContentBlock, Plan, Session
|
||||
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
|
||||
@@ -22,7 +22,11 @@ class Home(View):
|
||||
template_name = "index.html"
|
||||
|
||||
def get(self, request):
|
||||
return render(request, self.template_name)
|
||||
blocks = ContentBlock.objects.all().order_by("position")
|
||||
print("BLOCKS", blocks)
|
||||
print("ITER", [x.position for x in blocks])
|
||||
context = {"blocks": blocks}
|
||||
return render(request, self.template_name, context)
|
||||
|
||||
|
||||
class Billing(LoginRequiredMixin, View):
|
||||
|
||||
Reference in New Issue
Block a user