File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 11import inspect
2+ import json
23import pprint
34import os
45from typing import List
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ def get(cls):
5151 NotFound404 (),
5252 InvalidRouteMethodType (),
5353 ModelNotFound (),
54+ DatabaseDriverNotFound (),
55+ DriverNotFound (),
5456 ]
5557
5658
@@ -383,6 +385,28 @@ def regex(self):
383385 return r"No record found with the given primary key"
384386
385387
388+ class DriverNotFound :
389+ def title (self ):
390+ return "Driver Is Not Installed"
391+
392+ def description (self ):
393+ return ":package is required by the driver. You should install it with 'pip install :package' and refresh the page."
394+
395+ def regex (self ):
396+ return r"^Could not find the '(?P<package>([\w]*))' library"
397+
398+
399+ class DatabaseDriverNotFound :
400+ def title (self ):
401+ return "Database Driver Is Not Installed"
402+
403+ def description (self ):
404+ return ":package is required by the database driver. You should install it with 'pip install :package' and refresh the page."
405+
406+ def regex (self ):
407+ return r"^You must have the '(?P<package>([\w]*))' package installed"
408+
409+
386410class InvalidRouteMethodType :
387411 def title (self ):
388412 return "The method type is incorrect"
You can’t perform that action at this time.
0 commit comments