Originally written on 2020-01-02. DEV's displayed publication date reflects this archive migration.
Simple 3 Steps
- add a folder
templatesunder the root folder of your project; ideally it should be the same directory as yourmanage.pyfile - create
404.htmland500.htmlfiles intemplatesfolder and customize however you please - go to
settings.pychange one little thing:
# assuming you haven't changed your BASE_DIR
# this is the default:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATES = [{
'DIRS': [os.path.join(BASE_DIR, 'templates')],
}]
You have to make sure that the correct html files can be properly referred to. And that's is!!
Top comments (0)