Commits

Artur Barseghyan committed 1ae4377 Draft

fix sample reports

  • Participants
  • Parent commits 5f4ee83

Comments (0)

Files changed (2)

example/example/foo/reports.py

 from foo.models import FooItem
 
 get_user_info = lambda u: "%s <%s>" % ((u.get_full_name() if u.get_full_name() else u.username), u.email)
-get_users_info = lambda uu: ','.join([get_user_info(u) for u in uu])
+get_users_info = lambda uu: ', '.join([get_user_info(u) for u in uu])
 
 # Define the report class
 class FooReport(sirep.Report):

src/sirep/templates/sirep/view.html

 {% load static from staticfiles %}
 
 {% block extrastyle %}
-  <link rel="stylesheet" type="text/css" href="{% static 'admin/css/sirep.css' %}" />
+    <link rel="stylesheet" type="text/css" href="{% static 'admin/css/sirep.css' %}" />
     {{ block.super }}
 {% endblock %}
 
 {% block extrahead %}
-<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
-<script>function gettext(txt){ return txt}</script>
-<script>
-    $(document).ready(function() {
-        $('#generate-csv-report, #generate-csv-report-current-page').click(function() {
-            $('.report-loading').height($(window).height());
-            $('.report-loading').show();
+    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
+    <script>function gettext(txt){ return txt}</script>
+    <script>
+        $(document).ready(function() {
+            $('#generate-csv-report, #generate-csv-report-current-page').click(function() {
+                $('.report-loading').height($(window).height());
+                $('.report-loading').show();
+            });
+
+            $('.report-loading').click(function() {
+                $('.report-loading').hide();
+            });
+
+            $('#apply-filtering-to-current-page').click(function() {
+                window.location = "{{ request.path }}?" + $('.report-form').serialize();
+                return;
+            });
         });
-
-        $('.report-loading').click(function() {
-            $('.report-loading').hide();
-        });
-
-        $('#apply-filtering-to-current-page').click(function() {
-            window.location = "{{ request.path }}?" + $('.report-form').serialize();
-            return;
-        });
-    });
-</script>
-{{ report_form.media }}
+    </script>
+    {{ report_form.media }}
+    {{ block.super }}
 {% endblock extrahead %}
 
 {% block bodyclass %}change-list{% endblock %}