django-adminfiles / adminfiles / settings.py

import posixpath

import django
from django.conf import settings
from django.utils.translation import ugettext_lazy as _

if django.VERSION >= (1,2):
    default_jquery = None
else:
    default_jquery = 'http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'

JQUERY_URL = getattr(settings, 'JQUERY_URL', default_jquery)

if JQUERY_URL and not ((':' in JQUERY_URL) or (JQUERY_URL.startswith('/'))):
    JQUERY_URL = posixpath.join(settings.MEDIA_URL, JQUERY_URL)

ADMINFILES_MEDIA_URL = getattr(settings, 'ADMINFILES_MEDIA_URL',
                               settings.MEDIA_URL)

ADMINFILES_UPLOAD_TO = getattr(settings, 'ADMINFILES_UPLOAD_TO', 'adminfiles')

ADMINFILES_THUMB_ORDER = getattr(settings, 'ADMINFILES_THUMB_ORDER',
                                 ('-upload_date',))

ADMINFILES_USE_SIGNALS = getattr(settings, 'ADMINFILES_USE_SIGNALS', False)
                                 
ADMINFILES_REF_START = getattr(settings, 'ADMINFILES_REF_START', '<<<')

ADMINFILES_REF_END = getattr(settings, 'ADMINFILES_REF_END', '>>>')

ADMINFILES_STRING_IF_NOT_FOUND = getattr(settings,
                                         'ADMINFILES_STRING_IF_NOT_FOUND',
                                         u'')

ADMINFILES_INSERT_LINKS = getattr(
    settings,
    'ADMINFILES_INSERT_LINKS',
    {'': [(_('Insert Link'), {})],
     'image': [(_('Insert'), {}),
               (_('Insert (align left)'), {'class': 'left'}),
               (_('Insert (align right)'), {'class': 'right'})]
     },
    )
    
ADMINFILES_STDICON_SET = getattr(settings, 'ADMINFILES_STDICON_SET', None)
    
ADMINFILES_BROWSER_VIEWS = getattr(settings, 'ADMINFILES_BROWSER_VIEWS',
                                   ['adminfiles.views.AllView',
                                    'adminfiles.views.ImagesView',
                                    'adminfiles.views.AudioView',
                                    'adminfiles.views.FilesView',
                                    'adminfiles.views.FlickrView',
                                    'adminfiles.views.YouTubeView',
                                    'adminfiles.views.VimeoView'])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.