1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-01-22 12:34:17 +00:00

Move common static files to static-common

And also use django.contrib.staticfiles to properly handle them.
This commit is contained in:
Hidden Z 2013-09-26 17:59:57 +00:00
parent 57478a6fd0
commit 59f0cb930f
6 changed files with 12 additions and 3 deletions

View File

@ -53,21 +53,29 @@ USE_L10N = True
# Absolute path to the directory that holds media. # Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/" # Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'static/') #MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'static/')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a # URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases). # trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/" # Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = '/static/' #MEDIA_URL = '/static/'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash. # trailing slash.
# Examples: "http://foo.com/media/", "/media/". # Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/' #ADMIN_MEDIA_PREFIX = '/media/'
# Make this unique, and don't share it with anybody. # Make this unique, and don't share it with anybody.
SECRET_KEY = 'u*x8(m=px4az@g+!-c&p9d5z0$g+bhw@t28wf*fz#lo$@^bc5u' SECRET_KEY = 'u*x8(m=px4az@g+!-c&p9d5z0$g+bhw@t28wf*fz#lo$@^bc5u'
# Static files will be addressed as http://example.com/static/
STATIC_URL = '/static/'
# Additional dirs to look for static files. See https://docs.djangoproject.com/en/1.5/howto/static-files/
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, "static-common"),
)
# List of callables that know how to import templates from various sources. # List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = ( TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader', 'django.template.loaders.filesystem.Loader',
@ -103,6 +111,7 @@ INSTALLED_APPS = (
'pyi2phosts.extsources', 'pyi2phosts.extsources',
# Uncomment the next line to enable the admin: # Uncomment the next line to enable the admin:
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.staticfiles'
) )

View File

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 609 B

View File

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

View File

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 420 B