Permalink
Browse files

rename /media/ to /static/

  • Loading branch information...
jedie committed Apr 24, 2012
1 parent 8933849 commit 452cab5b09958fd07b9cd450e706063a58cc5301
View
@@ -6,8 +6,8 @@ local_settings.py
/dist
/build
*.db3
-/pylucid_project/media/PyLucid/headfile_cache
-/pylucid_project/media/PyLucid_cache
+/pylucid_project/static/PyLucid/headfile_cache
+/pylucid_project/static/PyLucid_cache
/pylucid_project/external_plugins/**
.pydevproject
/.settings
View
@@ -4,6 +4,6 @@ recursive-include requirements *
recursive-include scripts *
recursive-include pylucid_project/locale *
recursive-include pylucid_project/media *
-recursive-exclude pylucid_project/media/PyLucid/headfile_cache *
+recursive-exclude pylucid_project/static/PyLucid/headfile_cache *
prune pylucid_project/pylucid_plugins/unittest_plugin
recursive-exclude * *.py[co]
@@ -323,7 +323,7 @@ def create_local_settings(self):
)
patch_data = [
(
- 'STATIC_ROOT = "/var/www/YourSite/media/"',
+ 'STATIC_ROOT = "/var/www/YourSite/static/"',
'STATIC_ROOT = os.path.join(os.getcwd(), "media")'
),
(
@@ -3259,7 +3259,7 @@
"pk": 5,
"model": "dbtemplates.template",
"fields": {
- "content": "{% extends \"initial_site_style/base_cms_site.html\" %}\r\n{% block title %}PyLucid CMS - {{ page_title }}{% endblock %}\r\n{% block body_content %}\r\n<div id=\"wrap\">\r\n <div id=\"header\">\r\n <img id=\"pylucid_logo\" src=\"/media/put_your_logo_here.jpg\" alt=\"Change Template and put your logo here\" title=\"Change Template and put your logo here\" />\r\n </div>\r\n\r\n <div id=\"leftside\">\r\n <h2 class=\"hide\">Menu:</h2>\r\n {% lucidTag main_menu %}\r\n {% lucidTag search %}\r\n </div>\r\n\r\n <div id=\"contentwide\">\r\n <div id=\"admin\">{% lucidTag admin_menu %}</div>\r\n {% include \"pylucid/includes/page_msg.html\" %}\r\n <h2>{{ page_title }}</h2>\r\n <p><!-- ContextMiddleware breadcrumb -->\r\n <p>{% lucidTag language %}</p>\r\n </p>\r\n <div id=\"page_content\">\r\n {% block content %}{{ page_content }}{% endblock content %}\r\n {% lucidTag pylucid_comments %}\r\n </div>\r\n {% include \"initial_includes/permalink.html\" %}\r\n </div>\r\n\r\n</div>\r\n{% endblock body_content %}\r\n",
+ "content": "{% extends \"initial_site_style/base_cms_site.html\" %}\r\n{% block title %}PyLucid CMS - {{ page_title }}{% endblock %}\r\n{% block body_content %}\r\n<div id=\"wrap\">\r\n <div id=\"header\">\r\n <img id=\"pylucid_logo\" src=\"/static/put_your_logo_here.jpg\" alt=\"Change Template and put your logo here\" title=\"Change Template and put your logo here\" />\r\n </div>\r\n\r\n <div id=\"leftside\">\r\n <h2 class=\"hide\">Menu:</h2>\r\n {% lucidTag main_menu %}\r\n {% lucidTag search %}\r\n </div>\r\n\r\n <div id=\"contentwide\">\r\n <div id=\"admin\">{% lucidTag admin_menu %}</div>\r\n {% include \"pylucid/includes/page_msg.html\" %}\r\n <h2>{{ page_title }}</h2>\r\n <p><!-- ContextMiddleware breadcrumb -->\r\n <p>{% lucidTag language %}</p>\r\n </p>\r\n <div id=\"page_content\">\r\n {% block content %}{{ page_content }}{% endblock content %}\r\n {% lucidTag pylucid_comments %}\r\n </div>\r\n {% include \"initial_includes/permalink.html\" %}\r\n </div>\r\n\r\n</div>\r\n{% endblock body_content %}\r\n",
"sites": [
1
],
@@ -173,7 +173,7 @@ def handle(self, *args, **options):
patch_data = [
(
- 'STATIC_ROOT = "/var/www/YourSite/media/"',
+ 'STATIC_ROOT = "/var/www/YourSite/static/"',
'STATIC_ROOT = "%s"' % media_dest
),
(
@@ -224,8 +224,8 @@ def _pre_setup(self, *args, **kwargs):
self.design3 = Design.objects.get(name="inverted blue")
self.design4 = Design.objects.get(name="inverted yellow")
- self.test_css_url1 = "/media/PyLucid_cache/ColorScheme_1/test_styles.css"
- self.test_css_url2 = "/media/PyLucid_cache/ColorScheme_2/test_styles.css"
+ self.test_css_url1 = "/static/PyLucid_cache/ColorScheme_1/test_styles.css"
+ self.test_css_url2 = "/static/PyLucid_cache/ColorScheme_2/test_styles.css"
def setUp(self):
removed_items = EditableHtmlHeadFile.objects.clean_headfile_cache()
@@ -85,7 +85,7 @@ def test_pagecontent_replace_simulate(self):
self.assertInputFields(response, find_string, replace_string)
self.assertResponse(response,
must_contain=(
- '<link rel="stylesheet" type="text/css" href="/media/PyLucid_cache/pygments.css"',
+ '<link rel="stylesheet" type="text/css" href="/static/PyLucid_cache/pygments.css"',
'<form action="%s" method="post" id="find_and_replace' % url,
'Simulate only, no entry changed.',
'<legend class="pygments_code">Diff</legend>',
@@ -114,7 +114,7 @@ def test_pagecontent_replace(self):
self.assertInputFields(response, find_string, replace_string)
self.assertResponse(response,
must_contain=(
- '<link rel="stylesheet" type="text/css" href="/media/PyLucid_cache/pygments.css"',
+ '<link rel="stylesheet" type="text/css" href="/static/PyLucid_cache/pygments.css"',
'<form action="%s" method="post" id="find_and_replace' % url,
'<legend class="pygments_code">Diff</legend>',
'<span class="gd">- Welcome to your fesh PyLucid CMS installation ;)</span>',
@@ -152,7 +152,7 @@ def test_Headfiles_replace(self):
self.assertInputFields(response, find_string, replace_string)
self.assertResponse(response,
must_contain=(
- '<link rel="stylesheet" type="text/css" href="/media/PyLucid_cache/pygments.css"',
+ '<link rel="stylesheet" type="text/css" href="/static/PyLucid_cache/pygments.css"',
'<form action="%s" method="post" id="find_and_replace' % url,
'<legend class="pygments_code">Diff</legend>',
'<span class="gd">- page messages</span>',
@@ -534,7 +534,7 @@ def test_convert_verbose_preview(self):
)
self.assertResponse(response,
must_contain=(
- '<link rel="stylesheet" type="text/css" href="/media/PyLucid_cache/pygments.css"',
+ '<link rel="stylesheet" type="text/css" href="/static/PyLucid_cache/pygments.css"',
'The original markup is: <strong>tinytextile</strong>',
),
must_not_contain=(
@@ -309,8 +309,8 @@ def _pkg_path(obj):
# ...must have a trailing slash.
# Absolute _local_filesystem_path_ to the directory that holds media.
-# Example-1: "./media/" (default)
-# Example-2: "/home/foo/htdocs/media/"
+# Example-1: "./static/" (default)
+# Example-2: "/home/foo/htdocs/static/"
STATIC_ROOT = "./static/"#os.path.join(PYLUCID_BASE_PATH, "media") + "/"
# Set base path for include plugin:
@@ -319,15 +319,15 @@ def _pkg_path(obj):
# URL that handles the static media served from STATIC_ROOT.
# Example-1: "/static/" (default)
-# Examlpe-2: "http://other_domain.net/media/"
+# Examlpe-2: "http://other_domain.net/static/"
# Example-3: "http://media.your_domain.net/"
STATIC_URL = "/static/"
# URL prefix for admin media -- CSS, JavaScript and images.
-# Examples-1: "/django/contrib/admin/media/" (default)
-# Examples-2: "http://other_domain.net/media/django/"
+# Examples-1: "/django/contrib/admin/static/" (default)
+# Examples-2: "http://other_domain.net/static/django/"
# Examples-3: "http://django.media.your_domain.net/"
-ADMIN_MEDIA_PREFIX = "/django/contrib/admin/media/"
+ADMIN_MEDIA_PREFIX = "/django/contrib/admin/static/"
STATICFILES_DIRS = (
os.path.join(DJANGO_BASE_PATH, "contrib/admin/static/"),
@@ -60,15 +60,15 @@ RewriteRule .* - [F]
# All requests would be "redirected" to PyLucid.
# Here we can exclude some directories.
-# Default: Leave out all request to /media/
+# Default: Leave out all request to /static/
# You can add more directories if needed.
-RewriteRule ^media - [L]
+RewriteRule ^static - [L]
# Enable next rule, if you would like to use a static robots.txt file.
# more information: http://www.pylucid.org/permalink/390/robots-txt
#RewriteRule ^robots.txt$ - [L]
-# Enable access to default favicon.ico file location
+# Enable access to default favicon.ico file location
RewriteRule ^favicon.ico$ - [L]
# Forbid the directly access to some files (send 403 HTTP response)
@@ -14,18 +14,18 @@
# Absolute _local_filesystem_path_ to the directory that holds media.
-STATIC_ROOT = "/var/www/YourSite/media/"
+STATIC_ROOT = "/var/www/YourSite/static/"
# URL that handles the media served from STATIC_ROOT.
-# Example-1: "/media/" (default)
-# Examlpe-2: "http://other_domain.net/media/"
+# Example-1: "/static/" (default)
+# Examlpe-2: "http://other_domain.net/static/"
# Example-3: "http://media.your_domain.net/"
-STATIC_URL = "/media/"
+STATIC_URL = "/static/"
-# URL prefix for django admin media -- CSS, JavaScript and images. Saved in /django/contrib/admin/media/
-ADMIN_MEDIA_PREFIX = "/media/django/"
+# URL prefix for django admin media -- CSS, JavaScript and images. Saved in /django/contrib/admin/static/
+ADMIN_MEDIA_PREFIX = "/static/django/"
# Changeable if needed (But should be off in productive usage!):
@@ -35,7 +35,7 @@ RewriteEngine On
# All requests would be "redirected" to PyLucid.
# Here we can exclude some directories.
-# Default: Leave out all request to /media/
+# Default: Leave out all request to /static/
# You can add more directories if needed.
RewriteRule ^media - [L]

0 comments on commit 452cab5

Please sign in to comment.