· 10 years ago · Mar 17, 2016, 05:42 PM
1"""
2Django settings for Sutora project.
3
4For more information on this file, see
5https://docs.djangoproject.com/en/1.6/topics/settings/
6
7For the full list of settings and their values, see
8https://docs.djangoproject.com/en/1.6/ref/settings/
9"""
10# -*- coding: utf-8 -*-
11# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
12import os
13SITE_NAME = 'http://www.sutora.ru'
14BASE_DIR = os.path.dirname(os.path.dirname(__file__))
15import datetime
16TEMPLATE_DIRS = (
17 os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/'),
18)
19
20# -*- coding: utf-8 -*-
21
22# Quick-start development settings - unsuitable for production
23# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
24
25# SECURITY WARNING: keep the secret key used in production secret!
26
27SECRET_KEY = 'z)vax1*%y8341uhf$-zm3ttcxkt6-%bqqmcp)4487leflpjg(q'
28
29# SECURITY WARNING: don't run with debug turned on in production!
30DEBUG = True
31
32TEMPLATE_DEBUG = True
33
34ALLOWED_HOSTS = [
35'.sutora.ru',
36'.sutora.ru.'
37]
38
39# Application definition
40
41INSTALLED_APPS = (
42 'django.contrib.admin',
43 'django.contrib.auth',
44 'django.contrib.contenttypes',
45 'django.contrib.sessions',
46 'django.contrib.messages',
47 'django.contrib.staticfiles',
48 'paypal.standard.ipn',
49 #'south',
50 #'debug_toolbar',
51 'mysite',
52 'sorl.thumbnail',
53 'tinymce',
54 'mce_filebrowser',
55
56 'orders'
57)
58
59
60#mail
61EMAIL_HOST = 'smtp.bk.ru'
62EMAIL_HOST_USER = 'atnes@bk.ru'
63EMAIL_HOST_PASSWORD = 'atnes28637'
64EMAIL_PORT = 2525
65EMAIL_USE_TLS = True
66
67MIDDLEWARE_CLASSES = (
68 'django.contrib.sessions.middleware.SessionMiddleware',
69 'django.middleware.common.CommonMiddleware',
70 'django.middleware.csrf.CsrfViewMiddleware',
71 'django.contrib.auth.middleware.AuthenticationMiddleware',
72 'django.contrib.messages.middleware.MessageMiddleware',
73 'django.middleware.clickjacking.XFrameOptionsMiddleware',
74)
75
76ROOT_URLCONF = 'Sutora.urls'
77WSGI_APPLICATION = 'Sutora.wsgi.application'
78
79TEMPLATE_CONTEXT_PROCESSORS = (
80 # other context processors....
81
82 'django.core.context_processors.static',
83 'django.contrib.auth.context_processors.auth',
84 'mycontext.year_sutora.years',
85)
86
87# Database
88# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
89DATABASES = {
90 'default': {
91 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
92 'NAME': 'u37230', # Or path to database file if using sqlite3.
93 # The following settings are not used with sqlite3:
94 'USER': 'u37230',
95 'PASSWORD': 'ops4vqzmiy',
96 'HOST': 'localhost', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
97 'PORT': '',
98 }
99}
100
101
102# Internationalization
103# https://docs.djangoproject.com/en/1.6/topics/i18n/
104
105LANGUAGE_CODE = 'ru'
106
107TIME_ZONE = 'Asia/Yekaterinburg'
108
109USE_I18N = True
110
111USE_L10N = True
112
113USE_TZ = True
114
115
116# Static files (CSS, JavaScript, Images)
117# https://docs.djangoproject.com/en/1.6/howto/static-files/
118
119MEDIA_ROOT = '/home/u37230/sitename.ru/www/media'
120MEDIA_URL = '/media/'
121STATIC_ROOT = '/home/u37230/sitename.ru/www/static'
122STATIC_URL = '/static/'
123STATICFILES_DIRS = (
124 os.path.join(BASE_DIR, 'static'),
125)
126#TINYMCE
127TINYMCE_JS_URL = 'tiny_mce/tiny_mce.js'
128TINYMCE_JS_ROOT = 'tiny_mce'
129TINYMCE_DEFAULT_CONFIG = {'theme': "advanced",
130 'theme_advanced_toolbar_location': "top",
131 'height': '400',
132 'skin': "o2k7",
133 'file_browser_callback': 'mce_filebrowser'
134
135
136
137}
138
139YEAR = datetime.date.today().year
140
141# PayPal
142PAYPAL_RECEIVER_EMAIL = "atnes-facilitator@bk.ru"
143PAYPAL_TEST = True
144
145
146from Sutora.default_models import set_default_models
147
148#set_default_models()