コード例 #1
0
ファイル: urls.py プロジェクト: reverie/jotleaf.com
# Ywot Transfer XHRs
urlpatterns += patterns('marketing.views',
    url(r'^mkt/ywot_transfer_check/$', 'ywot_transfer_check'),
    url(r'^mkt/ywot_transfer_response/$', 'ywot_transfer_response'),
)

# Static files
urlpatterns += patterns('',
    (r'^favicon\.ico$', redirect('/static/images/favicon.ico')),
    (r'^robots\.txt$', redirect('/static/robots.txt')),
)

# Useful when developing with DEBUG=False:
urlpatterns += patterns('',
    (r'^static/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': root_dir('static')})
    )

USERNAME_URL_REGEX = r'[0-9a-zA-Z_.-]+'

# Wildcards come last:
urlpatterns += patterns('main.views',
    url(r'^page/(?P<page_identifier>{})/$'.format(SLUG_REGEX), 'spa_base2', name='show_ownerless_page'),
    url(r'^(?P<username>{})/$'.format(USERNAME_URL_REGEX), 'spa_base', name="show_user"),
    url(r'^(?P<username>{})/(?P<page_identifier>{})/$'.format(USERNAME_URL_REGEX, SLUG_REGEX), 'spa_base2', name='show_user_page'),
    url(r'^(?P<username>{})/(?P<page_identifier>{})/item-.*$'.format(USERNAME_URL_REGEX, SLUG_REGEX), 'spa_base2'),
)

# Custom 404 -- don't use 404.html, just use spa_base.html
handler404 = 'main.views.spa_base'
コード例 #2
0
ファイル: settings.py プロジェクト: reverie/jotleaf.com
LANGUAGE_CODE = 'en-us'

SITE_ID = 1

USE_I18N = True

USE_L10N = True

MEDIA_ROOT = ''

MEDIA_URL = ''

LOGIN_URL = '/account/login/'

STATIC_ROOT = root_dir('..', 'static')

STATICFILES_DIRS = (
    root_dir('static'),
)

AUTH_USER_MODEL = 'main.CustomUser'

AWS_ACCESS_KEY_ID = 'your-aws-key' 
AWS_SECRET_ACCESS_KEY = 'your-aws-secret' 
AWS_STORAGE_BUCKET_NAME = 'jotleaf'

STATIC_URL = 'http://s3.amazonaws.com/{}/'.format(AWS_STORAGE_BUCKET_NAME)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
コード例 #3
0
from root_dir import root_dir

DEBUG = True

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', 
        'NAME': root_dir('dev.sqlite'),
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    }
}

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
    }
}

# python -m smtpd -n -c DebuggingServer localhost:1025
EMAIL_PORT = 1025
コード例 #4
0
ファイル: settings.py プロジェクト: hghazal/django-fabfile
TIME_ZONE = "America/Los_Angeles"

LANGUAGE_CODE = "en-us"

SITE_ID = 1

USE_I18N = True

USE_L10N = True

MEDIA_ROOT = ""

MEDIA_URL = ""

STATIC_ROOT = root_dir("..", "static")

STATIC_URL = "/static/"

STATICFILES_DIRS = (root_dir("static"),)

STATICFILES_FINDERS = (
    "django.contrib.staticfiles.finders.FileSystemFinder",
    "django.contrib.staticfiles.finders.AppDirectoriesFinder",
    #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Django uses:
"""
from random import choice
print ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])
コード例 #5
0
from root_dir import root_dir

DEBUG = True

LOG_DIRECTORY = root_dir('..', 'dev_logs')

EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
EMAIL_PORT = 1025

YWOT_HOST = 'localhost:8001'

PUSHER_APP_ID = '...'
PUSHER_KEY = '...'
PUSHER_SECRET = '...'
MIXPANEL_ID = "..."

STATIC_URL = '/static/'

SENTRY_DSN = None

コード例 #6
0
TIME_ZONE = 'America/Los_Angeles'

LANGUAGE_CODE = 'en-us'

SITE_ID = 1

USE_I18N = True

USE_L10N = True

MEDIA_ROOT = ''

MEDIA_URL = ''

# Put collected static files in project directory root
STATIC_ROOT = root_dir('..', 'static')

STATIC_URL = '/static/'

# Collect static files from within app code directory
STATICFILES_DIRS = (
    root_dir('static'),
)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Django uses: 
コード例 #7
0
from root_dir import root_dir

DEBUG = True

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': root_dir('dev.sqlite'),
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    }
}

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
    }
}

# python -m smtpd -n -c DebuggingServer localhost:1025
EMAIL_PORT = 1025
コード例 #8
0
ファイル: settings.py プロジェクト: reverie/seddit.com
DATABASE_NAME = 'redditchat'
DATABASE_USER = '******'
DATABASE_PASSWORD = '******'
DATABASE_PORT = ''

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
    root_dir('templates'),
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.transaction.TransactionMiddleware',
    'core.middleware.SignedAuthMiddleware'
)

TEMPLATE_CONTEXT_PROCESSORS = (
    "django.core.context_processors.auth",
    #"django.core.context_processors.debug",
    "django.core.context_processors.i18n",
コード例 #9
0
UZE_TZ = True

LANGUAGE_CODE = 'en-us'

SITE_ID = 1

USE_I18N = True

USE_L10N = True

MEDIA_ROOT = ''

MEDIA_URL = ''

# Put collected static files in project directory root
STATIC_ROOT = root_dir('..', 'static')

STATIC_URL = '/static/'

# Collect static files from within app code directory
STATICFILES_DIRS = (root_dir('static'), )

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Django uses:
"""
from random import choice
コード例 #10
0
from root_dir import root_dir

DEBUG = True

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', 
        'NAME': root_dir('dev.sqlite'),
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': '',
    }
}

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
    }
}

LOG_DIRECTORY = root_dir('..', 'dev_logs')

EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'

YWOT_HOST = 'localhost:8001'

PUSHER_APP_ID = '27671'
PUSHER_KEY = '...'
PUSHER_SECRET = '...'
MIXPANEL_ID = "..."