Permalink
Browse files

Merge remote-tracking branch 'core/master' into schema-alteration

Conflicts:
	django/db/backends/__init__.py
	django/db/models/fields/related.py
	tests/field_deconstruction/tests.py
  • Loading branch information...
2 parents e2d7e83 + 48dd1e6 commit 7a47ba6f6aeca36b8b092dbafd36abb342d34d4b @andrewgodwin andrewgodwin committed Jun 28, 2013
Showing with 1,166 additions and 419 deletions.
  1. +6 −1 AUTHORS
  2. +1 −1 django/__init__.py
  3. +1 −1 django/contrib/admin/actions.py
  4. +67 −56 django/contrib/admin/options.py
  5. +2 −2 django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
  6. +9 −0 django/contrib/admin/templates/admin/popup_response.html
  7. +1 −1 django/contrib/admin/templates/admin/search_form.html
  8. +1 −1 django/contrib/admin/templates/registration/password_reset_email.html
  9. +3 −3 django/contrib/admin/templatetags/admin_list.py
  10. +3 −3 django/contrib/admin/templatetags/admin_urls.py
  11. +1 −2 django/contrib/admin/validation.py
  12. +25 −3 django/contrib/admin/views/main.py
  13. +0 −1 django/contrib/admindocs/views.py
  14. +14 −1 django/contrib/auth/__init__.py
  15. +3 −2 django/contrib/auth/admin.py
  16. +3 −2 django/contrib/auth/forms.py
  17. +6 −7 django/contrib/auth/management/__init__.py
  18. +15 −12 django/contrib/auth/models.py
  19. +1 −1 django/contrib/auth/tests/templates/registration/password_reset_email.html
  20. +21 −1 django/contrib/auth/tests/test_custom_user.py
  21. +25 −0 django/contrib/auth/tests/test_models.py
  22. +1 −1 django/contrib/auth/tests/test_remote_user.py
  23. +23 −4 django/contrib/auth/tests/test_views.py
  24. +2 −3 django/contrib/auth/tests/urls.py
  25. +3 −0 django/contrib/auth/urls.py
  26. +15 −6 django/contrib/auth/views.py
  27. +1 −1 django/contrib/comments/admin.py
  28. +0 −1 django/contrib/flatpages/tests/test_csrf.py
  29. +0 −1 django/contrib/flatpages/tests/test_templatetags.py
  30. +0 −4 django/contrib/formtools/tests/tests.py
  31. +0 −2 django/contrib/formtools/tests/wizard/test_cookiestorage.py
  32. +0 −1 django/contrib/gis/admin/widgets.py
  33. +0 −1 django/contrib/gis/db/backends/postgis/creation.py
  34. +0 −1 django/contrib/gis/db/models/aggregates.py
  35. +0 −1 django/contrib/gis/geos/tests/test_io.py
  36. +0 −1 django/contrib/gis/management/commands/ogrinspect.py
  37. +0 −2 django/contrib/gis/tests/relatedapp/tests.py
  38. +0 −1 django/contrib/sitemaps/tests/base.py
  39. +0 −1 django/contrib/sitemaps/tests/urls/http.py
  40. 0 django/core/{compat_checks → checks}/__init__.py
  41. 0 {tests/compat_checks → django/core/checks/compatibility}/__init__.py
  42. +1 −1 django/core/{compat_checks → checks/compatibility}/base.py
  43. +1 −1 django/core/{compat_checks → checks/compatibility}/django_1_6_0.py
  44. +0 −1 django/core/exceptions.py
  45. +4 −0 django/core/files/move.py
  46. +1 −0 django/core/handlers/wsgi.py
  47. +0 −2 django/core/management/__init__.py
  48. +1 −1 django/core/management/commands/{checksetup.py → check.py}
  49. +3 −3 django/core/management/commands/makemessages.py
  50. +1 −1 django/core/management/templates.py
  51. +0 −1 django/core/serializers/base.py
  52. +14 −0 django/db/backends/__init__.py
  53. +42 −24 django/db/backends/oracle/base.py
  54. +0 −2 django/db/backends/postgresql_psycopg2/base.py
  55. +0 −2 django/db/backends/postgresql_psycopg2/creation.py
  56. +1 −1 django/db/backends/postgresql_psycopg2/operations.py
  57. +6 −1 django/db/backends/sqlite3/base.py
  58. +14 −8 django/db/models/fields/related.py
  59. +24 −0 django/db/models/options.py
  60. +4 −1 django/db/models/query.py
  61. +20 −0 django/db/transaction.py
  62. +2 −8 django/forms/fields.py
  63. +9 −8 django/forms/formsets.py
  64. +0 −1 django/forms/util.py
  65. +2 −3 django/forms/widgets.py
  66. +4 −0 django/http/request.py
  67. +0 −2 django/middleware/csrf.py
  68. +1 −0 django/template/base.py
  69. +0 −1 django/template/defaultfilters.py
  70. +3 −2 django/template/defaulttags.py
  71. +15 −10 django/test/utils.py
  72. +0 −1 django/utils/html.py
  73. +20 −1 django/utils/http.py
  74. +0 −1 django/utils/text.py
  75. +0 −1 django/views/debug.py
  76. +0 −2 django/views/decorators/csrf.py
  77. +15 −4 django/views/generic/edit.py
  78. +2 −2 docs/conf.py
  79. +10 −17 docs/faq/install.txt
  80. +1 −1 docs/howto/custom-model-fields.txt
  81. +3 −2 docs/howto/deployment/wsgi/modwsgi.txt
  82. +1 −1 docs/howto/static-files/index.txt
  83. +5 −1 docs/internals/contributing/triaging-tickets.txt
  84. +8 −0 docs/internals/deprecation.txt
  85. +1 −1 docs/intro/reusable-apps.txt
  86. +3 −3 docs/intro/tutorial03.txt
  87. +5 −0 docs/ref/class-based-views/flattened-index.txt
  88. +13 −0 docs/ref/class-based-views/mixins-editing.txt
  89. +6 −1 docs/ref/contrib/admin/index.txt
  90. +1 −1 docs/ref/contrib/sitemaps.txt
  91. +8 −0 docs/ref/databases.txt
  92. +22 −0 docs/ref/models/fields.txt
  93. +5 −2 docs/ref/models/instances.txt
  94. +11 −3 docs/ref/settings.txt
  95. +4 −4 docs/ref/signals.txt
  96. +14 −0 docs/ref/utils.txt
  97. +82 −3 docs/releases/1.6.txt
  98. +16 −6 docs/topics/auth/default.txt
  99. +21 −17 docs/topics/class-based-views/generic-display.txt
  100. +3 −2 docs/topics/class-based-views/generic-editing.txt
  101. +1 −1 docs/topics/class-based-views/intro.txt
  102. +79 −78 docs/topics/class-based-views/mixins.txt
  103. +20 −5 docs/topics/db/sql.txt
  104. +21 −0 docs/topics/db/transactions.txt
  105. +2 −2 docs/topics/http/file-uploads.txt
  106. +2 −2 docs/topics/http/shortcuts.txt
  107. +6 −4 docs/topics/testing/overview.txt
  108. +1 −1 tests/admin_views/models.py
  109. +23 −3 tests/admin_views/tests.py
  110. +78 −3 tests/backends/tests.py
  111. 0 tests/check/__init__.py
  112. 0 tests/{compat_checks → check}/models.py
  113. +11 −11 tests/{compat_checks → check}/tests.py
  114. +1 −1 tests/field_deconstruction/tests.py
  115. +14 −0 tests/files/tests.py
  116. +8 −0 tests/foreign_object/models.py
  117. +20 −1 tests/foreign_object/tests.py
  118. +2 −2 tests/forms_tests/tests/test_fields.py
  119. +2 −1 tests/forms_tests/tests/test_formsets.py
  120. +20 −1 tests/generic_views/test_edit.py
  121. +5 −1 tests/i18n/commands/__init__.py
  122. +19 −0 tests/i18n/commands/extraction.py
  123. +6 −0 tests/i18n/commands/templates/plural.djtpl
  124. +22 −0 tests/lookup/tests.py
  125. +19 −2 tests/model_formsets/tests.py
  126. +19 −2 tests/raw_query/tests.py
  127. +5 −0 tests/servers/tests.py
  128. +26 −1 tests/settings_tests/tests.py
  129. +4 −0 tests/template_tests/tests.py
  130. +24 −2 tests/transactions/tests.py
View
@@ -97,6 +97,7 @@ answer newbie questions, and generally made Django that much better:
Ned Batchelder <http://www.nedbatchelder.com/>
batiste@dosimple.ch
Batman
+ Oliver Beattie <oliver@obeattie.com>
Brian Beck <http://blog.brianbeck.com/>
Shannon -jj Behrens <http://jjinux.blogspot.com/>
Esdras Beleza <linux@esdrasbeleza.com>
@@ -151,6 +152,7 @@ answer newbie questions, and generally made Django that much better:
Antonis Christofides <anthony@itia.ntua.gr>
Michal Chruszcz <troll@pld-linux.org>
Can Burak Çilingir <canburak@cs.bilgi.edu.tr>
+ Andrew Clark <amclark7@gmail.com>
Ian Clelland <clelland@gmail.com>
Travis Cline <travis.cline@gmail.com>
Russell Cloran <russell@rucus.net>
@@ -248,6 +250,7 @@ answer newbie questions, and generally made Django that much better:
martin.glueck@gmail.com
Ben Godfrey <http://aftnn.org>
GomoX <gomo@datafull.com>
+ Gil Gonçalves <lursty@gmail.com>
Guilherme Mesquita Gondim <semente@taurinus.org>
Mario Gonzalez <gonzalemario@gmail.com>
David Gouldin <dgouldin@gmail.com>
@@ -271,6 +274,7 @@ answer newbie questions, and generally made Django that much better:
Brian Harring <ferringb@gmail.com>
Brant Harris
Ronny Haryanto <http://ronny.haryan.to/>
+ Axel Haustant <noirbizarre@gmail.com>
Hawkeye
Kent Hauser <kent@khauser.net>
Joe Heck <http://www.rhonabwy.com/wp/>
@@ -486,7 +490,7 @@ answer newbie questions, and generally made Django that much better:
Brian Ray <http://brianray.chipy.org/>
Lee Reilly <lee@leereilly.net>
Łukasz Rekucki <lrekucki@gmail.com>
- remco@diji.biz
+ Remco Wendt <remco.wendt@gmail.com>
Marc Remolt <m.remolt@webmasters.de>
Bruno Renié <buburno@gmail.com>
David Reynolds <david@reynoldsfamily.org.uk>
@@ -608,6 +612,7 @@ answer newbie questions, and generally made Django that much better:
Filip Wasilewski <filip.wasilewski@gmail.com>
Dan Watson <http://danwatson.net/>
Joel Watts <joel@joelwatts.com>
+ Russ Webber
Lakin Wecker <lakin@structuredabstraction.com>
Chris Wesseling <Chris.Wesseling@cwi.nl>
Benjamin Wohlwend <piquadrat@gmail.com>
View
@@ -1,4 +1,4 @@
-VERSION = (1, 6, 0, 'alpha', 1)
+VERSION = (1, 7, 0, 'alpha', 0)
def get_version(*args, **kwargs):
# Don't litter django/__init__.py with all the get_version stuff.
@@ -19,7 +19,7 @@ def delete_selected(modeladmin, request, queryset):
deleteable objects, or, if the user has no permission one of the related
childs (foreignkeys), a "permission denied" message.
- Next, it delets all selected objects and redirects back to the change list.
+ Next, it deletes all selected objects and redirects back to the change list.
"""
opts = modeladmin.model._meta
app_label = opts.app_label
@@ -4,18 +4,15 @@
from django import forms
from django.conf import settings
-from django.forms.formsets import all_valid, DELETION_FIELD_NAME
-from django.forms.models import (modelform_factory, modelformset_factory,
- inlineformset_factory, BaseInlineFormSet, modelform_defines_fields)
-from django.contrib.contenttypes.models import ContentType
+from django.contrib import messages
from django.contrib.admin import widgets, helpers
from django.contrib.admin.util import (unquote, flatten_fieldsets, get_deleted_objects,
model_format_dict, NestedObjects, lookup_needs_distinct)
from django.contrib.admin import validation
from django.contrib.admin.templatetags.admin_static import static
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
-from django.contrib import messages
-from django.views.decorators.csrf import csrf_protect
+from django.contrib.auth import get_permission_codename
+from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied, ValidationError, FieldError
from django.core.paginator import Paginator
from django.core.urlresolvers import reverse
@@ -24,7 +21,10 @@
from django.db.models.related import RelatedObject
from django.db.models.fields import BLANK_CHOICE_DASH, FieldDoesNotExist
from django.db.models.sql.constants import QUERY_TERMS
-from django.http import Http404, HttpResponse, HttpResponseRedirect
+from django.forms.formsets import all_valid, DELETION_FIELD_NAME
+from django.forms.models import (modelform_factory, modelformset_factory,
+ inlineformset_factory, BaseInlineFormSet, modelform_defines_fields)
+from django.http import Http404, HttpResponseRedirect
from django.http.response import HttpResponseBase
from django.shortcuts import get_object_or_404
from django.template.response import SimpleTemplateResponse, TemplateResponse
@@ -39,6 +39,10 @@
from django.utils.translation import ugettext as _
from django.utils.translation import ungettext
from django.utils.encoding import force_text
+from django.views.decorators.csrf import csrf_protect
+
+
+IS_POPUP_VAR = '_popup'
HORIZONTAL, VERTICAL = 1, 2
# returns the <ul> class for a given radio_admin field
@@ -56,15 +60,15 @@ class IncorrectLookupParameters(Exception):
'form_class': forms.SplitDateTimeField,
'widget': widgets.AdminSplitDateTime
},
- models.DateField: {'widget': widgets.AdminDateWidget},
- models.TimeField: {'widget': widgets.AdminTimeWidget},
- models.TextField: {'widget': widgets.AdminTextareaWidget},
- models.URLField: {'widget': widgets.AdminURLFieldWidget},
- models.IntegerField: {'widget': widgets.AdminIntegerFieldWidget},
+ models.DateField: {'widget': widgets.AdminDateWidget},
+ models.TimeField: {'widget': widgets.AdminTimeWidget},
+ models.TextField: {'widget': widgets.AdminTextareaWidget},
+ models.URLField: {'widget': widgets.AdminURLFieldWidget},
+ models.IntegerField: {'widget': widgets.AdminIntegerFieldWidget},
models.BigIntegerField: {'widget': widgets.AdminBigIntegerFieldWidget},
- models.CharField: {'widget': widgets.AdminTextInputWidget},
- models.ImageField: {'widget': widgets.AdminFileWidget},
- models.FileField: {'widget': widgets.AdminFileWidget},
+ models.CharField: {'widget': widgets.AdminTextInputWidget},
+ models.ImageField: {'widget': widgets.AdminFileWidget},
+ models.FileField: {'widget': widgets.AdminFileWidget},
}
csrf_protect_m = method_decorator(csrf_protect)
@@ -350,7 +354,8 @@ def has_add_permission(self, request):
Can be overridden by the user in subclasses.
"""
opts = self.opts
- return request.user.has_perm(opts.app_label + '.' + opts.get_add_permission())
+ codename = get_permission_codename('add', opts)
+ return request.user.has_perm("%s.%s" % (opts.app_label, codename))
def has_change_permission(self, request, obj=None):
"""
@@ -364,7 +369,8 @@ def has_change_permission(self, request, obj=None):
request has permission to change *any* object of the given type.
"""
opts = self.opts
- return request.user.has_perm(opts.app_label + '.' + opts.get_change_permission())
+ codename = get_permission_codename('change', opts)
+ return request.user.has_perm("%s.%s" % (opts.app_label, codename))
def has_delete_permission(self, request, obj=None):
"""
@@ -378,7 +384,9 @@ def has_delete_permission(self, request, obj=None):
request has permission to delete *any* object of the given type.
"""
opts = self.opts
- return request.user.has_perm(opts.app_label + '.' + opts.get_delete_permission())
+ codename = get_permission_codename('delete', opts)
+ return request.user.has_perm("%s.%s" % (opts.app_label, codename))
+
class ModelAdmin(BaseModelAdmin):
"Encapsulates all admin options and functionality for a given model."
@@ -606,11 +614,11 @@ def log_addition(self, request, object):
"""
from django.contrib.admin.models import LogEntry, ADDITION
LogEntry.objects.log_action(
- user_id = request.user.pk,
- content_type_id = ContentType.objects.get_for_model(object).pk,
- object_id = object.pk,
- object_repr = force_text(object),
- action_flag = ADDITION
+ user_id=request.user.pk,
+ content_type_id=ContentType.objects.get_for_model(object).pk,
+ object_id=object.pk,
+ object_repr=force_text(object),
+ action_flag=ADDITION
)
def log_change(self, request, object, message):
@@ -621,12 +629,12 @@ def log_change(self, request, object, message):
"""
from django.contrib.admin.models import LogEntry, CHANGE
LogEntry.objects.log_action(
- user_id = request.user.pk,
- content_type_id = ContentType.objects.get_for_model(object).pk,
- object_id = object.pk,
- object_repr = force_text(object),
- action_flag = CHANGE,
- change_message = message
+ user_id=request.user.pk,
+ content_type_id=ContentType.objects.get_for_model(object).pk,
+ object_id=object.pk,
+ object_repr=force_text(object),
+ action_flag=CHANGE,
+ change_message=message
)
def log_deletion(self, request, object, object_repr):
@@ -638,11 +646,11 @@ def log_deletion(self, request, object, object_repr):
"""
from django.contrib.admin.models import LogEntry, DELETION
LogEntry.objects.log_action(
- user_id = request.user.pk,
- content_type_id = ContentType.objects.get_for_model(self.model).pk,
- object_id = object.pk,
- object_repr = object_repr,
- action_flag = DELETION
+ user_id=request.user.pk,
+ content_type_id=ContentType.objects.get_for_model(self.model).pk,
+ object_id=object.pk,
+ object_repr=object_repr,
+ action_flag=DELETION
)
def action_checkbox(self, obj):
@@ -660,8 +668,8 @@ def get_actions(self, request):
"""
# If self.actions is explicitly set to None that means that we don't
# want *any* actions enabled on this page.
- from django.contrib.admin.views.main import IS_POPUP_VAR
- if self.actions is None or IS_POPUP_VAR in request.GET:
+ from django.contrib.admin.views.main import _is_changelist_popup
+ if self.actions is None or _is_changelist_popup(request):
return SortedDict()
actions = []
@@ -878,7 +886,7 @@ def render_change_form(self, request, context, add=False, change=False, form_url
'has_add_permission': self.has_add_permission(request),
'has_change_permission': self.has_change_permission(request, obj),
'has_delete_permission': self.has_delete_permission(request, obj),
- 'has_file_field': True, # FIXME - this should check if form or formsets have a FileField,
+ 'has_file_field': True, # FIXME - this should check if form or formsets have a FileField,
'has_absolute_url': hasattr(self.model, 'get_absolute_url'),
'form_url': form_url,
'opts': opts,
@@ -908,12 +916,11 @@ def response_add(self, request, obj, post_url_continue=None):
msg_dict = {'name': force_text(opts.verbose_name), 'obj': force_text(obj)}
# Here, we distinguish between different save types by checking for
# the presence of keys in request.POST.
- if "_popup" in request.POST:
- return HttpResponse(
- '<!DOCTYPE html><html><head><title></title></head><body>'
- '<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script></body></html>' % \
- # escape() calls force_text.
- (escape(pk_value), escapejs(obj)))
+ if IS_POPUP_VAR in request.POST:
+ return SimpleTemplateResponse('admin/popup_response.html', {
+ 'pk_value': escape(pk_value),
+ 'obj': escapejs(obj)
+ })
elif "_continue" in request.POST:
msg = _('The %(name)s "%(obj)s" was added successfully. You may edit it again below.') % msg_dict
@@ -1049,7 +1056,7 @@ def response_action(self, request, queryset):
if action_form.is_valid():
action = action_form.cleaned_data['action']
select_across = action_form.cleaned_data['select_across']
- func, name, description = self.get_actions(request)[action]
+ func = self.get_actions(request)[action][0]
# Get the list of selected PKs. If nothing's selected, we can't
# perform an action on it, so bail. Except we want to perform
@@ -1158,7 +1165,7 @@ def add_view(self, request, form_url='', extra_context=None):
context = {
'title': _('Add %s') % force_text(opts.verbose_name),
'adminform': adminForm,
- 'is_popup': "_popup" in request.REQUEST,
+ 'is_popup': IS_POPUP_VAR in request.REQUEST,
'media': media,
'inline_admin_formsets': inline_admin_formsets,
'errors': helpers.AdminErrorList(form, formsets),
@@ -1251,7 +1258,7 @@ def change_view(self, request, object_id, form_url='', extra_context=None):
'adminform': adminForm,
'object_id': object_id,
'original': obj,
- 'is_popup': "_popup" in request.REQUEST,
+ 'is_popup': IS_POPUP_VAR in request.REQUEST,
'media': media,
'inline_admin_formsets': inline_admin_formsets,
'errors': helpers.AdminErrorList(form, formsets),
@@ -1280,7 +1287,7 @@ def changelist_view(self, request, extra_context=None):
actions = self.get_actions(request)
if actions:
# Add the action checkboxes if there are any actions available.
- list_display = ['action_checkbox'] + list(list_display)
+ list_display = ['action_checkbox'] + list(list_display)
ChangeList = self.get_changelist(request)
try:
@@ -1429,7 +1436,10 @@ def delete_view(self, request, object_id, extra_context=None):
raise PermissionDenied
if obj is None:
- raise Http404(_('%(name)s object with primary key %(key)r does not exist.') % {'name': force_text(opts.verbose_name), 'key': escape(object_id)})
+ raise Http404(
+ _('%(name)s object with primary key %(key)r does not exist.') %
+ {'name': force_text(opts.verbose_name), 'key': escape(object_id)}
+ )
using = router.db_for_write(self.model)
@@ -1438,7 +1448,7 @@ def delete_view(self, request, object_id, extra_context=None):
(deleted_objects, perms_needed, protected) = get_deleted_objects(
[obj], opts, request.user, self.admin_site, using)
- if request.POST: # The user has already confirmed the deletion.
+ if request.POST: # The user has already confirmed the deletion.
if perms_needed:
raise PermissionDenied
obj_display = force_text(obj)
@@ -1456,7 +1466,9 @@ def delete_view(self, request, object_id, extra_context=None):
(opts.app_label, opts.model_name),
current_app=self.admin_site.name)
preserved_filters = self.get_preserved_filters(request)
- post_url = add_preserved_filters({'preserved_filters': preserved_filters, 'opts': opts}, post_url)
+ post_url = add_preserved_filters(
+ {'preserved_filters': preserved_filters, 'opts': opts}, post_url
+ )
else:
post_url = reverse('admin:index',
current_app=self.admin_site.name)
@@ -1522,6 +1534,7 @@ def history_view(self, request, object_id, extra_context=None):
"admin/object_history.html"
], context, current_app=self.admin_site.name)
+
class InlineModelAdmin(BaseModelAdmin):
"""
Options for inline editing of ``model`` instances.
@@ -1665,8 +1678,7 @@ def has_add_permission(self, request):
# to have the change permission for the related model in order to
# be able to do anything with the intermediate model.
return self.has_change_permission(request)
- return request.user.has_perm(
- self.opts.app_label + '.' + self.opts.get_add_permission())
+ return super(InlineModelAdmin, self).has_add_permission(request)
def has_change_permission(self, request, obj=None):
opts = self.opts
@@ -1677,8 +1689,8 @@ def has_change_permission(self, request, obj=None):
if field.rel and field.rel.to != self.parent_model:
opts = field.rel.to._meta
break
- return request.user.has_perm(
- opts.app_label + '.' + opts.get_change_permission())
+ codename = get_permission_codename('change', opts)
+ return request.user.has_perm("%s.%s" % (opts.app_label, codename))
def has_delete_permission(self, request, obj=None):
if self.opts.auto_created:
@@ -1687,8 +1699,7 @@ def has_delete_permission(self, request, obj=None):
# to have the change permission for the related model in order to
# be able to do anything with the intermediate model.
return self.has_change_permission(request, obj)
- return request.user.has_perm(
- self.opts.app_label + '.' + self.opts.get_delete_permission())
+ return super(InlineModelAdmin, self).has_delete_permission(request, obj)
class StackedInline(InlineModelAdmin):
@@ -32,9 +32,9 @@ function showRelatedObjectLookupPopup(triggeringLink) {
name = id_to_windowname(name);
var href;
if (triggeringLink.href.search(/\?/) >= 0) {
- href = triggeringLink.href + '&pop=1';
+ href = triggeringLink.href + '&_popup=1';
} else {
- href = triggeringLink.href + '?pop=1';
+ href = triggeringLink.href + '?_popup=1';
}
var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
win.focus();
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head><title></title></head>
+ <body>
+ <script type="text/javascript">
+ opener.dismissAddAnotherPopup(window, "{{ pk_value }}", "{{ obj }}");
+ </script>
+ </body>
+</html>
@@ -6,7 +6,7 @@
<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" />
<input type="submit" value="{% trans 'Search' %}" />
{% if show_result_count %}
- <span class="small quiet">{% blocktrans count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}pop=1{% endif %}">{% blocktrans with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
+ <span class="small quiet">{% blocktrans count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% blocktrans with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
{% endif %}
{% for pair in cl.params.items %}
{% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %}
Oops, something went wrong.

0 comments on commit 7a47ba6

Please sign in to comment.