Commits

Anonymous committed e686da0

Experiment templates go in django_lean/experiments/templates/experiments/include/ and JS files in django_lean/experiments/media/experiments/.
Updated the manifest file accordingly.

  • Participants
  • Parent commits 7d8930a

Comments (0)

Files changed (4)

 include AUTHORS
 include README
 
-recursive-include django_lean/experiments/media *.html *.js
-recursive-include django_lean/experiments/templates *.html *.js
+recursive-include django_lean/experiments/media *.js
+recursive-include django_lean/experiments/templates *.html
 recursive-include django_lean/experiments/tests/data *.json

File django_lean/experiments/media/experiments/experiment_enrollment.html

-{% if client_side_experiments or not request.session.verified_human %}
-  <script type="text/javascript" charset="utf-8">
-    {% if not request.session.verified_human %}
-      experiments.confirm_human();
-    {% endif %}
-    {% if client_side_experiments %}
-      {% for experiment, group in client_side_experiments.items %}
-        experiments.record_enrollment("{{ experiment|escapejs }}", "{{ group|escapejs }}");
-      {% endfor %}
-    {% endif %}
-  </script>
-{% endif %}

File django_lean/experiments/templates/experiments/include/experiment_enrollment.html

+{% if client_side_experiments or not request.session.verified_human %}
+  <script type="text/javascript" charset="utf-8">
+    {% if not request.session.verified_human %}
+      experiments.confirm_human();
+    {% endif %}
+    {% if client_side_experiments %}
+      {% for experiment, group in client_side_experiments.items %}
+        experiments.record_enrollment("{{ experiment|escapejs }}", "{{ group|escapejs }}");
+      {% endfor %}
+    {% endif %}
+  </script>
+{% endif %}
     ],
     package_data={
         'django_lean.experiments': ['media/experiments/*.js',
-                                    'media/experiments/*.html',
                                     'templates/experiments/*.html',
-                                    'templates/experiments/include/*.html',
-                                    'templates/experiments/include/*.js'],
+                                    'templates/experiments/include/*.html'],
         'django_lean.experiments.tests': ['data/*.json'],
     },
     install_requires=['django >= 1.0', 'BeautifulSoup', 'mox'],