Advertisement
Guest User

Untitled

a guest
Aug 10th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.87 KB | None | 0 0
  1. """
  2. Django settings for careergrowr project.
  3.  
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.7/topics/settings/
  6.  
  7. For the full list of settings and their values, see
  8. https://docs.djangoproject.com/en/1.7/ref/settings/
  9. """
  10.  
  11. # -*- coding: utf-8 -*-
  12.  
  13. from django.utils.translation import ugettext_lazy as _
  14. import os, sys
  15.  
  16. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  17. import os
  18. BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  19.  
  20. PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
  21.  
  22. # Import Project Modules
  23. modules = os.path.join(PROJECT_ROOT, './modules/')
  24. sys.path.append(modules)
  25. # Import Application libraries
  26. lib = os.path.join(PROJECT_ROOT, './lib/')
  27. sys.path.append(lib)
  28.  
  29.  
  30. KEYWORDS = "online cv, online resume, cv, resume, professional resume, cv template, resume template, how to write a cv, how to write a resume, professional resume template"
  31. KEYWORDS_SHORT = "online resume, online cv, professional resume, resume template"
  32. DESCRIPTION = "Build a professional cv / resume with competence test, to improve your hiring chances "
  33. PAGE_TITLE = "Build a professional online CV / RESUME"
  34.  
  35. ADMINS = (
  36. ('Ales Maticic', 'gospodarprstanov@gmail.com'),
  37. )
  38.  
  39. PROJECT_NAME = 'CarrerGrowr'
  40. PROJECT_URL = 'http://www.careergrowr.com'
  41.  
  42. # Quick-start development settings - unsuitable for production
  43. # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
  44.  
  45. # SECURITY WARNING: keep the secret key used in production secret!
  46. SECRET_KEY = 'y*%jc+d3hm70^#4(t1z!*z_8d&3ala2cw@napte*@hq8#aqf(_'
  47.  
  48. # SECURITY WARNING: don't run with debug turned on in production!
  49. DEBUG = True
  50.  
  51. TEMPLATE_DEBUG = True
  52.  
  53. ALLOWED_HOSTS = []
  54.  
  55.  
  56. # Application definition
  57.  
  58. INSTALLED_APPS = (
  59. 'django.contrib.admin',
  60. 'django.contrib.auth',
  61. 'django.contrib.contenttypes',
  62. 'django.contrib.sessions',
  63. 'django.contrib.sites',
  64. 'django.contrib.messages',
  65. 'django.contrib.staticfiles',
  66. 'django.contrib.flatpages',
  67.  
  68. 'django_countries',
  69. 'ckeditor',
  70. 'mailer',
  71. 'taggit',
  72. 'easy_thumbnails',
  73. 'wkhtmltopdf',
  74. 'rest_framework',
  75.  
  76. 'quiz',
  77. 'multichoice',
  78. 'true_false',
  79. 'essay',
  80.  
  81. 'modules.accounts',
  82. 'modules.frontend',
  83. 'modules.news',
  84. 'modules.company',
  85. 'modules.jobapplication',
  86.  
  87.  
  88. )
  89.  
  90. MIDDLEWARE_CLASSES = (
  91. 'modules.accounts.SetLastVisitMiddleware.SetLastVisitMiddleware',
  92. 'django.contrib.sessions.middleware.SessionMiddleware',
  93. 'django.middleware.common.CommonMiddleware',
  94. 'django.middleware.csrf.CsrfViewMiddleware',
  95. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  96. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  97. 'django.contrib.messages.middleware.MessageMiddleware',
  98. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  99. )
  100.  
  101. ROOT_URLCONF = 'careergrowr.urls'
  102.  
  103. WSGI_APPLICATION = 'careergrowr.wsgi.application'
  104.  
  105. import django.conf.global_settings as DEFAULT_SETTINGS
  106.  
  107. TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
  108. "frontend.context_processors.common_context",
  109. )
  110.  
  111. # Database
  112. # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
  113.  
  114. DATABASES = {
  115. 'default': {
  116. 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
  117. 'NAME': 'careergrowr', # Or path to database file if using sqlite3.
  118. 'USER': 'root', # Not used with sqlite3.
  119. 'PASSWORD': 'admin', # Not used with sqlite3.
  120. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
  121. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
  122. 'OPTIONS': {
  123. 'init_command': 'SET storage_engine=INNODB',
  124. }
  125. }
  126. }
  127.  
  128. SITE_ID = 1
  129.  
  130. # Internationalization
  131. # https://docs.djangoproject.com/en/1.7/topics/i18n/
  132.  
  133. LANGUAGE_CODE = 'en-us'
  134.  
  135. TIME_ZONE = 'Europe/Ljubljana'
  136.  
  137. USE_I18N = True
  138.  
  139. USE_L10N = True
  140.  
  141. USE_TZ = True
  142.  
  143. TEMPLATE_DIRS = (
  144. os.path.join(PROJECT_ROOT, './templates/'),
  145. )
  146.  
  147. AUTH_USER_MODEL = "accounts.EmailUser"
  148.  
  149. LOGIN_URL = '/login/'
  150. LOGOUT_URL = '/'
  151.  
  152. APPEND_SLASH = True
  153. PREPEND_WWW = True
  154.  
  155. # email configuration
  156. #EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  157. EMAIL_BACKEND = "mailer.backend.DbBackend"
  158. EMAIL_USE_TLS = True
  159. EMAIL_HOST = 'smtp.challengefuture.org'
  160.  
  161. #EMAIL_HOST_USER = 'happy@growr.net'
  162. #DEFAULT_FROM_EMAIL = 'happy@growr.net'
  163. #EMAIL_HOST_PASSWORD = '0G5Bge75GFtB4kF2'
  164.  
  165. EMAIL_HOST_USER = 'challengefuture@growr.net'
  166. DEFAULT_FROM_EMAIL = 'challengefuture@growr.net'
  167. EMAIL_HOST_PASSWORD = '5C0pFsDN4kn3j5db'
  168.  
  169. EMAIL_PORT = 587
  170.  
  171.  
  172. SERVER_EMAIL = 'webmaster@growr.net'
  173.  
  174. THUMBNAIL_ALIASES = {
  175. '': {
  176. 'avatar_small_square': {'size': (150, 150), 'crop': True},
  177. 'avatar_big': {'size': (255, 0), 'crop': False},
  178. 'thumbnail_small': {'size': (90, 90), 'crop': True},
  179. 'thumbnail_big': {'size': (100, 0), 'crop': False},
  180. 'thumbnail_blog': {'size': (100, 100), 'crop': True},
  181. 'blog_big': {'size': (764, 0), 'crop': False},
  182. 'blog_small': {'size': (764, 300), 'crop': True},
  183. },
  184. }
  185.  
  186. MEDIA_ROOT = os.path.join(PROJECT_ROOT, './media/')
  187. #STATIC_ROOT = os.path.join(PROJECT_ROOT, './static/')
  188.  
  189. MEDIA_URL = '/media/'
  190.  
  191. STATIC_URL = '/static/'
  192.  
  193. # Additional locations of static files
  194. STATICFILES_DIRS = (
  195. # Put strings here, like "/home/html/static" or "C:/www/django/static".
  196. # Always use forward slashes, even on Windows.
  197. # Don't forget to use absolute paths, not relative paths.
  198. os.path.join(PROJECT_ROOT, './static/'),
  199. )
  200.  
  201. FILE_CHARSET = 'utf-8'
  202.  
  203. CKEDITOR_UPLOAD_PATH = os.path.join(PROJECT_ROOT, './media/ck_uploads/')
  204.  
  205. CKEDITOR_CONFIGS = {
  206. 'awesome_ckeditor': {
  207. 'toolbar': 'Basic',
  208. },
  209. 'default': {
  210. 'toolbar': [
  211. ['Bold', 'Italic', 'Underline','-','NumberedList','BulletedList','-','Outdent','Indent','Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','Link','Unlink','Anchor','TextColor','BGColor', 'Source', ],
  212. ],
  213. 'height': 300,
  214. 'width': '100%',
  215. 'htmlEncodeOutput': False,
  216. 'entities': False,
  217. 'disableNativeSpellChecker': False,
  218. },
  219. }
  220.  
  221.  
  222. # uncomment for production
  223. """REST_FRAMEWORK = {
  224. 'DEFAULT_PERMISSION_CLASSES': [
  225. 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
  226. ]
  227. }"""
  228.  
  229. #WKHTMLTOPDF_CMD_OPTIONS = {
  230. # 'quiet': True,
  231. #}
  232. REST_FRAMEWORK = {
  233. 'DEFAULT_PERMISSION_CLASSES': [
  234. 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
  235. ]
  236. }
  237.  
  238. try:
  239. from local_settings import *
  240. except Exception, e:
  241. import sys
  242. print >> sys.stderr, e
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement