I get the template path using
paymenthtml = os.path.join(os.path.dirname(__file__), 'template\\payment.html')
and calling it in another application where paymenthtml is copied to payment_template
return render_to_response(self.payment_template, self.context, RequestContext(self.request))
But I get an error
TemplateDoesNotExist at / test-payment-url /
E: \ TestApp \ template \ payment.html
Why does an error occur?
Edit: I made the following change in settings.py, and it can find the template, but I canβt hardcode the path during production, any hint?
TEMPLATE_DIRS = ("E:/testapp" )
python django django-templates
dhaval Dec 24 '09 at 6:46 2009-12-24 06:46
source share