[Fixed]-'module' object has no attribute 'SITE_PAGES_DIRECTORY'

1👍

The line

SITE_PAGES_DIRECTORY=os.path.join(BASE_DIR,'pages')

should be inside

settings.configure()

not outside, i.e.

settings.configure(
    DEBUG = True,
    SECRET_KEY= 'qfzf!b1z^5dyk%syiokeg4*2xf%kj68g=o&e8qvd@@(1lj5z8)',
    ROOT_URLCONF='sitebuilder.urls',
    MIDDLEWARE_CLASSES=(),
    INSTALLED_APPS=(
        'django.contrib.staticfiles',
        'sitebuilder',
    ),
    TEMPLATES=(
        {
            'BACKEND':'django.template.backends.django.DjangoTemplates',
            'DIRS':[],
            'APP_DIRS':True,
        },
    ),
    STATIC_URL='/static/',
    SITE_PAGES_DIRECTORY=os.path.join(BASE_DIR,'pages'), #RIGHT HERE
)

Leave a comment