[extensions-web] Remove staticfiles.



commit e8945ffff7b264c5c25a67560abaf6ffd270711f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Oct 19 14:58:45 2011 -0400

    Remove staticfiles.

 sweettooth/review/templates/review/review.html |    2 +-
 sweettooth/settings.py                         |   18 ------------------
 sweettooth/templates/base.html                 |   10 +++++-----
 sweettooth/urls.py                             |    3 ---
 4 files changed, 6 insertions(+), 27 deletions(-)
---
diff --git a/sweettooth/review/templates/review/review.html b/sweettooth/review/templates/review/review.html
index 7bec96e..f086a3e 100644
--- a/sweettooth/review/templates/review/review.html
+++ b/sweettooth/review/templates/review/review.html
@@ -94,5 +94,5 @@
 
 {% block head %}
   {{ block.super }}
-  <link rel="stylesheet" href="{{ STATIC_URL }}css/review.css" />
+  <link rel="stylesheet" href="/static/css/review.css" />
 {% endblock %}
diff --git a/sweettooth/settings.py b/sweettooth/settings.py
index b3dbbf0..290db1a 100644
--- a/sweettooth/settings.py
+++ b/sweettooth/settings.py
@@ -71,22 +71,6 @@ STATIC_URL = '/static/'
 # Examples: "http://foo.com/static/admin/";, "/static/admin/".
 ADMIN_MEDIA_PREFIX = '/static-admin/'
 
-# Additional locations of static files
-STATICFILES_DIRS = (
-    # Put strings here, like "/home/html/static" or "C:/www/django/static".
-    # Always use forward slashes, even on Windows.
-    # Don't forget to use absolute paths, not relative paths.
-    os.path.join(SITE_ROOT, "static"),
-)
-
-# List of finder classes that know how to find static files in
-# various locations.
-STATICFILES_FINDERS = (
-    'django.contrib.staticfiles.finders.FileSystemFinder',
-    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
-#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
-)
-
 # Make this unique, and don't share it with anybody.
 SECRET_KEY = 'tv(d+lom-sa^de5i#ab)(g^3249tbzssizuvh8m9_lwppdn1bw'
 
@@ -120,7 +104,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     "django.core.context_processors.i18n",
     "django.core.context_processors.media",
     "django.core.context_processors.request",
-    "django.core.context_processors.static",
     "django.contrib.messages.context_processors.messages",
     "sweettooth.review.context_processors.n_unreviewed_extensions",
     "sweettooth.auth.context_processors.login_form",
@@ -140,7 +123,6 @@ INSTALLED_APPS = (
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.messages',
-    'django.contrib.staticfiles',
     'django_extensions',
     'sorl.thumbnail',
 
diff --git a/sweettooth/templates/base.html b/sweettooth/templates/base.html
index 0f27996..29bc088 100644
--- a/sweettooth/templates/base.html
+++ b/sweettooth/templates/base.html
@@ -2,8 +2,8 @@
 <html>
   <head>
     <meta charset="utf-8" />
-    <link rel="stylesheet" href="{{ STATIC_URL }}css/sweettooth.css" />
-    <link rel="shortcut icon" href="{{ STATIC_URL }}images/favicon.png" />
+    <link rel="stylesheet" href="/static/css/sweettooth.css" />
+    <link rel="shortcut icon" href="/static/images/favicon.png" />
     {% block head %} {% endblock %}
     <title>{% block title %}GNOME Shell Extensions{% endblock %}</title>
     <script>
@@ -11,8 +11,8 @@ window._SW = function() {
 {% block document-ready %}{% endblock %}
 };
     </script>
-    <script src="{{ STATIC_URL }}js/jquery.js"></script>
-    <script data-main="{{ STATIC_URL }}js/main.js" src="{{ STATIC_URL }}js/require.js"></script>
+    <script src="/static/js/jquery.js"></script>
+    <script data-main="/static/js/main.js" src="/static/js/require.js"></script>
   </head>
   <body>
     <div id="global_domain_bar">
@@ -49,7 +49,7 @@ window._SW = function() {
     <!-- header -->
     <div id="gnome_header">
       <div class="maxwidth">
-        <h1><a href="/"><img src="{{ STATIC_URL }}images/foot.png" alt="GNOME" /> Shell Extensions</a></h1>
+        <h1><a href="/"><img src="/static/images/foot.png" alt="GNOME" /> Shell Extensions</a></h1>
         
         <ul id="globalnav" class="{% block navclass %}{% endblock %}">
           <li class="main"><a href="{% url extensions-index %}">Extensions</a></li>
diff --git a/sweettooth/urls.py b/sweettooth/urls.py
index 9048916..98682c1 100644
--- a/sweettooth/urls.py
+++ b/sweettooth/urls.py
@@ -4,7 +4,6 @@ import os.path
 from django.conf.urls.defaults import patterns, include, url
 from django.conf import settings
 
-from django.contrib.staticfiles.urls import staticfiles_urlpatterns
 from django.contrib import admin
 from django.views import static
 admin.autodiscover()
@@ -40,5 +39,3 @@ if settings.DEBUG:
 
     urlpatterns.append(url(r'^%s(?P<path>.*)' % (admin_media_prefix,),
                            static.serve, dict(document_root=admin_media_dir)))
-
-urlpatterns += staticfiles_urlpatterns()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]