Commits

Ryan Wilcox  committed 1f54872

pull in django-hoptoad properly

  • Participants
  • Parent commits 91da204

Comments (0)

Files changed (2)

File setups/project/add_hoptoad.py

 from setup_helpers import applypatch, filecopy, install_python_module
 
 def add_django_hoptoad(base_path, project_path):
-    # TODO: pull in <https://bitbucket.org/sjl/django-hoptoad/src> here
-    pass
+    install_python_module("django-hoptoad")
+    install_python_module("PyYAML")
+    applypatch( os.path.join(base_path, "supporting", "hoptoad.patch"),
+           os.path.join(project_path, "settings.py") )
+    print " *** TODO ITEM: you're on your own to pip install PyYAML (after you install libyaml C library)"
+    print " *** TODO ITEM: In settings.py set HOPTOAD_API_KEY"

File supporting/hoptoad.patch

+--- settings_orig.py	2010-12-26 12:51:17.000000000 -0500
++++ settings.py	2010-12-26 12:51:30.000000000 -0500
+@@ -73,6 +73,7 @@
+     'django.middleware.csrf.CsrfViewMiddleware',
+     'django.contrib.auth.middleware.AuthenticationMiddleware',
+     'django.contrib.messages.middleware.MessageMiddleware',
++    'hoptoad.middleware.HoptoadNotifierMiddleware'  # this needs to be last
+ )
+ 
+ ROOT_URLCONF = 'test_project.urls'
+@@ -94,3 +95,5 @@
+     # Uncomment the next line to enable admin documentation:
+     # 'django.contrib.admindocs',
+ )
++
++HOPTOAD_API_KEY = 'Your Hoptoad API key.'
+\ No newline at end of file