[Fixed]-How to get a flatpage as a variable in views.py and pass it to another view?

1👍

Flatpages are just models, like anything else; you can query them and pass the instances around however you like.

from django.contrib.flatpages.models import FlatPage
flatpage = FlatPage.objects.get(url='/about/)

Leave a comment