Change static->media and stop using collectstatic
authorMagnus Hagander <[email protected]>
Wed, 12 Apr 2023 11:42:58 +0000 (13:42 +0200)
committerMagnus Hagander <[email protected]>
Wed, 12 Apr 2023 11:44:51 +0000 (13:44 +0200)
This changes both the storage location of the files and the URL. This
aligns it up with how (almost) all our other django apps work, so good
for consistency.

35 files changed:
media/commitfest/css/bootstrap-theme.min.css [moved from pgcommitfest/commitfest/static/commitfest/css/bootstrap-theme.min.css with 100% similarity]
media/commitfest/css/bootstrap.css [moved from pgcommitfest/commitfest/static/commitfest/css/bootstrap.css with 100% similarity]
media/commitfest/css/commitfest.css [moved from pgcommitfest/commitfest/static/commitfest/css/commitfest.css with 88% similarity]
media/commitfest/css/images/animated-overlay.gif [moved from pgcommitfest/commitfest/static/commitfest/css/images/animated-overlay.gif with 100% similarity]
media/commitfest/css/images/ui-bg_flat_0_aaaaaa_40x100.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-bg_flat_0_aaaaaa_40x100.png with 100% similarity]
media/commitfest/css/images/ui-bg_flat_75_ffffff_40x100.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-bg_flat_75_ffffff_40x100.png with 100% similarity]
media/commitfest/css/images/ui-bg_glass_55_fbf9ee_1x400.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-bg_glass_55_fbf9ee_1x400.png with 100% similarity]
media/commitfest/css/images/ui-bg_glass_65_ffffff_1x400.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-bg_glass_65_ffffff_1x400.png with 100% similarity]
media/commitfest/css/images/ui-bg_glass_75_dadada_1x400.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-bg_glass_75_dadada_1x400.png with 100% similarity]
media/commitfest/css/images/ui-bg_glass_75_e6e6e6_1x400.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-bg_glass_75_e6e6e6_1x400.png with 100% similarity]
media/commitfest/css/images/ui-bg_glass_95_fef1ec_1x400.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-bg_glass_95_fef1ec_1x400.png with 100% similarity]
media/commitfest/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png with 100% similarity]
media/commitfest/css/images/ui-icons_222222_256x240.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-icons_222222_256x240.png with 100% similarity]
media/commitfest/css/images/ui-icons_2e83ff_256x240.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-icons_2e83ff_256x240.png with 100% similarity]
media/commitfest/css/images/ui-icons_454545_256x240.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-icons_454545_256x240.png with 100% similarity]
media/commitfest/css/images/ui-icons_888888_256x240.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-icons_888888_256x240.png with 100% similarity]
media/commitfest/css/images/ui-icons_cd0a0a_256x240.png [moved from pgcommitfest/commitfest/static/commitfest/css/images/ui-icons_cd0a0a_256x240.png with 100% similarity]
media/commitfest/css/jquery-ui.css [moved from pgcommitfest/commitfest/static/commitfest/css/jquery-ui.css with 100% similarity]
media/commitfest/css/selectize.css [moved from pgcommitfest/commitfest/static/commitfest/css/selectize.css with 100% similarity]
media/commitfest/css/selectize.default.css [moved from pgcommitfest/commitfest/static/commitfest/css/selectize.default.css with 100% similarity]
media/commitfest/favicon.ico [moved from pgcommitfest/commitfest/static/commitfest/favicon.ico with 100% similarity]
media/commitfest/fonts/glyphicons-halflings-regular.eot [moved from pgcommitfest/commitfest/static/commitfest/fonts/glyphicons-halflings-regular.eot with 100% similarity]
media/commitfest/fonts/glyphicons-halflings-regular.svg [moved from pgcommitfest/commitfest/static/commitfest/fonts/glyphicons-halflings-regular.svg with 100% similarity]
media/commitfest/fonts/glyphicons-halflings-regular.ttf [moved from pgcommitfest/commitfest/static/commitfest/fonts/glyphicons-halflings-regular.ttf with 100% similarity]
media/commitfest/fonts/glyphicons-halflings-regular.woff [moved from pgcommitfest/commitfest/static/commitfest/fonts/glyphicons-halflings-regular.woff with 100% similarity]
media/commitfest/js/bootstrap.js [moved from pgcommitfest/commitfest/static/commitfest/js/bootstrap.js with 100% similarity]
media/commitfest/js/commitfest.js [moved from pgcommitfest/commitfest/static/commitfest/js/commitfest.js with 100% similarity]
media/commitfest/js/jquery-ui.js [moved from pgcommitfest/commitfest/static/commitfest/js/jquery-ui.js with 100% similarity]
media/commitfest/js/jquery.js [moved from pgcommitfest/commitfest/static/commitfest/js/jquery.js with 100% similarity]
media/commitfest/js/selectize.min.js [moved from pgcommitfest/commitfest/static/commitfest/js/selectize.min.js with 100% similarity]
media/commitfest/spinner.gif [moved from pgcommitfest/commitfest/static/commitfest/spinner.gif with 100% similarity]
pgcommitfest/commitfest/templates/base.html
pgcommitfest/commitfest/templates/base_form.html
pgcommitfest/settings.py
update.sh [deleted file]

similarity index 88%
rename from pgcommitfest/commitfest/static/commitfest/css/commitfest.css
rename to media/commitfest/css/commitfest.css
index 0ed83555212bc3fdd597824e93aa2bedbeede044..07bfa102c962556f864e35aba7df1b9d3cf94e97 100644 (file)
@@ -44,7 +44,7 @@ div.form-group div.controls input.threadpick-input {
  */
 #attachThreadListWrap.loading {
     display: block;
-    background: url('/static/commitfest/spinner.gif') no-repeat center;
+    background: url('/media/commitfest/spinner.gif') no-repeat center;
     width: 124px;
     height: 124px;
     margin: 0 auto;
@@ -57,7 +57,7 @@ div.form-group div.controls input.threadpick-input {
  * Annotate message dialog */
 #annotateMessageBody.loading {
     display: block;
-    background: url('/static/commitfest/spinner.gif') no-repeat center;
+    background: url('/media/commitfest/spinner.gif') no-repeat center;
     width: 124px;
     height: 124px;
     margin: 0 auto;
index dc2f643eae986942ed40273f8516cb3e4f884597..4a6ba990e1bfa2185c0a969b35ce253144888fd1 100644 (file)
@@ -3,11 +3,11 @@
 <html>
 <head>
   <title>{{title}}</title>
-  <link rel="stylesheet" href="/static/commitfest/css/jquery-ui.css" type="text/css">
-  <link rel="stylesheet" href="/static/commitfest/css/bootstrap.css" />
-  <link rel="stylesheet" href="/static/commitfest/css/bootstrap-theme.min.css" />
-  <link rel="stylesheet" href="/static/commitfest/css/commitfest.css" />
-  <link rel="shortcut icon" href="/static/commitfest/favicon.ico" />
+  <link rel="stylesheet" href="/media/commitfest/css/jquery-ui.css" type="text/css">
+  <link rel="stylesheet" href="/media/commitfest/css/bootstrap.css" />
+  <link rel="stylesheet" href="/media/commitfest/css/bootstrap-theme.min.css" />
+  <link rel="stylesheet" href="/media/commitfest/css/commitfest.css" />
+  <link rel="shortcut icon" href="/media/commitfest/favicon.ico" />
 {%block extrahead%}{%endblock%}
 {%if rss_alternate%}  <link rel="alternate" type="application/rss+xml" title="{{rss_alternate_title}}" href="{{rss_alternate}}" />{%endif%}
 </head>
@@ -40,9 +40,9 @@
 {%block contents%}
 {%endblock%}
 </div>
-<script src="/static/commitfest/js/jquery.js"></script>
-<script src="/static/commitfest/js/jquery-ui.js"></script>
-<script src="/static/commitfest/js/bootstrap.js"></script>
-<script src="/static/commitfest/js/commitfest.js"></script>
+<script src="/media/commitfest/js/jquery.js"></script>
+<script src="/media/commitfest/js/jquery-ui.js"></script>
+<script src="/media/commitfest/js/bootstrap.js"></script>
+<script src="/media/commitfest/js/commitfest.js"></script>
 {%block morescript%}{%endblock%}
 </html>
index 7f2b2adfbfeecaaa3adfd807168abf71f598d957..91f2e91e6bb22af2359df9b143420ddf783464a5 100644 (file)
 {%endblock%}
 
 {%block extrahead%}
-<link rel="stylesheet" href="/static/commitfest/css/selectize.css" />
-<link rel="stylesheet" href="/static/commitfest/css/selectize.default.css" />
+<link rel="stylesheet" href="/media/commitfest/css/selectize.css" />
+<link rel="stylesheet" href="/media/commitfest/css/selectize.default.css" />
 {%endblock%}
 {%block morescript%}
-<script src="/static/commitfest/js/selectize.min.js"></script>
+<script src="/media/commitfest/js/selectize.min.js"></script>
 <script>
 /* Set up selectize fields */
 {% for f, url in selectize_multiple_fields %}
index d83d994b3271f59dc058453d8a36b7cde611021c..ffac58cce05c61c15f2a5e86de8808a5eae89b94 100644 (file)
@@ -64,12 +64,12 @@ STATIC_ROOT = ''
 
 # URL prefix for static files.
 # Example: "http://media.lawrence.com/static/"
-STATIC_URL = '/static/'
+STATIC_URL = '/media/'
 
 # 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/'
+ADMIN_MEDIA_PREFIX = '/media/admin/'
 
 # Additional locations of static files
 STATICFILES_DIRS = (
@@ -81,8 +81,6 @@ STATICFILES_DIRS = (
 # 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',
 )
 
 # Make this unique, and don't share it with anybody.
@@ -119,7 +117,6 @@ INSTALLED_APPS = (
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
-    'django.contrib.staticfiles',
     # Uncomment the next line to enable the admin:
     'django.contrib.admin',
     # Uncomment the next line to enable admin documentation:
diff --git a/update.sh b/update.sh
deleted file mode 100755 (executable)
index 0eb138a..0000000
--- a/update.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-set -e
-
-# Trivial update script for pgcf
-if [ "$(id -u)" == "0" ]; then
-    echo Do not run as root!
-    exit 1
-fi
-
-cd $(dirname $0)
-
-git pull --rebase
-
-./python manage.py collectstatic --noinput
-
-./python manage.py migrate
-
-echo Done!