Permalink
Browse files

Merge branch 'master' of https://github.com/django/django

  • Loading branch information...
2 parents fbb7389 + 840ffd8 commit eee791e9b216333ad0b4c6c441a88828bf9aee62 @bohyn bohyn committed Jun 5, 2012
Showing with 3,275 additions and 2,324 deletions.
  1. +3 −2 AUTHORS
  2. +11 −11 django/contrib/admin/static/admin/js/actions.js
  3. +6 −7 django/contrib/admin/static/admin/js/actions.min.js
  4. +13 −13 django/contrib/admin/static/admin/js/inlines.js
  5. +5 −5 django/contrib/admin/static/admin/js/inlines.min.js
  6. +6 −2 django/contrib/admin/templates/admin/index.html
  7. +1 −0 django/contrib/admin/views/main.py
  8. +7 −7 django/contrib/auth/management/commands/createsuperuser.py
  9. +4 −9 django/contrib/auth/tests/management.py
  10. +11 −0 django/contrib/flatpages/fixtures/example_site.json
  11. +2 −1 django/contrib/flatpages/tests/csrf.py
  12. +4 −1 django/contrib/flatpages/tests/forms.py
  13. +7 −5 django/contrib/flatpages/tests/middleware.py
  14. +1 −0 django/contrib/flatpages/tests/templatetags.py
  15. +5 −3 django/contrib/flatpages/tests/views.py
  16. +27 −30 django/contrib/formtools/tests/__init__.py
  17. +8 −6 django/contrib/formtools/tests/wizard/namedwizardtests/tests.py
  18. +6 −6 django/contrib/formtools/tests/wizard/wizardtests/tests.py
  19. +2 −4 django/contrib/formtools/utils.py
  20. +8 −0 django/contrib/gis/admin/options.py
  21. +2 −2 django/contrib/gis/gdal/base.py
  22. +3 −1 django/contrib/gis/gdal/tests/__init__.py
  23. +3 −1 django/contrib/gis/geoip/__init__.py
  24. +2 −2 django/contrib/gis/geos/base.py
  25. +20 −9 django/contrib/gis/geos/mutable_list.py
  26. +3 −1 django/contrib/gis/geos/tests/__init__.py
  27. +65 −60 django/contrib/gis/geos/tests/test_geos.py
  28. +9 −3 django/contrib/gis/maps/google/overlays.py
  29. +20 −4 django/contrib/gis/measure.py
  30. +1 −1 django/contrib/gis/templates/gis/admin/openlayers.js
  31. +19 −0 django/contrib/gis/tests/geoadmin/tests.py
  32. +1 −0 django/contrib/gis/tests/layermap/models.py
  33. +34 −31 django/contrib/gis/tests/layermap/tests.py
  34. +1 −1 django/contrib/gis/utils/layermapping.py
  35. +1 −1 django/contrib/humanize/tests.py
  36. +1 −1 django/contrib/localflavor/es/es_provinces.py
  37. +2 −1 django/contrib/messages/tests/base.py
  38. +0 −10 django/contrib/sitemaps/tests/base.py
  39. +11 −2 django/contrib/sitemaps/tests/http.py
  40. +2 −5 django/contrib/staticfiles/management/commands/collectstatic.py
  41. +2 −4 django/contrib/staticfiles/management/commands/findstatic.py
  42. +16 −7 django/contrib/staticfiles/storage.py
  43. +1 −1 django/core/context_processors.py
  44. +1 −0 django/core/exceptions.py
  45. +3 −2 django/core/files/base.py
  46. +2 −2 django/core/files/uploadedfile.py
  47. +5 −5 django/core/handlers/wsgi.py
  48. +46 −32 django/core/management/base.py
  49. +1 −1 django/core/management/commands/compilemessages.py
  50. +7 −8 django/core/management/commands/createcachetable.py
  51. +16 −12 django/core/management/commands/dumpdata.py
  52. +5 −0 django/core/management/commands/inspectdb.py
  53. +18 −18 django/core/management/commands/loaddata.py
  54. +2 −2 django/core/management/commands/runserver.py
  55. +2 −4 django/core/management/templates.py
  56. +3 −0 django/core/serializers/base.py
  57. +27 −2 django/core/serializers/json.py
  58. +8 −5 django/core/serializers/python.py
  59. +12 −14 django/core/servers/basehttp.py
  60. +2 −4 django/core/urlresolvers.py
  61. +10 −5 django/db/backends/__init__.py
  62. +11 −2 django/db/backends/mysql/base.py
  63. +1 −0 django/db/backends/oracle/base.py
  64. +9 −9 django/db/backends/sqlite3/base.py
  65. +3 −9 django/db/models/base.py
  66. +10 −15 django/db/models/fields/__init__.py
  67. +21 −0 django/db/models/fields/files.py
  68. +40 −23 django/db/models/fields/related.py
  69. +13 −8 django/db/models/query.py
  70. +32 −17 django/db/models/query_utils.py
  71. +12 −2 django/db/models/sql/compiler.py
  72. +2 −1 django/db/models/sql/where.py
  73. +5 −5 django/dispatch/saferef.py
  74. +5 −1 django/forms/fields.py
  75. +2 −2 django/forms/models.py
  76. +3 −3 django/http/__init__.py
  77. +19 −19 django/http/multipartparser.py
  78. +1 −1 django/template/loaders/app_directories.py
  79. +1 −1 django/template/loaders/filesystem.py
  80. +1 −1 django/templatetags/i18n.py
  81. +32 −38 django/test/client.py
  82. +2 −2 django/utils/cache.py
  83. +5 −4 django/utils/crypto.py
  84. +4 −5 django/utils/encoding.py
  85. +15 −8 django/utils/functional.py
  86. +1 −1 django/utils/html.py
  87. +15 −4 django/views/debug.py
  88. +6 −6 django/views/decorators/debug.py
  89. +10 −2 django/views/generic/base.py
  90. +168 −77 django/views/generic/dates.py
  91. +2 −3 django/views/generic/detail.py
  92. +16 −7 django/views/generic/list.py
  93. +8 −4 docs/howto/custom-management-commands.txt
  94. BIN docs/intro/_images/admin10.png
  95. BIN docs/intro/_images/admin11.png
  96. BIN docs/intro/_images/admin11t.png
  97. BIN docs/intro/_images/admin12.png
  98. +28 −17 docs/intro/tutorial01.txt
  99. +6 −6 docs/intro/tutorial02.txt
  100. +2 −2 docs/intro/tutorial03.txt
  101. +2 −2 docs/intro/tutorial04.txt
  102. +17 −1 docs/ref/class-based-views.txt
  103. +1 −0 docs/ref/contrib/formtools/form-wizard.txt
  104. +1 −1 docs/ref/contrib/gis/geoquerysets.txt
  105. +9 −0 docs/ref/contrib/staticfiles.txt
  106. +1 −1 docs/ref/files/file.txt
  107. +3 −2 docs/ref/settings.txt
  108. +4 −3 docs/ref/templates/api.txt
  109. +2 −2 docs/ref/unicode.txt
  110. +60 −1 docs/releases/1.5.txt
  111. +0 −3 docs/topics/class-based-views.txt
  112. +2 −0 docs/topics/forms/formsets.txt
  113. +1 −1 docs/topics/forms/index.txt
  114. +1 −1 docs/topics/i18n/timezones.txt
  115. +86 −52 docs/topics/install.txt
  116. +10 −13 docs/topics/security.txt
  117. +11 −2 docs/topics/settings.txt
  118. +34 −23 docs/topics/testing.txt
  119. +36 −0 setup.py
  120. +15 −0 tests/modeltests/defer/tests.py
  121. +4 −0 tests/modeltests/field_subclassing/tests.py
  122. +12 −1 tests/modeltests/files/tests.py
  123. +15 −15 tests/modeltests/fixtures/tests.py
  124. 0 tests/modeltests/known_related_objects/__init__.py
  125. +65 −0 tests/modeltests/known_related_objects/fixtures/tournament.json
  126. +19 −0 tests/modeltests/known_related_objects/models.py
  127. +88 −0 tests/modeltests/known_related_objects/tests.py
  128. +7 −7 tests/modeltests/model_forms/tests.py
  129. +18 −0 tests/modeltests/model_inheritance/tests.py
  130. +9 −9 tests/modeltests/serializers/tests.py
  131. +4 −4 tests/modeltests/str/tests.py
  132. +1 −4 tests/modeltests/update_only_fields/tests.py
  133. +5 −3 tests/modeltests/user_commands/management/commands/dance.py
  134. +19 −2 tests/modeltests/user_commands/tests.py
  135. +52 −104 tests/modeltests/validation/test_error_messages.py
  136. +7 −4 tests/regressiontests/admin_scripts/tests.py
  137. +1 −1 tests/regressiontests/admin_util/tests.py
  138. +1 −1 tests/regressiontests/admin_widgets/tests.py
  139. +12 −0 tests/regressiontests/backends/tests.py
  140. +8 −4 tests/regressiontests/cache/tests.py
  141. +2 −2 tests/regressiontests/conditional_processing/models.py
  142. +1 −1 tests/regressiontests/csrf_tests/tests.py
  143. +27 −27 tests/regressiontests/file_storage/tests.py
  144. +16 −16 tests/regressiontests/file_uploads/tests.py
  145. +0 −19 tests/regressiontests/fixtures_regress/tests.py
  146. +29 −30 tests/regressiontests/forms/tests/fields.py
  147. 0 tests/regressiontests/forms/tests/filepath_test_files/.dot-file
  148. 0 tests/regressiontests/forms/tests/filepath_test_files/directory/.keep
  149. 0 tests/regressiontests/forms/tests/filepath_test_files/fake-image.jpg
  150. 0 tests/regressiontests/forms/tests/filepath_test_files/real-text-file.txt
  151. +3 −3 tests/regressiontests/forms/tests/forms.py
  152. +3 −3 tests/regressiontests/forms/tests/models.py
  153. +3 −2 tests/regressiontests/forms/tests/regressions.py
  154. +1 −1 tests/regressiontests/forms/tests/widgets.py
  155. +52 −0 tests/regressiontests/generic_views/base.py
  156. +28 −3 tests/regressiontests/generic_views/dates.py
  157. +10 −0 tests/regressiontests/generic_views/list.py
  158. +1 −1 tests/regressiontests/generic_views/templates/generic_views/book_archive.html
  159. +1 −1 tests/regressiontests/generic_views/templates/generic_views/book_archive_year.html
  160. +9 −0 tests/regressiontests/generic_views/urls.py
  161. +1 −1 tests/regressiontests/handlers/tests.py
  162. +5 −5 tests/regressiontests/httpwrappers/tests.py
  163. +6 −17 tests/regressiontests/i18n/commands/compilation.py
  164. BIN tests/regressiontests/i18n/other/locale/fr/LC_MESSAGES/django.mo
  165. +6 −0 tests/regressiontests/i18n/other/locale/fr/LC_MESSAGES/django.po
  166. +16 −2 tests/regressiontests/i18n/tests.py
  167. +24 −2 tests/regressiontests/inspectdb/tests.py
  168. +1 −1 tests/regressiontests/localflavor/es/tests.py
  169. +1 −1 tests/regressiontests/localflavor/mk/tests.py
  170. +25 −25 tests/regressiontests/mail/tests.py
  171. +13 −1 tests/regressiontests/model_fields/tests.py
  172. +3 −3 tests/regressiontests/model_forms_regress/tests.py
  173. +1 −1 tests/regressiontests/queries/models.py
  174. +57 −2 tests/regressiontests/queries/tests.py
  175. +44 −44 tests/regressiontests/requests/tests.py
  176. +3 −3 tests/regressiontests/servers/tests.py
  177. +3 −3 tests/regressiontests/signing/tests.py
  178. +7 −0 tests/regressiontests/staticfiles_tests/storage.py
  179. +76 −46 tests/regressiontests/staticfiles_tests/tests.py
  180. +1 −1 tests/regressiontests/string_lookup/tests.py
  181. +7 −7 tests/regressiontests/templates/tests.py
  182. +6 −6 tests/regressiontests/templates/unicode.py
  183. +0 −1,034 tests/regressiontests/test_client_regress/models.py
  184. +1,006 −0 tests/regressiontests/test_client_regress/tests.py
  185. +2 −3 tests/regressiontests/test_client_regress/views.py
  186. +3 −8 tests/regressiontests/test_runner/tests.py
  187. +3 −3 tests/regressiontests/views/__init__.py
  188. +63 −41 tests/regressiontests/views/tests/debug.py
  189. +5 −5 tests/regressiontests/views/tests/static.py
  190. +21 −2 tests/regressiontests/views/views.py
View
@@ -93,7 +93,7 @@ answer newbie questions, and generally made Django that much better:
Simon Blanchard
David Blewett <david@dawninglight.net>
Matt Boersma <matt@sprout.org>
- boobsd@gmail.com
+ Artem Gnilov <boobsd@gmail.com>
Matías Bordese
Nate Bragg <jonathan.bragg@alum.rpi.edu>
Sean Brant
@@ -211,7 +211,6 @@ answer newbie questions, and generally made Django that much better:
Dimitris Glezos <dimitris@glezos.com>
glin@seznam.cz
martin.glueck@gmail.com
- Artyom Gnilov <boobsd@gmail.com>
Ben Godfrey <http://aftnn.org>
GomoX <gomo@datafull.com>
Guilherme Mesquita Gondim <semente@taurinus.org>
@@ -347,6 +346,7 @@ answer newbie questions, and generally made Django that much better:
Frantisek Malina <vizualbod@vizualbod.com>
Mike Malone <mjmalone@gmail.com>
Martin Maney <http://www.chipy.org/Martin_Maney>
+ Michael Manfre <mmanfre@gmail.com>
masonsimon+django@gmail.com
Manuzhai
Petr Marhoun <petr.marhoun@gmail.com>
@@ -401,6 +401,7 @@ answer newbie questions, and generally made Django that much better:
Christian Oudard <christian.oudard@gmail.com>
oggie rob <oz.robharvey@gmail.com>
oggy <ognjen.maric@gmail.com>
+ Jens Page
Jay Parlar <parlar@gmail.com>
Carlos Eduardo de Paula <carlosedp@gmail.com>
John Paulett <john@paulett.org>
@@ -3,15 +3,15 @@
var options = $.extend({}, $.fn.actions.defaults, opts);
var actionCheckboxes = $(this);
var list_editable_changed = false;
- checker = function(checked) {
+ var checker = function(checked) {
if (checked) {
showQuestion();
} else {
reset();
}
$(actionCheckboxes).attr("checked", checked)
.parent().parent().toggleClass(options.selectedClass, checked);
- }
+ },
updateCounter = function() {
var sel = $(actionCheckboxes).filter(":checked").length;
$(options.counterContainer).html(interpolate(
@@ -29,30 +29,30 @@
}
return value;
});
- }
+ },
showQuestion = function() {
$(options.acrossClears).hide();
$(options.acrossQuestions).show();
$(options.allContainer).hide();
- }
+ },
showClear = function() {
$(options.acrossClears).show();
$(options.acrossQuestions).hide();
$(options.actionContainer).toggleClass(options.selectedClass);
$(options.allContainer).show();
$(options.counterContainer).hide();
- }
+ },
reset = function() {
$(options.acrossClears).hide();
$(options.acrossQuestions).hide();
$(options.allContainer).hide();
$(options.counterContainer).show();
- }
+ },
clearAcross = function() {
reset();
$(options.acrossInput).val(0);
$(options.actionContainer).removeClass(options.selectedClass);
- }
+ };
// Show counter by default
$(options.counterContainer).show();
// Check state of checkboxes and reinit state if needed
@@ -81,9 +81,9 @@
});
lastChecked = null;
$(actionCheckboxes).click(function(event) {
- if (!event) { var event = window.event; }
+ if (!event) { event = window.event; }
var target = event.target ? event.target : event.srcElement;
- if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey == true) {
+ if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey === true) {
var inrange = false;
$(lastChecked).attr("checked", target.checked)
.parent().parent().toggleClass(options.selectedClass, target.checked);
@@ -124,7 +124,7 @@
}
}
});
- }
+ };
/* Setup plugin defaults */
$.fn.actions.defaults = {
actionContainer: "div.actions",
@@ -135,5 +135,5 @@
acrossClears: "div.actions span.clear",
allToggle: "#action-toggle",
selectedClass: "selected"
- }
+ };
})(django.jQuery);

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -31,11 +31,11 @@
}
};
var totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS").attr("autocomplete", "off");
- var nextIndex = parseInt(totalForms.val());
+ var nextIndex = parseInt(totalForms.val(), 10);
var maxForms = $("#id_" + options.prefix + "-MAX_NUM_FORMS").attr("autocomplete", "off");
// only show the add button if we are allowed to add more items,
// note that max_num = None translates to a blank string.
- var showAddButton = maxForms.val() == '' || (maxForms.val()-totalForms.val()) > 0;
+ var showAddButton = maxForms.val() === '' || (maxForms.val()-totalForms.val()) > 0;
$(this).each(function(i) {
$(this).not("." + options.emptyCssClass).addClass(options.formCssClass);
});
@@ -52,13 +52,14 @@
$(this).filter(":last").after('<div class="' + options.addCssClass + '"><a href="javascript:void(0)">' + options.addText + "</a></div>");
addButton = $(this).filter(":last").next().find("a");
}
- addButton.click(function() {
+ addButton.click(function(e) {
+ e.preventDefault();
var totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS");
var template = $("#" + options.prefix + "-empty");
var row = template.clone(true);
row.removeClass(options.emptyCssClass)
- .addClass(options.formCssClass)
- .attr("id", options.prefix + "-" + nextIndex);
+ .addClass(options.formCssClass)
+ .attr("id", options.prefix + "-" + nextIndex);
if (row.is("tr")) {
// If the forms are laid out in table rows, insert
// the remove button into the last table cell:
@@ -78,14 +79,15 @@
// Insert the new form when it has been fully edited
row.insertBefore($(template));
// Update number of total forms
- $(totalForms).val(parseInt(totalForms.val()) + 1);
+ $(totalForms).val(parseInt(totalForms.val(), 10) + 1);
nextIndex += 1;
// Hide add button in case we've hit the max, except we want to add infinitely
- if ((maxForms.val() != '') && (maxForms.val()-totalForms.val()) <= 0) {
+ if ((maxForms.val() !== '') && (maxForms.val()-totalForms.val()) <= 0) {
addButton.parent().hide();
}
// The delete button of each row triggers a bunch of other things
- row.find("a." + options.deleteCssClass).click(function() {
+ row.find("a." + options.deleteCssClass).click(function(e) {
+ e.preventDefault();
// Remove the parent form containing this button:
var row = $(this).parents("." + options.formCssClass);
row.remove();
@@ -98,7 +100,7 @@
var forms = $("." + options.formCssClass);
$("#id_" + options.prefix + "-TOTAL_FORMS").val(forms.length);
// Show add button again once we drop below max
- if ((maxForms.val() == '') || (maxForms.val()-forms.length) > 0) {
+ if ((maxForms.val() === '') || (maxForms.val()-forms.length) > 0) {
addButton.parent().show();
}
// Also, update names and ids for all remaining form controls
@@ -110,17 +112,15 @@
updateElementIndex(this, options.prefix, i);
});
}
- return false;
});
// If a post-add callback was supplied, call it with the added form:
if (options.added) {
options.added(row);
}
- return false;
});
}
return this;
- }
+ };
/* Setup plugin defaults */
$.fn.formset.defaults = {
prefix: "form", // The form prefix for your django formset
@@ -132,5 +132,5 @@
formCssClass: "dynamic-form", // CSS class applied to each form in a formset
added: null, // Function called each time a new form is added
removed: null // Function called each time a form is deleted
- }
+ };
})(django.jQuery);

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -15,8 +15,12 @@
{% if app_list %}
{% for app in app_list %}
<div class="module">
- <table summary="{% blocktrans with name=app.name %}Models available in the {{ name }} application.{% endblocktrans %}">
- <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with name=app.name %}{{ name }}{% endblocktrans %}</a></caption>
+ <table>
+ <caption>
+ <a href="{{ app.app_url }}" class="section" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">
+ {% blocktrans with name=app.name %}{{ name }}{% endblocktrans %}
+ </a>
+ </caption>
{% for model in app.models %}
<tr>
{% if model.admin_url %}
@@ -1,4 +1,5 @@
import operator
+from functools import reduce
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
from django.core.paginator import InvalidPage
Oops, something went wrong.

0 comments on commit eee791e

Please sign in to comment.