I am using django_bootstrap.py there are similar errors but i could not find solution to it. I am using django helper(please do not suggest non-rel)
What i was trying to do was, inside a static html js website attaching a feature of sending mail, through a contact form. The form would take the data, and jQuery would validate and make a POST AJAX request to the url "/sendmail/" the views.py i have the following code:
def sendmail(request):
logging.info("here1")
msg = request.POST['comment']; sub = request.POST['subject']
name = request.POST['name']; frm = request.POST['email']
sender = name + " " + frm
logging.info(sender)
a = mail.send_mail(sender=sender,
to="to@example.com",
subject=sub,
body=msg)
logging.info(request)
logging.info(a)
return http.HttpResponse("1")
I get absolutely no error when i remove the line:
a = mail.send_mail(sender=sender,
to="to@example.com",
subject=sub,
body=msg)
However with that line being there, i get the following error:
<class 'django.core.exceptions.ImproperlyConfigured'>: You haven't set the DATABASE_ENGINE setting yet.
I look at my settings.py file and try making some changes: 1 adding two lines as done in django-nonrel settings.py
DATABASES['native'] = DATABASES['default']
DATABASES['default'] = {'ENGINE': 'dbindexer', 'TARGET': 'native'}
This gave a 500 error on server and the page did not open.
2 I tried putting
DATABASE_ENGINE = 'dummy'
This works locally but doesnot work on server(appspot).
3 I tried putting
DATABASE_ENGINE = 'appengine'
This too gives a 500 error.
Please let me know how to solve it.