Django unable to load static files

后端 未结 3 775
粉色の甜心
粉色の甜心 2021-01-27 06:09

Completely new to django.

In my settings.py file, I have:

STATIC_URL = \'/static/\'
INSTALLED_APPS = [
    \'django.contrib.admin\',
    \'django.contri         


        
3条回答
  •  一生所求
    2021-01-27 06:24

    Here is settings.py code:

    STATIC_URL = "/static/"
    STATICFILES_DIR = [
    os.path.join(BASE_DIR, "static")]
    LOGIN_URL = "account:login"
    LOGIN_REDIRECT_URL = "public:index"
    LOGOUT_REDIRECT_URL = "public:index"
    
    
     INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'website.apps.accounts',]
    

提交回复
热议问题