· 7 years ago · Apr 05, 2018, 04:50 AM
1HTTP/1.1 302 Found
2Server: nginx
3Date: Thu, 05 Apr 2018 04:37:10 GMT
4Content-Type: text/html; charset=utf-8
5Connection: keep-alive
6Keep-Alive: timeout=5
7X-Frame-Options: SAMEORIGIN
8Vary: Cookie
9Set-Cookie: sessionid=s6ei8nyhxpx0xvl430zjtrsyimwv1l4i; expires=Thu, 19-Apr-2018 04:37:10 GMT; HttpOnly; Max-Age=1209600; Path=/
10Location: https://oauth.vk.com/authorize?redirect_uri=http%3A%2F%2Fyakhshisarova.ru%2Faccounts%2Fvk%2Flogin%2Fcallback%2F&state=fUNKUiqBxJSy&response_type=code&scope=&client_id=2806261
11
12AddHandler fcgid-script .fcgi
13Options +FollowSymLinks
14RewriteEngine On
15RewriteBase /
16RewriteRule ^(media/.*)$ - [L]
17RewriteRule ^(static/.*)$ - [L]
18RewriteCond %{REQUEST_URI} !(cgi-bin/realestate.fcgi)
19RewriteRule ^(.*)$ cgi-bin/realestate.fcgi/$1 [L]
20
21import os
22
23# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
24BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
25
26
27# Quick-start development settings - unsuitable for production
28# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
29
30# SECURITY WARNING: keep the secret key used in production secret!
31SECRET_KEY = SECRET_KEY
32
33# SECURITY WARNING: don't run with debug turned on in production!
34DEBUG = True
35
36ALLOWED_HOSTS = ['yakhshisarova.ru', '127.0.0.1']
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 'django.contrib.sites',
49
50 'widget_tweaks',
51
52 'allauth',
53 'allauth.account',
54 'allauth.socialaccount',
55 'allauth.socialaccount.providers.vk',
56 'allauth.socialaccount.providers.instagram'
57]
58
59AUTHENTICATION_BACKENDS = (
60 'django.contrib.auth.backends.ModelBackend',
61 'allauth.account.auth_backends.AuthenticationBackend',
62)
63
64ACCOUNT_EMAIL_REQUIRED = False
65
66SITE_ID = 1
67
68MIDDLEWARE = [
69 'django.middleware.security.SecurityMiddleware',
70 'django.contrib.sessions.middleware.SessionMiddleware',
71 'django.middleware.common.CommonMiddleware',
72 'django.middleware.csrf.CsrfViewMiddleware',
73 'django.contrib.auth.middleware.AuthenticationMiddleware',
74 'django.contrib.messages.middleware.MessageMiddleware',
75 'django.middleware.clickjacking.XFrameOptionsMiddleware',
76]
77
78ROOT_URLCONF = 'realestate.urls'
79
80TEMPLATES = [
81 {
82 'BACKEND': 'django.template.backends.django.DjangoTemplates',
83 'DIRS': [
84 os.path.join(BASE_DIR, 'templates'),
85 ],
86 'APP_DIRS': True,
87 'OPTIONS': {
88 'context_processors': [
89 'django.template.context_processors.debug',
90 'django.template.context_processors.request',
91 'django.contrib.auth.context_processors.auth',
92 'django.contrib.messages.context_processors.messages',
93 ],
94 },
95 },
96]
97
98WSGI_APPLICATION = 'realestate.wsgi.application'
99
100
101# Database
102# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
103
104DATABASES = {
105 'default': {
106 'HOST': HOST,
107 'ENGINE': 'django.db.backends.mysql',
108 'NAME': NAME,
109 'USER': USER,
110 'PASSWORD': PASSWORD,
111 }
112}
113
114
115# Password validation
116# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
117
118AUTH_PASSWORD_VALIDATORS = [
119 {
120 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
121 },
122 {
123 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
124 },
125 {
126 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
127 },
128 {
129 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
130 },
131]
132
133
134# Internationalization
135# https://docs.djangoproject.com/en/2.0/topics/i18n/
136
137LANGUAGE_CODE = 'en-us'
138
139TIME_ZONE = 'UTC'
140
141USE_I18N = True
142
143USE_L10N = True
144
145USE_TZ = True
146
147
148# Static files (CSS, JavaScript, Images)
149# https://docs.djangoproject.com/en/2.0/howto/static-files/
150
151STATIC_URL = '/static/'
152STATICFILES_DIRS = [
153 os.path.join(BASE_DIR, 'static'),
154]
155
156LOGIN_REDIRECT_URL = 'index'
157LOGOUT_REDIRECT_URL = 'index'
158STATIC_ROOT = '/home/httpd/vhosts/yakhshisarova.ru/httpdocs/static'