{"id": 8030, "created": "2008-07-29 18:54:32", "changetime": "2008-08-01 14:44:38", "last_pulled_from_trac": "2022-03-06 03:41:12.498379", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "BaseModelForm does not use super()", "description": "As seen in:\r\n\r\nhttp://code.djangoproject.com/browser/django/trunk/django/forms/models.py#L262\r\n\r\nThis somewhat restricts what can be done with multiple inheritance on form objects, which imo would be the most effective way of adding custom form display methods and such to forms.\r\n\r\nThis can be worked around by simply ensuring that the mixin class comes before the form classes, however there isn't really any reason that this cannot be fixed.", "owner": "nobody", "reporter": "glenjamin@gmail.com", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8033, "created": "2008-07-29 22:53:23", "changetime": "2014-06-23 07:38:45", "last_pulled_from_trac": "2022-03-06 03:41:12.886828", "stage": "Ready for checkin", "status": "closed", "component": "Internationalization", "type": "Cleanup/optimization", "severity": "Normal", "version": "dev", "resolution": "fixed", "summary": "Better error handling for gettext and gettext_lazy issues", "description": "It's very common get confused in use of {{{gettext}}} and {{{gettext_lazy}}} functions. An usual error was to use {{{gettext}}} at import time, for example, in any of this cases:\r\n * In a parameter of {{{settings.py}}} file:\r\n{{{\r\nfrom django.utils.translation import ugettext as _\r\n...\r\nLANGUAGE_CHOICES = (('es', _('Spanish')),\r\n ('en', _('English')),)\r\n}}}\r\n * In class or field definition of a {{{models.py}}} file:\r\n{{{\r\nfrom django.db import models\r\nfrom django.utils.translation import ugettext as _\r\n\r\nclass Author(models.Model):\r\n name = models.CharField(_(u'Name'), max_length=100)\r\n}}}\r\n\r\nIn both cases, if you get an error, the error will be an {{{ImportError}}} usually in another part of code... This is very difficult to debug, because the real error should be ''\"Incorrect use of gettext. You can't use gettext at import time\"''. \r\n\r\nThe error is due to the fact of not all applications has been imported yet, and {{{gettext}}} resolution need to have all possible translation files loaded ({{{django.po}}} files), which implies loading of all applications. This causes a circular import error problem.\r\n\r\nIn [http://groups.google.com/group/django-developers/browse_frm/thread/fdc392d546fd8da this thread] there is a discussion about this.\r\n\r\nWe are thinking in check in every call to {{{gettext}}} if django apps has been loaded (using {{{django.db.models.loading.app_cache_ready()}}}) and take one of this options:\r\n * raise an representative error.\r\n * return a dummy string.\r\n\r\nI personally prefers first one, because {{{gettext}}} should be '''always''' called inside functions (at run time), and '''never''' at import time. I don't imagine a case of we need use {{{gettext}}} before that.", "owner": "Claude Paroz ", "reporter": "msaelices", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8023, "created": "2008-07-29 14:00:22", "changetime": "2011-09-28 16:12:16", "last_pulled_from_trac": "2022-03-06 03:41:11.522517", "stage": "Unreviewed", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Changeset 8131 breaks filtering from the URL in the admin", "description": "\r\nThe admin allows filtering objects by edting the url in the browser window.[[BR]]\r\nEg: http://youraddress/admin/yourapp/yourmodel/?yourdecimalfield__lt=20\r\n\r\nWhen filtering on a decimal field, changeset #7560 breaks this with the following stacktrace:\r\n{{{\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\core\\handlers\\base.py\" in get_response\r\n 87. response = callback(request, *callback_args, **callback_kwargs)\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\contrib\\admin\\views\\decorators.py\" in _checklogin\r\n 61. return view_func(request, *args, **kwargs)\r\nFile \"c:\\develop\\frepple\\contrib\\django\\freppledb\\utils\\report.py\" in view_report\r\n 302. counter = counter.filter( **{smart_str(key): value} )\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\models\\query.py\" in filter\r\n 479. return self._filter_or_exclude(False, *args, **kwargs)\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\models\\query.py\" in _filter_or_exclude\r\n 497. clone.query.add_q(Q(*args, **kwargs))\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\models\\sql\\query.py\" in add_q\r\n 1176. can_reuse=used_aliases)\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\models\\sql\\query.py\" in add_filter\r\n 1123. self.where.add((alias, col, field, lookup_type, value), connector)\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\models\\sql\\where.py\" in add\r\n 48. params = field.get_db_prep_lookup(lookup_type, value)\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\models\\fields\\__init__.py\" in get_db_prep_lookup\r\n 242. return [self.get_db_prep_value(value)]\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\models\\fields\\__init__.py\" in get_db_prep_value\r\n 736. self.decimal_places)\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\backends\\__init__.py\" in value_to_db_decimal\r\n 302. return util.format_number(value, max_digits, decimal_places)\r\nFile \"C:\\packages\\Python-2.5\\lib\\site-packages\\django\\db\\backends\\util.py\" in format_number\r\n 126. return u\"%.*f\" % (decimal_places, value)\r\n\r\nException Type: TypeError at /admin/input/buffer/\r\nException Value: a float is required\r\n}}}\r\n\r\nThe value argument is a Unicode string while the format string only accepts a float.\r\n\r\nYou can also reproduce the same error from the command line:\r\n{{{\r\n>>> works_as_expected = yourapp.yourmodel.objects.all().filter(yourdecimalfield__gt=0)\r\n>>> doesnt_work_any_more = yourapp.yourmodel.objects.all().filter(yourdecimalfield__gt=u'0')\r\n}}}\r\n\r\nChanging the format string from %f to %s fixes the problem in both backends I tested (SQLite + PostgreSQL):\r\n{{{\r\nreturn u\"%.*f\" % (decimal_places, value) # OLD\r\nreturn u\"%.*s\" % (decimal_places, value) # NEW\r\n}}}\r\n", "owner": "mtredinnick", "reporter": "jdetaeye", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8024, "created": "2008-07-29 15:06:47", "changetime": "2011-09-28 16:12:16", "last_pulled_from_trac": "2022-03-06 03:41:11.661059", "stage": "Accepted", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Changeset 8132 breaks labels on ForeignKey Fields", "description": "The change in r8132 leads to empty labels in the admin change-forms if the ForeignKey Fields don't have an verbose_name parameter set.\r\n\r\nTo reproduce just create two models:\r\n\r\n{{{\r\nclass ModelA(models.Model):\r\n title = models.CharField(max_length=20)\r\n\r\nclass ModelB(models.Model):\r\n foo = models.ForeignKey(ModelA)\r\n\r\n}}}\r\n\r\nand register the models with the admin app\r\n\r\n{{{\r\nclass ModelAadmin(admin.ModelAdmin):\r\n pass\r\n\r\nclass ModelBadmin(admin.ModelAdmin):\r\n pass\r\n\r\nadmin.site.register(ModelA, ModelAadmin)\r\nadmin.site.register(ModelB, ModelBadmin)\r\n}}}\r\n\r\nIn the Admin Change-Form of ModelB an empty label is displayed on the ForeignKeyField to ModelA (only a \":\" displayed, expected output would be \"Model a:\")\r\n\r\nThe following patch fixes the problem, but I'm not sure if it breaks the problem which should be fixed by r8132 which was reported in #8011\r\n\r\n{{{\r\n--- db/models/fields/related.py\t(revision 8137)\r\n+++ db/models/fields/related.py\t(working copy)\r\n@@ -117,7 +117,7 @@\r\n \r\n def set_attributes_from_rel(self):\r\n self.name = self.name or (self.rel.to._meta.object_name.lower() + '_' + self.rel.to._meta.pk.name)\r\n- if self.verbose_name is None:\r\n+ if not self.verbose_name:\r\n self.verbose_name = self.rel.to._meta.verbose_name\r\n self.rel.field_name = self.rel.field_name or self.rel.to._meta.pk.name\r\n}}}", "owner": "mtredinnick", "reporter": "arne", "keywords": "label, verbose_name, model", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8017, "created": "2008-07-29 10:28:10", "changetime": "2011-09-28 16:12:16", "last_pulled_from_trac": "2022-03-06 03:41:10.713119", "stage": "Unreviewed", "status": "closed", "component": "Documentation", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "Doc page 'model-api' should be updated according with NFA.", "description": "The page http://www.djangoproject.com/documentation/model-api/ looks like outdated now.\r\nFor instance, whether it is correct to use 'validator_list' with NFA?", "owner": "nobody", "reporter": "niksite", "keywords": "nfa, model-api", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8022, "created": "2008-07-29 13:54:51", "changetime": "2009-01-02 15:07:17", "last_pulled_from_trac": "2022-03-06 03:41:11.376027", "stage": "Design decision needed", "status": "closed", "component": "Generic views", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Extend django.views.generic.simple.redirect_to to support permanent or temporary redirect codes", "description": "It's possible that this is completely inappropriate, but I've extended django.generic.simple.redirect_to with an extra, optional argument, 'permanent'.\r\n\r\nBy default, redirect_to returns a 301 return code, but if permanent=True is specified, it'll return a 302 instead.\r\n\r\nAlternatively, a new generic view function, say temporary_redirect_to, could also do the same thing.\r\n\r\n{{{\r\nIndex: simple.py\r\n===================================================================\r\n--- simple.py\t(revision 8135)\r\n+++ simple.py\t(working copy)\r\n@@ -1,5 +1,5 @@\r\n from django.template import loader, RequestContext\r\n-from django.http import HttpResponse, HttpResponsePermanentRedirect, HttpResponseGone\r\n+from django.http import HttpResponse, HttpResponsePermanentRedirect, HttpResponseGone,HttpResponseRedirect\r\n \r\n def direct_to_template(request, template, extra_context=None, mimetype=None, **kwargs):\r\n \"\"\"\r\n@@ -17,7 +17,7 @@\r\n t = loader.get_template(template)\r\n return HttpResponse(t.render(c), mimetype=mimetype)\r\n \r\n-def redirect_to(request, url, **kwargs):\r\n+def redirect_to(request, url, permanent=True, **kwargs):\r\n \"\"\"\r\n Redirect to a given URL.\r\n \r\n@@ -30,8 +30,13 @@\r\n )\r\n \r\n If the given url is ``None``, a HttpResponseGone (410) will be issued.\r\n+ If permanent is True, the return code will be 301 - Moved Permanently,\r\n+ otherwise, the return code will be 302 - Found.\r\n \"\"\"\r\n if url is not None:\r\n- return HttpResponsePermanentRedirect(url % kwargs)\r\n+ if permanent:\r\n+ return HttpResponsePermanentRedirect(url % kwargs)\r\n+ else:\r\n+ return HttpResponseRedirect(url % kwargs)\r\n else:\r\n return HttpResponseGone()\r\n}}}", "owner": "nobody", "reporter": "David Sauve ", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8025, "created": "2008-07-29 15:22:31", "changetime": "2011-09-28 16:12:16", "last_pulled_from_trac": "2022-03-06 03:41:11.799784", "stage": "Accepted", "status": "closed", "component": "Core (Other)", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "Failed when lookups that span relationships with __isnull.", "description": "I have two records like this:\r\n\r\n{{{\r\nid user name desc parent type\r\n 5, 5, 'My favorites', 'The default group of user's group.', , 1\r\n 6, 5, 'My traces', 'The default group of my traces.', 5, 2\r\n}}}\r\n\r\nWhen I query it with (user's id = 5):\r\n\r\n\r\n{{{\r\nTraceGroup.objects.filter(user=user, parent__parent__isnull=True)\r\n}}}\r\n\r\nI got:\r\n\r\n[, ]\r\n\r\nBut the first record (My favorites) is not expected result for me.\r\nI think this is because 's parent is null, parent__parent__isnull will be matched if parent is null.\r\n\r\nI have to do this way to get correct result:\r\n\r\n\r\n{{{\r\nTraceGroup.objects.filter(user=user, parent__isnull=False, parent__parent__isnull=True)\r\n}}}\r\n \r\n\r\nIs this a bug or it should be commented at documentation?\r\n\r\nThanks.", "owner": "nobody", "reporter": "bear330", "keywords": "isnull, span", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8034, "created": "2008-07-29 23:26:03", "changetime": "2011-09-16 22:24:27", "last_pulled_from_trac": "2022-03-06 03:41:13.015949", "stage": "Design decision needed", "status": "closed", "component": "HTTP handling", "type": "New feature", "severity": "Normal", "version": "dev", "resolution": "wontfix", "summary": "Gzip Middleware And Images", "description": "In the random cases where Images (Gifs, JPEGS, PNG, etc) are passed through the Gzip middleware (usually through the static sender), sometimes they get 'truncated' (i think it may be a partial browser bug too)\r\n\r\nbut there is no reason to Gzip image content-types and waste the time/ram/etc in doing them\r\n\r\n\r\n", "owner": "nobody", "reporter": "magneto", "keywords": "gzip middleware", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8013, "created": "2008-07-29 02:38:10", "changetime": "2011-07-29 09:41:15", "last_pulled_from_trac": "2022-03-06 03:41:10.208548", "stage": "Ready for checkin", "status": "closed", "component": "contrib.localflavor", "type": "New feature", "severity": "Normal", "version": "dev", "resolution": "fixed", "summary": "Localflavor for Colombia and Ecuador", "description": "This is intended to add a basic localflavor for Colombia and Ecuador.", "owner": "nobody", "reporter": "ikks", "keywords": "Colombia Ecuador", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8012, "created": "2008-07-29 00:30:27", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:10.071351", "stage": "Unreviewed", "status": "closed", "component": "Tools", "type": null, "severity": null, "version": "0.96", "resolution": "invalid", "summary": "MySQLdb build failure", "description": "Hello,\r\n\r\nI'm at my wit's end. I have been trying to add the required MySQL-python-1.2.2 to MySQL so i can use the database with django but the i cannot get the command: python setup.py build , to work. I posted my problem in the Django Users group but didn't get any response. Here is the error output i am getting.\r\n\r\n$ python setup.py build\r\nrunning build\r\nrunning build_py\r\ncopying MySQLdb/release.py -> build/lib.macosx-10.3-i386-2.5/MySQLdb\r\nrunning build_ext\r\nbuilding '_mysql' extension\r\ngcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc -o build/lib.macosx-10.3-i386-2.5/_mysql.so\r\n/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: for architecture ppc\r\n/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning build/temp.macosx-10.3-i386-2.5/_mysql.o cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)\r\n/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning /usr/local/mysql//lib/libmysqlclient_r.dylib usrcputype (7,/libexec/ architecture gcc/i686i386) does-apple- not matchdarwin8/4.0.1 cputype (/ld: 18) forfor architecture specified -i386\r\n/arch flag: usr/libexecppc (file/gcc/i686 not loaded-apple-)\r\n/usrdarwin8/4.0.1//libexec/gcc/ld: /powerpc-apple-usr/local/mysql/lib/libmysqlclient_r.dylib load command 8 unknown cmd field\r\ndarwin8/4.0.1/ld: warningcollect2: /usr/ld returned 1 exit statuslocal/\r\nmysql/lib/libmygcc.a archive's cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (can't load from it)\r\nlipo: can't open input file: /var/folders/1D/1DIYDOE7GQ0pbcmmuCcESE+++TI/-Tmp-//ccCeFF5W.out (No such file or directory)\r\nerror: command 'gcc' failed with exit status 1\r\n\r\nI have read countless blogs posts and discussions but haven't found a solution.\r\n\r\nI am currently using a macbook pro with an intel duo core processor\r\nI have running MySQL version 5.0 although i have tried 5.1 and that didn't fix the problem.\r\n\r\nPlease help!\r\n\r\nJon", "owner": "nobody", "reporter": "Jonathan Osborne ", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8015, "created": "2008-07-29 04:02:48", "changetime": "2008-07-29 04:26:14", "last_pulled_from_trac": "2022-03-06 03:41:10.467261", "stage": "Unreviewed", "status": "closed", "component": "Forms", "type": null, "severity": null, "version": "1.0-alpha", "resolution": "duplicate", "summary": "OneToOne Fields excluded from ModelForms", "description": "Since r8033 all !ModelForms (including those in the admin site) made from a model with a !OneToOne field exclude that field from the form. This means all models with !OneToOne fields raise !ImproperlyConfigured errors in the admin site, unless the !OneToOne field is explicitly excluded using the model's !ModelAdmin configuration.\r\n\r\nThe relevant diff from that changeset:\r\n\r\n{{{\r\n===================================================================\r\n--- django/db/models/fields/related.py (revision 8032)\r\n+++ django/db/models/fields/related.py (revision 8033)\r\n@@ -706,6 +706,7 @@\r\n \"\"\"\r\n def __init__(self, to, to_field=None, **kwargs):\r\n kwargs['unique'] = True\r\n+ kwargs['editable'] = False\r\n if 'num_in_admin' not in kwargs:\r\n kwargs['num_in_admin'] = 0\r\n super(OneToOneField, self).__init__(to, to_field,\r\nOneToOneRel, **kwargs)\r\nIndex: tests/regressiontests/model_inheritance_regress/models.py\r\n===================================================================\r\n}}}\r\nr8033 was related to making model inheritance work in the admin site. I'm currently at r8130, and commenting out the {{{\"kwargs['editable'] = False\"}}} line above makes everything work as expected (!OneToOne fields appear in !ModelForms and !ModelAdmin). I'm not using model inheritance, though, so can't say if removing this line would break that \u2013 I assume it would.", "owner": "nobody", "reporter": "taojian", "keywords": "OneToOne, ModelForm, ModelAdmin", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8016, "created": "2008-07-29 08:47:42", "changetime": "2008-07-30 00:52:01", "last_pulled_from_trac": "2022-03-06 03:41:10.604054", "stage": "Unreviewed", "status": "closed", "component": "contrib.admin", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "Problem with decoding of non ASCII symbols.", "description": "I'm using development version django with newforms admin. When I tried to set verbose name for model (verbose_name = 'M\u0101jas lapas tekstu') using latvian symbols, I got an UnicodeDecodeError. Patch attached.\r\n\r\n\r\n{{{\r\nException Type: \tUnicodeDecodeError\r\nException Value: \t'ascii' codec can't decode byte 0xc4 in position 1: ordinal not in range(128)\r\nException Location: \t/django/contrib/admin/options.py in add_view, line 506\r\nPython Executable: \t/usr/bin/python\r\nPython Version: \t2.5.2\r\n}}}\r\n", "owner": "nobody", "reporter": "aabele", "keywords": "newforms admin", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8014, "created": "2008-07-29 02:57:28", "changetime": "2008-07-29 03:02:22", "last_pulled_from_trac": "2022-03-06 03:41:10.343331", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "Removal of mysql_old should be noted in Backward Incompatible Changes", "description": "Believe it or not, Dreamhost still has an old version of mysqldb. They recently claimed to be addressing that, but in the mean time, many people on Dreamhost who do an SVN update will be unpleasantly surprised. At the very least, please put this in the Backward Incompatible Changes page!", "owner": "nobody", "reporter": "Beetle_B", "keywords": "mysql, mysql_old", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8028, "created": "2008-07-29 15:54:59", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:12.213390", "stage": "Ready for checkin", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Small docstring fix for BaseDatabaseOperations.value_to_db_*", "description": "On #7560 I mistakenly copied two docstrings without tweaking them later. This patch solves this.", "owner": "nobody", "reporter": "leosoto", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8031, "created": "2008-07-29 19:34:22", "changetime": "2008-08-05 14:25:42", "last_pulled_from_trac": "2022-03-06 03:41:12.646121", "stage": "Design decision needed", "status": "closed", "component": "Template system", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Suppressing exceptions in templates harmful for debugging", "description": "Even when TEMPLATE_DEBUG is enabled, Django will currently silently suppress all exceptions during template rendering.\r\nThis makes it hard to find typos in the template (misspelled variable names), but can also hide other errors.\r\n\r\nThe concrete problem I hit was the conversion to permalink and the resolver not knowing functions specified directly as object and not string.\r\nAs the exception was ignored, all users of the permalink used the empty string.\r\n\r\nIt would be nice if the exceptions can be easily logged either to stderr (manage.py runserver) or some file, potentially using another debug option in settings.py.", "owner": "lukeplant", "reporter": "joerg@bec.de", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8019, "created": "2008-07-29 10:57:27", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:10.978521", "stage": "Unreviewed", "status": "closed", "component": "Translations", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Updated translation for Serbian language", "description": "based on [8133]", "owner": "nobody", "reporter": "nesh", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8032, "created": "2008-07-29 21:46:54", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:12.772915", "stage": "Ready for checkin", "status": "closed", "component": "Documentation", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Wrong module name in settings documentation", "description": "There is a wrong module name in settings.txt for the FILE_UPLOAD_HANDLERS default value. It should be uploadhandler not fileuploadhandler.", "owner": "mzgur", "reporter": "mzgur", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8029, "created": "2008-07-29 18:10:20", "changetime": "2008-07-30 09:29:53", "last_pulled_from_trac": "2022-03-06 03:41:12.358944", "stage": "Unreviewed", "status": "closed", "component": "Testing framework", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "admin_scripts regression tests override PYTHONPATH", "description": "When running the test suite against a custom external DB backend, the admin_scripts test fail with multiple errors like this:\r\n\r\n{{{\r\n======================================================================\r\nFAIL: multiple: manage.py builtin commands succeed if settings are provided as argument\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n File \"C:\\ramiro\\django-ramiro\\tests\\regressiontests\\admin_scripts\\tests.py\", line 669, in test_builtin_with_settings\r\n self.assertNoOutput(err)\r\n File \"C:\\ramiro\\django-ramiro\\tests\\regressiontests\\admin_scripts\\tests.py\", line 109, in assertNoOutput\r\n self.assertEquals(len(stream), 0, \"Stream should be empty: actually contains '%s'\" % stream)\r\nAssertionError: Stream should be empty: actually contains 'Traceback (most recent call last):\r\n File \"./manage.py\", line 11, in \r\n execute_manager(settings)\r\n File \"C:\\ramiro\\django-ramiro\\django\\core\\management\\__init__.py\", line 301, in execute_manager\r\n utility.execute()\r\n File \"C:\\ramiro\\django-ramiro\\django\\core\\management\\__init__.py\", line 248, in execute\r\n self.fetch_command(subcommand).run_from_argv(self.argv)\r\n File \"C:\\ramiro\\django-ramiro\\django\\core\\management\\base.py\", line 77, in run_from_argv\r\n self.execute(*args, **options.__dict__)\r\n File \"C:\\ramiro\\django-ramiro\\django\\core\\management\\base.py\", line 90, in execute\r\n self.validate()\r\n File \"C:\\ramiro\\django-ramiro\\django\\core\\management\\base.py\", line 117, in validate\r\n num_errors = get_validation_errors(s, app)\r\n File \"C:\\ramiro\\django-ramiro\\django\\core\\management\\validation.py\", line 22, in get_validation_errors\r\n from django.db import models, connection\r\n File \"C:\\ramiro\\django-ramiro\\django\\db\\__init__.py\", line 34, in \r\n (settings.DATABASE_ENGINE, \", \".join(map(repr, available_backends)))\r\ndjango.core.exceptions.ImproperlyConfigured: 'sql_server.pyodbc' isn't an available database backend.\r\nAvailable options are: 'dummy', 'mysql', 'oracle', 'postgresql', 'postgresql_psycopg2', 'sqlite3'\r\n\r\n----------------------------------------------------------------------\r\nRan 93 tests in 32.563s\r\n\r\nFAILED (failures=25)\r\n}}}\r\n\r\nSuspicion is that the tests override the {{{PYTHONPATH}}} envvar, and this break things ebcause the documented way of specifying an external backend is adding it's path to {{{PYTHONPATH}}} and setting the {{{DATABASE_ENGINE}}} var of the {{{settings}}} file being used for testing.\r\n\r\nIt was confirmed by Alex Gaynor who suggested to try the patch attached that solved the problem.\r\n", "owner": "nobody", "reporter": "ramiro", "keywords": "DATABASE_BACKEND admin_scripts", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8026, "created": "2008-07-29 15:29:18", "changetime": "2008-07-29 19:49:52", "last_pulled_from_trac": "2022-03-06 03:41:11.936921", "stage": "Unreviewed", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "get_or_create fails on related queryset", "description": "The following will fail with a cryptic error message,\r\n\r\n{{{\r\nclass Counter(models.Model):\r\n name = CharField(max_length = 255)\r\n\r\nclass Point(models.Model):\r\n counter = ForeignKey(Counter)\r\n\r\ncounter = Counter.objects.get(name = 'some name')\r\npoints = counter.points.all()\r\npoints.get_or_create(**some_parameters)\r\n}}}\r\n\r\nFor some reason, get_or_create ends up executing a SQL INSERT statement\r\n\r\n{{{\r\n INSERT INTO 'point_table' ('counter_id') VALUES (None)\r\n}}}\r\n\r\nWell, that's not the exact output, which I unfortunately can't really copy and paste here, but the point is that get_or_create ends up inserting a Point with a '''None''' value for counter_id.\r\n\r\nThe quick fix right now is,\r\n\r\n{{{\r\n counter = Counter.objects.get(name = 'some name')\r\n points = counter.points.all()\r\n\r\n some_parameters.update({ 'defaults': { 'counter': counter } })\r\n points.get_or_create(**some_parameters)\r\n}}}", "owner": "nobody", "reporter": "Phoenixfire159@gmail.com", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8018, "created": "2008-07-29 10:54:29", "changetime": "2008-07-29 12:59:10", "last_pulled_from_trac": "2022-03-06 03:41:10.830356", "stage": "Unreviewed", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "dev", "resolution": "wontfix", "summary": "m2m intermediary models (both generic and custom)", "description": "Ticket #6095 introduced the idea of custom intermediary models. Refractoring the m2m code to always use (generic) intermediary models would have benefits:\r\n * a simplier implementation of m2m\r\n * appropriate signals are always sent when a relation is created, modified or deleted (eg. #6778)\r\n * extending the generic relations (using 'through=') would be easier\r\nOf course, we must maintain compatibility to the m2m api, which consists (as far as I see it) of the ManyToManyField and the ManyRelatedManager. See the attachment for usage examples.", "owner": "nobody", "reporter": "remo", "keywords": "m2m intermediary", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8020, "created": "2008-07-29 12:10:05", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:11.102954", "stage": "Accepted", "status": "closed", "component": "Contrib apps", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "python process crashes when using sitemaps after [8088]", "description": "When I go to http://example.com/sitemap.xml, python process crashes without any errors or core dumps.\r\n{{{\r\nDjango-version: trunk after [8088]\r\nDB-backends: PostgreSQL or SQLite3\r\nURLs in sitemap: less than 50000\r\n}}}\r\n", "owner": "nobody", "reporter": "Boo", "keywords": "sitemap", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8021, "created": "2008-07-29 13:03:47", "changetime": "2008-07-29 22:42:09", "last_pulled_from_trac": "2022-03-06 03:41:11.248483", "stage": "Unreviewed", "status": "closed", "component": "Core (Other)", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "save_FIELD_file closes tmpfile before moving it", "description": "There seems to be a bug in django/db/models/base.py that prevents files bigger than 2.5 megs to be uploaded.\r\n\r\n1) create a model called \"SimpleFile\" with a FileField\r\n2) register it with the admin site\r\n3) log in the admin app, add a new \"SimpleFile\" with a file larger than 2.5 megs, SUBMIT\r\n\r\nAt this point I get an IOError because the tmpfile created by the uploadhandler no longer exists.\r\n\r\nI believe the bug lies in file django/db/models/base.py line 530. If I comment it out everything works and the temp file is deleted correctly.", "owner": "nobody", "reporter": "mpaolini", "keywords": "uploadhandler tmpfile", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8027, "created": "2008-07-29 15:39:06", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:12.073333", "stage": "Accepted", "status": "closed", "component": "Forms", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "wrong fieldset validation?", "description": "{{{\r\nclass WYSIWYGForm(forms.ModelForm): \r\n class Media: \r\n js = (\r\n ''.join((MEDIA_URL,\"js/tiny_mce/tiny_mce.js\")),\r\n ''.join((MEDIA_URL, \"admin/js/textareas.js\")),\r\n )\r\n\r\nclass AdminWYSIWYG(admin.ModelAdmin):\r\n form = WYSIWYGForm\r\n\r\nclass SongAdmin(AdminWYSIWYG):\r\n fieldsets = (\r\n (None, {\r\n 'fields': ('title', 'slug', 'group', 'author_l', 'co_author', 'author_v', 'lyrics')\r\n }),\r\n ('\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438 \u0430\u043a\u043a\u043e\u0440\u0434\u044b', {\r\n 'classes': ('collapse',),\r\n 'fields': ('accords', 'translation')\r\n }),\r\n )\r\n prepopulated_fields = {\"slug\": (\"title\",)}\r\n}}}\r\n\r\nThis construction raises error in validation.py, line 182:\r\n{{{\r\n for field in flatten_fieldsets(cls.fieldsets):\r\n _check_form_field_existsw(\"fieldsets[%d][1]['fields']\" % idx, field)\r\n}}}\r\nBut without validation it works correctly. May be, there is possible to off checking fields if form is subclass of ModelForm? Or validate it in other way?\r\n\r\n'''---->>>'''\r\n{{{\r\n if not issubclass(cls.form, BaseModelForm):\r\n for field in flatten_fieldsets(cls.fieldsets):\r\n _check_form_field_existsw(\"fieldsets[%d][1]['fields']\" % idx, field)\r\n}}}\r\n\r\nMay be, I do something wrong?", "owner": "jacob", "reporter": "Harut", "keywords": "newforms", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0}