forked from PathagarBooks/pathagar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
104 lines (72 loc) · 2.29 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
"""
This settings are for testing Pathagar with the Django development
server. It will use a SQLite database in the current directory and
Pathagar will be available at http://127.0.0.1:8000 loopback address.
For production, you should use a proper web server to deploy Django,
serve static files, and setup a proper database.
"""
import os
# Books settings:
BOOKS_PER_PAGE = 20 # Number of books shown per page in the OPDS
# catalogs and in the HTML pages.
BOOKS_STATICS_VIA_DJANGO = True
DEFAULT_BOOK_STATUS = 'Published'
# Allow non logued users to upload books
ALLOW_PUBLIC_ADD_BOOKS = False
# sendfile settings:
SENDFILE_BACKEND = 'sendfile.backends.development'
# Get current directory to get media and templates while developing:
CUR_DIR = u'' + os.path.dirname(__file__)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', '[email protected]'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(CUR_DIR, 'database.db'),
}
}
TIME_ZONE = 'America/Chicago'
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
USE_I18N = True
MEDIA_ROOT = os.path.join(CUR_DIR, 'static_media')
MEDIA_URL = '/static_media/'
SECRET_KEY = '7ks@b7+gi^c4adff)6ka228#rd4f62v*g_dtmo*@i62k)qn=cs'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
ROOT_URLCONF = 'pathagar.urls'
INTERNAL_IPS = ('127.0.0.1',)
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
STATIC_ROOT = os.path.join(CUR_DIR, 'staticfiles')
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(CUR_DIR, 'static'),
)
ALLOW_USER_COMMENTS = False
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.staticfiles',
'django.contrib.admin',
'tagging', # TODO old
'taggit',
'django.contrib.comments',
'pathagar.books'
)