Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixes bug 965589 - replace vendored libs with a requirements file, r=@…

  • Loading branch information...
commit c44c535575c1d1e856a329660466901ebb97ec5f 1 parent d21d60a
Peter Bengtsson peterbe authored
30 requirements.txt
View
@@ -118,3 +118,33 @@ https://github.com/BradRuderman/pyhs2/archive/48d22aff9d23db1221ad913670aaad90a7
django-jingo-offline-compressor==0.0.7
# sha256: TzJCJuHuhaxBUgV5up3nAylAEmAuU2IX_Q50VuFH2IY
sasl==0.1.3
+
+# things needed specifically for the webapp
+# sha256: m3_LmdICiRiewPHgbR0r7TtHcuOjk_3b-wBup8P5v68
+Django==1.5.6
+# sha256: 1BuH0etCTRi6Lb5zMTHp2HPnCcwR63PaJIw07sHV7W4
+django-browserid==0.10.1
+# sha256: akF58qKszaKyc7_Ybeb3AkzuIDBDzJp8BA_nswa74SA
+fancy-tag==0.2.0
+# sha256: uDA8a2lQGB1uEg_sdygAueYurQsQAD6-utf81kFmE9g
+https://github.com/mozilla/django-session-csrf/archive/f00ad91.zip#egg=django-session-csrf
+# sha256: ezt0vf24BIR-7Lxcap02St7FFYx-HlyK-dgjh88iYMg
+https://github.com/mozilla/funfactory/archive/6b797bb.zip#egg=funfactory
+# sha256: B-lA57jFsdXYf3h9luYXt_gbsep2FZ4ZIvPHvzt0Y4Y
+https://github.com/jbalogh/test-utils/archive/4ae9327.zip#egg=test-utils
+# sha256: UXatpPjasXm5Y7Ty6MDkUEbcSXP3n5itRb66J3usPjY
+https://github.com/jbalogh/jingo/archive/5e985a5.zip#egg=jingo
+# sha256: nc6AOA28EXa-GdHOg2C5QC4d5SpHNG_3WeV-3zgxHRw
+https://github.com/django-nose/django-nose/archive/10475f1.zip#egg=django-nose
+# sha256: vOWl5zvacyobs3P8ofRyh7uZ7MoYS7kPJh5VymTCBh4
+https://github.com/jezdez/django_compressor/archive/90966ed.zip#egg=django-compressor
+# sha256: W_sDzKCODJmJWOLJs1MOyFoCyY0cqkhJZ-GwpsCICEM
+https://github.com/jezdez/django-appconf/archive/d7ff3bb.zip#egg=django-appconf
+# sha256: 0p07MkSEjnM0DFU_lgrFzRSlNmEa7tbcC7rj0bZJvZg
+https://github.com/fwenzel/django-sha2/archive/3ba2b47.zip#egg=django-sha2
+# sha256: A1gwhyCNozcxug18_9RjJTmJQa1rctOt-AnP7_yR0PM
+https://github.com/jsocol/commonware/archive/b554418.zip#egg=commonware
+# sha256: LRy1WDkWc99RCaP-XoT95hYO3IskGz6xmrPTq-m43zE
+cef==0.5
+# sha256: -fUE8yboUH-tNZdMGuX5HUpzX7M-VWtu2PXsEGBUpHM
+https://github.com/mozilla/nuggets/archive/ce50688.zip#egg=nuggets
89 webapp-django/crashstats/settings/base.py
View
@@ -3,6 +3,7 @@
from funfactory.settings_base import *
+
# Name of the top-level module where you put all your apps.
# If you did not install Playdoh with the funfactory installer script
# you may need to edit this value. See the docs about installing from a
@@ -12,7 +13,18 @@
# Defines the views served for root URLs.
ROOT_URLCONF = '%s.urls' % PROJECT_MODULE
-INSTALLED_APPS = list(INSTALLED_APPS) + [
+INSTALLED_APPS = (
+ 'funfactory',
+ 'compressor',
+ 'django_browserid',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.staticfiles',
+ 'commonware.response.cookies',
+ 'django_nose',
+ 'session_csrf',
+
# Application base, containing global templates.
'%s.base' % PROJECT_MODULE,
# Example code. Can (and should) be removed for actual projects.
@@ -28,39 +40,51 @@
'django.contrib.messages',
'raven.contrib.django.raven_compat',
'waffle',
-]
+)
+
+
+funfactory_JINJA_CONFIG = JINJA_CONFIG # that from funfactory
+
+
+def JINJA_CONFIG():
+ # different from that in funfactory in that we don't want to
+ # load the `tower` extension
+ config = funfactory_JINJA_CONFIG()
+ config['extensions'].remove('tower.template.i18n')
+ return config
# Because Jinja2 is the default template loader, add any non-Jinja templated
# apps here:
-JINGO_EXCLUDE_APPS = [
- 'admin',
- 'registration',
+JINGO_EXCLUDE_APPS = (
'browserid',
-]
-
-MIDDLEWARE_EXCLUDE_CLASSES = [
- 'funfactory.middleware.LocaleURLMiddleware',
-]
-
-MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES)
+)
-for app in MIDDLEWARE_EXCLUDE_CLASSES:
- if app in MIDDLEWARE_CLASSES:
- MIDDLEWARE_CLASSES.remove(app)
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'session_csrf.CsrfMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'commonware.middleware.FrameOptionsHeader',
-MIDDLEWARE_CLASSES = tuple(MIDDLEWARE_CLASSES) + (
'waffle.middleware.WaffleMiddleware',
'%s.tokens.middleware.APIAuthenticationMiddleware' % PROJECT_MODULE,
)
# BrowserID configuration
-AUTHENTICATION_BACKENDS = [
+AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'django_browserid.auth.BrowserIDBackend',
-]
+)
-TEMPLATE_CONTEXT_PROCESSORS += (
+TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.contrib.auth.context_processors.auth',
+ 'django.core.context_processors.debug',
+ 'django.core.context_processors.media',
+ 'django.core.context_processors.request',
+ 'session_csrf.context_processor',
+ 'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
'crashstats.base.context_processors.google_analytics',
'crashstats.base.context_processors.browserid',
@@ -76,30 +100,6 @@
}
}
-# Tells the extract script what files to look for L10n in and what function
-# handles the extraction. The Tower library expects this.
-DOMAIN_METHODS['messages'] = [
- ('%s/**.py' % PROJECT_MODULE,
- 'tower.management.commands.extract.extract_tower_python'),
- ('%s/**/templates/**.html' % PROJECT_MODULE,
- 'tower.management.commands.extract.extract_tower_template'),
- ('templates/**.html',
- 'tower.management.commands.extract.extract_tower_template'),
-],
-
-# # Use this if you have localizable HTML files:
-# DOMAIN_METHODS['lhtml'] = [
-# ('**/templates/**.lhtml',
-# 'tower.management.commands.extract.extract_tower_template'),
-# ]
-
-# # Use this if you have localizable JS files:
-# DOMAIN_METHODS['javascript'] = [
-# # Make sure that this won't pull in strings from external libraries you
-# # may use.
-# ('media/js/**.js', 'javascript'),
-# ]
-
LOGGING = dict(loggers=dict(playdoh={'level': logging.DEBUG}))
CACHES = {
@@ -155,6 +155,9 @@
)
+# No need to load it because we don't do i18n in this project
+USE_I18N = False
+
# by default, compression is done in runtime.
COMPRESS_OFFLINE = False
16 webapp-django/manage.py
View
@@ -1,24 +1,10 @@
#!/usr/bin/env python
import os
-import sys
# Edit this if necessary or override the variable in your environment.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'crashstats.settings')
-try:
- # For local development in a virtualenv:
- from funfactory import manage
-except ImportError:
- # Production:
- # Add a temporary path so that we can import the funfactory
- tmp_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
- 'vendor', 'src', 'funfactory')
- sys.path.append(tmp_path)
-
- from funfactory import manage
-
- # Let the path magic happen in setup_environ() !
- sys.path.remove(tmp_path)
+from funfactory import manage
manage.setup_environ(__file__, more_pythonic=True)
1  webapp-django/vendor
@@ -1 +0,0 @@
-Subproject commit 62c8b50c7467dfec09974e4c3edfe0dcc632a613
Please sign in to comment.
Something went wrong with that request. Please try again.