You must import them into view.py, then in your view function, pass them in context to submit the template.
models.py
CONSTANT1 = 1
CONSTANT2 = 2
view.py
from app.models import CONSTANCT1, CONSTANCE2
def func(request):
context['constant1'] = CONSTANT1
context['constant2'] = CONSTANT2
template.html
{{ constant1 }}
{{ constant2 }}
Edit:
Class based views are no different than function based views. According to django docs , override get_context_datato add additional material to the context.