{"id": 8272, "created": "2008-08-13 02:11:04", "changetime": "2013-04-07 18:04:21", "last_pulled_from_trac": "2022-03-06 03:41:48.836748", "stage": "Accepted", "status": "closed", "component": "Forms", "type": "New feature", "severity": "Normal", "version": "dev", "resolution": "duplicate", "summary": "Patch to forms to add a fieldset attribute to Field for use with templates", "description": "I needed to create a complex form that used fieldsets to divide sections of the form. I finally figured out that to do this, I needed to modify the forms code a bit. I've tested this patch against the latest version of svn and it worked. Below is a snippet of a template to show you how you would use the new fieldset attribute for more complex form layouts. The diff file is attached.\r\n\r\n
\r\n{% regroup form by fieldset as fields_list %}\r\n{% for field in fields_list %}\r\n
\r\n {{ field.grouper|upper }}\r\n {% for f in field.list %}\r\n {{ f.label_tag }} {{ f }}\r\n {% endfor %}\r\n
\r\n{% endfor %}\r\n \r\n
", "owner": "jbowman", "reporter": "jbowman", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 1, "needs_docs": 1, "ui_ux": 0} {"id": 8273, "created": "2008-08-13 02:13:52", "changetime": "2012-10-15 19:37:28", "last_pulled_from_trac": "2022-03-06 03:41:49.004388", "stage": "Accepted", "status": "closed", "component": "contrib.localflavor", "type": "Cleanup/optimization", "severity": "Normal", "version": "dev", "resolution": "wontfix", "summary": "Reduce amount of redundant code in django.contrib.localflavor", "description": "There is a plenty of somehow redundant code in {{{django.contrib.localflavor}}} which leads to potentially more bugs and what is quite inconvenient -- many translation strings.\r\n\r\nI would like to propose the patch that handles all fields with a checksum verification.\r\n\r\nPros:\r\n\r\n * a lot fewer translation strings, which is more consistent and means less work when translating Django to 50 languages,\r\n * DRY compatible (and all benefits that it implies).\r\n\r\nCons:\r\n\r\n * backwards incompatible,\r\n * new code may contain bugs (although all tests were OK).\r\n\r\nI volunteer for further modifications of {{{django.contrib.localflavor}}} code to use {{{NumberWithChecksumField}}} if this patch is accepted.", "owner": "nobody", "reporter": "Piotr Lewandowski ", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8275, "created": "2008-08-13 02:38:17", "changetime": "2009-03-26 03:45:49", "last_pulled_from_trac": "2022-03-06 03:41:49.345347", "stage": "Accepted", "status": "closed", "component": "contrib.auth", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Unused and unnecessary imports in auth views", "description": "Attached patch removes those.", "owner": "nobody", "reporter": "julien", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8276, "created": "2008-08-13 02:42:15", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:49.524817", "stage": "Accepted", "status": "closed", "component": "contrib.localflavor", "type": "Uncategorized", "severity": "Normal", "version": "dev", "resolution": "fixed", "summary": "Change fields' names in django.contrib.localflavor.pl.forms", "description": "I would like to propose backward incompatible change {{{django.contrib.localflavor.pl.forms}}}:\r\n\r\nSome classes present in {{{django.contrib.localflavor.pl.forms}}} are named in a werid way - they are neither short and useful, nor offical translations of corresponding numbers.\r\n\r\n||Old name||New name||\r\n||`PLNationalIdentificationNumberField`||`PLPESELField`||\r\n||`PLTaxNumberField`||`PLNIPField`||\r\n||`PLNationalBusinessRegisterField`||`PLREGONField`||\r\n||`PLVoivodeshipSelect`||`PLProvinceSelect`||\r\n||`PLAdministrativeUnitSelect`||`PLCountiesSelect`||\r\n\r\nNot only Polish people in everyday language use those acronyms, but even Polish officials refer to those numbers as `PESEL`, `REGON` and `NIP`:\r\n\r\n * http://www.mswia.gov.pl/portal/en/1/383/18102007_Meeting_of_G6_Ministers__Invitation_for_Conference.html\r\n * http://www.stat.gov.pl/bip/regon_ENG_HTML.htm\r\n\r\nI'm willing to prepare the patch if those changes are accepted.", "owner": "nobody", "reporter": "Piotr Lewandowski ", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8277, "created": "2008-08-13 03:17:31", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:49.694552", "stage": "Accepted", "status": "closed", "component": "Documentation", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Typo in forms documentation", "description": "\"You might want to allow the user to create several articles at once. To create a formset '''of''' out of an ArticleForm you would do:\"\r\n", "owner": "nobody", "reporter": "jarrow", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8278, "created": "2008-08-13 04:32:20", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:49.849023", "stage": "Accepted", "status": "closed", "component": "Core (Other)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "QueryDict.update eats data when other_dict is a MultiValueDict", "description": "django.http.QueryDict supports .update, but it seems to assume that other_dict is a (builtin) dict.\r\n\r\nThis is dangerous when mixing two QueryDicts. \r\n\r\n{{{\r\n>>> x = QueryDict('a=1&a=2')\r\n>>> y = QueryDict('a=3&a=4')\r\n>>> print x\r\n\r\n>>> print y\r\n\r\n>>> x._mutable = True\r\n>>> x.update(y)\r\n>>> x._mutable=False\r\n>>> print x\r\n\r\n}}}\r\n\r\nNote that a=3 was lost.\r\n\r\nAs far as I can see, there's no really nice fix to this. QueryDict.update doesn't just defer to MultiValueDict because it needs to force keys and values into unicode.\r\n\r\nDefering to MultiValueDict first and then forcing means duplicate keys for items not yet coerced.\r\nForcing individual items results in lists from QueryDict becoming (single) items in MultiValueDict.\r\n\r\ni.e.\r\n{{{\r\ndict([(f(k), f(v)) for k, v in other_dict.items()])\r\n->\r\ndict([(f(k), [f(v) for v in values]) for k, values in other_dict.lists()])\r\n}}}\r\n\r\nThis seems to be a leaky abstraction here; I think QueryDict is not really a MultiValueDict, since MultiValueDict can have any (hashable) objects as keys and values, while QueryDict insists on unicode objects only.\r\n\r\nNo patch from me since the solution isn't obvious to me. Marking as 1.0 since this is a bug, though.", "owner": "nobody", "reporter": "jdunck", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8279, "created": "2008-08-13 04:39:16", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:50.013692", "stage": "Accepted", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Models with multiple ManyToManyField to 'self' use the last table for every m2m", "description": "{{{\r\n#!python\r\nclass Entry(models.Model):\r\n more_fields\r\n related = models.ManyToManyField('self', verbose_name=_('related entries'))\r\n translations = models.ManyToManyField('self', verbose_name=_('translations'))\r\n}}}\r\n\r\nFrom the database (postgres):\r\n{{{\r\nblango=# select * from blango_entry_related;\r\n id | from_entry_id | to_entry_id \r\n----+---------------+-------------\r\n 1 | 27 | 29\r\n 2 | 29 | 27\r\n 3 | 27 | 30\r\n 4 | 30 | 27\r\n 5 | 27 | 38\r\n 6 | 38 | 27\r\n(6 rows)\r\n\r\nblango=# select * from blango_entry_translations;\r\n id | from_entry_id | to_entry_id \r\n----+---------------+-------------\r\n 3 | 4 | 3\r\n 4 | 3 | 4\r\n 7 | 8 | 7\r\n 8 | 7 | 8\r\n 11 | 13 | 12\r\n 12 | 12 | 13\r\n(6 rows)\r\n\r\nblango=# \r\n}}}\r\n\r\nAnd from ./manage.py shell:\r\n{{{\r\nIn [2]: from blango.models import *;Entry.objects.get(pk=27).related.all()\r\nOut[2]: []\r\nIn [3]: from blango.models import *;Entry.objects.get(pk=27).translations.all()\r\nOut[3]: []\r\n}}}\r\n\r\nThe database query log indicates that Django is using the wrong table:\r\n{{{\r\n2008-08-12 22:38:10 CEST LOG: statement: SELECT \"blango_entry\".\"id\", \"blango_entry\".\"title\", \"blango_entry\".\"slug\", \"blango_entry\".\"author_id\", \"blango_entry\".\"language_id\", \"blango_entry\".\"body\", \"blango_entry\".\"body_html\", \"blango_entry\".\"pub_date\", \"blango_entry\".\"draft\", \"blango_entry\".\"allow_comments\" FROM \"blango_entry\" INNER JOIN \"blango_entry_translations\" ON (\"blango_entry\".\"id\" = \"blango_entry_translations\".\"to_entry_id\") WHERE \"blango_entry_translations\".\"from_entry_id\" = 27 \r\n}}}\r\n\r\nIf I change the order of the m2m in the model to:\r\n\r\n{{{\r\n#!python\r\nclass Entry(models.Model):\r\n more_fields\r\n translations = models.ManyToManyField('self', verbose_name=_('translations'))\r\n related = models.ManyToManyField('self', verbose_name=_('related entries'))\r\n}}}\r\n\r\nThen I get all the related entries as related and as translations.\r\n\r\nIf it serves as help, I've added a print statement in django/db/models/fields/related.py at line 776:\r\n{{{\r\n...\r\n775 else:\r\n776 print '%s_%s' % (opts.db_table, self.name)\r\n777 return '%s_%s' % (opts.db_table, self.name)\r\n...\r\n}}}\r\n\r\nWhich prints:\r\n\r\n{{{\r\nIn [1]: from blango.models import *;Entry.objects.get(pk=27).related.all()\r\nblango_entry_related\r\nblango_entry_translations\r\nOut[1]: []\r\n\r\nIn [2]: from blango.models import *;Entry.objects.get(pk=27).related.all()\r\nblango_entry_related\r\nOut[2]: []\r\n\r\n}}}", "owner": "mtredinnick", "reporter": "Alberto Garc\u00eda Hierro ", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8281, "created": "2008-08-13 08:39:34", "changetime": "2011-05-20 08:53:31", "last_pulled_from_trac": "2022-03-06 03:41:50.350073", "stage": "Accepted", "status": "closed", "component": "HTTP handling", "type": "New feature", "severity": "Normal", "version": "1.0-alpha", "resolution": "wontfix", "summary": "Django running ounder PyISAPIe on IIS doesn't detect HTTPS", "description": "The is_secure() function in django.http.Request uses os.environ to detect whether or not the request is HTTPS or not. This doesn't work on Windows because the environment doesn't contain this information.\r\n\r\nPyISAPIe makes this information available in META (well, actually it doesn't yet, but that's another bug and patch to file against PyISAPIe).\r\n\r\nThe Django patch is against django.http.__init__.py and the PyISAPIe patch is against django.core.handlers.pysiapi.py. We're using Django trunk r8066.\r\n\r\nSome [http://www.kirit.com/Blog:/2008-08-13/HTTPS%20detection%20in%20Django%20under%20PyISAPIe extra information is available on my blog].", "owner": "nobody", "reporter": "KayEss", "keywords": "PyISAPIe HTTPS", "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8282, "created": "2008-08-13 10:59:05", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:50.512055", "stage": "Accepted", "status": "closed", "component": "contrib.admin", "type": null, "severity": null, "version": "1.0-alpha", "resolution": "duplicate", "summary": "admin models not properly unregistered when having exceptions in admin.py (using django development server)", "description": "If duing development one makes codeing errors in admin.py, the development server will require a full restart before functioning properly.\r\nReason is that models registered to newforms-admin before the exception occours will still be registered and models unregistered (but not reregistered) before the exception, will not be registered. \r\nThis will cause allready registered exceptions for every registration and not registered exceptions for unregistrations. \r\nFix: Django needs to do proper cleanup upon exceptions. ", "owner": "nobody", "reporter": "ask@jillion.dk", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8283, "created": "2008-08-13 12:49:39", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:50.667027", "stage": "Accepted", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": ".filter() is ignored after (query | query) construction", "description": "Model:\r\n\r\n{{{\r\nfrom django.db import models\r\nfrom django.contrib.auth.models import User\r\n\r\nclass Asset(models.Model):\r\n public = models.BooleanField(default=True)\r\n owner = models.ForeignKey(User)\r\n\r\n def __unicode__(self):\r\n return \"%s, %d (%s)\" % (self.owner.username, self.id, \"public\" if self.public else \"private\")\r\n}}}\r\n\r\nLet's create several assets:\r\n{{{\r\n>>> from testqsbug.models import Asset\r\n>>> from django.contrib.auth.models import User\r\n>>> user1 = User.objects.get(username = \"user1\")\r\n>>> user2 = User.objects.get(username = \"user2\")\r\n>>> Asset.objects.create(public=True, owner=user1)\r\n\r\n>>> Asset.objects.create(public=False, owner=user1)\r\n\r\n>>> Asset.objects.create(public=True, owner=user2)\r\n\r\n>>> Asset.objects.create(public=False, owner=user2)\r\n\r\n}}}\r\n\r\nLet's query all public assets OR assets that belong to some user:\r\n\r\n{{{\r\n>>> Asset.objects.filter(public=True) | Asset.objects.filter(owner=user1)\r\n[, , ]\r\n}}}\r\n\r\nLet's filter from the result assets owned by user again (silly, I know):\r\n\r\n{{{\r\n>>> (Asset.objects.filter(public=True) | Asset.objects.filter(owner=user1)).filter(owner=user1)\r\n[, , ]\r\n}}}\r\n\r\nUhm. Does not work. Both requests resulted in the same query:\r\n\r\n{{{\r\n>>> q = (Asset.objects.filter(public=True) | Asset.objects.filter(owner=user1))\r\n>>> print q.query\r\nSELECT \"testqsbug_asset\".\"id\", \"testqsbug_asset\".\"public\", \"testqsbug_asset\".\"owner_id\" FROM \"testqsbug_asset\" WHERE (\"testqsbug_asset\".\"public\" = True OR \"testqsbug_asset\".\"owner_id\" = 1 )\r\n>>> q2 = (Asset.objects.filter(public=True) | Asset.objects.filter(owner=user1)).filter(owner=user1)\r\n>>> print q2.query\r\nSELECT \"testqsbug_asset\".\"id\", \"testqsbug_asset\".\"public\", \"testqsbug_asset\".\"owner_id\" FROM \"testqsbug_asset\" WHERE (\"testqsbug_asset\".\"public\" = True OR \"testqsbug_asset\".\"owner_id\" = 1 )\r\n}}}\r\n\r\nFiltering by another user works fine:\r\n\r\n{{{\r\n>>> (Asset.objects.filter(public=True) | Asset.objects.filter(owner=user1)).filter(owner=user2)\r\n[]\r\n>>> q3 = (Asset.objects.filter(public=True) | Asset.objects.filter(owner=user1)).filter(owner=user2)\r\n>>> print q3.query\r\nSELECT \"testqsbug_asset\".\"id\", \"testqsbug_asset\".\"public\", \"testqsbug_asset\".\"owner_id\" FROM \"testqsbug_asset\" WHERE ((\"testqsbug_asset\".\"public\" = True OR \"testqsbug_asset\".\"owner_id\" = 1 ) AND \"testqsbug_asset\".\"owner_id\" = 2 )\r\n}}}\r\n", "owner": "mtredinnick", "reporter": "dottedmag", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8285, "created": "2008-08-13 14:16:39", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:50.986252", "stage": "Accepted", "status": "closed", "component": "Core (Other)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Signal Handlers can only be functions with DEBUG=True", "description": "When DEBUG=True, signal handlers can only be functions, rather than any callable object. This is because dispatch/dispatcher.py tries to ensure that signal handlers accept **kwargs, using inspect.getargspec. Unfortunately, inspect.getargspec accepts only actual function objects, and not any callable. Thus, the check does more harm than good in cases where the signal handler is not an actual function. I suggest this check simply be removed.", "owner": "nobody", "reporter": "Zal", "keywords": "signals functions", "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8286, "created": "2008-08-13 15:06:15", "changetime": "2011-09-28 16:12:16", "last_pulled_from_trac": "2022-03-06 03:41:51.125596", "stage": "Accepted", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Tests fail with r8336", "description": "Tested on r8336, Debian Etch, Python 2.4.4\r\n\r\n{{{\r\nvm3:~/dev/django-trunk/tests# ./runtests.py --settings settings\r\n======================================================================\r\nFAIL: Doctest: regressiontests.m2m_through_regress.models.__test__.API_TESTS\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n File \"/usr/lib/python2.4/site-packages/django/test/_doctest.py\", line 2180, in runTest\r\n raise self.failureException(self.format_failure(new.getvalue()))\r\nAssertionError: Failed doctest test for regressiontests.m2m_through_regress.models.__test__.API_TESTS\r\n File \"/home/dev/django-trunk/tests/regressiontests/m2m_through_regress/models.py\", line unknown line number, in API_TESTS\r\n\r\n----------------------------------------------------------------------\r\nFile \"/home/dev/django-trunk/tests/regressiontests/m2m_through_regress/models.py\", line ?, in regressiontests.m2m_through_regress.models.__test__.API_TESTS\r\nFailed example:\r\n management.call_command('dumpdata', 'm2m_through_regress', format='json', indent=2)\r\nExpected:\r\n [\r\n {\r\n \"pk\": 1,\r\n \"model\": \"m2m_through_regress.membership\",\r\n \"fields\": {\r\n \"person\": 1,\r\n \"price\": 100,\r\n \"group\": 1\r\n }\r\n },\r\n {\r\n \"pk\": 2,\r\n \"model\": \"m2m_through_regress.membership\",\r\n \"fields\": {\r\n \"person\": 1,\r\n \"price\": 100,\r\n \"group\": 2\r\n }\r\n },\r\n {\r\n \"pk\": 3,\r\n \"model\": \"m2m_through_regress.membership\",\r\n \"fields\": {\r\n \"person\": 2,\r\n \"price\": 100,\r\n \"group\": 1\r\n }\r\n },\r\n {\r\n \"pk\": 1,\r\n \"model\": \"m2m_through_regress.usermembership\",\r\n \"fields\": {\r\n \"price\": 100,\r\n \"group\": 1,\r\n \"user\": 1\r\n }\r\n },\r\n {\r\n \"pk\": 2,\r\n \"model\": \"m2m_through_regress.usermembership\",\r\n \"fields\": {\r\n \"price\": 100,\r\n \"group\": 2,\r\n \"user\": 1\r\n }\r\n },\r\n {\r\n \"pk\": 3,\r\n \"model\": \"m2m_through_regress.usermembership\",\r\n \"fields\": {\r\n \"price\": 100,\r\n \"group\": 1,\r\n \"user\": 2\r\n }\r\n },\r\n {\r\n \"pk\": 1,\r\n \"model\": \"m2m_through_regress.person\",\r\n \"fields\": {\r\n \"name\": \"Bob\"\r\n }\r\n },\r\n {\r\n \"pk\": 2,\r\n \"model\": \"m2m_through_regress.person\",\r\n \"fields\": {\r\n \"name\": \"Jim\"\r\n }\r\n },\r\n {\r\n \"pk\": 1,\r\n \"model\": \"m2m_through_regress.group\",\r\n \"fields\": {\r\n \"name\": \"Rock\"\r\n }\r\n },\r\n {\r\n \"pk\": 2,\r\n \"model\": \"m2m_through_regress.group\",\r\n \"fields\": {\r\n \"name\": \"Roll\"\r\n }\r\n }\r\n ]\r\nGot:\r\n [\r\n {\r\n \"pk\": 1,\r\n \"model\": \"m2m_through_regress.membership\",\r\n \"fields\": {\r\n \"person\": 1,\r\n \"price\": 100,\r\n \"group\": 1\r\n }\r\n },\r\n {\r\n \"pk\": 2,\r\n \"model\": \"m2m_through_regress.membership\",\r\n \"fields\": {\r\n \"person\": 1,\r\n \"price\": 100,\r\n \"group\": 2\r\n }\r\n },\r\n {\r\n \"pk\": 3,\r\n \"model\": \"m2m_through_regress.membership\",\r\n \"fields\": {\r\n \"person\": 2,\r\n \"price\": 100,\r\n \"group\": 1\r\n }\r\n },\r\n {\r\n \"pk\": 1,\r\n \"model\": \"m2m_through_regress.usermembership\",\r\n \"fields\": {\r\n \"price\": 100,\r\n \"group\": 1,\r\n \"user\": 2\r\n }\r\n },\r\n {\r\n \"pk\": 2,\r\n \"model\": \"m2m_through_regress.usermembership\",\r\n \"fields\": {\r\n \"price\": 100,\r\n \"group\": 2,\r\n \"user\": 2\r\n }\r\n },\r\n {\r\n \"pk\": 3,\r\n \"model\": \"m2m_through_regress.usermembership\",\r\n \"fields\": {\r\n \"price\": 100,\r\n \"group\": 1,\r\n \"user\": 3\r\n }\r\n },\r\n {\r\n \"pk\": 1,\r\n \"model\": \"m2m_through_regress.person\",\r\n \"fields\": {\r\n \"name\": \"Bob\"\r\n }\r\n },\r\n {\r\n \"pk\": 2,\r\n \"model\": \"m2m_through_regress.person\",\r\n \"fields\": {\r\n \"name\": \"Jim\"\r\n }\r\n },\r\n {\r\n \"pk\": 1,\r\n \"model\": \"m2m_through_regress.group\",\r\n \"fields\": {\r\n \"name\": \"Rock\"\r\n }\r\n },\r\n {\r\n \"pk\": 2,\r\n \"model\": \"m2m_through_regress.group\",\r\n \"fields\": {\r\n \"name\": \"Roll\"\r\n }\r\n }\r\n ]\r\n----------------------------------------------------------------------\r\nFile \"/home/dev/django-trunk/tests/regressiontests/m2m_through_regress/models.py\", line ?, in regressiontests.m2m_through_regress.models.__test__.API_TESTS\r\nFailed example:\r\n management.call_command('dumpdata', 'm2m_through_regress', format='xml', indent=2)\r\nExpected:\r\n \r\n \r\n \r\n 1\r\n 1\r\n 100\r\n \r\n \r\n 1\r\n 2\r\n 100\r\n \r\n \r\n 2\r\n 1\r\n 100\r\n \r\n \r\n 1\r\n 1\r\n 100\r\n \r\n \r\n 1\r\n 2\r\n 100\r\n \r\n \r\n 2\r\n 1\r\n 100\r\n \r\n \r\n Bob\r\n \r\n \r\n Jim\r\n \r\n \r\n Rock\r\n \r\n \r\n Roll\r\n \r\n \r\nGot:\r\n \r\n \r\n \r\n 1\r\n 1\r\n 100\r\n \r\n \r\n 1\r\n 2\r\n 100\r\n \r\n \r\n 2\r\n 1\r\n 100\r\n \r\n \r\n 2\r\n 1\r\n 100\r\n \r\n \r\n 2\r\n 2\r\n 100\r\n \r\n \r\n 3\r\n 1\r\n 100\r\n \r\n \r\n Bob\r\n \r\n \r\n Jim\r\n \r\n \r\n Rock\r\n \r\n \r\n Roll\r\n \r\n \r\n\r\n\r\n----------------------------------------------------------------------\r\nRan 443 tests in 580.486s\r\n\r\nFAILED (failures=1)\r\n}}}", "owner": "nobody", "reporter": "jarrow", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8287, "created": "2008-08-13 15:11:58", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:51.303091", "stage": "Accepted", "status": "closed", "component": "HTTP handling", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Debug page shows wrong URL info when altering request.path", "description": "Not sure if this is a bug or an expected behavior, but anyway...\r\nI have a middleware that alters {{{request.path}}} in order to hide a certain part of the URL to the views, so if I have an URL like {{{/en/view/page/}}} this should become {{{/view/page/}}}. With recent upgrades this stopped working, and after a bit of investigating I found that this was due to [8015].\r\nI spent a lot of time trying to understand why this was failing, since the debug page was showing the output I was expecting. For example, for {{{/en/view/page}}} I got:\r\n\r\n{{{\r\nUsing the URLconf defined in project.urls, Django tried these URL patterns, in this order:\r\n\r\n ...\r\n 3. ^view/(?P[\\w-]+)/$\r\n ...\r\n\r\nThe current URL, view/page/, didn't match any of these.\r\n}}}\r\n\r\nWhile {{{view/page/}}} ''matches'' the 3rd url pattern.\r\nThis happens because the debug page shows {{{request.path}}}, while the URLconf actually evaluates {{{PATH_INFO}}} and {{{SCRIPT_NAME}}}.\r\nI fixed the problem by altering {{{request.path_info}}} as well, but shouldn't the debug page show the URL that is actually evaluated by URLconf?\r\nIn case this should be fixed I can provide a patch, but actually I don't know if {{{.path_info}}} should be ''always'' shown or must be shown only in certain places within the debug page.", "owner": "nobody", "reporter": "kratorius", "keywords": "request.path, urlconf, urls", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8288, "created": "2008-08-13 16:06:47", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:51.454952", "stage": "Accepted", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "1.0-alpha", "resolution": "worksforme", "summary": "Field lookup of __gt and __gte on DecimalField causes memory blowup", "description": "Somewhere between Django alpha 1 and 2, it seems a bug was introduced where using a field lookup of __gt or __gte on a DecimalField causes an instance of the development server (and probably other server instances, e.g. mod_python) to rapidly grow in memory and consume system resources (primarily memory). Perhaps a race condition is being triggered. I have to kill the dev server to get my system (running Linux) under control again. \r\n\r\nThere were no such problems seen with the exact same code in the alpha 1 svn, as far as I recall. I notice some changes have been made to the DecimalField #8143, but these are pre-existing values already in the database. I'm using the trunk at revision 8336.\r\n", "owner": "nobody", "reporter": "odonian", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8289, "created": "2008-08-13 16:45:46", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:51.622402", "stage": "Accepted", "status": "closed", "component": "Translations", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Update to Irish Translation", "description": "updating translation files to r8335 now 20% complete", "owner": "nobody", "reporter": "mt", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8290, "created": "2008-08-13 18:34:58", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:51.759604", "stage": "Accepted", "status": "closed", "component": "Validators", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "DecimalField does not handle validation of large decimal_places", "description": "If decimal_places is set to 2, and a number like 0.0000000001 tries to get validated, it passes when it should fail. If you make a form and look at the cleaned data for a DecimalField, you will see that a number like .0000001 looks something like the notation 1E-8, of the decimal.Decimal type.", "owner": "gwilson", "reporter": "jb0t", "keywords": "DecimalField, decimal_places, validation", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8291, "created": "2008-08-13 19:32:48", "changetime": "2012-02-04 19:56:40", "last_pulled_from_trac": "2022-03-06 03:41:51.919782", "stage": "Accepted", "status": "closed", "component": "Database layer (models, ORM)", "type": "Bug", "severity": "Normal", "version": "dev", "resolution": "fixed", "summary": "\"pk\" alias doesn't work for Meta option \"ordering\"", "description": "Using the model below:\r\n\r\n\r\n{{{\r\nclass MyModel(models.Model):\r\n part_number = models.CharField(max_length=128)\r\n\r\n class Meta:\r\n ordering = ['pk']\r\n}}}\r\n\r\n\r\n... yields the error message: \"ordering\" refers to \"pk\", a field that doesn't exist\r\n", "owner": "dgouldin", "reporter": "peterd12", "keywords": "Meta ordering pk alias", "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8292, "created": "2008-08-13 20:34:04", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:52.071525", "stage": "Accepted", "status": "closed", "component": "contrib.admin", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "InlineModelAdmin not honoring filter_horizontal", "description": "One would expect the `filter_horizontal` / `filter_vertical` admin options to \r\nfunction with the `InlineModelAdmin` classes for generic relationships \r\n`in contenttypes.generic`. \r\n\r\nConsidering the code snippet below, I would have expected the nice javascript \r\ndual-picklist interface instead of the plain, single multiselect input. \r\n\r\nSample models.py file:\r\n \r\n{{{\r\n#!python\r\nfrom django.db import models \r\nfrom django.contrib.auth.models import User \r\nfrom django.contrib import admin \r\nfrom django.contrib.contenttypes import generic \r\nfrom django.contrib.contenttypes.models import ContentType \r\n\r\nclass GenericDocument(models.Model): \r\n title = models.CharField(max_length=100) \r\n authors = models.ManyToManyField(User, blank=True) \r\n content_type = models.ForeignKey(ContentType) \r\n object_id = models.PositiveIntegerField() \r\n content_object = generic.GenericForeignKey() \r\n\r\nclass Publisher(models.Model): \r\n name = models.CharField(max_length=50) \r\n articles = generic.GenericRelation(GenericDocument) \r\n\r\nclass GenericDocumentInline(generic.GenericStackedInline): \r\n model = GenericDocument \r\n filter_horizontal = ('authors', ) \r\n\r\nclass PublisherAdmin(admin.ModelAdmin): \r\n list_display = ('name', ) \r\n inlines = [GenericDocumentInline] \r\n\r\nadmin.site.register(Publisher, PublisherAdmin)\r\n}}}", "owner": "brosner", "reporter": "dakrauth", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8298, "created": "2008-08-13 22:47:21", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:52.966223", "stage": "Accepted", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Missing to_python methods causing issues with serialization", "description": "Lack of to_python on IntegerField? is breaking our tests that read from XML fixtures.\r\n\r\nFrom what I can tell, this how things are supposed to work: (1) an IntegerField is read in as unicode (from the XML fixture), (2) the row is saved to the database, and (3) field is an integer on the next read from db. However, on one model, we have a post-save signal handler that expects the field to be an integer. This handler throws an exception when it gets unicode, so our tests break.\r\n\r\nIs accepting strings a part of the database interface definition? I'm guessing we'd hit this same problem if using a form. ", "owner": "nobody", "reporter": "andrewbadr", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8299, "created": "2008-08-13 23:00:18", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:53.115221", "stage": "Accepted", "status": "closed", "component": "Documentation", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Docs on ModelAdmin.form attribute need improvement", "description": "At the moment it is not really clear from the docs that you have to supply a subclass that already has a Meta class in it. From reading it I thought this would be added by the admin (as happens if you don't set the form attribute). This interpretation is also enforced by the lack of a Meta class in the validation example given later on. The attached patch fixes the example and tries to be a bit more explicit in the form attribute explanation.", "owner": "nobody", "reporter": "jarrow", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8296, "created": "2008-08-13 22:25:36", "changetime": "2009-07-29 15:52:52", "last_pulled_from_trac": "2022-03-06 03:41:52.692010", "stage": "Design decision needed", "status": "closed", "component": "Template system", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "Allow template parser to parse until \"complex\" block node", "description": "For info, this was brought up in [1].\r\n\r\nCurrently, with block tags, you can only parse until a \"simple\" closure tag. For example: `{% endif %}` or `{% endfor %}`.\r\n\r\nNow, it would be nice if you could parse until something more \"complex\" like `{% elseif blah and blahblah %}`. By \"complex\" I mean a tag that requires some parameters.\r\n\r\nHere I'm not asking for an `elseif` tag in particular, but I'd like to allow the parser to also consider \"complex\" closure tags.\r\n\r\nFor example, a direct application of this would be a suggestion for a `{% withblock %}` tag. Here's a suggested syntax:\r\n\r\n{{{\r\n{% withblock as myurl %}\r\n {% url path.to.some_view arg1,arg2,name1=value1 %}\r\n{% and as var %}\r\n {% whatever %}\r\n{% in %}\r\n Click the link: {{ var }}.\r\n{% endwithblock %}\r\n}}}\r\n\r\nCurrently the `{% and as var %}` tag cannot be recognized. The problem is in `django.template.Parser.parse()`:\r\n\r\n{{{\r\n...\r\nelif token.token_type == TOKEN_BLOCK:\r\n if token.contents in parse_until:\r\n ...\r\n}}}\r\n\r\nIt basically checks if the tag's hard string name is in the list. The attached patch, which is *backward compatible*, only looks at the first piece of text in the node, namely the tag's name. With that, in your tag you could parse the block like follows:\r\n\r\n{{{\r\n nodelist = parser.parse(('and', 'in')) # Parse until {% and as var %} or {% in %} \r\n}}}\r\n\r\n\r\n[1] http://groups.google.com/group/django-developers/browse_thread/thread/c81a9fe156af71e7", "owner": "nobody", "reporter": "julien", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8274, "created": "2008-08-13 02:23:50", "changetime": "2010-07-05 04:39:53", "last_pulled_from_trac": "2022-03-06 03:41:49.179051", "stage": "Ready for checkin", "status": "closed", "component": "contrib.auth", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Auth views should allow form customization", "description": "It is possible to make your own authentication backend. However, if you want to authenticate with usernames longer than 30 characters (e.g. emails) you cannot rely on the login view, since it's bound to use the AuthenticationForm, which itself only allows 30 characters usernames. You could easily find a way around if only the form was customizable.\r\n\r\nCuriously, some views already allow form customization -- `password_reset_confirm` and `password_reset` -- but the others don't -- `login` and `password_change` --. The attached patch fixes the latter.", "owner": "julien", "reporter": "julien", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8280, "created": "2008-08-13 07:08:07", "changetime": "2015-01-05 16:19:23", "last_pulled_from_trac": "2022-03-06 03:41:50.160805", "stage": "Ready for checkin", "status": "closed", "component": "Core (Management commands)", "type": "Bug", "severity": "Normal", "version": "dev", "resolution": "fixed", "summary": "Commands framework doesn't support alternate import methods", "description": "\r\nFrom this thread on the developer mailing list\r\nhttp://groups.google.com/group/django-developers/browse_thread/thread/78975372cdfb7d1a#\r\nI understand that the Django team is keen on supporting alternate ways of packaging django: in a zip-file, in a jar-file(Jython) or other \"frozen\" formats.\r\n\r\nOne place that'll need fixing to achieve this is to update the command framework. [[BR]]\r\nThe find available commands, the current Django code is browsing the command subdirectories and looking for files that end with a .py extension[[BR]]\r\nTo support alternate packaging, the code should use the proper Python APIs to iterate over the available modules in a package.\r\n\r\nA patch along these lines was already included with #5825. (The patch would need updating to the SVN version however - Once this ticket is accepted I can take care of it.) ", "owner": "nobody", "reporter": "jdetaeye", "keywords": "command zip", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8284, "created": "2008-08-13 13:59:45", "changetime": "2008-08-13 14:39:19", "last_pulled_from_trac": "2022-03-06 03:41:50.816428", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "wontfix", "summary": "raw_input broken in eclipse", "description": "There are a few constructs in django like\r\n\r\n{{{\r\nresponse = raw_input()\r\nif response == 'yes':\r\n do_stuff()\r\n}}}\r\n\r\nIn eclipse on windows the '\\r' is not stripped out of the string so the equality fails ('yes' != 'yes\\r'). This means django refuses to delete my test database if i abort the tests in the middle. See: http://mail.python.org/pipermail/python-list/2008-March/482847.html\r\n\r\nI suggest something like:\r\n\r\n{{{\r\ndef _django_raw_input():\r\n return raw_input.replace('\\r', '')\r\nraw_input = _django_raw_input\r\n}}}\r\n\r\nI will write a patch if someone recommends the correct solution.\r\n", "owner": "nobody", "reporter": "adamlofts", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8293, "created": "2008-08-13 20:34:18", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:52.220619", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "NJiKWWbgSqiqJS", "description": "\n92cPNo dgvnmufchudp, [url=http://swuokhptbspg.com/]swuokhptbspg[/url], [link=http://sibuawgeaewg.com/]sibuawgeaewg[/link], http://tkszumxylrco.com/", "owner": "nobody", "reporter": "anonymous", "keywords": "nxPxrdftI", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8294, "created": "2008-08-13 20:34:20", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:52.375101", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "NJiKWWbgSqiqJS", "description": "\n92cPNo dgvnmufchudp, [url=http://swuokhptbspg.com/]swuokhptbspg[/url], [link=http://sibuawgeaewg.com/]sibuawgeaewg[/link], http://tkszumxylrco.com/", "owner": "nobody", "reporter": "anonymous", "keywords": "nxPxrdftI", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8295, "created": "2008-08-13 20:34:25", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:52.535459", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "NJiKWWbgSqiqJS", "description": "\n92cPNo dgvnmufchudp, [url=http://swuokhptbspg.com/]swuokhptbspg[/url], [link=http://sibuawgeaewg.com/]sibuawgeaewg[/link], http://tkszumxylrco.com/", "owner": "nobody", "reporter": "anonymous", "keywords": "nxPxrdftI", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8297, "created": "2008-08-13 22:31:50", "changetime": "2009-02-25 19:51:44", "last_pulled_from_trac": "2022-03-06 03:41:52.828046", "stage": "Unreviewed", "status": "closed", "component": "Template system", "type": null, "severity": null, "version": "dev", "resolution": "wontfix", "summary": "Withblock template tag", "description": "'''Important note''': This ticket can work only if #8296 gets checked in.\r\n\r\nCurrently there is the convenient `{% with %}` tag to create variables in templates. Unfortunately there is no built-in counterpart for blocks. The attached patch does just that, with the following suggested syntax:\r\n\r\n{{{\r\n{% withblock as myurl %}\r\n {% url path.to.some_view arg1,arg2,name1=value1 %}\r\n{% and as var %}\r\n {% whatever %}\r\n{% in %}\r\n Click the link: link.\r\n

{{ var }}

\r\n{% endwithblock %}\r\n}}}", "owner": "nobody", "reporter": "julien", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8300, "created": "2008-08-13 23:13:52", "changetime": "2009-02-25 19:51:44", "last_pulled_from_trac": "2022-03-06 03:41:53.262410", "stage": "Unreviewed", "status": "closed", "component": "contrib.syndication", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "feedgenerator shouldn't use ascii to decode dates", "description": "if i use some locale like '''tr_TR.UTF-8''' or any other locale, a date for the rss feed could be '''\"10 A\u011fu\"''' instead of '''\"10 Aug\"'''.. Therefore, I get the following error messages:\r\n\r\nUnicodeDecodeError at /feeds/latest/[[BR]]\r\n'ascii' codec can't decode byte 0xc4 in position 9: ordinal not in range(128)\r\n\r\nI think all decoding should be done using utf-8 instead of ascii.. And by the way there's a problem in line 241 of feedgenerator.py file:\r\n\r\nhandler.addQuickElement(u\"pubDate\", rfc2822_date(item['pubdate']).decode('links'))\r\n\r\n'links' here should be something like ascii or especially utf-8..", "owner": "nobody", "reporter": "alperkanat", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0}