165 rows where "changetime" is on date 2011-10-09

View and edit SQL

Suggested facets: changetime, stage, severity, version, easy, has_patch, needs_better_patch, needs_tests, needs_docs, ui_ux, created (date), last_pulled_from_trac (date)

changetime (date)

  • 2011-10-09 · 165
id ▼ created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
1015 2005-12-07 05:55:34 2011-10-09 12:44:57 2019-06-24 00:26:04.249952 Accepted closed Tools defect normal   fixed django.utils.decorators.decorator_from_middleware doesn't work with parameters {{{django.utils.decorators.decorator_from_middleware}}} doesn't work for decorators with parameters: 1. Any parameter of decorator causes a call to {{{_decorator_from_middleware()}}}. 1. Instead of actual wrapping {{{_wrapped_view()}}} is called, which fails because at that point {{{request}}} is actually a view function. Basically this works: {{{ #!python @cache_page def my_cool_view(request): # cool processing }}} This doesn't: {{{ #!python @cache_page(60) def my_cool_view(request): # cool processing }}} Nor this: {{{ #!python @cache_page(cache_timeout=60) def my_cool_view(request): # cool processing }}} Just try it. If this is an intended behavior, we need to update documentation for {{{@cache_page}}}. (I didn't check if there is a documentation for {{{@gzip_page}}} and {{{@conditional_page}}}). It makes sense to document that per-page caching still uses {{{CACHE_MIDDLEWARE_SECONDS}}} and {{{CACHE_MIDDLEWARE_KEY_PREFIX}}}, if no decorator arguments were given. And currently it is impossible to specify them. adrian eugene@lazutkin.com cache_page 0 1 0 1 0 0
2391 2006-07-21 08:50:36 2011-10-09 12:44:57 2019-06-24 00:40:40.777247 Accepted closed Template system defect normal   fixed title case not handling UTF8 correctly Since Django is basically a UTF8 based platform, it should perfom .title() on utf-8 strings. It assumes unicode. I think this diff fixes the problem. adrian rob@audenaerde.org unicode-branch 0 1 1 1 0 0
2489 2006-08-05 23:27:57 2011-10-09 12:44:57 2019-06-24 00:41:43.466549 Accepted closed Core (Other) enhancement normal   fixed Make everything Unicode At some point, we would like to make Django use Unicode objects everywhere internally, with conversion to/from a specific charset happening on input and output. This ticket is a holding place for all related discussion/links. UnicodeInDjango is a related wiki page. A number of tickets have been created (and closed) that related to this problem: #924, #2276, #2132. mtredinnick adrian unicode-branch 0 1 1 0 0 0
2591 2006-08-22 13:30:38 2011-10-09 12:44:57 2019-06-24 00:42:48.586590 Ready for checkin closed django-admin.py inspectdb defect blocker master fixed manage.py inspectdb causes exception on postgresql_psycopg2 backend running ... {{{ manage.py inspectdb }}} cause an exception on postgresql_psycopg2 backend (might be the same to postgresql). {{{ class AuthMessage(models.Model): Traceback (most recent call last): File "F:\...\manage.py", line 11, in ? execute_manager(settings) .... File "F:\...site-packages\django\core\management.py", line 718, in inspectdb relations = introspection_module.get_relations(cursor, table_name) File "F:\...site-packages\django\db\backends\postgresql_psycopg2\introspection.py", line 36, in get_relations relations[int(row[0][1:-1]) - 1] = (int(row[1][1:-1]) - 1, row[2]) TypeError: int() argument must be a string or a number }}} I fixed this bug by editing line 36 from {{{ introspection.py:36: relations[int(row[0][1:-1]) - 1] = (int(row[1][1:-1]) - 1, row[2]) }}} to .. {{{ introspection.py:36: relations[int(row[0][0]) - 1] = (int(row[1][0]) - 1, row[2]) }}} I'am not familiarly with django but it seems to work. adrian markus@heiser-it.de   0 1 0 0 0 0
2996 2006-11-07 13:20:19 2011-10-09 12:44:57 2019-06-24 00:47:05.631924 Accepted closed Template system defect major master fixed [possible patch] template.Nodelist.render and non-ascii data template.Nodelist.render raised an exception in {{{ return ''.join(bits) }}} UnicodeDecodeError : 'ascii' codec can't decode byte 0xd1 in position 3128: ordinal not in range(128) The problem was that the content it tried to join had UTF-8 characters. The *temporary* patch that worked for me was to write the render method as follows: {{{ def render(self, context): bits = [] for node in self: if isinstance(node, Node): bits.append(self.render_node(node, context).decode(settings.DEFAULT_CHARSET)) else: bits.append(node.decode(settings.DEFAULT_CHARSET)) return ''.join(bits).encode(settings.DEFAULT_CHARSET) }}} However, I suppose the bug can be deeper than this and should be fixed somewhere else. regards, Max adrian Max Derkachev <mderk@yandex.ru> unicode-branch 0 0 0 0 0 0
3322 2007-01-18 18:33:23 2011-10-09 12:44:57 2019-06-24 00:50:38.204769 Accepted closed Database layer (models, ORM)     master fixed [patch] UnicodeCursorWrapper does not accept dict-style format objects Django supports pyformat style format parameters (eg. http://code.djangoproject.com/changeset/3038). The change intended to add unicode support for postgresql queries restricts format objects to lists and tuples. The following patch reinstates dict format object passing. adrian kurtiss@meetro.com unicode-branch 0 1 0 0 0 0
3344 2007-01-21 21:35:45 2011-10-09 12:44:57 2019-06-24 00:50:52.049125 Accepted closed Forms     master fixed newforms UnicodeEncodeError in EmailField on non-successful validation newforms EmailField causes UnicodeEncodeError exception in case when value isn't correct. {{{ Exception Type: UnicodeEncodeError Exception Value: 'ascii' codec can't encode character u'\u017a' in position 33: ordinal not in range(128) Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/newforms/forms.py in _html_output, line 103 }}} I spent some time for debugging and I found that what probably causes the error is: {{{ RegexField.__init__(self, email_re, max_length, min_length, gettext(u'Enter a valid e-mail address.'), required, widget, label, initial) }}} newforms/fields.py, line 267 (rev. 4386) When for debug purposes I changed gettext(u'Enter a valid e-mail address.') to anything else (ex. gettext(u'aaa')), the problem didn't occur and the 'aaa' validation error message was displayed like it should. This is probably a problem with translation file or so, but I'm just a Python/django/gettext newbie and I'm just starting my adventure with all of them, so I'm unable to debug it more. adrian bartekr UnicodeEncodeError EmailField gettext Polish Norwegian unicode unicode-branch 0 1 0 0 0 0
3370 2007-01-26 06:35:57 2011-10-09 12:44:57 2019-06-24 00:51:08.605543 Accepted closed Forms     master fixed [patch] newforms: form.save() raises UnicodeEncodeError when form contains any non latin characters Hello everyone I've found the following bug with newforms: when one uses form_for_model/form_for_instance methods and then does save() and form contains any non-latin (national) characters, UnicodeEncodeError is raised. Example (console encoding = ru_RU.UTF-8) {{{ >>> from myproject.models import Payment >>> from django import newforms as forms }}} Let's try form_for_model: {{{ >>> PaymentForm1 = forms.models.form_for_model(Payment) >>> form1 = PaymentForm1({'description': 'превед now', 'event_date': '2007-01-26', 'user': '1', 'pay_type': 'cash', 'amount':'50.3'}) >>> form1.is_valid() True >>> form1.save() Traceback (most recent call last): File "<console>", line 1, in ? File "/usr/lib/python2.4/site-packages/django/newforms/models.py", line 25, in model_save obj.save() File "/usr/lib/python2.4/site-packages/netangels/models/payment.py", line 26, in save super(Payment, self).save() File "/usr/lib/python2.4/site-packages/django/db/models/base.py", line 204, in save ','.join(placeholders)), db_values) File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 148, in execute query = query % db.literal(args) File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 232, in literal return self.escape(o, self.encoders) File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 179, in unicode_literal return db.literal(u.encode(unicode_literal.charset)) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-5: ordinal not in range(256) }}} now let's try form_for_instance {{{ >>> payment = Payment.objects.get(pk=2) >>> PaymentForm2 = forms.models.form_for_instance(payment) >>> form2 = PaymentForm2({'description': 'превед now', 'event_date': '2007-01-26', 'user': '1', 'pay_type': 'cash', 'amount':'50.3'}) >>> form2.is_valid() True >>> form2.save() Traceback (most recent call last): File "<console>", line 1, in ? File "/usr/lib/python2.4/site-packages/django/newforms/models.py", l… adrian anton@khalikov.ru newforms utf8 unicode-branch 0 1 1 1 0 0
3406 2007-01-31 06:00:41 2011-10-09 12:44:57 2019-06-24 00:51:31.311827 Accepted closed Forms     master fixed [patch] newforms: choices checking should unicode choices list before comparing to a value Hello everyone There is a mistake in django/newforms/fields.py: when one uses ChoiceField to select a value from predefined choices it tries to validate selected choice against a list of string values, should be a list of unicode values as it's done in MultipleChoiceField Without the patch one always gets "Select a valid choice. %s is not one of the available choices." ValidationError. Patch works with my previous #3401 adrian anton@khalikov.ru unicode unicode-branch 0 1 0 1 0 0
3432 2007-02-05 13:49:17 2011-10-09 12:44:57 2019-06-24 00:51:47.801634 Accepted closed Core (Other)     master fixed django.test.client.Client.post doesn't like unicode data Ran in to a weird bug today involving passing a unicode dictionary to the post() method of django.test.client.Client. It was pretty tough to reproduce (it seems you need to post, then get, then post with the same client instance) but I've attached a test case that demonstrates the error. Here's the failing test method: {{{ def test_post_get_post_unicode(self): client = Client() data = { u'firstname': u'Test', u'lastname': u'Example', u'email': u'test@example.com', } keys = data.keys() keys.sort() response = client.post('/echomethod/', data) self.assertEqual(response.content, 'POST\n%s' % ','.join(keys)) response = client.get('/echomethod/') self.assert_(response.content.startswith('GET')) response = client.post('/echomethod/', data) self.assertEqual(response.content, 'POST\n%s' % ','.join(keys)) }}} And the corresponding view: {{{ def echo_view(self, request): from django.http import HttpResponse response = HttpResponse() response.write(request.method + '\n') keys = request.POST.keys() keys.sort() response.write(','.join(keys)) return response }}} And the test output: {{{ ====================================================================== FAIL: test_post_get_post_unicode (__main__.TestPostGetPost) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_client_unicode.py", line 85, in test_post_get_post_unicode self.assertEqual(response.content, 'POST\n%s' % ','.join(keys)) AssertionError: 'POST\n' != u'POST\nemail,firstname,lastname' ---------------------------------------------------------------------- }}} Basically, while request.method is still 'POST' the request.POST dictionary doesn't get populated. The workaround is to only post regular dictionaries (without unicode values) to the … adrian Simon Willison test testclient unicode-branch 0 0 0 0 0 0
3454 2007-02-08 03:36:26 2011-10-09 12:44:57 2019-06-24 00:52:01.644598 Accepted closed Database layer (models, ORM)     master fixed sqlite backend is using row_factory when it should be using text_factory currently, sqlite has {{{ def utf8rowFactory(cursor, row): def utf8(s): if type(s) == unicode: return s.encode("utf-8") return s return [utf8(r) for r in row] }}} for row_factory; problem here is that it's rebuilding each record regardless of whether or not the utf8 conversion is required. doing {{{ Database.text_factory = lambda s:s.decode("utf-8") }}} limits the conversion to just TEXT objects. This is a bit faster; that said, I'm wondering why the forced conversion- sqlite stores data in utf8, if {{{ Database.text_factory = str }}} ware set, the whole decoding/encoding would be bypassed, and the native encoding (utf8) would be passed back. In terms of performance, using {{{ Database.text_factory = lambda s:s.decode("utf-8") }}} gains are dependant upon the column types; greater # of non-text fields, greater the gain. Real gain is via turning off the encode/decode and using str directly (underlying utf8); same gain in terms of avoiding extra inspection, but avoids all the extra work. Only downside to either change I can see is that raw sql queries would return str instead of sqlites unicode. Not really sure if this is an actual issue however (don't see any other such limitation in the backends). Patch is attached for the encode/decode variant; unless there are good reasons, would just bypass the encoding/decoding entirely. adrian (removed) unicode-branch 0 1 1 0 0 0
3492 2007-02-13 20:29:14 2011-10-09 12:44:57 2019-06-24 00:52:25.678311 Design decision needed closed Database layer (models, ORM)     master fixed [patch] db.backends.postgres chokes on unicode extra If you use unicode in Model.objects.extra(...), postgres chokes.[[BR]] For instance when using Form.clean_data from newforms. adrian Chris.Wesseling@cwi.nl unicode postgresql unicode-branch 0 1 0 0 0 0
3505 2007-02-15 22:05:05 2011-10-09 12:44:57 2019-06-24 00:52:33.959434 Accepted closed Contrib apps     master fixed Missing authentication backend should be reported When authentication method is not found in AUTHENTICATION_BACKENDS, TypeError is raised with "authenticate() takes exactly 0 arguments (1 given)". Something like CustomError: auth backend not found would be nicer. adrian bugs@almad.net   0 1 0 0 0 0
3582 2007-02-26 19:02:55 2011-10-09 12:44:57 2019-06-24 00:53:22.112583 Accepted closed Forms     master fixed Newforms tests fail under Python2.3 -- unicode related The newforms tests fail under Python2.3: {{{ ====================================================================== ERROR: Doctest: regressiontests.forms.tests ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/jacob/Projects/Django/django/test/doctest.py", line 2150, in runTest failures, tries = runner.run( File "/Users/jacob/Projects/Django/django/test/doctest.py", line 1379, in run return self.__run(test, compileflags, out) File "/Users/jacob/Projects/Django/django/test/doctest.py", line 1267, in __run got += _exception_traceback(exc_info) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 249: ordinal not in range(128) ---------------------------------------------------------------------- }}} I suspect this is either related to something about Python 2.3's unicode handling (as suggested in #3396), or perhaps some difference in how doctest operates under Python2.3. I can't really figure it out, though... adrian jacob newforms unicode python2.3 tests unicode-branch 0 0 0 0 0 0
3690 2007-03-09 23:06:18 2011-10-09 12:44:57 2019-06-24 00:54:30.147260 Accepted closed Forms     master fixed the smart_unicode in newforms/util.py shouldn't assume utf-8 encoded strings in utf-8 environment In utf-8 environment: {{{ >>> from django import newforms as forms >>> f = forms.CharField() >>> f.clean('aaa') u'aaa' >>> f.clean('ąąą') <---- there are latin2 characters, instead utf-8 Traceback (most recent call last): File "<console>", line 1, in ? File "/usr/lib/python2.4/site-packages/django/newforms/fields.py", line 99, in clean value = smart_unicode(value) File "/usr/lib/python2.4/site-packages/django/newforms/util.py", line 15, in smart_unicode s = unicode(s, settings.DEFAULT_CHARSET) UnicodeDecodeError: 'utf8' codec can't decode byte 0xb1 in position 0: unexpected code byte >>> }}} Django should not trust to anything that the browser sends. It's trivial (and common in non-latin1 countries) to set custom encoding (instead auto-detect, this helps with wrongly configured www servers that declare to send latin1 and in fact send local (eg. latin2, or koir8, or...) encoded characters) and this will cause 500 server error messages. Maybe the solution would be to catch UnicodeError and encode incoming string like: {{{ >>> "ąąą".decode('ascii', 'replace') <--- this is again in latin2 instead utf8 u'\ufffd\ufffd\ufffd' >>> print "ąąą".decode('ascii', 'replace') ��� }}} Other solution could be to add FALLBACK_CHARSET variable, that will be used to decode the string. This variable could be set per language for i18n environments, so one can set latin1 for de, fr, latin2 for cz, pl and other encodings as appropriate. Regards, fback adrian fback+django@fback.net unicode-branch 0 1 1 1 0 0
3760 2007-03-19 04:29:37 2011-10-09 12:44:57 2019-06-24 00:55:14.146752 Design decision needed closed contrib.syndication     master fixed feeds.py should allow user set guid tag /django/contrib/syndication/feeds.py specifies the RSS item guid property to be identical to link. guid, by RSS 2 specification must be a *UNIQUE* id for the rss item. However, it is quite possible that multiple items in the feed will have the same link. Leaving the default for guid to be the same as item is fine, but there should definitely be code to allow the developer to override using the same style as the other feed properties: def item_guid(self, item): adrian spark343@cs.ubc.ca guid, 0 1 0 0 0 0
3768 2007-03-20 18:48:45 2011-10-09 12:44:57 2019-06-24 00:55:19.099955 Design decision needed closed Core (Serialization)     master fixed NullBooleanField cannot be a primary key I'm trying to implement the MS SQL Server backend (see #2358) and I find the following regression test in [source:django/trunk/tests/regressiontests/serializers_regress/models.py#4757 the serializer regression tests]: {{{ #!python class NullBooleanPKData(models.Model): data = models.NullBooleanField(primary_key=True) }}} Under MS SQL Server, no nullable field can be a primary key, and so I'm unable to pass this test at all. My suggestion: delete the test. To me, it makes no sense. However, since it seems to be the only test of its type, I suspect it was put in there for a reason. I'd love to hear alternatives as to how to deal with this issue. jacob moof@metamoof.net tests 0 0 0 0 0 0
3770 2007-03-20 20:45:31 2011-10-09 12:44:57 2019-06-24 00:55:20.313866 Unreviewed closed Core (Serialization)     master fixed OneToOneField cannot be a primary key Similar to #3768, in the [source:django/trunk/tests/regressiontests/serializers_regress/models.py#4757 serializer regression tests] you have: {{{ #!python class O2OData(models.Model): data = models.OneToOneField(Anchor, null=True) }}} This cannot be made true for SQL server, as no NULL field can be a primary key. More to the point, I fail to see how a field like this could ever be a primary key. This test should be removed. jacob moof@metamoof.net tests 0 0 0 0 0 0
3878 2007-03-30 15:17:55 2011-10-09 12:44:57 2019-06-24 00:56:27.898240 Accepted closed Core (Serialization)     0.96 fixed (JSON)-serializing utf8 data fails If i try to serialize data from the database (for example using fixtures), which is utf8-encoded, the JSON output will contain unicode-escapes (\uXXXX) which will not be loaded back allright. Example: {{{ >>> obj = Blah() >>> obj.test = "ö" >>> obj.save() }}} {{{ ./manage.py dumpdata > blah.json ./manage.py loaddata blah }}} {{{ >>> obj = Blah.objects.all()[0] >>> print obj.test blök }}} mtredinnick alex@gc-web.de utf8 unicode-branch 0 1 0 1 0 0
3891 2007-04-01 09:57:58 2011-10-09 12:44:57 2019-06-24 00:56:35.951556 Accepted closed Database layer (models, ORM)     master fixed CursorDebugWrapper unicode problems Using Django 0.96/development server/mysql. I'm writing unicode strings into the db. Writing actually succeeds, but when the sql query is logged by CursorDebugWrapper, I see a UnicodeDecodeError at line 19, in django/db/backends/util.py {{{ if not isinstance(params, (tuple, dict)): params = tuple(params) # UnicodeDecodeError raised here self.db.queries.append({ 'sql': sql % params, 'time': "%.3f" % (stop - start), }) }}} adrian mbrezu@gmail.com debug unicode unicode-branch 0 0 0 0 0 0
3937 2007-04-05 18:14:57 2011-10-09 12:44:57 2019-06-24 00:57:04.767445 Accepted closed Database layer (models, ORM)     other branch fixed UnicodeEncodeError exception when using the filter method with LIKE operator and unicode strings When i try to use objects.filter this way: Participante.objects.filter(nome__contains=u"á") it returns this exception: {{{ Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 102, in __repr__ return repr(self._get_data()) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 470, in _get_data self._result_cache = list(self.iterator()) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 174, in iterator select, sql, params = self._get_sql_clause() File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 484, in _get_sql_clause joins2, where2, params2 = self._filters.get_sql(opts) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 648, in get_sql joins2, where2, params2 = val.get_sql(opts) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 699, in get_sql return parse_lookup(self.kwargs.items(), opts) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 831, in parse_lookup joins2, where2, params2 = lookup_inner(path, lookup_type, value, opts, opts.db_table, None) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 1009, in lookup_inner params.extend(field.get_db_prep_lookup(lookup_type, value)) File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py", line 173, in get_db_prep_lookup return ["%%%s%%" % prep_for_like_query(value)] File "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py", line 25, in <lambda> prep_for_like_query = lambda x: str(x).replace("\\", "\\\\").replace("%", "\%").replace("_", "\_") UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-2: ordinal not in range(128) }}} I don't know if it is a bug, BUT me and some guys from django-brasil have tried a lot of ways before changing django code, so... Changing str() for unico… adrian brunogola@gmail.com unicode str unicode-branch 0 1 1 1 0 0
4039 2007-04-13 22:59:41 2011-10-09 12:44:57 2019-06-24 00:58:08.820587 Accepted closed Internationalization     0.96 fixed New forms and the set_language redirect view don't work together When using the 'set_language redirect view' along with newforms, where the newform fields' labels are marked with gettext_lazy, after the view is reloaded, the fields' labels are still in the original language (while template internationalized string are actualized). Example code for the form: {{{ from django import newforms as forms from django.utils.translation import gettext_lazy as _ class GetInForm(forms.Form): name = forms.CharField(label=_('Name'), max_length=30) password = forms.CharField(label=_('Password'), widget=forms.PasswordInput(render_value=False)) }}} View code: {{{ from django.shortcuts import render_to_response from django.template import RequestContext import GetInForm def getin(request): return render_to_response('template_name', {'test': _('Hello'), 'form': GetInForma().as_p()}, context_instance=RequestContext(request)) }}} Inside the template, the set_language redirect view' is used. Hello is translated, but the form labels no. hugo anonymous unicode-branch 0 0 0 0 0 0
4141 2007-04-24 11:45:04 2011-10-09 12:44:57 2019-06-24 00:59:13.589109 Accepted closed Database layer (models, ORM)     master fixed TextFeld raises UnicodeDecodeError When trying to insert some text with non-ascii character into a TextField from admin, Django throws this error: {{{ Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/contrib/admin/views/decorators.py" in _checklogin 55. return view_func(request, *args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/views/decorators/cache.py" in _wrapped_view_func 39. response = view_func(request, *args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/contrib/admin/views/main.py" in change_stage 329. new_object = manipulator.save(new_data) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/models/manipulators.py" in save 108. new_object.save() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/polismus/aggregator/models.py" in save 59. super(UserProfile, self).save() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/models/base.py" in save 223. db_values + [pk_val]) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/backends/util.py" in execute 19. self.db.queries.append({ UnicodeDecodeError at /admin/aggregator/userprofile/1/ 'ascii' codec can't decode byte 0xc5 in position 511: ordinal not in range(128) }}} Maybe this can be fixed only with the Unicode branch? adrian flavio.curella@gmail.com admin,unicode,decode, unicode-branch 0 0 0 0 0 0
4198 2007-05-02 02:01:54 2011-10-09 13:42:11 2019-06-24 00:59:49.293597 Ready for checkin closed contrib.admin Bug Normal master fixed admin javascript calendar spacing problem See the right edge of the calendar in the attached screen capture. Setting the table's width to 100% seems to make the gap disappear (at least in Firefox on Linux). {{{ #!diff Index: django/contrib/admin/media/css/widgets.css =================================================================== --- django/contrib/admin/media/css/widgets.css (revision 5135) +++ django/contrib/admin/media/css/widgets.css (working copy) @@ -45,7 +45,7 @@ .calendarbox, .clockbox { margin:5px auto; font-size:11px; width:16em; text-align:center; background:white; position:relative; } .clockbox { width:9em; } .calendar { margin:0; padding: 0; } -.calendar table { margin:0; padding:0; border-collapse:collapse; background:white; width:99%; } +.calendar table { margin:0; padding:0; border-collapse:collapse; background:white; width:100%; } .calendar caption, .calendarbox h2 { margin: 0; font-size:11px; text-align:center; border-top:none; } .calendar th { font-size:10px; color:#666; padding:2px 3px; text-align:center; background:#e1e1e1 url(../img/admin/nav-bg.gif) 0 50% repeat-x; border-bottom:1px solid #ddd; } .calendar td { font-size:11px; text-align: center; padding: 0; border-top:1px solid #eee; border-bottom:none; } }}} So anyone know a reason why this needs to be 99%? Is this needed so that other browsers don't break? xian Gary Wilson <gary.wilson@gmail.com>   1 1 0 0 0 1
4227 2007-05-05 22:52:48 2011-10-09 12:44:57 2019-06-24 01:00:07.895968 Accepted closed Core (Other)     master fixed dumpdata/loaddata serializer ignores encoding settings When dumping data from a UTF-8-encoded database, {{{get_string_value()}}} in {{{core/serializers/base.by}}} casts !CharField/!TextField values with {{{str()}}}, which results in a decode error when encountering non-ASCII characters. The settings.DEFAULT_CHARSET value and the 'encoding' option are ignored. Setup to reproduce:[[br]] PostgreSQL 8.1.8 [[br]] Python 2.4.4 [[br]] Django SVN revision 5152 create new project and app for testing (names used in this example are 'myproject' and 'myapp') {{{ cat myapp/models.py }}}: {{{ from django.db import models class Thingy(models.Model): my_column = models.CharField(maxlength=255) }}} {{{ python manage.py --plain shell }}} {{{ >>> from myproject.myapp import models >>> thing = models.Thingy(my_column='äöü') # non-ASCII string entered as literal here, locale is set to UTF-8 >>> thing.save() >>> thing.my_column '\xc3\xa4\xc3\xb6\xc3\xbc' # UTF-8 string }}} {{{ python manage.py dumpdata --format=xml myapp }}} {{{ Unable to serialize database: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) }}} Using the JSON format to dump works, but then fails with a similar encoding error on 'loaddata'. A partial fix is attached as patch (this now works for me with XML-serialization). adrian Caspar Hasenclever <hasencle@informatik.uni-freiburg.de> unicode-branch 0 0 0 0 0 0
4286 2007-05-12 22:56:59 2011-10-09 12:44:57 2019-06-24 01:00:45.463476 Accepted closed contrib.admin     master fixed unicode error in "added" confirmation error I am using django with the french i18n enabled. When I add a new object from the admin I get a Unicode Error. I fixed the problem with this patch The french message was : L'objet %(name)s "%(obj)s" a été ajouté avec succès. {{{ Index: main.py =================================================================== --- main.py (revision 5173) +++ main.py (working copy) @@ -254,7 +254,9 @@ new_object = manipulator.save(new_data) pk_value = new_object._get_pk_val() LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, str(new_object), ADDITION) - msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': opts.verbose_name, 'obj': new_object} + from django.utils.encoding import StrAndUnicode, smart_unicode + msg = smart_unicode(_('The %(name)s "%(obj)s" was added successfully.')) + msg = msg % {'name': opts.verbose_name, 'obj': new_object} # Here, we distinguish between different save types by checking for # the presence of keys in request.POST. if "_continue" in request.POST: }}} adrian thomas.rabaix@gmail.com unicode-branch 0 1 0 0 0 0
4291 2007-05-14 11:44:26 2011-10-09 12:44:57 2019-06-24 01:00:48.973513 Accepted closed Forms     master fixed Unicode bug with gettext variables in newforms/widgets.py {{{newforms/widgets.py}}} has a bug related to {{{gettext}}}. I have a select widget in a form template with several options, translated with {{{gettext_lazy}}}. The rendering of the template fails with an {{{UnicodeDecodeError}}} exception with a message like {{{ 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128) }}} Following the callback, trouble arises from calls like this in {{{newforms/widgets.py}}}: {{{ escape(smart_unicode(string_variable_with_non_english_chars_translated_by_gettext)) }}} The fix is simple: exchange the order of the calls to {{{escape()}}} and {{{smart_unicode()}}}: {{{ smart_unicode(escape(string_variable_with_non_english_chars_translated_by_gettext)) }}} These are some code snippets that mimic the application in which I detected the problem: model.py: {{{ FOO_LIST = (('A', _('A msgid'),) class FooModel(models.Model): a_list = models.StringField(choices=FOO_LIST) }}} django.po: {{{ msgid "A msgid" msgstr "Nön-ÁSCII chäráctèrs" }}} view.py: {{{ FooForm = forms.form_for_model(FooModel) f = FooForm() return render_to_response('footemplate.html', {'f': f}) }}} footemplate.html: {{{ ... {{ f }} ... }}} adrian Fidel Ramos <framos@yaco.es> unicode gettext widget unicode-branch 0 1 0 0 0 0
4300 2007-05-15 08:03:03 2011-10-09 12:44:57 2019-06-24 01:00:54.711243 Accepted closed Uncategorized     master fixed views/debug.py: exc_value might contain unkown encodings Hi, here is a patch for views/debug.py. The exc_value might contain unknown encodings. Try latin1 and utf8, but don't fail. jacob Thomas Güttler <hv@tbz-pariv.de> unicode-branch 0 0 0 0 0 0
4365 2007-05-23 04:19:32 2011-10-09 12:44:57 2019-06-24 01:01:36.164837 Accepted closed Internationalization     unicode fixed [unicode] slug generation can be enhanced It is worthwhile enhancing both the slugify filter and admin/media/js/admin/urlify.js to handle some foreign letters a bit better. We aren't looking to create a transliteration function, but some lightweight improvements are certainly possible. A start was made by Bill de hÓra in [http://groups.google.com/group/django-developers/browse_thread/thread/fd6a5f6cee758418/70106d7ae062b136 this thread] (django-developers) and there is also some good data in #2716. mtredinnick mtredinnick slug unicode i18n 0 0 0 0 0 0
4452 2007-06-01 12:34:13 2011-10-09 12:44:57 2019-06-24 01:02:31.998888 Accepted closed contrib.syndication     master fixed Unicode error in the syndication system First of all, Idon't know if the component is RSS framework, I don't know if it's the same as "Syndication feeds", I guess so. I'm serving an atom feed, and I got problems with the following line:[[BR]] {{{ subtitle = u"Melón" }}} The codification is wrong, but with the next line I get an error:[[BR]] {{{ subtitle = "Melón" }}} '''Error:'ascii' codec can't decode byte 0xc3 in position 40: ordinal not in range(128)[[BR]]''' Probably it's because the framework doesn't check the codification before trying to convert it to unicode. I don't know, actually I didn't check the code yet. A matter of time. adrian aribao@gmail.com unicode-branch 0 0 0 0 0 0
4469 2007-06-03 14:47:13 2011-10-09 12:44:57 2019-06-24 01:02:42.875948 Ready for checkin closed Forms     master fixed More information in field length validation error (newforms) If the length of the entered text is more than ''max_length'', django says: {{{ Ensure this value has at most 3000 characters. }}} It would be nice for the user to know how many characters in the text. Please see the patch attached below: {{{ Ensure this value has at most 3000 characters (it has 4112). }}} Best, adrian A. Murat Eren <meren@pardus.org.tr> newforms, max_length, min_length, validation 0 1 0 0 0 0
4484 2007-06-06 00:51:53 2011-10-09 12:44:57 2019-06-24 01:02:52.607840 Ready for checkin closed Uncategorized       fixed traceback in django/middleware/common.py caused by empty old_url Somehow managed to get an exception in django/middleware/common.py - old_url[1] was `''` Patch attached. Happened in both SVN and 0.96. The patch is against 0.96. jacob VesselinK   0 1 0 0 0 0
4502 2007-06-07 19:02:11 2011-10-09 12:44:57 2019-06-24 01:03:04.079848 Ready for checkin closed Documentation     master fixed Tutorial 3, small change http://www.djangoproject.com/documentation/tutorial03/ "Back to our polls.detail view." I don't see where we are going back too - seems to be the first time it is mentioned. jacob Carl Karsten <carl@personnelware.com>   0 1 0 0 0 0
4522 2007-06-10 13:04:00 2011-10-09 12:44:57 2019-06-24 01:03:17.308844 Ready for checkin closed Documentation     master fixed limitations of 'time' filter should be clarified It would be helpful if the template filters documentation page at [http://www.djangoproject.com/documentation/templates/#time] could clarify the limitations of the '''time''' filter, and preferably have a reference to the more flexible '''date''' filter. The description 'same as the '''now''' tag' leads you to expect that it can accept all the same arguments as '''now''', rather than just those that refer to a time of day, so it's a little frustrating when you find it doesn't. Suggested addition: ---- Note that unlike '''now''', '''time''' only accepts parameters in the format string that refer to the ''time of day'', not parameters referring to the date. For date formatting use the '''date''' filter. jacob admackin@gmail.com   0 1 0 0 0 0
4525 2007-06-10 19:22:48 2011-10-09 12:44:57 2019-06-24 01:03:19.158764 Ready for checkin closed Documentation     master fixed Small error in FastCGI documentation An example states that choosing protocol should be done with ''--protocol=N'' when the correct way is ''protocol=N''. jacob Johan Bergström <bugs@bergstroem.nu> fastcgi protocol 0 1 0 0 0 0
4526 2007-06-10 21:12:27 2011-10-09 12:44:57 2019-06-24 01:03:19.772586 Unreviewed closed Testing framework     master fixed test.Client.login does not check is_active The login methon in django.test.Client class does not check whether the user is active or not -- it simply uses the authenticate function, which does only username and password checks. adrian marcin@elksoft.pl login,authenticate,is_active 0 1 0 0 0 0
4538 2007-06-11 17:43:05 2011-10-09 12:44:57 2019-06-24 01:03:27.445356 Ready for checkin closed Documentation     master fixed "Installing the official version" should be broken into 2 parts http://www.djangoproject.com/documentation/install/ "Installing the official version" currenty: {{{ 1. Check the distribution specific notes to see if your platform/distribution provides official Django packages/installers. Distribution-provided packages will typically allow for automatic installation of dependancies and easy upgrade paths. 2. Download the latest release from our download page. 3. Untar the downloaded file (e.g. tar xzvf Django-NNN.tar.gz). 4. Change into the downloaded directory (e.g. cd Django-NNN). 5. Run sudo python setup.py install. }}} suggested: {{{ Use either A or B: A. Package 1. Check the distribution specific notes to see if your platform/distribution provides official Django packages/installers. Distribution-provided packages will typically allow for automatic installation of dependancies and easy upgrade paths. B. Tarbal 1. Download the latest release from our download page. 2. Untar the downloaded file (e.g. tar xzvf Django-NNN.tar.gz). 3. Change into the downloaded directory (e.g. cd Django-NNN). 4. Run sudo python setup.py install. }}} Might also want to add "C. using ez_install" jacob Carl Karsten <carl@personnelware.com>   0 1 0 0 0 0
4556 2007-06-13 16:12:38 2011-10-09 12:44:57 2019-06-24 01:03:38.995216 Ready for checkin closed contrib.admin     newforms-admin fixed Improvement of javascript function showAddAnotherPopup Hi I made a little imrovement of javascript function showAddAnotherPopup in admin, because it was not possible to have a link to url which already contained GET attribute. (function adds "?_popup=1", so if I had url for example "/change_object?something=1" then result was "/change_object?something=1?_popup=1", that is incorrect, so after applying patch, result will be "/change_object?something=1&_popup=1"). adrian glin@seznam.cz   0 1 0 0 0 0
4615 2007-06-18 19:42:53 2011-10-09 12:44:57 2019-06-24 01:04:17.251373 Ready for checkin closed Documentation     master fixed Part 4 of tutorial leaves "vote" view in broken state due to reverse lookup on deleted view When part 4 of the tutorial introduces generic views it breaks the vote method. The last line currently reads {{{ return HttpResponseRedirect(reverse('mysite.polls.views.results', args=(p.id,))) }}} Once we've switched to generic views, however, the mysite.polls.views.results view is deleted. Voting on a poll now results in an error message {{{ NoReverseMatch at /polls/2/vote/ }}} The tutorial does mention changing the vote view to pass the expected generic result set objects. It should also specify that the urls.py file should be modified so that the the results view has a name like {{{ url(r'^(?P<object_id>\d+)/results/$', 'django.views.generic.list_detail.object_detail', dict(info_dict, template_name='polls/results.html'), name="poll_results"), }}} and modify the reverse call to use the named view instead of the site.app.viewname syntax like: {{{ return HttpResponseRedirect(reverse('poll_results', args=(p.id,))) }}} jacob simeonf@gmail.com tutorial 0 1 0 0 0 0
4627 2007-06-20 03:04:23 2011-10-09 12:44:57 2019-06-24 01:04:24.792085 Ready for checkin closed Documentation     master fixed "Distributions" page should mention MacPorts Possibly Fink too, though I don't use that so I don't have the specifics handy. jacob Paul Bx <pb@e-scribe.com>   0 1 0 0 0 0
4640 2007-06-21 01:33:57 2011-10-09 12:44:57 2019-06-24 01:04:33.221401 Ready for checkin closed Documentation     master fixed import path to "stringfilter" decorator is incorrect in the docs http://www.djangoproject.com/documentation/templates_python/#template-filters-which-expect-strings The given import path for the "stringfilter" decorator is wrong there. I don't know whether the docs should be updated (patch attached) or whether django/template/__init__.py should import "stringfilter" so that it available via "django.template.stringfilter" (This is for the trunk.) jacob trentm@gmail.com   0 1 0 0 0 0
4702 2007-06-27 07:32:23 2011-10-09 12:44:57 2019-06-24 01:05:12.868324 Accepted closed contrib.admin     master fixed gettext_lazy on _meta.app_label doesn't group together in admin When you apply gettext_lazy on the app_label Meta attribute, it causes the class to ungroup in the admin even if the label is identical to another. Example: {{{ #!python class QuestionSet(models.Model): ...fields... class Meta: app_label = _("Q and A") class Question(models.Model): ...fields... class Meta: app_label = _("Q and A") }}} This gives you two separate groups called "Q And A" in the admin instead of grouping them together. adrian anonymous unicode-branch 0 0 0 0 0 0
4717 2007-06-28 17:52:07 2011-10-09 12:44:57 2019-06-24 01:05:22.452264 Accepted closed Translations     master fixed Catalan translation updated Translations added, and some corrections to catalan language file. mtredinnick marc.garcia@accopensys.com catalan 0 1 0 0 0 0
4722 2007-06-28 23:12:04 2011-10-09 12:44:57 2019-06-24 01:05:25.631523 Ready for checkin closed Documentation     master fixed Possibly confusing/inaccurate line in modpython documentation In the mod_python doc, currently the bit on !PythonPath says "if you have manually modified PYTHONPATH" which isn't always the case - many people simply use runserver, so they've never touched the PYTHONPATH var or anything related to sys.path :) Attaching patch with possible alteration to be a bit more clear jacob Collin Grady <cgrady@the-magi.us>   0 1 0 0 0 0
4731 2007-06-30 05:05:57 2011-10-09 12:44:57 2019-06-24 01:05:31.236012 Ready for checkin closed Core (Other)     master fixed setup_environ assumes that settings module is called "settings" In several of my apps, I use a `settings_live` module (which simply imports * from settings and overrides appropriately). I can't use `management.setup_environ()` for a cron script I'm using because it relies on the settings module actually being called `settings` (it's hard coded) Patch attached which fixes this. adrian SmileyChris   0 1 0 0 0 0
4745 2007-07-03 04:32:30 2011-10-09 12:44:57 2019-06-24 01:05:40.180804 Ready for checkin closed Documentation     master fixed SITE_ID cannot be 0 (zero), despite what the docs say The "Running the unit tests" subsection at http://www.djangoproject.com/documentation/contributing/#running-the-unit-tests claims that the SITE_ID in the settings file can be set to any integer "...SITE_ID setting (any integer value will do)...", which is not correct. At least one test will fail with a SITE_ID of 0 (zero). The documentation should be updated to say something like "...SITE_ID setting (any nonzero integer value will do)...". jacob Lars Stavholm <stava@telcotec.se>   0 0 0 0 0 0
4753 2007-07-03 13:50:39 2011-10-09 12:44:57 2019-06-24 01:05:45.239336 Unreviewed closed Translations     master fixed Updated es/ translation Spanish translations mtredinnick MarioGonzalez <gonzalemario t@ gmail.com>   0 1 0 0 0 0
4755 2007-07-03 21:20:53 2011-10-09 12:44:57 2019-06-24 01:05:46.576428 Ready for checkin closed Forms     master fixed use list comprehension in MultipleChoiceField.clean instead of for loop Currently, there is a for loop that builds a list with `append`. adrian Gary Wilson <gary.wilson@gmail.com>   0 1 0 0 0 0
4763 2007-07-04 04:58:06 2011-10-09 12:44:57 2019-06-24 01:05:52.007861 Ready for checkin closed Documentation     master fixed Minor Cache documentation typo On http://www.djangoproject.com/documentation/cache/ Under the heading '''Order of MIDDLEWARE_CLASSES''', the last line of the first paragraph reads: {{{ Middleware always adds something the Vary response header when it can. }}} This probably should be: {{{ Middleware always adds something to the Vary response header when it can. }}} (Although it seems like a rather broad and slightly odd statement, at least it would make more sense!) Thanks for a great project and great documentation! Dan Scott jacob dan@coffeecode.net   0 1 0 0 0 0
4764 2007-07-04 05:06:14 2011-10-09 12:44:57 2019-06-24 01:05:52.667332 Ready for checkin closed Documentation     master fixed Locale middleware is missing from "Available middleware" list On http://www.djangoproject.com/documentation/middleware/ Under heading '''Available middleware''': django.middleware.locale.LocaleMiddleware should be added to the list of available middleware, with a link to http://www.djangoproject.com/documentation/i18n/ Thanks for great docs and a great project! jacob dan@coffeecode.net   0 1 0 0 0 0
4766 2007-07-04 10:47:44 2011-10-09 12:44:57 2019-06-24 01:05:53.899915 Accepted closed contrib.admin     unicode fixed Patch for adding RUSSIAN_MAP in 5608 Patch for adding RUSSIAN_MAP in django/contrib/admin/media/js/urlify.js mtredinnick boobsd@gmail.com RUSSIAN_MAP 0 1 0 0 0 0
4768 2007-07-04 22:37:29 2011-10-09 12:44:57 2019-06-24 01:05:55.160626 Ready for checkin closed Template system     master fixed Trivial timesince and dateformat cleanups * python -Qwarn gives !DeprecationWarnings for "classic int division". * The milliseconds code in timesince is unused, and it doesn't fit the design of the function. Why have milliseconds but not seconds? adrian John Shaffer <jshaffer2112@gmail.com>   0 1 0 0 0 0
4770 2007-07-05 04:59:27 2011-10-09 12:44:57 2019-06-24 01:05:56.481288 Accepted closed Database layer (models, ORM)     master fixed mysql_old and tables in utf8_unicode_ci -- non-ascii chars problems I have a website in Dreamhost and with database engine 'mysql_old'... The non-ascii chars shows deformed, like this: Atenção! Inscrição, Seleção e Música de Câmara. But with 'mysql' in DATABASE_ENGINE the non-ascii chars works fine (I tested with a remotely connection). [SVN INFO] Revision: 5616 Last Changed Date: 2007-07-05 00:29:18 -0300 (Thu, 05 Jul 2007) With unicode branch, the problem persists. PS: I can't install new python-mysqldb in Dreamhost! :-/ adrian Guilherme M. Gondim (semente) <semente@taurinus.org>   0 0 0 0 0 0
4772 2007-07-05 13:31:24 2011-10-09 12:44:57 2019-06-24 01:05:57.780015 Accepted closed Core (Other)     master fixed urlresolver fails to resolve urls with unicode {{{ Traceback (most recent call last): File "C:\python24\Lib\site-packages\django\template\__init__.py" in render_node 754. result = node.render(context) File "C:\python24\Lib\site-packages\django\template\defaulttags.py" in render 134. nodelist.append(node.render(context)) File "C:\python24\Lib\site-packages\django\template\__init__.py" in render 790. return self.filter_expression.resolve(context) File "C:\python24\Lib\site-packages\django\template\__init__.py" in resolve 582. obj = resolve_variable(self.var, context) File "C:\python24\Lib\site-packages\django\template\__init__.py" in resolve_variable 680. current = current() File "C:\python24\Lib\site-packages\django\utils\functional.py" in _curried 3. return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs)) File "C:\python24\Lib\site-packages\django\db\models\base.py" in get_absolute_url 457. return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self) File "C:\python24\Lib\site-packages\django\db\models\__init__.py" in inner 27. return reverse(bits[0], None, *bits[1:3]) File "C:\python24\lib\site-packages\django\core\urlresolvers.py" in reverse 289. return iri_to_uri(u'/' + get_resolver(urlconf).reverse(viewname, *args, **kwargs)) File "C:\python24\lib\site-packages\django\core\urlresolvers.py" in reverse 275. return u''.join([reverse_helper(part.regex, *args, **kwargs) for part in self.reverse_dict[lookup_view]]) File "C:\python24\lib\site-packages\django\core\urlresolvers.py" in reverse_helper 90. result = re.sub(r'\(([^)]+)\)', MatchChecker(args, kwargs), regex.pattern) File "C:\python24\lib\sre.py" in sub 142. return _compile(pattern, 0).sub(repl, string, count) File "C:\python24\lib\site-packages\django\core\urlresolvers.py" in __call__ 130. if not re.match(test_regex + '$', str(value)): # TODO: Unicode? UnicodeEncodeError at / 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) }}} adrian alexthreed@gmail.com unicode 0 1 1 1 0 0
4775 2007-07-05 20:04:04 2011-10-09 12:44:57 2019-06-24 01:05:59.659385 Ready for checkin closed contrib.admin     master fixed in urlify.js LATIN_MAP some hungarian accents are missing in urlify.js LATIN_MAP some hungarian accents are missing ( ő Ő ű Ű ). The attached patch adds them. Side note: the format of the code makes it extremely difficult to extend that table. This makes the patch totally unreadable. I would suggest to re-format this table (one mapping / line). adrian Pistahh <szekeres@iii.hu>   0 1 0 0 0 0
4776 2007-07-05 20:27:31 2011-10-09 12:44:57 2019-06-24 01:06:00.323843 Accepted closed Uncategorized     master fixed Unicode branch merge and strftime in FileField upload_to I experience file upload breakage after merger of the unicode branch. The strftime function on line 738 in django/db/models/fields/__init__.py gave the following error: TypeError: strftime() argument 1 must be str, not unicode I have included a simple patch to byte-stringify the input to the strftime method... that may not be the best strategy to take. Mike. mtredinnick mike.j.thompson@gmail.com unicode strftime 0 1 0 0 0 0
4779 2007-07-06 00:13:49 2011-10-09 12:44:57 2019-06-24 01:06:02.426832 Unreviewed closed Testing framework     master fixed typo in tests Willing to bet the commiter of this didn't win the spelling bee as a kid ;) Attached is a simple 3 line correction; basically tests are asserting Response == Reponse, simple typo. adrian (removed)   0 1 0 0 0 0
4781 2007-07-06 06:24:07 2011-10-09 12:44:57 2019-06-24 01:06:03.733536 Ready for checkin closed Core (Mail)     master fixed Typo in mail.py Line 286 self.attachments was spelt self.attachements and raised an error. adrian simo <simon@quo.com.au> EmailMessage attach 0 1 0 0 0 0
4782 2007-07-06 07:06:03 2011-10-09 12:44:57 2019-06-24 01:06:04.383042 Unreviewed closed Translations     master fixed Updated Slovenian (sl) translations Attached is updated Slovenian (sl_SI) translation mtredinnick Gasper Koren <skrat@owca.info>   0 1 0 0 0 0
4798 2007-07-08 10:37:08 2011-10-09 12:44:57 2019-06-24 01:06:14.387515 Unreviewed closed Core (Other)     master fixed Unicode strings being passed as kwargs Hi, Since the Unicode merging, this view : {{{ #!python @vary_on_headers('Authenticated-User') def list_articles(request, blog, slug=None, tags='', year=None, month=None, day=None): }}} raises an Exception, "inner_func() keywords must be strings".[[BR]] The Exception allows me to watch local vars, like callback_kwargs, that is going to be passed to the function : {{{ #!python {'blog': <Blog>, u'month': '6', u'slug': '', u'year': '2007'} }}} It seems that unicode there is not well-handled. On a few pages, I have the same error but with views instead of inner_func(). Moreover, Magus- has a temp fix : {{{ <Magus-> line 235 of django/core/urlresolvers.py - the 3rd arg on the return (the dict() call) is the one in question <Magus-> move that dict() to a new line above 235, setting it to a temp var - then you need to build a new dict with bytestring keys instead of unicode }}} adrian Baptiste <baptiste.goupil@gmail.com> unicode 0 0 0 0 0 0
4802 2007-07-08 14:12:22 2011-10-09 12:44:57 2019-06-24 01:06:16.982190 Accepted closed Translations     master fixed French i18n Language file for the last SVN. mtredinnick Baptiste <baptiste.goupil@gmail.com> french, i18n 0 1 1 0 0 0
4804 2007-07-08 19:46:21 2011-10-09 12:44:57 2019-06-24 01:06:18.240539 Unreviewed closed Core (Other)     master fixed [patch] Oldforms library (and therefore admin) does not convert choices to unicode This bug is practically identical to #3406 but concerns the oldforms library. When using a SelectField, the choices are not converted to unicode before they are compared to the submitted value. This makes submitting a value in the admin impossible when the choice values contain characters outside the ASCII range. Patch is included and similar to the one included in #3406. adrian django@vonposer.de unicode oldforms admin 0 1 0 0 0 0
4807 2007-07-09 02:28:31 2011-10-09 12:44:57 2019-06-24 01:06:20.139688 Accepted closed Validators     master fixed Decimal regex doesn't support a case where no leading numbers are used In a case where you want percentages less than 100, it would be expected to have a decimal field like this: {{{ percentage = models.DecimalField(decimal_places=4,max_digits=4) }}} In order to allow the user to only enter values from .0001 -> .9999 The problem is the decimal_re in validators.py requires at least 1 digit: decimal_re = re.compile(r'^-?(?P<digits>\d+)(\.(?P<decimals>\d+))?$') If you modify the field to include 5 digits, then you support the range .0001 -> 9.9999 This isn't a show stopper but it is a little counter-intuitive. Unfortunately my regex foo isn't quite good enough to figure out the right regex. adrian chris.moffitt@gmail.com   0 1 1 0 0 0
4808 2007-07-09 02:57:54 2011-10-09 12:44:57 2019-06-24 01:06:20.740714 Ready for checkin closed contrib.localflavor     master fixed Support for Chilean regions in localflavor Included is a patch for adding the Chilean administrative regions to the localflavor. adrian Marijn Vriens <marijn@metronomo.cl>   0 1 0 0 0 0
4812 2007-07-09 11:47:11 2011-10-09 12:44:57 2019-06-24 01:06:23.469285 Unreviewed closed Validators     master fixed typo in email validator there is a small typo in validators.py:email_re {{{ ...[\001-011\013... }}} should be {{{ ...[\001-\011\013... }}} figured out after compiling this regex with option re.IGNORECASE + 128 (an internal debug value) {{{ === modified file 'django/core/validators.py' --- django/core/validators.py 2007-07-09 13:18:03.000000000 +0200 +++ django/core/validators.py 2007-07-09 13:18:14.000000000 +0200 @@ -24,5 +24,5 @@ email_re = re.compile( r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom - r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string + r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"' # quoted-string r')@(?:[A-Z0-9-]+\.)+[A-Z]{2,6}$', re.IGNORECASE) # domain integer_re = re.compile(r'^-?\d+$') }}} adrian batchman@free.fr small typo in email validator 0 1 0 0 0 0
4814 2007-07-09 15:10:14 2011-10-09 12:44:57 2019-06-24 01:06:24.778779 Ready for checkin closed Documentation       fixed System Message within Tutorial 1: Why __unicode__() and not __str__() I have been going through your tutorial lately and noticed a change from the use of __str__() to __unicode__() and read the new block with the text below: ---- Why __unicode__() and not __str__()? If you’re familiar with Python, you might be in the habit of adding __str__() methods to your classes, not __unicode__() methods. '''System Message: WARNING/2 (<string>, line 499) Block quote ends without a blank line; unexpected unindent.''' We use __unicode__() here because Django models deal with Unicode by default. All data stored in your database is converted to Unicode when it’s returned. ---- Since the System Message listed above doesn't seem to be explained, I didn't think that it was the reason for a switch from __str__() to __unicode__(), but that there was something you had meant to include that had a problem. I'm really impressed with Django - keep up the good work! anonymous eryost@gmail.com tutorial1 __unicode__ __str__ 0 1 0 0 0 0
4815 2007-07-09 16:06:22 2011-10-09 12:44:57 2019-06-24 01:06:25.438049 Unreviewed closed HTTP handling     master fixed QueryDict doesn't pass correct encoding to force_unicode QueryDict doesn't pass correct encoding to force_unicode, so request parameters are always assumed to be unicode. See patch. mtredinnick s3x3y1@gmail.com http, request, unicode, querydict 0 1 0 1 0 0
4817 2007-07-09 20:20:25 2011-10-09 12:44:57 2019-06-24 01:06:26.657262 Unreviewed closed Documentation     master fixed Documentation issue in named urls documentation On http://www.djangoproject.com/documentation/url_dispatch/#naming-url-patterns, there are a few lines of a urlconf that include / at the start of the match. Since django never passes the initial slash to the urlconf, I think the leading slashes on all of those should be removed. jacob Collin Grady <cgrady@the-magi.us>   0 1 0 0 0 0
4823 2007-07-10 07:35:13 2011-10-09 12:44:57 2019-06-24 01:06:30.463550 Accepted closed Core (Other)     master fixed Changeset 5636 causes AttributeError at django/core/urlresolvers.py in resolve, line 234 when using Django's adminstrative interface I installed django.contrib.admin to my new project. When I navigate to /admin/, I receive this error: {{{ Traceback (most recent call last): File "/django/django_src/django/core/handlers/base.py" in get_response 68. callback, callback_args, callback_kwargs = resolver.resolve(request.path) File "/django/django_src/django/core/urlresolvers.py" in resolve 227. sub_match = pattern.resolve(new_path) File "/django/django_src/django/core/urlresolvers.py" in resolve 234. sub_match_dict.update([(smart_str(k), v) for k, v in sub_match[2].items()]) AttributeError at /admin/ keys }}} If I make the following changes to urlresolvers.py at line 232, basically undoing changeset 5636: {{{ #sub_match_dict = dict([(smart_str(k), v) for k, v in match.groupdict().items()]) #sub_match_dict.update(self.default_kwargs) #sub_match_dict.update([(smart_str(k), v) for k, v in sub_match[2].items()]) #return sub_match[0], sub_match[1], sub_match_dict sub_match_dict = dict(self.default_kwargs, **sub_match[2]) return sub_match[0], sub_match[1], dict(match.groupdict(), **sub_match_dict) }}} the problem goes away and I get the login page for the administrative interface for my project. This is my first time submitting a bug to an open source project. If I'm unclear, please feel free to contact me at hangonline{at}gmail.com mtredinnick hangonline@gmail.com   0 0 0 0 0 0
4837 2007-07-11 04:57:04 2011-10-09 12:44:57 2019-06-24 01:06:39.336575 Ready for checkin closed Documentation     master fixed Django is in the current debian stable Debian Etch became [http://www.debian.org/News/2007/20070408 Debian Stable] back in April. It includes the [http://packages.debian.org/stable/python/python-django python-django] package. jacob anonymous   0 1 0 0 0 0
4839 2007-07-11 10:40:28 2011-10-09 12:44:57 2019-06-24 01:06:40.650431 Design decision needed closed Core (Other)     master fixed show __repr__ of RegexURLPattern in debug traceback Hi, For debugging url.py I find this patch usefull. It displays the regex pattern in the debug traceback via __repr__ adrian Thomas Güttler <hv@tbz-pariv.de>   0 1 0 0 0 0
4842 2007-07-11 12:03:21 2011-10-09 12:44:57 2019-06-24 01:06:42.523886 Unreviewed closed Uncategorized     master fixed defaultfilter.pprint Unicode Error --> replace Hi, if there is an exception in defaultfilter.pprint the force_unicode should be with error="replace". I get this since, my database returns messages in latin1 (Umlaute). jacob Thomas Güttler <hv@tbz-pariv.de>   0 1 0 0 0 0
4846 2007-07-11 17:52:30 2011-10-09 12:44:57 2019-06-24 01:06:45.195454 Unreviewed closed Contrib apps     master fixed Some inappropriate unicode handling in contrib/admin/views/main.py I have models which have {{{__unicode__}}} method that returns unicode string including Korean utf8 characters. With some configuration of MySQL 5.0.27, everything works OK, but the admin mode does not. Altough inserting, updating the tables of my own models works fine, UnicodeDecodeException is occurred when the insertion query to djang_admin_log table is executed. I've found that this problem is inappropriate handling of objects that has non-ascii unicode string output for {{{__unicode__}}} method. I attach the patch which may have some non-necessary changes, but please consider it. adrian daybreaker12@gmail.com admin unicode 0 1 0 0 0 0
4861 2007-07-13 04:50:59 2011-10-09 12:44:57 2019-06-24 01:06:54.765537 Ready for checkin closed Forms     master fixed RegexField extends Field instead of CharField, duplicating much of the logic Talking on IRC again, it came up that {{{RegexField}}} is a subclass of {{{Field}}} instead of {{{CharField}}}, and duplicates much of the logic, but not all of it, making it an incomplete mimic - specifically, it fails to define a {{{widget_attrs}}} method for setting the min/max length of the text input properly. With a few minor changes, {{{RegexField}}} can instead extend {{{CharField}}} and gets all the same validation for free, along with the {{{widget_attrs}}} method :) adrian Collin Grady <cgrady@the-magi.us>   0 1 0 0 0 0
4862 2007-07-13 07:47:32 2011-10-09 12:44:57 2019-06-24 01:06:55.394822 Accepted closed contrib.admin     master fixed Unicode changes break admin popup windows My application has models with a string as primary key. With the recent unicode changes this creates invalid javascript code for the popup windows. Because of the javascript error the popup window doesn't close any more. Invalid code: {{{ <tr class="row2"><th><a href="product/" onclick="opener.dismissRelatedLookupPopup(window, u'product'); return false;">product</a></th> <td>None</td><td>None</td><td>None</td><td>(None)</td><td>(None)</td><td class="nowrap">July 12, 2007, 5:48 p.m.</td></tr> }}} Notice the "u'product'" part. Digging a bit deeper I found the lines 193-195 of the file django/contrib/admin/templatetags/admin_list.py to be the culprit. Original code: {{{ result_id = smart_unicode(getattr(result, pk)) # conversion to string is needed in case of 23L (long ints) yield (u'<%s%s><a href="%s"%s>%s</a></%s>' % \ (table_tag, row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %r); return false;"' % result_id or ''), result_repr, table_tag)) }}} The revised code below fixes the problem in my case, but I am unsure whether this is a generic and complete fix: {{{ result_id = smart_unicode(getattr(result, pk)) # conversion to string is needed in case of 23L (long ints) yield (u'<%s%s><a href="%s"%s>%s</a></%s>' % \ (table_tag, row_class, url, (cl.is_popup and u' onclick="opener.dismissRelatedLookupPopup(window, \'%s\'); return false;"' % result_id or ''), result_repr, table_tag)) }}} adrian jdetaeye@www.frepple.com unicode 0 1 0 0 0 0
4863 2007-07-13 08:50:40 2011-10-09 12:44:57 2019-06-24 01:06:56.033474 Ready for checkin closed Documentation     master fixed Link to language codes info in settings.py at Harvard.edu does not exist The link to the language codes at harvard is broken. This one works. jacob Thomas Güttler <hv@tbz-pariv.de>   0 1 0 0 0 0
4865 2007-07-13 13:03:31 2011-10-09 12:44:57 2019-06-24 01:06:57.319208 Accepted closed contrib.localflavor     master fixed Python 2.3 incompatibility in contrib/localflavor/no/forms.py I've found that the current revision 5684 is not installed well with the following error message: {{{ byte-compiling /usr/lib/python2.3/site-packages/django/contrib/localflavor/no/forms.py to forms.pyc File "/usr/lib/python2.3/site-packages/django/contrib/localflavor/no/forms.py", line 69 return sum((a * b) for (a, b) in zip(aval, bval)) ^ SyntaxError: invalid syntax }}} Source file : [source:django/trunk/django/contrib/localflavor/no/forms.py] It seems that this is the same problem fixed in r5641. adrian daybreaker12@gmail.com syntax python2.3 compatibility 0 0 0 0 0 0
4869 2007-07-14 04:10:27 2011-10-09 12:44:57 2019-06-24 01:07:00.911621 Accepted closed Documentation     master fixed Provide large glaring warning that `syncdb` does not alter tables Probably the number one most frequently asked question about `syncdb` is "why didn't it change my table when I changed my model?" To avoid the need to repetitively answer this question on the mailing lists and on IRC, it'd be a good idea to add an explanation of this to the documentation for `syncdb`, along with a brief discussion of why we don't try to automatically alter tables for you. jacob ubernostrum   0 0 0 0 0 0
4870 2007-07-14 10:16:00 2011-10-09 12:44:57 2019-06-24 01:07:01.599820 Unreviewed closed Documentation     master fixed Doc page / test imports a function it never uses; also has formatting error http://www.djangoproject.com/documentation/models/str/, generated from test/modeltests/str/, imports smart_str but never uses it - in addition, the {{{``__unicode__``()}}} bit is botched, resulting in too much text being monospace jacob Collin Grady <cgrady@the-magi.us>   0 1 0 0 0 0
6011 2007-11-22 06:16:04 2011-10-09 13:42:11 2019-06-24 01:19:36.490346 Ready for checkin closed Core (Management commands) Bug Normal master fixed manage.py flush command not working as advertised If you run `manage.py help flush`, it indicates that it will be the same as if you ran the sql in `manage.py sqlflush` However, once you try to run it, it starts prompting as if it's running syncdb, like reset does. Flush should be a simple flush as advertised, while reset does the resetting. nobody Collin Grady <cgrady@the-magi.us>   0 1 0 0 0 0
7198 2008-05-08 18:18:15 2011-10-09 13:42:11 2019-06-24 01:32:30.393233 Ready for checkin closed Core (Other) Bug Normal master fixed improved error message on apps without models.py files When attempting to run python manage.py sql <list_of_apps> (or sqlall, sqlindexes, etc.), if one of the apps listed does not have any models, the command will generate this error. {{{ Error: App with label XXXXX could not be found. Are you sure your INSTALLED_APPS setting is correct? }}} The solution is to allow emptyOK=True when the models are pulled from each app. (Patch attached). There are several reasons to create apps that have no models.py, not the least of which is to register more management commands with your project in their own independent app (which you could then include in several other projects). Someone trying to automate the use of the management commands to generate SQL would not be able to determine easily which apps do and do not have models.py, but it is not in any way harmful to just allow emptyOK=True, as all other app errors will still be caught, and the output does not change in any way before or after the patch. justinlilly gav management command sql sqlall 0 1 0 0 0 0
7596 2008-07-01 23:10:02 2011-10-09 13:42:11 2019-06-24 01:36:47.358044 Accepted closed Database layer (models, ORM) New feature Normal master fixed Multiple Database Inserts using 1 query It would be really nice (ie convenient, reduce load on db, improve performance) to be able to create a "collection" of model objects with a single query. I've tested the raw SQL, and it is significantly faster than using a loop to insert a bunch of database rows. All of the backends seem to support it. I'm thinking something like [queryset] = Model.objects.bulk_create([{object}, {object}, {object}]) http://www.desilva.biz/mysql/insert.html http://www.postgresql.org/docs/8.2/interactive/sql-insert.html (search for: To insert multiple rows using the multirow VALUES syntax) http://codingforums.com/archive/index.php?t-109802.html Multirow inserts are not supported in sqlite yet (http://www.sqlite.org/cvstrac/wiki?p=UnsupportedSql), but the backend could fall back to a python loop in this case.... Thanks! nobody erikcw database, create, multirow, feature 0 1 0 0 0 0
8103 2008-08-04 05:09:44 2011-10-09 13:42:11 2019-06-24 01:42:18.565541 Ready for checkin closed Forms Bug Normal master fixed Select widget should only allow for one selected option According to http://www.w3.org/TR/html401/interact/forms.html#h-17.6.1 : It is considered an error if more than one OPTION element has the selected attribute set and the SELECT element does not have the multiple attribute set. SmileyChris SmileyChris   0 1 0 0 0 0
8160 2008-08-08 11:42:41 2011-10-09 13:42:11 2019-06-24 01:42:59.351235 Accepted closed Forms Bug Normal 1.1-beta fixed ModelFormset ignores form properties The implementation of modelformset_factory and inlineformset_factory ignore 'fields' and 'excludes' attributes of the supplied form (in fact all of Meta), and only use the values passed to the factory function. Also the ModelFormset and InlineFormset 'save' method ignores the 'save' method of the supplied form. {{{ #!python class MyModelForm (django.forms.models.ModelForm): class Meta: model = models.MyModel fields = ('field1', 'field2') def save(self): m = super(MyModelForm, self).save() do_something_with(m) return m MyFormSet = modelformset_factory(models.MyModel, MyModelForm) fset = MyFormSet() }}} The forms that are part of fset have all fields of models.MyModel and not just 'field1' and 'field2' as expected. Also fset.save() will not call 'do_something_with' on the models saved. Much of the functionality of the ModelForm is ignored when used as part of a formset. This may be intended behavior, but it is not mentioned in the manual as far as I can see, and is not what one might expect. jkocherhans andrew.mcmurry@ifi.uio.no formset 0 1 0 0 0 0
8794 2008-09-02 11:54:58 2011-10-09 13:42:11 2019-06-24 01:50:43.833301 Accepted closed contrib.comments     master fixed Profanity filter suffers from the Scunthorpe problem The implementation of the profanity filter suffers from the [http://en.wikipedia.org/wiki/Scunthorpe_Problem Scunthorpe Problem]; ie. that it considers the town of Scunthorpe, amongst other innocuous words, to be profane. Profanity filtering is A Hard Problem, and naïve solutions like this one cause frustrating problems to end-users. Checking the current profanities list for false positives in a couple of word lists I had to hand also yields: {{{ gobbledegook snigger Brushite Cushite Niggerhead Peshito Peshitto Shittah Shittah tree Shittim Shittim wood Shittle Shittlecock Shittleness }}} Obviously proper names are not in my dictionary, but they cause frequent and often more annoying problems. I suggest to disable the filter by default so that scope of the problem is limited, and at the very least the filter must be restricted to {{{re.match(r'\b' + word + '\b')}}}. Users who need stricter profanity filters should have the responsibility for doing so, and potentially annoying their users themselves. Django should not be doing it for them. nobody Daniel Pope <dan@mauveinternet.co.uk>   0 0 0 0 0 0
11404 2009-06-30 04:18:51 2011-10-09 13:42:11 2019-06-24 02:18:54.991287 Ready for checkin closed Forms New feature Normal 1.0 fixed add has_changed() method to formsets both formsets and forms have `.is_valid()` but only forms have `.has_changed()` it would be nice if formsets had it too nobody anonymous formset 0 1 0 0 0 0
13211 2010-03-25 21:09:27 2011-10-09 13:42:11 2019-06-24 02:38:39.290137 Ready for checkin closed Documentation New feature Normal master fixed More Group Documentation in the Auth Page The Django auth documentation: http://docs.djangoproject.com/en/dev/topics/auth/ contains very little information about Groups. The documentation does not provide any API reference material for the models.Group objects, and does not go into any detail about how to create, use, or edit groups. I think that adding in more information about the Group object would be beneficial to coders developing sites that rely heavily on authentication and complex permission schemas. jpaulett b14ck group, authentication, documentation 0 1 0 0 0 1
13429 2010-04-27 16:44:04 2011-10-09 13:42:11 2019-06-24 02:40:59.567571 Accepted closed GIS Bug Normal master fixed GeoDjango tutorial model should be WorldBorder(singular) instead of WorldBorders(plural) Django automatically makes the model name plural when necessary so in the tutorial it should be called WorldBorder without the 's'. jbronn tubaman   0 0 0 0 0 0
13670 2010-05-31 19:48:54 2011-10-09 13:42:11 2019-06-24 02:43:34.716687 Accepted closed GIS Bug Normal 1.2 fixed postgis adapter fails to compare against empty string following test case fails: {{{ from django.db.models import Q from django.contrib.gis.db import models class Area(models.Model): poly = models.PolygonField(srid=4326, verbose_name=u"area repr") objects = models.GeoManager() class District(models.Model): poly = models.PolygonField(srid=4326, verbose_name=u"district repr") objects = models.GeoManager() class Factory(models.Model): area = models.ForeignKey(Area) district = models.ForeignKey(District) __test__ = {'API_TESTS':""" >>> from django.contrib.gis.geos import fromstr >>> location = fromstr('POINT (5 7)') >>> a, created = Area.objects.get_or_create(poly=fromstr('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))')) >>> d, created = District.objects.get_or_create(poly=fromstr('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))')) >>> f, created = Factory.objects.get_or_create(area=a, district=d) >>> areas = Area.objects.filter(poly__intersects = location) >>> districts = District.objects.filter(poly__intersects = location) >>> qobj = Q(area__isnull=True)&Q(district__isnull=True) >>> qobj |= (Q(area__in = areas)|Q(district__in = districts)) >>> match = Factory.objects.filter(qobj) >>> match2 = Factory.objects.filter(id__in = match) >>> match2.count() 1 """} }}} the last line will raise an exception in django.contrib.gis.db.backends.postgis.adapter __eq__ due to the comparision against empty string the following patch solves the problem: {{{ Index: adapter.py =================================================================== --- adapter.py (revision 3756) +++ adapter.py (working copy) @@ -21,6 +21,8 @@ raise Exception('Error implementing psycopg2 protocol. Is psycopg2 installed?') def __eq__(self, other): + if not isinstance(other, PostGISAdapter): + return False return (self.ewkb == other.ewkb) and (self.srid == other.srid) def __str__(self): }}} nobody milosu   0 1 0 0 0 0
14138 2010-08-19 17:17:47 2011-10-09 13:42:11 2019-06-24 02:48:42.434711 Accepted closed Database layer (models, ORM) Uncategorized Normal 1.2 fixed Apache setup using sqlite3 breaks when performing a field__regex filter Using a simple apache mod_wsgi setup, setting the project to use sqlite3 as the backend, and running {{{MyModel.objects.filter(field__regex=r'')}}} (and later evaluating that query with a {{{.count()}}} ) causes the backend to throw an "{{{OperationalError: user-defined function raised exception}}}". I've managed to trace this to the '{{{import re}}}' statement inside {{{_sqlite_regexp}}} in {{{db/backends/sqlite3/base.py}}}. After moving that import statement to outside that function (making it a module-level import), the exception is no longer raised and everything works fine. My specific regex that I initially tried was {{{r'\bfeatured\b'}}} on a django-tagging {{{TagField}}}, but it happened with an empty string ({{{r''}}}) as well. I noticed this while using 1.1.2. A quick test with 1.2 confirmed the error shows up there (as a {{{DatabaseError}}}, same message), too. I haven't tested with SVN. Strangely, the regex filter works perfectly when run from {{{./manage.py shell}}}, or from the same page viewed on {{{./manage.py runserver}}}. It's just when it's setup with apache that it has issues for some reason. nobody eternicode sqlite3 apache operationalerror databaseerror regex 0 0 0 0 0 0
14270 2010-09-12 06:36:38 2011-10-09 13:42:11 2019-06-24 02:50:06.840420 Accepted closed Database layer (models, ORM) Cleanup/optimization Normal 1.2 fixed ManyToMany manager classes should be cached Right now they are created every time an m2m relationship is accessed, this class should be cached. nobody Alex   0 0 0 0 0 0
14648 2010-11-08 22:44:30 2011-10-09 13:42:11 2019-06-24 02:54:12.120610 Accepted closed GIS Bug Normal 1.2 fixed Annotated date querysets fail if spatial backend is used Annotated DateQuerysets fail if django.contrib.gis is installed. By that I mean this queryset will throw an exception: {{{ Bug.objects.annotate(num_patches=Count('patches')).dates('created', 'year') }}} Note that I'm not intentionally running dates() on an annotated queryset (that would normally be pointless); this is happening inside the date_based.archive_index generic view and I need the aggregate annotation in the main queryset. My example project at https://github.com/codysoyland/django-gis-bug-example/ demonstrates this. See the tests: https://github.com/codysoyland/django-gis-bug-example/blob/master/bughouse/tests.py The test output is: {{{ ====================================================================== ERROR: test_date_queryset (bughouse.tests.DateQuerysetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/csoyland/projects/buggy/bughouse/tests.py", line 19, in test_date_queryset len(Bug.objects.annotate(num_patches=Count('patches')).dates('created', 'year')), File "/Users/csoyland/.virtualenvs/generic/lib/python2.6/site-packages/django/db/models/query.py", line 81, in __len__ self._result_cache = list(self.iterator()) File "/Users/csoyland/.virtualenvs/generic/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 948, in results_iter for rows in self.execute_sql(MULTI): File "/Users/csoyland/.virtualenvs/generic/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 717, in execute_sql sql, params = self.as_sql() File "/Users/csoyland/.virtualenvs/generic/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 56, in as_sql out_cols = self.get_columns(with_col_aliases) File "/Users/csoyland/.virtualenvs/generic/lib/python2.6/site-packages/django/contrib/gis/db/models/sql/compiler.py", line 78, in get_columns for alias, aggregate in self.query.aggregate_select.items() File "/Users/csoyland/.virtualenvs/generic/lib/py… jbronn codysoyland   0 1 1 1 0 0
15277 2011-02-11 14:49:19 2011-10-09 13:42:11 2019-06-24 03:01:00.725741 Accepted closed GIS Bug Normal 1.2 fixed TypeError in ogrinspect geodjango gis I got an error when using {{{ python manage.py ogrinspect PG:"dbname='thedbname' host='localhost' port='5432' user='theuser' password='thepassword'" MyModel --layer=thelayer --mapping --multi }}} there is a table with a column of type "time" in the database and the error when running the command above: {{{ File "PATH_TO_VENV\venv\Lib\site-packages\django\contrib\gis\utils\ogrinspect.py", line 195, in _ogrinspect raise TypeError('Unknown field type %s in %s' % (field_type, mfield)) TypeError: Unknown field type <class 'django.contrib.gis.gdal.field.OFTTime'> in thelayer_time }}} --> the bug seems to be in ogrinspect.py line 192: {{{ elif field_type is OFTDate: }}} change: {{{ elif field_type is OFTTime: }}} willi willinoed@gmail.com ogrinspect, geodjango OFTTime TypeError 0 1 0 0 0 0
15305 2011-02-15 17:57:20 2011-10-09 13:42:11 2019-06-24 03:01:18.845517 Accepted closed GIS Bug Normal master fixed GeoQuerySet with values() and aggregates raises exception When I apply the attached patch to contrib.gis testsuite and run it on r15540 with Python 2.6 and PostGis I get the following exception: {{{ ====================================================================== ERROR: test12a_count (django.contrib.gis.tests.relatedapp.tests.RelatedGeoModelTest) Testing `Count` aggregate use with the `GeoManager` on geo-fields. ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python26\lib\site-packages\django_versions\trunk\django\contrib\gis\tests\relatedapp\tests.py", line 236, in test12a_count len(locqs) File "C:\Python26\lib\site-packages\django_versions\trunk\django\db\models\query.py", line 82, in __len__ self._result_cache = list(self.iterator()) File "C:\Python26\lib\site-packages\django_versions\trunk\django\db\models\query.py", line 841, in iterator for row in self.query.get_compiler(self.db).results_iter(): File "C:\Python26\lib\site-packages\django_versions\trunk\django\db\models\sql\compiler.py", line 698, in results_iter row = self.resolve_columns(row, fields) File "C:\Python26\lib\site-packages\django_versions\trunk\django\contrib\gis\db\models\sql\compiler.py", line 197, in resolve_columns values.append(self.query.convert_values(value, field, connection=self.connection)) File "C:\Python26\lib\site-packages\django_versions\trunk\django\contrib\gis\db\models\sql\query.py", line 74, in convert_values value = Geometry(value) File "C:\Python26\lib\site-packages\django_versions\trunk\django\contrib\gis\geos\geometry.py", line 85, in __init__ raise TypeError('Improper geometry input type: %s' % str(type(geo_input))) TypeError: Improper geometry input type: <type 'long'> ---------------------------------------------------------------------- }}} The exception disappears if I comment out adding of aggregates to aliases in compiler.py like this {{{ --- django/contrib/gis/db/models/sql/compiler.py (revision 15540) +++ django/contrib/gis/db… jbronn vrehak   0 1 1 0 0 0
15633 2011-03-17 15:53:29 2011-10-09 13:42:11 2019-06-24 03:04:50.398333 Ready for checkin closed Documentation Bug Normal master fixed Bad documentation of post_syncdb signal Signal post_sycndb is badly documented: - documentation says that created_models is list, but emit_post_sync_signal is called with set when it is called from syncdb command. Surprisingly it is called with set from flush command, so there is probably error in code as well. - documentation suggests that post_syncdb signal is called only when table is created, so it looks like you can use it to change database structure (create contraints, triggers, ...) These SQL fail when yout post_sycndb handler is called from flush, because flush does not change database structure (except SQLs with 'IF NOT EXISTS'-like conditions). Documentation should noted that handlers of this signal should not change database structure and for such cases customize sql hack in syncdb should be used. justinlilly vzima   0 1 0 0 0 0
15722 2011-03-30 19:38:46 2011-10-09 13:42:11 2019-06-24 03:05:50.773535 Accepted closed Forms Bug Normal 1.3 fixed Conditional Formset Rendering/Validation #14655 introduced formsets as iterables and defined `__len__` as the number of forms. However this causes a side effect in that if there are no forms then bool returns `False`. Meaning if you have a condition in your template which looks for the formset in the context before rendering {{{ {% if formset %} {# formset rendering would go here... #} {% endif %} }}} then if there are no forms this will not render. It also means that the management form will not be rendered. On POST if the formset is bound without the management form data it raises a `ValidationError` on `__init__`. There are possible work-arounds: 1.) Override `__nonzero___` on the formset to return `True` 2.) Change conditional statements to look for the existence of the management form instead i.e. `{% if formset.management_form %}` nobody mlavin   0 1 0 0 0 0
16026 2011-05-14 20:18:03 2011-10-09 13:42:11 2019-06-24 03:09:08.635593 Ready for checkin closed Core (Management commands) New feature Normal 1.3 fixed Inform user which object triggered error in loaddata When the loaddata command saves objects it is entirely possible for the database to raise an exception, which is all well and good except for the fact that the standard `IntegrityError` and `DatabaseError` messages don't mention which object raised the exception. This can make debugging a fixture with dozens, hundreds or thousands of objects in it nearly impossible. So I've got a patch here which adds one extra line of output notifying the user of which object (and which DB) raised the error before re-raising the exception. gabrielhurley gabrielhurley   1 1 0 0 0 0
16079 2011-05-23 14:16:22 2011-10-09 13:42:11 2019-06-24 03:09:45.365748 Accepted closed Documentation Cleanup/optimization Normal 1.3 fixed Clarify that handler404 and handler500 only applies to project The documentation states that you can define handler404 and handler500 in your URLconf, but it doesn't say that this only works in the project-level URLconf, not inside an app. I think it should be mentioned in these sections: http://docs.djangoproject.com/en/dev/topics/http/urls/#handler404 http://docs.djangoproject.com/en/dev/intro/tutorial03/#write-a-404-page-not-found-view There are several questions about this at Stack Overflow (for example http://stackoverflow.com/questions/3309076/is-it-possible-to-include-a-custom-404-view-for-a-django-app-without-changing-any), so if the documentation could just say that it's impossible, it would save time for a lot of people. nobody Martin Vilcans <martin@librador.com>   0 1 1 0 0 0
16094 2011-05-25 05:14:51 2011-10-09 13:42:11 2019-06-24 03:09:55.001950 Ready for checkin closed Documentation Cleanup/optimization Normal 1.3 fixed Documentation for Custom permissions is ambiguous. The example in http://docs.djangoproject.com/en/1.3/topics/auth/#custom-permissions is not clear. A few extra permissions are defined, e.g. "can_view", but it wasn't clear to me whether this would result in an "app.can_view" or "app.can_view_task" permission. Essentially in order to figure out what would happen, I had to create a test permission and run syncdb. nobody Bradley Ayers <bradley.ayers@gmail.com>   0 0 0 0 0 0
16109 2011-05-27 15:04:27 2011-10-09 13:42:11 2019-06-24 03:10:04.650504 Ready for checkin closed Documentation Bug Normal 1.3 fixed Inconsistency in docs: Leading zero of numbers in URLconf In [https://docs.djangoproject.com/en/1.3/topics/http/urls/#example], the suggested regex for an article / numbers in a url is {{{ r'^articles/(\d{4})/(\d{2})/(\d+)/$' }}} But in [https://docs.djangoproject.com/en/1.3/ref/models/instances/#django.db.models.permalink], it says {{{ r'/archive/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$' }}} In particular, the first expression allows only 05 for a month, the second 05 and 5, which leads to multiple urls for the same content. Additionally, the example get_absolute_url method wouldn't match the first expression (\d{2}) for dates with month or day below 10. I first thought this is a "support issue", not a bug, so you may want to read my post on [http://stackoverflow.com/questions/6098371/zero-fill-numbers-in-djangos-urlconf stackoverflow.com]. It was recommended to me to submit bug report because of this inconsistency in the docs. nobody wegener92@googlemail.com   0 1 0 0 0 0

Next page

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE "tickets_full" (
        id int primary key,
        created datetime,
        changetime datetime,
        last_pulled_from_trac datetime,
        stage text,
        status text,
        component text,
        type text,
        severity text,
        version text,
        resolution text,
        summary text,
        description text,
        owner text,
        reporter text,
        keywords text,
        easy boolean,
        has_patch boolean,
        needs_better_patch boolean,
        needs_tests boolean,
        needs_docs boolean,
        ui_ux boolean