Permalink
Browse files

Updated django to 1.4 release

Fix bug 742812
  • Loading branch information...
1 parent bd7d6d8 commit edbf6a3e9e6711b77b8a510a618e235c1f3547a6 @tallowen committed Apr 5, 2012
Showing with 89 additions and 62 deletions.
  1. +3 −2 .gitignore
  2. +4 −4 .gitmodules
  3. +1 −1 apps/phonebook/helpers.py
  4. +1 −1 apps/phonebook/models.py
  5. +1 −7 apps/users/models.py
  6. +0 −1 media/js/libs/tag-it
  7. +52 −26 settings/default.py
  8. 0 {media → staticfiles}/css/base-480px.css
  9. 0 {media → staticfiles}/css/base-768px.css
  10. 0 {media → staticfiles}/css/base-980px.css
  11. 0 {media → staticfiles}/css/base.css
  12. 0 {media → staticfiles}/css/bootstrap-responsive.css
  13. 0 {media → staticfiles}/css/bootstrap.css
  14. +5 −5 {media → staticfiles}/css/jquery-ui-1.8.16.custom.css
  15. 0 {media → staticfiles}/css/qunit.css
  16. 0 {media → staticfiles}/favicon.ico
  17. 0 {media → staticfiles}/img/.gitignore
  18. 0 {media → staticfiles}/img/about-bg.png
  19. 0 {media → staticfiles}/img/about-globe-icon.png
  20. 0 {media → staticfiles}/img/about-lock-icon.png
  21. 0 {media → staticfiles}/img/about-photo-collage.png
  22. 0 {media → staticfiles}/img/blue-pastels-bottom.png
  23. 0 {media → staticfiles}/img/blue-pastels-top.png
  24. 0 {media → staticfiles}/img/dinos/dino-head-128.png
  25. 0 {media → staticfiles}/img/dinos/dino-head-16.png
  26. 0 {media → staticfiles}/img/dinos/dino-head-48.png
  27. 0 {media → staticfiles}/img/glyphicons-halflings-white.png
  28. 0 {media → staticfiles}/img/glyphicons-halflings.png
  29. 0 {media → staticfiles}/img/home-anon-bg.png
  30. 0 {media → staticfiles}/img/home-auth-bg.png
  31. 0 {media → staticfiles}/img/icon-person.png
  32. 0 {media → staticfiles}/img/jquery-ui-blitzer/ .png
  33. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-bg_diagonals-thick_75_f3d8d8_40x40.png
  34. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-bg_dots-small_65_a6a6a6_2x2.png
  35. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-bg_flat_0_333333_40x100.png
  36. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-bg_flat_65_ffffff_40x100.png
  37. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-bg_flat_75_ffffff_40x100.png
  38. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-bg_highlight-hard_100_eeeeee_1x100.png
  39. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-bg_highlight-hard_100_f6f6f6_1x100.png
  40. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-bg_highlight-soft_15_cc0000_1x100.png
  41. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-icons_004276_256x240.png
  42. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-icons_cc0000_256x240.png
  43. 0 {media → staticfiles}/img/jquery-ui-blitzer/ui-icons_ffffff_256x240.png
  44. 0 {media → staticfiles}/img/layout/footer-bg.png
  45. 0 {media → staticfiles}/img/layout/paper-bg.png
  46. 0 {media → staticfiles}/img/mozilla/background.jpg
  47. 0 {media → staticfiles}/img/mozilla/bullet.png
  48. 0 {media → staticfiles}/img/mozilla/dino.png
  49. 0 {media → staticfiles}/img/mozilla/logo_footer.png
  50. 0 {media/img → staticfiles/img/mozilla}/mozorg-gradient.png
  51. 0 {media → staticfiles}/img/mozilla/search-icon.png
  52. 0 {media → staticfiles}/img/mozilla/search-submit.png
  53. 0 {media/img/mozilla → staticfiles/img}/mozorg-gradient.png
  54. 0 {media → staticfiles}/img/pending-alert-bg.png
  55. 0 {media → staticfiles}/img/sign_in_blue.png
  56. 0 {media → staticfiles}/img/tumblebeast-404.png
  57. 0 {media → staticfiles}/img/tumblebeast-500.png
  58. 0 {media → staticfiles}/img/unknown.png
  59. 0 {media → staticfiles}/js/browserid.js
  60. 0 {media → staticfiles}/js/groups.js
  61. +1 −1 {media → staticfiles}/js/infinite.js
  62. 0 {media → staticfiles}/js/libs/backbone.js
  63. 0 {media → staticfiles}/js/libs/backbone.localStorage.js
  64. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-alert.js
  65. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-button.js
  66. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-carousel.js
  67. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-collapse.js
  68. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-dropdown.js
  69. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-modal.js
  70. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-popover.js
  71. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-scrollspy.js
  72. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-tab.js
  73. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-tooltip.js
  74. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-transition.js
  75. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap-typeahead.js
  76. 0 {media → staticfiles}/js/libs/bootstrap/bootstrap.js
  77. +1 −1 {media → staticfiles}/js/libs/jquery-1.7.2.js
  78. 0 {media → staticfiles}/js/libs/jquery-ui-1.8.7.custom.min.js
  79. 0 {media → staticfiles}/js/libs/jquery.endless-scroll.js
  80. 0 {media → staticfiles}/js/libs/qunit.js
  81. +1 −0 staticfiles/js/libs/tag-it
  82. 0 {media → staticfiles}/js/libs/underscore.js
  83. +1 −1 {media → staticfiles}/js/libs/validation/test.html
  84. 0 {media → staticfiles}/js/libs/validation/validation.js
  85. 0 {media → staticfiles}/js/libs/validation/validation_tests.js
  86. 0 {media → staticfiles}/js/main.js
  87. 0 {media → staticfiles}/js/profiles.js
  88. 0 {media → staticfiles}/js/tests/test.js
  89. +6 −6 {media → staticfiles}/js/webtrends.js
  90. 0 {media → staticfiles}/mozillians.webapp
  91. 0 {media → staticfiles}/robots.txt
  92. +3 −3 templates/base.html
  93. +1 −1 templates/includes/webtrends_desktop.html
  94. +7 −1 urls.py
  95. +1 −1 vendor
View
5 .gitignore
@@ -23,5 +23,6 @@ vagrantconfig_local.yaml
docs/_build
settings/*local.py
directory
-media/uploads
-media/cache
+media
+staticfiles/uploads
+staticfiles/cache
View
8 .gitmodules
@@ -1,8 +1,8 @@
[submodule "vendor"]
- ignore = dirty
+ ignore = dirty
path = vendor
url = git://github.com/mozilla/mozillians-lib.git
-[submodule "media/js/libs/tag-it"]
- ignore = dirty
- path = media/js/libs/tag-it
+[submodule "staticfiles/js/libs/tag-it"]
+ ignore = dirty
+ path = staticfiles/js/libs/tag-it
url = git://github.com/aehlke/tag-it.git
View
2 apps/phonebook/helpers.py
@@ -33,7 +33,7 @@ def search_result(context, profile):
def gravatar(
email,
- default='%simg/unknown.png' % (settings.MEDIA_URL),
+ default='%simg/unknown.png' % (settings.STATIC_URL),
size=175,
rating='pg'):
"""Return the Gravatar URL for an email address."""
View
2 apps/phonebook/models.py
@@ -1,7 +1,7 @@
-from django.contrib.auth.utils import get_random_string
from django.core.mail import send_mail
from django.db import models
from django.dispatch import receiver
+from django.utils.crypto import get_random_string
from funfactory.urlresolvers import reverse
from funfactory.utils import absolutify
View
8 apps/users/models.py
@@ -17,11 +17,6 @@
from groups.models import Group, Skill
from phonebook.helpers import gravatar
-# This is because we are using MEDIA_ROOT wrong in 1.4
-from django.core.files.storage import FileSystemStorage
-fs = FileSystemStorage(location=settings.UPLOAD_ROOT,
- base_url='/media/uploads/')
-
class UserProfile(SearchMixin, models.Model):
# This field is required.
@@ -40,8 +35,7 @@ class UserProfile(SearchMixin, models.Model):
groups = models.ManyToManyField('groups.Group')
skills = models.ManyToManyField('groups.Skill')
bio = models.TextField(verbose_name=_lazy(u'Bio'), default='', blank=True)
- photo = ImageField(default='', blank=True, storage=fs,
- upload_to='userprofile')
+ photo = ImageField(default='', blank=True, upload_to='userprofile/photo')
display_name = models.CharField(max_length=255, default='', blank=True)
ircname = models.CharField(max_length=63,
verbose_name=_lazy(u'IRC Nickname'),
1 media/js/libs/tag-it
@@ -1 +0,0 @@
-Subproject commit 396745ea0adcb97b97366528247dcecf703c8d92
View
78 settings/default.py
@@ -2,7 +2,6 @@
# Django settings for the mozillians project.
import logging
-import os
from funfactory.manage import path
from funfactory import settings_base as base
@@ -32,11 +31,20 @@
PORT = 443
## Media and templates.
-TEMPLATE_DIRS = (path('apps/users/templates'), )
+STATIC_URL = '/static/'
+
STATICFILES_DIRS = (
- pre.UPLOAD_ROOT,
+ path('staticfiles'),
)
+STATIC_ROOT = path('media')
+
+
+MEDIA_URL = '/uploads/'
+
+# Deprecated with django 1.4
+ADMIN_MEDIA_PREFIX = None
+
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'jingo.Loader',
@@ -45,8 +53,10 @@
# 'django.template.loaders.eggs.Loader',
)
-TEMPLATE_CONTEXT_PROCESSORS = (base.TEMPLATE_CONTEXT_PROCESSORS +
- ('django_browserid.context_processors.browserid_form',))
+TEMPLATE_CONTEXT_PROCESSORS = list(base.TEMPLATE_CONTEXT_PROCESSORS) + [
+ 'django_browserid.context_processors.browserid_form',
+ 'django.core.context_processors.static',
+]
JINGO_EXCLUDE_APPS = [
'bootstrapform',
@@ -136,40 +146,58 @@
# On Login, we redirect through register.
LOGIN_REDIRECT_URL = '/register'
-INSTALLED_APPS = list(base.INSTALLED_APPS) + [
- # These need to go in order of migration.
+INSTALLED_APPS = (
+ # Local apps
+ 'funfactory', # Content common to most playdoh-based apps.
+ 'jingo_minify',
+ 'tower', # for ./manage.py extract (L10n)
+ 'cronjobs', # for ./manage.py cron * cmd line tasks
+
+ # Django contrib apps
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.staticfiles',
+ 'django.contrib.admin',
+
+ # Our apps. These need to go in order of migration.
'users',
'phonebook',
'groups',
'taskboard',
'common',
# 'locations',
+ # Third party apps
+ 'bootstrapform',
'csp',
- 'jingo_minify',
- 'tower',
- 'cronjobs',
+ 'commonware.response.cookies',
+ 'django_browserid',
+ 'djcelery',
'elasticutils',
'sorl.thumbnail',
-
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django_browserid',
- 'bootstrapform',
-
- # DB migrations
'south',
- # re-assert dominance of 'django_nose'
- 'django_nose',
-
-]
+ 'django_nose', # Load last to enforce dominance.
+)
-## Auth
-PWD_ALGORITHM = 'bcrypt'
HMAC_KEYS = {
'2011-01-01': 'cheesecake',
+ '2012-01-01': 'foobar',
}
+BASE_PASSWORD_HASHERS = (
+ 'django_sha2.hashers.BcryptHMACCombinedPasswordVerifier',
+ 'django_sha2.hashers.SHA512PasswordHasher',
+ 'django_sha2.hashers.SHA256PasswordHasher',
+ 'django.contrib.auth.hashers.SHA1PasswordHasher',
+ 'django.contrib.auth.hashers.MD5PasswordHasher',
+ 'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',
+)
+
+from django_sha2 import get_password_hashers
+PASSWORD_HASHERS = get_password_hashers(BASE_PASSWORD_HASHERS, HMAC_KEYS)
+
+
SESSION_COOKIE_HTTPONLY = True
SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
@@ -190,9 +218,7 @@
#: Userpics will be uploaded here.
USERPICS_PATH = pre.NETAPP_STORAGE + '/userpics'
-# Django 1.4
-# TODO fix all templates so this works.
-# MEDIA_ROOT = pre.NETAPP_STORAGE
+MEDIA_ROOT = pre.NETAPP_STORAGE
# Userpics will accessed here.
USERPICS_URL = pre.UPLOAD_URL + '/userpics'
View
0 media/css/base-480px.css → staticfiles/css/base-480px.css
File renamed without changes.
View
0 media/css/base-768px.css → staticfiles/css/base-768px.css
File renamed without changes.
View
0 media/css/base-980px.css → staticfiles/css/base-980px.css
File renamed without changes.
View
0 media/css/base.css → staticfiles/css/base.css
File renamed without changes.
View
0 media/css/bootstrap-responsive.css → staticfiles/css/bootstrap-responsive.css
File renamed without changes.
View
0 media/css/bootstrap.css → staticfiles/css/bootstrap.css
File renamed without changes.
View
10 media/css/jquery-ui-1.8.16.custom.css → staticfiles/css/jquery-ui-1.8.16.custom.css
@@ -344,7 +344,7 @@
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
-.ui-autocomplete { position: absolute; cursor: default; }
+.ui-autocomplete { position: absolute; cursor: default; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
@@ -400,8 +400,8 @@
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3.4em; }
-button.ui-button-icons-only { width: 3.7em; }
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; }
@@ -437,7 +437,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
@@ -509,7 +509,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
View
0 media/css/qunit.css → staticfiles/css/qunit.css
File renamed without changes.
View
0 media/favicon.ico → staticfiles/favicon.ico
File renamed without changes.
View
0 media/img/.gitignore → staticfiles/img/.gitignore
File renamed without changes.
View
0 media/img/about-bg.png → staticfiles/img/about-bg.png
File renamed without changes
View
0 media/img/about-globe-icon.png → staticfiles/img/about-globe-icon.png
File renamed without changes
View
0 media/img/about-lock-icon.png → staticfiles/img/about-lock-icon.png
File renamed without changes
View
0 media/img/about-photo-collage.png → staticfiles/img/about-photo-collage.png
File renamed without changes
View
0 media/img/blue-pastels-bottom.png → staticfiles/img/blue-pastels-bottom.png
File renamed without changes
View
0 media/img/blue-pastels-top.png → staticfiles/img/blue-pastels-top.png
File renamed without changes
View
0 media/img/dinos/dino-head-128.png → staticfiles/img/dinos/dino-head-128.png
File renamed without changes
View
0 media/img/dinos/dino-head-16.png → staticfiles/img/dinos/dino-head-16.png
File renamed without changes
View
0 media/img/dinos/dino-head-48.png → staticfiles/img/dinos/dino-head-48.png
File renamed without changes
View
0 media/img/glyphicons-halflings-white.png → ...cfiles/img/glyphicons-halflings-white.png
File renamed without changes
View
0 media/img/glyphicons-halflings.png → staticfiles/img/glyphicons-halflings.png
File renamed without changes
View
0 media/img/home-anon-bg.png → staticfiles/img/home-anon-bg.png
File renamed without changes
View
0 media/img/home-auth-bg.png → staticfiles/img/home-auth-bg.png
File renamed without changes
View
0 media/img/icon-person.png → staticfiles/img/icon-person.png
File renamed without changes
View
0 media/img/jquery-ui-blitzer/ .png → staticfiles/img/jquery-ui-blitzer/ .png
File renamed without changes
View
0 ...ui-bg_diagonals-thick_75_f3d8d8_40x40.png → ...ui-bg_diagonals-thick_75_f3d8d8_40x40.png
File renamed without changes
View
0 ...litzer/ui-bg_dots-small_65_a6a6a6_2x2.png → ...litzer/ui-bg_dots-small_65_a6a6a6_2x2.png
File renamed without changes
View
0 ...ui-blitzer/ui-bg_flat_0_333333_40x100.png → ...ui-blitzer/ui-bg_flat_0_333333_40x100.png
File renamed without changes
View
0 ...i-blitzer/ui-bg_flat_65_ffffff_40x100.png → ...i-blitzer/ui-bg_flat_65_ffffff_40x100.png
File renamed without changes
View
0 ...i-blitzer/ui-bg_flat_75_ffffff_40x100.png → ...i-blitzer/ui-bg_flat_75_ffffff_40x100.png
File renamed without changes
View
0 ...ui-bg_highlight-hard_100_eeeeee_1x100.png → ...ui-bg_highlight-hard_100_eeeeee_1x100.png
File renamed without changes
View
0 ...ui-bg_highlight-hard_100_f6f6f6_1x100.png → ...ui-bg_highlight-hard_100_f6f6f6_1x100.png
File renamed without changes
View
0 .../ui-bg_highlight-soft_15_cc0000_1x100.png → .../ui-bg_highlight-soft_15_cc0000_1x100.png
File renamed without changes
View
0 ...ry-ui-blitzer/ui-icons_004276_256x240.png → ...ry-ui-blitzer/ui-icons_004276_256x240.png
File renamed without changes
View
0 ...ry-ui-blitzer/ui-icons_cc0000_256x240.png → ...ry-ui-blitzer/ui-icons_cc0000_256x240.png
File renamed without changes
View
0 ...ry-ui-blitzer/ui-icons_ffffff_256x240.png → ...ry-ui-blitzer/ui-icons_ffffff_256x240.png
Diff not rendered.
View
0 media/img/layout/footer-bg.png → staticfiles/img/layout/footer-bg.png
Diff not rendered.
View
0 media/img/layout/paper-bg.png → staticfiles/img/layout/paper-bg.png
Diff not rendered.
View
0 media/img/mozilla/background.jpg → staticfiles/img/mozilla/background.jpg
Diff not rendered.
View
0 media/img/mozilla/bullet.png → staticfiles/img/mozilla/bullet.png
Diff not rendered.
View
0 media/img/mozilla/dino.png → staticfiles/img/mozilla/dino.png
Diff not rendered.
View
0 media/img/mozilla/logo_footer.png → staticfiles/img/mozilla/logo_footer.png
Diff not rendered.
View
0 media/img/mozorg-gradient.png → staticfiles/img/mozilla/mozorg-gradient.png
Diff not rendered.
View
0 media/img/mozilla/search-icon.png → staticfiles/img/mozilla/search-icon.png
Diff not rendered.
View
0 media/img/mozilla/search-submit.png → staticfiles/img/mozilla/search-submit.png
Diff not rendered.
View
0 media/img/mozilla/mozorg-gradient.png → staticfiles/img/mozorg-gradient.png
Diff not rendered.
View
0 media/img/pending-alert-bg.png → staticfiles/img/pending-alert-bg.png
Diff not rendered.
View
0 media/img/sign_in_blue.png → staticfiles/img/sign_in_blue.png
Diff not rendered.
View
0 media/img/tumblebeast-404.png → staticfiles/img/tumblebeast-404.png
Diff not rendered.
View
0 media/img/tumblebeast-500.png → staticfiles/img/tumblebeast-500.png
Diff not rendered.
View
0 media/img/unknown.png → staticfiles/img/unknown.png
Diff not rendered.
View
0 media/js/browserid.js → staticfiles/js/browserid.js
File renamed without changes.
View
0 media/js/groups.js → staticfiles/js/groups.js
File renamed without changes.
View
2 media/js/infinite.js → staticfiles/js/infinite.js
@@ -35,7 +35,7 @@
}
});
}
-
+
}
});
});
View
0 media/js/libs/backbone.js → staticfiles/js/libs/backbone.js
File renamed without changes.
View
0 media/js/libs/backbone.localStorage.js → staticfiles/js/libs/backbone.localStorage.js
File renamed without changes.
View
0 media/js/libs/bootstrap/bootstrap-alert.js → ...iles/js/libs/bootstrap/bootstrap-alert.js
File renamed without changes.
View
0 media/js/libs/bootstrap/bootstrap-button.js → ...les/js/libs/bootstrap/bootstrap-button.js
File renamed without changes.
View
0 ...a/js/libs/bootstrap/bootstrap-carousel.js → ...s/js/libs/bootstrap/bootstrap-carousel.js
File renamed without changes.
View
0 ...a/js/libs/bootstrap/bootstrap-collapse.js → ...s/js/libs/bootstrap/bootstrap-collapse.js
File renamed without changes.
View
0 ...a/js/libs/bootstrap/bootstrap-dropdown.js → ...s/js/libs/bootstrap/bootstrap-dropdown.js
File renamed without changes.
View
0 media/js/libs/bootstrap/bootstrap-modal.js → ...iles/js/libs/bootstrap/bootstrap-modal.js
File renamed without changes.
View
0 media/js/libs/bootstrap/bootstrap-popover.js → ...es/js/libs/bootstrap/bootstrap-popover.js
File renamed without changes.
View
0 .../js/libs/bootstrap/bootstrap-scrollspy.js → .../js/libs/bootstrap/bootstrap-scrollspy.js
File renamed without changes.
View
0 media/js/libs/bootstrap/bootstrap-tab.js → ...cfiles/js/libs/bootstrap/bootstrap-tab.js
File renamed without changes.
View
0 media/js/libs/bootstrap/bootstrap-tooltip.js → ...es/js/libs/bootstrap/bootstrap-tooltip.js
File renamed without changes.
View
0 ...js/libs/bootstrap/bootstrap-transition.js → ...js/libs/bootstrap/bootstrap-transition.js
File renamed without changes.
View
0 .../js/libs/bootstrap/bootstrap-typeahead.js → .../js/libs/bootstrap/bootstrap-typeahead.js
File renamed without changes.
View
0 media/js/libs/bootstrap/bootstrap.js → staticfiles/js/libs/bootstrap/bootstrap.js
File renamed without changes.
View
2 media/js/libs/jquery-1.7.2.js → staticfiles/js/libs/jquery-1.7.2.js
@@ -3645,7 +3645,7 @@ if ( !jQuery.support.submitBubbles ) {
});
// return undefined since we don't need an event listener
},
-
+
postDispatch: function( event ) {
// If form was submitted by the user, bubble the event up the tree
if ( event._submit_bubble ) {
View
0 media/js/libs/jquery-ui-1.8.7.custom.min.js → ...les/js/libs/jquery-ui-1.8.7.custom.min.js
File renamed without changes.
View
0 media/js/libs/jquery.endless-scroll.js → staticfiles/js/libs/jquery.endless-scroll.js
File renamed without changes.
View
0 media/js/libs/qunit.js → staticfiles/js/libs/qunit.js
File renamed without changes.
1 staticfiles/js/libs/tag-it
@@ -0,0 +1 @@
+Subproject commit d64a7940ff052675c897b5e989d601cc9d6dc1eb
View
0 media/js/libs/underscore.js → staticfiles/js/libs/underscore.js
File renamed without changes.
View
2 media/js/libs/validation/test.html → staticfiles/js/libs/validation/test.html
@@ -34,7 +34,7 @@
<label for="id_last_name">Last Name</label>
<span title="This field is required." class="required">*</span>
</div>
-
+
<h1 id="qunit-header">Validation Tests</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
View
0 media/js/libs/validation/validation.js → staticfiles/js/libs/validation/validation.js
File renamed without changes.
View
0 media/js/libs/validation/validation_tests.js → ...es/js/libs/validation/validation_tests.js
File renamed without changes.
View
0 media/js/main.js → staticfiles/js/main.js
File renamed without changes.
View
0 media/js/profiles.js → staticfiles/js/profiles.js
File renamed without changes.
View
0 media/js/tests/test.js → staticfiles/js/tests/test.js
File renamed without changes.
View
12 media/js/webtrends.js → staticfiles/js/webtrends.js
@@ -1,5 +1,5 @@
// WebTrends SmartSource Data Collector Tag
-// Version: 9.4.0
+// Version: 9.4.0
// Tag Builder Version: 3.2
// Created: 5/24/2011 11:49:08 PM
@@ -340,7 +340,7 @@ WebTrends.prototype.dcsVar=function(){
})();
WT.slv=(function(){
var slv="Not enabled";
- try{
+ try{
if (navigator.userAgent.indexOf('MSIE')!=-1){
var sli = new ActiveXObject('AgControl.AgControl');
if (sli){
@@ -382,7 +382,7 @@ WebTrends.prototype.dcsVar=function(){
if (this.i18n){
if (typeof(document.defaultCharset)=="string"){
WT.le=document.defaultCharset;
- }
+ }
else if (typeof(document.characterSet)=="string"){
WT.le=document.characterSet;
}
@@ -421,9 +421,9 @@ WebTrends.prototype.dcsEscape=function(S, REL){
if (REL!=""){
S=S.toString();
for (var R in REL){
- if (REL[R] instanceof RegExp){
+ if (REL[R] instanceof RegExp){
S=S.replace(REL[R],R);
- }
+ }
}
return S;
}
@@ -507,7 +507,7 @@ WebTrends.prototype.dcsTag=function(){
WT.dep="";
}
for (var N in DCS){
- if (DCS[N]&&(typeof DCS[N]!="function")){
+ if (DCS[N]&&(typeof DCS[N]!="function")){
P+=this.dcsA(N,DCS[N]);
}
}
View
0 media/mozillians.webapp → staticfiles/mozillians.webapp
File renamed without changes.
View
0 media/robots.txt → staticfiles/robots.txt
File renamed without changes.
View
6 templates/base.html
@@ -12,15 +12,15 @@
<meta name="author" content="Mozilla">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="apple-touch-icon" href="{{ MEDIA_URL }}apple-touch-icon.png">
+ <link rel="apple-touch-icon" href="{{ STATIC_URL }}apple-touch-icon.png">
<link rel="search" type="application/opensearchdescription+xml"
title="{{ _('Mozillians') }}" href="{{ url('search_plugin') }}">
{% block site_css %}
{{ css('common') }}
{% endblock %}
- <link rel="shortcut icon" type="image/ico" href="{{ MEDIA_URL }}favicon.ico">
+ <link rel="shortcut icon" type="image/ico" href="{{ STATIC_URL }}favicon.ico">
{% block feeds %}{% endblock %}
{% block extra_headers %}{% endblock %}
</head>
@@ -95,7 +95,7 @@
<li class="pull-right">
<a class="browser_id_login" href="#join_us">
<img alt="{{ _('Sign in with BrowserID') }}"
- src="{{ MEDIA_URL }}img/sign_in_blue.png">
+ src="{{ STATIC_URL }}img/sign_in_blue.png">
</a>
</li>
{% endif %}
View
2 templates/includes/webtrends_desktop.html
@@ -5,7 +5,7 @@
<!-- Tag Builder Version: 3.1 -->
<!-- Created: 9/9/2010 8:15:41 PM -->
#}
-<script src="{{ MEDIA_URL }}js/webtrends.js"></script>
+<script src="{{ STATIC_URL }}js/webtrends.js"></script>
{#
<!-- ----------------------------------------------------------------------------------- -->
<!-- Warning: The two script blocks below must remain inline. Moving them to an external -->
View
8 urls.py
@@ -1,6 +1,7 @@
from django.conf import settings
from django.conf.urls.defaults import include, patterns, url
from django.contrib import admin
+from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.shortcuts import render
from django.views.decorators.cache import cache_page
from django.views.generic.base import TemplateView
@@ -38,11 +39,16 @@ def error_page(request, template, status=None):
# In DEBUG mode, serve media files through Django, and serve error pages
# via predictable routes. Add in qunit tests.
if settings.DEBUG:
- # Remove leading and trailing slashes so the regex matches.
+ # Serve media (i.e. uploads).
media_url = settings.MEDIA_URL.lstrip('/').rstrip('/')
urlpatterns += patterns('',
(r'^%s/(?P<path>.*)$' % media_url, 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
+ )
+ # Serve the static files.
+ urlpatterns += staticfiles_urlpatterns()
+ # Serve the error pages.
+ urlpatterns += patterns('',
# Add the 404, 500, and csrf pages for testing
(r'^404$', handler404),
(r'^500$', handler500),
2 vendor
@@ -1 +1 @@
-Subproject commit 36a690fb8811cbddc7a90aaf22765d590749b3d9
+Subproject commit 2ad0003701eccd9ea3e8387ba0d3564352205bcf

0 comments on commit edbf6a3

Please sign in to comment.