[Answered ]-Exceptions using django standalone with python3

2👍

After calling settings.configure(), you must call django.setup().

import django
from django.conf import settings
settings.configure()
django.setup()
from django.template import Template, Context
t = Template('My name is {{ my_name }}.')
c=Context({'my_name': 'Mindaugas'})
t.render(c)

See the docs for more info.

Leave a comment