summaryrefslogtreecommitdiff
path: root/commonnet
diff options
context:
space:
mode:
Diffstat (limited to 'commonnet')
-rw-r--r--commonnet/local_settings.py.sample12
-rw-r--r--commonnet/scrapy_setting.py3
-rw-r--r--commonnet/settings.py13
3 files changed, 26 insertions, 2 deletions
diff --git a/commonnet/local_settings.py.sample b/commonnet/local_settings.py.sample
index 0cba3f5..8c59516 100644
--- a/commonnet/local_settings.py.sample
+++ b/commonnet/local_settings.py.sample
@@ -4,3 +4,15 @@ RESPONSIBLE_EMAIL = None
DEV = True
EXTRA_APPS = []
+
+# you probably have at least to set a password for db connection
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.contrib.gis.db.backends.postgis',
+ 'NAME': 'commonnet',
+ 'USER': 'commonnet',
+ 'PASSWORD': '',
+ 'HOST': '127.0.0.1',
+ 'PORT': '5432',
+ }
+}
diff --git a/commonnet/scrapy_setting.py b/commonnet/scrapy_setting.py
index 2d2b7b7..0d0f15b 100644
--- a/commonnet/scrapy_setting.py
+++ b/commonnet/scrapy_setting.py
@@ -85,5 +85,8 @@ SCRAPPY_SETTINGS = {
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
"COOKIES_ENABLED": False,
+ "ITEM_PIPELINES": {
+ 'commcrawler.scrapy.DbPipeline': 300,
+ }
}
diff --git a/commonnet/settings.py b/commonnet/settings.py
index c72756c..40e3335 100644
--- a/commonnet/settings.py
+++ b/commonnet/settings.py
@@ -26,10 +26,13 @@ INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
+ 'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
]
+SITE_ID = 1
+
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
@@ -64,14 +67,20 @@ WSGI_APPLICATION = 'commonnet.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
+
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
+ 'ENGINE': 'django.db.backends.postgresql',
+ 'NAME': 'commonnet',
+ 'USER': 'commonnet',
+ 'PASSWORD': '',
+ 'HOST': '127.0.0.1',
+ 'PORT': '5432',
}
}
+
# Password validation
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators