```
try:
    explosive_date = datetime.datetime.strptime(date, '%Y-%m-%d') 
except ValueError:
    return http.HttpResponseBadRequest('Invalid date')
```