Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MEDIA_ROOT = os.path.join(SITE_ROOT, 'media')
- # URL that handles the media served from MEDIA_ROOT. Make sure to use a
- # trailing slash.
- # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
- MEDIA_URL = '/media/'
- # Absolute path to the directory static files should be collected to.
- # Don't put anything in this directory yourself; store your static files
- # in apps' "static/" subdirectories and in STATICFILES_DIRS.
- # Example: "/home/media/media.lawrence.com/static/"
- STATIC_ROOT = os.path.join(SITE_ROOT, 'static')
- # URL prefix for static files.
- # Example: "http://media.lawrence.com/static/"
- STATIC_URL = '/static/'
- # URL prefix for admin static files -- CSS, JavaScript and images.
- # Make sure to use a trailing slash.
- # Examples: "http://foo.com/static/admin/", "/static/admin/".
- ADMIN_MEDIA_PREFIX = '/static/admin/'
- STATICFILES_FINDERS = (
- 'django.contrib.staticfiles.finders.FileSystemFinder',
- 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
- # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
- )
- INSTALLED_APPS = (
- # django apps
- 'django.contrib.admin',
- 'django.contrib.admindocs',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.messages',
- 'django.contrib.sessions',
- 'django.contrib.sites',
- 'django.contrib.staticfiles',
- option_list = BaseCommand.option_list + (
- make_option('--noreload', action='store_false', dest='use_reloader', default=True,
- help='Tells Django to NOT use the auto-reloader.'),
- make_option('--adminmedia', dest='admin_media_path', default='',
- help='Specifies the directory from which to serve admin media.'),
- )
- try:
- path = admin_media_path or django.__path__[0] + '/contrib/admin/media'
- if settings.DEBUG:
- urlpatterns += patterns('',
- url(r'^somepath/(?P<path>.*)$', 'django.contrib.staticfiles.views.serve'),
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement