##// END OF EJS Templates
developer version fixes....
Ilyas -
r49:8537e179 default
parent child Browse files
Show More
@@ -1,179 +1,179 b''
1 # Django settings for neboard project.
1 # Django settings for neboard project.
2 import os
2 import os
3
3
4 DEBUG = True
4 DEBUG = True
5 TEMPLATE_DEBUG = DEBUG
5 TEMPLATE_DEBUG = DEBUG
6
6
7 ADMINS = (
7 ADMINS = (
8 # ('Your Name', 'your_email@example.com'),
8 # ('Your Name', 'your_email@example.com'),
9 ('admin', 'admin@example.com')
9 ('admin', 'admin@example.com')
10 )
10 )
11
11
12 MANAGERS = ADMINS
12 MANAGERS = ADMINS
13
13
14 DATABASES = {
14 DATABASES = {
15 'default': {
15 'default': {
16 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
16 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
17 'NAME': 'database.db', # Or path to database file if using sqlite3.
17 'NAME': 'database.db', # Or path to database file if using sqlite3.
18 'USER': '', # Not used with sqlite3.
18 'USER': '', # Not used with sqlite3.
19 'PASSWORD': '', # Not used with sqlite3.
19 'PASSWORD': '', # Not used with sqlite3.
20 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
20 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
21 'PORT': '', # Set to empty string for default. Not used with sqlite3.
21 'PORT': '', # Set to empty string for default. Not used with sqlite3.
22 }
22 }
23 }
23 }
24
24
25 # Local time zone for this installation. Choices can be found here:
25 # Local time zone for this installation. Choices can be found here:
26 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
26 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
27 # although not all choices may be available on all operating systems.
27 # although not all choices may be available on all operating systems.
28 # In a Windows environment this must be set to your system time zone.
28 # In a Windows environment this must be set to your system time zone.
29 TIME_ZONE = 'Europe/Kiev'
29 TIME_ZONE = 'Europe/Kiev'
30
30
31 # Language code for this installation. All choices can be found here:
31 # Language code for this installation. All choices can be found here:
32 # http://www.i18nguy.com/unicode/language-identifiers.html
32 # http://www.i18nguy.com/unicode/language-identifiers.html
33 LANGUAGE_CODE = 'ru'
33 LANGUAGE_CODE = 'ru'
34
34
35 SITE_ID = 1
35 SITE_ID = 1
36
36
37 # If you set this to False, Django will make some optimizations so as not
37 # If you set this to False, Django will make some optimizations so as not
38 # to load the internationalization machinery.
38 # to load the internationalization machinery.
39 USE_I18N = True
39 USE_I18N = True
40
40
41 # If you set this to False, Django will not format dates, numbers and
41 # If you set this to False, Django will not format dates, numbers and
42 # calendars according to the current locale.
42 # calendars according to the current locale.
43 USE_L10N = True
43 USE_L10N = True
44
44
45 # If you set this to False, Django will not use timezone-aware datetimes.
45 # If you set this to False, Django will not use timezone-aware datetimes.
46 USE_TZ = True
46 USE_TZ = True
47
47
48 # Absolute filesystem path to the directory that will hold user-uploaded files.
48 # Absolute filesystem path to the directory that will hold user-uploaded files.
49 # Example: "/home/media/media.lawrence.com/media/"
49 # Example: "/home/media/media.lawrence.com/media/"
50 MEDIA_ROOT = ''
50 MEDIA_ROOT = './media/'
51
51
52 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
52 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
53 # trailing slash.
53 # trailing slash.
54 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
54 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
55 MEDIA_URL = ''
55 MEDIA_URL = '/media/'
56
56
57 # Absolute path to the directory static files should be collected to.
57 # Absolute path to the directory static files should be collected to.
58 # Don't put anything in this directory yourself; store your static files
58 # Don't put anything in this directory yourself; store your static files
59 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
59 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
60 # Example: "/home/media/media.lawrence.com/static/"
60 # Example: "/home/media/media.lawrence.com/static/"
61 STATIC_ROOT = ''
61 STATIC_ROOT = ''
62
62
63 # URL prefix for static files.
63 # URL prefix for static files.
64 # Example: "http://media.lawrence.com/static/"
64 # Example: "http://media.lawrence.com/static/"
65 STATIC_URL = '/static/'
65 STATIC_URL = '/static/'
66
66
67 # Additional locations of static files
67 # Additional locations of static files
68 # It is really a hack, put real paths, not related
68 # It is really a hack, put real paths, not related
69 STATICFILES_DIRS = (
69 STATICFILES_DIRS = (
70 os.path.dirname(__file__) + '/boards/static',
70 os.path.dirname(__file__) + '/boards/static',
71
71
72 # '/d/work/python/django/neboard/neboard/boards/static',
72 # '/d/work/python/django/neboard/neboard/boards/static',
73 # Put strings here, like "/home/html/static" or "C:/www/django/static".
73 # Put strings here, like "/home/html/static" or "C:/www/django/static".
74 # Always use forward slashes, even on Windows.
74 # Always use forward slashes, even on Windows.
75 # Don't forget to use absolute paths, not relative paths.
75 # Don't forget to use absolute paths, not relative paths.
76 )
76 )
77
77
78 # List of finder classes that know how to find static files in
78 # List of finder classes that know how to find static files in
79 # various locations.
79 # various locations.
80 STATICFILES_FINDERS = (
80 STATICFILES_FINDERS = (
81 'django.contrib.staticfiles.finders.FileSystemFinder',
81 'django.contrib.staticfiles.finders.FileSystemFinder',
82 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
82 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
83 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
83 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
84 )
84 )
85
85
86 # Make this unique, and don't share it with anybody.
86 # Make this unique, and don't share it with anybody.
87 SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o'
87 SECRET_KEY = '@1rc$o(7=tt#kd+4s$u6wchm**z^)4x90)7f6z(i&55@o11*8o'
88
88
89 # List of callables that know how to import templates from various sources.
89 # List of callables that know how to import templates from various sources.
90 TEMPLATE_LOADERS = (
90 TEMPLATE_LOADERS = (
91 'django.template.loaders.filesystem.Loader',
91 'django.template.loaders.filesystem.Loader',
92 'django.template.loaders.app_directories.Loader',
92 'django.template.loaders.app_directories.Loader',
93 # 'django.template.loaders.eggs.Loader',
93 # 'django.template.loaders.eggs.Loader',
94 )
94 )
95
95
96 TEMPLATE_CONTEXT_PROCESSORS = (
96 TEMPLATE_CONTEXT_PROCESSORS = (
97 'django.core.context_processors.media',
97 'django.core.context_processors.media',
98 'django.core.context_processors.static',
98 'django.core.context_processors.static',
99 'django.core.context_processors.request',
99 'django.core.context_processors.request',
100 'django.contrib.auth.context_processors.auth',
100 'django.contrib.auth.context_processors.auth',
101 )
101 )
102
102
103 MIDDLEWARE_CLASSES = (
103 MIDDLEWARE_CLASSES = (
104 'django.middleware.common.CommonMiddleware',
104 'django.middleware.common.CommonMiddleware',
105 'django.contrib.sessions.middleware.SessionMiddleware',
105 'django.contrib.sessions.middleware.SessionMiddleware',
106 # 'django.middleware.csrf.CsrfViewMiddleware',
106 # 'django.middleware.csrf.CsrfViewMiddleware',
107 'django.contrib.auth.middleware.AuthenticationMiddleware',
107 'django.contrib.auth.middleware.AuthenticationMiddleware',
108 'django.contrib.messages.middleware.MessageMiddleware',
108 'django.contrib.messages.middleware.MessageMiddleware',
109 # Uncomment the next line for simple clickjacking protection:
109 # Uncomment the next line for simple clickjacking protection:
110 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
110 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
111 )
111 )
112
112
113 ROOT_URLCONF = 'neboard.urls'
113 ROOT_URLCONF = 'neboard.urls'
114
114
115 # Python dotted path to the WSGI application used by Django's runserver.
115 # Python dotted path to the WSGI application used by Django's runserver.
116 WSGI_APPLICATION = 'neboard.wsgi.application'
116 WSGI_APPLICATION = 'neboard.wsgi.application'
117
117
118 TEMPLATE_DIRS = (
118 TEMPLATE_DIRS = (
119 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
119 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
120 # Always use forward slashes, even on Windows.
120 # Always use forward slashes, even on Windows.
121 # Don't forget to use absolute paths, not relative paths.
121 # Don't forget to use absolute paths, not relative paths.
122 'templates',
122 'templates',
123 )
123 )
124
124
125 INSTALLED_APPS = (
125 INSTALLED_APPS = (
126 'django.contrib.auth',
126 'django.contrib.auth',
127 'django.contrib.contenttypes',
127 'django.contrib.contenttypes',
128 'django.contrib.sessions',
128 'django.contrib.sessions',
129 'django.contrib.sites',
129 'django.contrib.sites',
130 'django.contrib.messages',
130 'django.contrib.messages',
131 'django.contrib.staticfiles',
131 'django.contrib.staticfiles',
132 # Uncomment the next line to enable the admin:
132 # Uncomment the next line to enable the admin:
133 'django.contrib.admin',
133 'django.contrib.admin',
134 # Uncomment the next line to enable admin documentation:
134 # Uncomment the next line to enable admin documentation:
135 # 'django.contrib.admindocs',
135 # 'django.contrib.admindocs',
136 'django.contrib.markup',
136 'django.contrib.markup',
137 'django_cleanup',
137 'django_cleanup',
138 'boards',
138 'boards',
139 )
139 )
140
140
141 # A sample logging configuration. The only tangible logging
141 # A sample logging configuration. The only tangible logging
142 # performed by this configuration is to send an email to
142 # performed by this configuration is to send an email to
143 # the site admins on every HTTP 500 error when DEBUG=False.
143 # the site admins on every HTTP 500 error when DEBUG=False.
144 # See http://docs.djangoproject.com/en/dev/topics/logging for
144 # See http://docs.djangoproject.com/en/dev/topics/logging for
145 # more details on how to customize your logging configuration.
145 # more details on how to customize your logging configuration.
146 LOGGING = {
146 LOGGING = {
147 'version': 1,
147 'version': 1,
148 'disable_existing_loggers': False,
148 'disable_existing_loggers': False,
149 'filters': {
149 'filters': {
150 'require_debug_false': {
150 'require_debug_false': {
151 '()': 'django.utils.log.RequireDebugFalse'
151 '()': 'django.utils.log.RequireDebugFalse'
152 }
152 }
153 },
153 },
154 'handlers': {
154 'handlers': {
155 'mail_admins': {
155 'mail_admins': {
156 'level': 'ERROR',
156 'level': 'ERROR',
157 'filters': ['require_debug_false'],
157 'filters': ['require_debug_false'],
158 'class': 'django.utils.log.AdminEmailHandler'
158 'class': 'django.utils.log.AdminEmailHandler'
159 }
159 }
160 },
160 },
161 'loggers': {
161 'loggers': {
162 'django.request': {
162 'django.request': {
163 'handlers': ['mail_admins'],
163 'handlers': ['mail_admins'],
164 'level': 'ERROR',
164 'level': 'ERROR',
165 'propagate': True,
165 'propagate': True,
166 },
166 },
167 }
167 }
168 }
168 }
169
169
170 # Custom imageboard settings
170 # Custom imageboard settings
171 MAX_POSTS_PER_THREAD = 10 # Thread bumplimit
171 MAX_POSTS_PER_THREAD = 10 # Thread bumplimit
172 MAX_THREAD_COUNT = 500 # Old threads will be deleted to preserve this count
172 MAX_THREAD_COUNT = 500 # Old threads will be deleted to preserve this count
173 THREADS_PER_PAGE = 10
173 THREADS_PER_PAGE = 10
174 SITE_NAME = 'Neboard'
174 SITE_NAME = 'Neboard'
175
175
176 THEMES = [
176 THEMES = [
177 ('md', 'Mystic Dark'),
177 ('md', 'Mystic Dark'),
178 ('sw', 'Snow White') ]
178 ('sw', 'Snow White') ]
179 DEFAULT_THEME = 'md' No newline at end of file
179 DEFAULT_THEME = 'md'
@@ -1,21 +1,23 b''
1 from django.conf.urls import patterns, include, url
1 from django.conf.urls import patterns, include, url
2
2
3 # Uncomment the next two lines to enable the admin:
3 # Uncomment the next two lines to enable the admin:
4 from django.conf.urls.static import static
4 from django.conf.urls.static import static
5 from django.contrib import admin
5 from django.contrib import admin
6 from neboard import settings
6 from neboard import settings
7
7
8 admin.autodiscover()
8 admin.autodiscover()
9
9
10 urlpatterns = patterns('',
10 urlpatterns = patterns('',
11 # Examples:
11 # Examples:
12 # url(r'^$', 'neboard.views.home', name='home'),
12 # url(r'^$', 'neboard.views.home', name='home'),
13 # url(r'^neboard/', include('neboard.foo.urls')),
13 # url(r'^neboard/', include('neboard.foo.urls')),
14
14
15 # Uncomment the admin/doc line below to enable admin documentation:
15 # Uncomment the admin/doc line below to enable admin documentation:
16 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
16 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
17
17
18 # Uncomment the next line to enable the admin:
18 # Uncomment the next line to enable the admin:
19 url(r'^admin/', include(admin.site.urls)),
19 url(r'^admin/', include(admin.site.urls)),
20 url(r'^', include('boards.urls')),
20 url(r'^', include('boards.urls')),
21 )
21 ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
22
23
General Comments 0
You need to be logged in to leave comments. Login now