· 9 years ago · Aug 24, 2016, 05:24 PM
1"""
2Django settings for simplemooc project.
3
4Generated by 'django-admin startproject' using Django 1.8.
5
6For more information on this file, see
7https://docs.djangoproject.com/en/1.8/topics/settings/
8
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/1.8/ref/settings/
11"""
12
13# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14import os
15
16BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17
18
19# Quick-start development settings - unsuitable for production
20# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
21
22# SECURITY WARNING: keep the secret key used in production secret!
23SECRET_KEY = '*2_v+kaqwl_qi!(o(l2-rbjp0$qhhor4aa8d%ab67xc11ih&z0'
24
25# SECURITY WARNING: don't run with debug turned on in production!
26DEBUG = True
27
28ALLOWED_HOSTS = []
29
30
31# Application definition
32
33INSTALLED_APPS = (
34 'django.contrib.admin',
35 'django.contrib.auth',
36 'django.contrib.contenttypes',
37 'django.contrib.sessions',
38 'django.contrib.messages',
39 'django.contrib.staticfiles',
40
41 'simplemooc.core'
42 'simplemooc.courses'
43)
44
45MIDDLEWARE_CLASSES = (
46 'django.contrib.sessions.middleware.SessionMiddleware',
47 'django.middleware.common.CommonMiddleware',
48 'django.middleware.csrf.CsrfViewMiddleware',
49 'django.contrib.auth.middleware.AuthenticationMiddleware',
50 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
51 'django.contrib.messages.middleware.MessageMiddleware',
52 'django.middleware.clickjacking.XFrameOptionsMiddleware',
53 'django.middleware.security.SecurityMiddleware',
54)
55
56ROOT_URLCONF = 'simplemooc.urls'
57
58TEMPLATES = [
59 {
60 'BACKEND': 'django.template.backends.django.DjangoTemplates',
61 'DIRS': [],
62 'APP_DIRS': True,
63 'OPTIONS': {
64 'context_processors': [
65 'django.template.context_processors.debug',
66 'django.template.context_processors.request',
67 'django.contrib.auth.context_processors.auth',
68 'django.contrib.messages.context_processors.messages',
69 ],
70 },
71 },
72]
73
74WSGI_APPLICATION = 'simplemooc.wsgi.application'
75
76
77# Database
78# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
79
80DATABASES = {
81 'default': {
82 'ENGINE': 'django.db.backends.sqlite3',
83 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
84 }
85}
86
87
88# Internationalization
89# https://docs.djangoproject.com/en/1.8/topics/i18n/
90
91LANGUAGE_CODE = 'pt-br'
92
93TIME_ZONE = 'UTC'
94
95USE_I18N = True
96
97USE_L10N = True
98
99USE_TZ = True
100
101
102# Static files (CSS, JavaScript, Images)
103# https://docs.djangoproject.com/en/1.8/howto/static-files/
104
105STATIC_URL = '/static/'
106MEDIA_ROOT = os.path.join(BASE_DIR,'simplemooc','media')