Browse Source

Move common static files to static-common

And also use django.contrib.staticfiles to properly handle them.
pull/1/head
Hidden Z 11 years ago
parent
commit
59f0cb930f
  1. 15
      pyi2phosts/settings.py
  2. 0
      pyi2phosts/static-common/base.css
  3. 0
      pyi2phosts/static-common/en.png
  4. 0
      pyi2phosts/static-common/inproxy.html
  5. 0
      pyi2phosts/static-common/rss-grey-18.png
  6. 0
      pyi2phosts/static-common/ru.png

15
pyi2phosts/settings.py

@ -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'
) )

0
pyi2phosts/static/base.css → pyi2phosts/static-common/base.css

0
pyi2phosts/static/en.png → pyi2phosts/static-common/en.png

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 609 B

0
pyi2phosts/static/inproxy.html → pyi2phosts/static-common/inproxy.html

0
pyi2phosts/static/rss-grey-18.png → pyi2phosts/static-common/rss-grey-18.png

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

0
pyi2phosts/static/ru.png → pyi2phosts/static-common/ru.png

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 420 B

Loading…
Cancel
Save