Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PyCon 3.14 KB | None | 0 0
  1. import os
  2.  
  3. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  4. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  5.  
  6.  
  7. # Quick-start development settings - unsuitable for production
  8. # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
  9.  
  10. # SECURITY WARNING: keep the secret key used in production secret!
  11. SECRET_KEY = '_k9)2t+-+=i!_y=rz0cj*w+0v!-=)4=xcot2)(w*g(=izrw28v'
  12.  
  13. # SECURITY WARNING: don't run with debug turned on in production!
  14. DEBUG = True
  15.  
  16.  
  17.  
  18.  
  19. ALLOWED_HOSTS = []
  20.  
  21.  
  22. # Application definition
  23.  
  24. INSTALLED_APPS = [
  25.     'django.contrib.admin',
  26.     'django.contrib.auth',
  27.     'django.contrib.contenttypes',
  28.     'django.contrib.sessions',
  29.     'bootstrap_themes',
  30.     'django.contrib.messages',
  31.     'django.contrib.staticfiles',
  32.     'webku',
  33. ]
  34.  
  35. MIDDLEWARE_CLASSES = [
  36.     'django.contrib.sessions.middleware.SessionMiddleware',
  37.     'django.middleware.common.CommonMiddleware',
  38.     'django.middleware.csrf.CsrfViewMiddleware',
  39.     'django.contrib.auth.middleware.AuthenticationMiddleware',
  40.     'django.contrib.messages.middleware.MessageMiddleware',
  41.     'django.middleware.clickjacking.XFrameOptionsMiddleware',
  42. ]
  43.  
  44. ROOT_URLCONF = 'tegalku.urls'
  45.  
  46. TEMPLATES = [
  47.     {
  48.         'BACKEND': 'django.template.backends.django.DjangoTemplates',
  49.         'DIRS': [os.path.join( BASE_DIR,"templates")],
  50.         'APP_DIRS': True,
  51.         'OPTIONS': {
  52.             'context_processors': [
  53.                 'django.template.context_processors.debug',
  54.                 'django.template.context_processors.request',
  55.                 'django.contrib.auth.context_processors.auth',
  56.                 'django.contrib.messages.context_processors.messages',
  57.             ],
  58.         },
  59.     },
  60. ]
  61.  
  62. WSGI_APPLICATION = 'tegalku.wsgi.application'
  63.  
  64.  
  65. # Database
  66. # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
  67.  
  68. DATABASES = {
  69.     'default': {
  70.         'ENGINE': 'django.db.backends.mysql',
  71.         'NAME': 'tegalku',
  72.         'USER': 'root',
  73.         'PASSWORD':'',
  74.         'HOST':'',
  75.         'PORT':'',
  76.         'OPTIONS': {
  77.           'autocommit': True,
  78.          },
  79.     }
  80. }
  81.  
  82.  
  83. # Password validation
  84. # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
  85.  
  86. AUTH_PASSWORD_VALIDATORS = [
  87.     {
  88.         'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  89.     },
  90.     {
  91.         'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  92.     },
  93.     {
  94.         'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  95.     },
  96.     {
  97.         'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  98.     },
  99. ]
  100.  
  101.  
  102. # Internationalization
  103. # https://docs.djangoproject.com/en/1.9/topics/i18n/
  104.  
  105. LANGUAGE_CODE = 'en-us'
  106.  
  107. TIME_ZONE = 'UTC'
  108.  
  109. USE_I18N = True
  110.  
  111. USE_L10N = True
  112.  
  113. USE_TZ = True
  114.  
  115.  
  116. # Static files (CSS, JavaScript, Images)
  117. # https://docs.djangoproject.com/en/1.9/howto/static-files/
  118.  
  119.  
  120. STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'static')
  121. STATIC_URL = '/static/'
  122. STATICFILES_DIRS = (
  123.  os.path.join(BASE_DIR, "static"),
  124. )
  125.  
  126. MEDIA_ROOT = 'D:/alim/projek/tegalku/static'
  127. MEDIA_URL = 'http://127.0.0.1:8000/static/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement