Django Tutorial: Django Settings.py File Explained

preview_player
Показать описание


"""
Django settings for lpt project.

Generated by 'django-admin startproject' using Django 1.9.7.

For more information on this file, see

For the full list of settings and their values, see
"""

import os

# Quick-start development settings - unsuitable for production

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '8ub$l1nip#d(m43q%swlj3_-d(stl$7zx75cs3+%c$&la5zen)'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = [
]

MIDDLEWARE_CLASSES = [
]

TEMPLATES = [
{
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
],
},
},
]

# Database

DATABASES = {
'default': {
}
}

# Password validation

AUTH_PASSWORD_VALIDATORS = [
{
},
{
},
{
},
{
},
]

# Internationalization

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)

STATIC_URL = '/static/'
Python os module

import os

Base_Dir

Рекомендации по теме
Комментарии
Автор

Very good and funny videos bring a great sense of entertainment!

kieutrangao
Автор

hi I have a question. How to calculate number of parameters in this code?

WOLFANB
Автор

(1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS.


Could you please help me how to remove this warning..

alistairlobo
Автор

Greate video thank you
I Have a question.
sys.path.append(os.path.join(os.path.dirname(BASE_DIR), 'application'))
I have a such line in settings.py and don't qute understand for what?

RuslanSkiraUkraine
Автор

I m getting this error and dont know how to solve it
Error response
Error code 501.

Message: Unsupported method ('GET').

Error code explanation: 501 = Server does not support this operation.

neethiramaiah
join shbcf.ru