forked from nitely/Spirit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
136 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,6 @@ sudo: false | |
|
||
python: | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
- "3.5" | ||
|
||
install: | ||
- pip install --upgrade pip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
Django>=1.8,<1.9 | ||
django-haystack==2.4.1 | ||
django-trusts>=0.10.3 | ||
whoosh==2.7.0 | ||
mistune==0.7.1 | ||
Pillow==3.1.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('trusts', '0001_initial'), | ||
('spirit_category', '0003_category_is_global'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='category', | ||
options={'ordering': ['title', 'pk'], 'default_permissions': ('add', 'change', 'delete', 'read', 'add_topic_to'), 'verbose_name': 'category', 'verbose_name_plural': 'categories'}, | ||
), | ||
migrations.AddField( | ||
model_name='category', | ||
name='trust', | ||
field=models.ForeignKey(related_name='spirit_category_category_content', default=1, to='trusts.Trust'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
from __future__ import unicode_literals | ||
import os | ||
|
||
|
||
ST_TOPIC_PRIVATE_CATEGORY_PK = 1 | ||
ST_UNCATEGORIZED_CATEGORY_PK = 2 | ||
|
||
ST_RATELIMIT_ENABLE = True | ||
ST_RATELIMIT_CACHE_PREFIX = 'srl' | ||
ST_RATELIMIT_CACHE = 'default' | ||
|
||
ST_NOTIFICATIONS_PER_PAGE = 20 | ||
|
||
ST_COMMENT_MAX_LEN = 3000 | ||
|
||
ST_MENTIONS_PER_COMMENT = 30 | ||
|
||
ST_YT_PAGINATOR_PAGE_RANGE = 3 | ||
|
||
ST_SEARCH_QUERY_MIN_LEN = 3 | ||
|
||
ST_USER_LAST_SEEN_THRESHOLD_MINUTES = 1 | ||
|
||
ST_PRIVATE_FORUM = False | ||
|
||
ST_ALLOWED_UPLOAD_IMAGE_FORMAT = ('jpeg', 'png', 'gif') | ||
|
||
ST_ALLOWED_URL_PROTOCOLS = { | ||
'http', 'https', 'mailto', 'ftp', 'ftps', | ||
'git', 'svn', 'magnet', 'irc', 'ircs'} | ||
|
||
ST_UNICODE_SLUGS = True | ||
|
||
ST_UNIQUE_EMAILS = True | ||
ST_CASE_INSENSITIVE_EMAILS = True | ||
|
||
|
||
INSTALLED_APPS = [ | ||
'spirit.core', | ||
'spirit.admin', | ||
'spirit.search', | ||
|
||
'spirit.user', | ||
'spirit.user.admin', | ||
'spirit.user.auth', | ||
|
||
'spirit.category', | ||
'spirit.category.admin', | ||
|
||
'spirit.topic', | ||
'spirit.topic.admin', | ||
'spirit.topic.favorite', | ||
'spirit.topic.moderate', | ||
'spirit.topic.notification', | ||
'spirit.topic.poll', # todo: remove in Spirit v0.5 | ||
'spirit.topic.private', | ||
'spirit.topic.unread', | ||
|
||
'spirit.comment', | ||
'spirit.comment.bookmark', | ||
'spirit.comment.flag', | ||
'spirit.comment.flag.admin', | ||
'spirit.comment.history', | ||
'spirit.comment.like', | ||
'spirit.comment.poll', | ||
|
||
# 'spirit.core.tests' | ||
] | ||
|
||
MIDDLEWARE_CLASSES = [ | ||
# 'spirit.core.middleware.XForwardedForMiddleware', | ||
'spirit.user.middleware.TimezoneMiddleware', | ||
'spirit.user.middleware.LastIPMiddleware', | ||
'spirit.user.middleware.LastSeenMiddleware', | ||
'spirit.user.middleware.ActiveUserMiddleware', | ||
'spirit.core.middleware.PrivateForumMiddleware', | ||
] | ||
|
||
# | ||
# Third-party apps settings defined below... | ||
# | ||
|
||
# django-djconfig | ||
INSTALLED_APPS += [ | ||
'djconfig', | ||
] | ||
|
||
MIDDLEWARE_CLASSES += [ | ||
'djconfig.middleware.DjConfigMiddleware', | ||
] | ||
|
||
|
||
INSTALLED_APPS += [ | ||
'haystack', | ||
] | ||
|
||
HAYSTACK_CONNECTIONS = { | ||
'default': { | ||
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', | ||
'PATH': os.path.join(os.path.dirname(os.path.dirname(__file__)), 'search/whoosh_index'), | ||
}, | ||
} |