1👍
✅
You can easily expose your constants to view by just wrapping them in context.
so if you want to access NUM_IMAGES in view
first import it into views.py file
from models import NUM_IMAGES
then pass it to required view
def myview(request):
#something to do
return render( request,'app/page.html',{'NUM_IMAGES':NUM_IMAGES})
Source:stackexchange.com