示例#1
0
文件: conf.py 项目: skada/ella-polls
from ella.utils.settings import Settings

ACTIVITY_NOT_YET_ACTIVE = 0
ACTIVITY_ACTIVE = 1
ACTIVITY_CLOSED = 2

IP_VOTE_TRESHOLD = 10 * 60

POLL_COOKIE_NAME = 'polls_voted'
POLL_JUST_VOTED_COOKIE_NAME = 'polls_just_voted_voted'
POLL_NO_CHOICE_COOKIE_NAME = 'polls_no_choice'
POLL_MAX_COOKIE_LENGTH = 20
POLL_MAX_COOKIE_AGE = 604800

SURVEY_COOKIE_NAME = 'surveys_voted'
SURVEY_JUST_VOTED_COOKIE_NAME = 'surveys_just_voted_voted'
SURVEY_NO_CHOICE_COOKIE_NAME = 'surveys_no_choice'
SURVEY_MAX_COOKIE_LENGTH = 20
SURVEY_MAX_COOKIE_AGE = 604800

USER_NOT_YET_VOTED = 0
USER_JUST_VOTED = 1
USER_ALLREADY_VOTED = 2
USER_NO_CHOICE = 3

polls_settings = Settings('ella_polls.conf', 'POLLS')
示例#2
0
from django.utils.translation import ugettext_lazy as _
from ella.utils.settings import Settings

# settings default
FORMAT_QUALITY_DEFAULT = (
    (45, _('Low')),
    (65, _('Medium')),
    (75, _('Good')),
    (85, _('Better')),
    (95, _('High')),
)

FORMAT_QUALITY = FORMAT_QUALITY_DEFAULT
CUSTOM_SUBDIR = ''
UPLOAD_TO = CUSTOM_SUBDIR and 'photos/%s/%%Y/%%m/%%d' % CUSTOM_SUBDIR or 'photos/%Y/%m/%d'
EMPTY_IMAGE_SITE_PREFIX = ''

TYPE_EXTENSION = {'JPEG': '.jpg', 'PNG': '.png', 'GIF': '.gif'}

PHOTO_MIN_WIDTH = 150
PHOTO_MIN_HEIGHT = 150

DEFAULT_BG_COLOR = 'black'

FORMATED_PHOTO_FILENAME = None

DEBUG = False
DEBUG_PLACEHOLDER_PROVIDER_TEMPLATE = 'http://placehold.it/%(width)sx%(height)s'

photos_settings = Settings('ella.photos.conf', 'PHOTOS')
示例#3
0
    'core.publishable',
    'articles.article',
    'galleries.gallery',
    'interviews.interview',
    'polls.quiz',
    'polls.contest',
)

FAVORITE_ITEMS = (
    'core.publishable',
    'articles.article',
    'photos.photo',
    'galleries.gallery',
    'polls.survey',
    'polls.quiz',
    'polls.contest',
    'interviews.interview',
    'positions.position',
)

EDITOR_PREVIEW_CSS = None
EDITOR_PREVIEW_TEMPLATE = None

# Widgets
MEDIA_PREFIX = getattr(settings, 'STATIC_URL')

# tagging
MAX_TAGS_INLINE = 3

newman_settings = Settings('ella.newman.conf', 'NEWMAN')
示例#4
0
from django.conf import settings

from ella.utils.settings import Settings

OLD_STYLE_URL = False

IGNORE_PATHS = [
    '/feeds/rss',
    '/feeds/atom',
]
if (settings.MEDIA_URL):
    IGNORE_PATHS.append(settings.MEDIA_URL)
if (settings.STATIC_URL):
    IGNORE_PATHS.append(settings.STATIC_URL)

ella_category_subdomain_settings = Settings('ella_category_subdomain.conf',
                                            'CATEGORY_SUBDOMAIN')
示例#5
0
文件: conf.py 项目: whit/ella
from ella.utils.settings import Settings

PAGINATION_PER_PAGE = 5

interviews_settings = Settings('ella.interviews.conf', 'INTERVIEW')
示例#6
0
文件: conf.py 项目: Pheox/ella
        'ella.core.related_finders.directly_related',
        'ella.core.related_finders.related_by_category',
    ),
    'directly': ('ella.core.related_finders.directly_related', )
}

LISTING_HANDLERS = {
    'default': 'ella.core.managers.ModelListingHandler',
}

# Category settings
CATEGORY_TEMPLATES = (('category.html', gettext('default (category.html)')), )

# context_processor
MEDIA_URL = ''
STATIC_URL = MEDIA_URL
VERSION = 1
SERVER_INFO = {}

RSS_NUM_IN_FEED = 10
RSS_ENCLOSURE_PHOTO_FORMAT = None
RSS_DESCRIPTION_BOX_TYPE = 'rss_description'

# middlewares
ECACHE_INFO = 'ella.core.middleware.ECACHE_INFO'

# templates
ARCHIVE_TEMPLATE = 'listing.html'

core_settings = Settings('ella.core.conf', '')
示例#7
0
from ella.utils.settings import Settings

__author__ = 'xaralis'

AUTOCREATE = True

FOLDERS = (('/galleries/', None, None), )

filergalleries_settings = Settings('ella_filer_galleries.conf',
                                   'FILERGALLERIES')
示例#8
0
from datetime import timedelta
from ella.utils.settings import Settings

POSITION_IS_NOT_OVERLOADED = 0
DATETIME_FORMAT = '%Y-%m-%d %H:%M'
TIME_FORMAT = '%H:%M'
FEED_DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S+02:00'  #TODO settings.py

# timeline
TIMELINE_STEP = timedelta(hours=2)  # two hours by default
EMPTY_TIMELINE_CELL = None
DAY_MAX_HOUR = 23
RANGE_DAYS = 14
RANGE_WIDTH_HOURS = 2

ellaexports_settings = Settings('ella.ellaexports.conf', 'EXPORTS')
示例#9
0
文件: conf.py 项目: snapbakk/ella
from ella.utils.settings import Settings

# master API switch
ENABLED = False

# photo formats to be included when serializing Publishables
PUBLISHABLE_PHOTO_FORMATS = []

# default formats that should be serialized for each Photo
DEFAULT_PHOTO_FORMATS = []

api_settings = Settings('ella.api.conf', 'API')
示例#10
0
from ella.utils.settings import Settings

MOST_COMMENTED_LH = 'most_commented'
RECENTLY_COMMENTED_LH = 'recently_commented'
LAST_COMMENTED_LH = 'last_commented'

# list of Comments-related ListingHandlers
LISTING_HANDLERS = (MOST_COMMENTED_LH, RECENTLY_COMMENTED_LH,
                    LAST_COMMENTED_LH)

# redis client kwargs
REDIS = {}

LIST_KEY = 'comments:%s:%s:%s'
LOCKED_KEY = 'comments_locked'

PAGINATE_BY = 10

IS_MODERATOR_FUNC = lambda u: u.is_staff

comments_settings = Settings('ella_flatcomments.conf', 'COMMENTS')