tickets_full

29,846 rows where "last_pulled_from_trac" is on date 2019-06-24 sorted by severity

View and edit SQL

These facets timed out: last_pulled_from_trac

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
3426 2007-02-03 23:47:09 2007-05-20 20:57:07 2019-06-24 00:51:43.899580 Design decision needed closed Core (Other)     master duplicate FileField / ImageField - old files left around When uploading a new file as a replacement for an old one using the FileField, the old file is left lying around on the file system. The old one should be deleted, which would be consistent with the behavior exhibited when deleting an object with a FileField. adrian xlotlu   0 0 0 0 0 0
3427 2007-02-04 00:50:34 2009-01-07 10:39:52 2019-06-24 00:51:44.499223 Design decision needed closed Forms     master wontfix newforms: add readonly support to widgets readonly= is an integral part of some Intranet applications and is currently lacking from newforms. The documentation should probably state that, of course, if you really want something to be readonly, you cannot put it in a form at all, but for the rest of us, readonly is an easy solution. The only problems are that select fields don't have a readonly= property. I've seen them rendered as <input type="text" /> instead, or you can use <select disabled=disabled" /> and automatically append an <input type="hidden" /> with the real readonly value (<select /> fields cannot have readonly as a UI restriction, e.g., UAs don't allow it). disabled= may also be useful. adrian anonymous   0 0 0 0 0 0
3428 2007-02-04 21:25:35 2008-10-06 02:02:59 2019-06-24 00:51:45.216712 Someday/Maybe closed Uncategorized     other branch wontfix [full-history] Small fixes to the code This patch fixes: * There are some TAB chars indenting the Python code. From the context it can be deduced that they were used to represent 8 spaces. * In {{{django/contrib/history/models.py}}}: The {{{Pickle.dumps}}} call in {{{save_new_revision()}}} uses named {{{protocol=0}}} as a second parameter. It gives me an error under Python 2.3 (and this result in the the save operation failing always) but from the Python 2.5 ![1]documentation it's clear than nothing has changed since 2.3 times in that method. The fix is just call it using 0 or not use it at all. This patch is against the branch code as of [4459] nobody ramiro <rm0 _at_ gmx.net>   0 1 0 0 0 0
3429 2007-02-05 02:26:14 2007-02-15 00:17:59 2019-06-24 00:51:45.805161 Ready for checkin closed Translations     master fixed [patch] update for german translations some strings from the admin interface and from the newform library where not yet translated. Also the .po file is now utf-8, our moast beloved encoding. Hope to see this in svn soon. hugo djunky i18n german l10n 0 1 0 0 0 0
3430 2007-02-05 11:15:52 2007-03-27 22:06:37 2019-06-24 00:51:46.424249 Design decision needed closed Forms     master worksforme Label rendering in newforms I would be nice to have an option to disable the adding of ':' to labels. Also with mobile devices the label attribute 'accesskey' is needed. adrian devel@fashioncontent.com label 0 0 0 0 0 0
3431 2007-02-05 12:06:47 2007-02-05 15:54:56 2019-06-24 00:51:47.165277 Design decision needed closed contrib.admin     master worksforme Adding English plural 's' in Admin is offensive and weakens credibility The Admin interface adds a plural 's' to class names (e.g.) Poll --> Polls. This is all right if you use English class names. Since Django is used all over the planet this leads to offensive and ridiculous results and lessens the credibility of Django. Adding the plural 's' serves no useful purpose, but leads to problems in non English contexts, so this feature should be removed. -- Mika Nyman (Finland) adrian info@synapse-computing.com Admin interface internationalization 0 0 0 0 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
3433 2007-02-05 15:16:38 2007-02-22 22:11:32 2019-06-24 00:51:48.446257 Design decision needed closed contrib.admin     master duplicate Use javascript to add more items when using edit_in_line on a ForeignKey When you use edit_in_line on a ForeignKey, you should specify how many options will you limit on creating and modification of the object (with the keyword num_in_admin and so). If we think on the polls example from the doc, I have a Poll and it may have many Choices, I am limited to "num_in_admin" choices on creating, and if I want more than "num_in_admin" choices, I must create and then modify. My feature request is, instead of being limited to "num_in_admin", django may have a javascript function to create another inline editable item. Google mail uses this idea to add attachments to emails, you have a link "add another" that creates a new input to load another file. adrian michelts@gmail.com ForeignKey edit_inline javascript admin 0 0 0 0 0 0
3434 2007-02-05 16:39:38 2007-12-08 02:32:03 2019-06-24 00:51:49.075005 Accepted closed contrib.admin     newforms-admin invalid [newforms-admin] change_stage is broken for models with no editable fields render_change_form raises an IndexError (list index out of range) for models that have no editable fields. This may sound weird, but it actually makes sense in some situations, ie. for a model that serves only as a foreignkey target with edit_inline. I only tested this for the old admin, but from the source code it appears that the newforms one has the same problem. The patch is for old admin, but fixing newforms-admin is just as simple. nobody marcink@elksoft.pl   0 1 0 0 0 0
3435 2007-02-05 16:57:10 2007-05-23 05:28:25 2019-06-24 00:51:49.687589 Ready for checkin closed Core (Serialization)     master fixed Can't serialize to file stream The stream argument to django.core.serializers.base.Serializer.serialize() does not work because serialize() calls self.stream.getvalue() to return the data; getvalue() is not part of the file protocol so this fails when stream is an HttpResponse, for example. Also when using the stream argument for JSON serialization there is a failure in django.utils.simplejson.encoder.JSONEncoder.__init__() because the stream keyword argument is not accepted. jacob kent@kentsjohnson.com   0 0 1 0 0 0
3436 2007-02-05 21:25:31 2007-09-16 12:59:29 2019-06-24 00:51:50.302817 Accepted closed Core (Other)     master wontfix Don't fetch Field's choices on form/manipulator creation Currently creation of a default manipulator for a model causes actual fetching of all content of every related parent models which tends to be slow. They are used to fill <select>s created for ForeignKeys and ManyToManyFields but this may be unnecessary if those <select>s never rendered. This can be easily fixed by turning a method that gets choices for <select>s (Field.get_choices()) into a generator that will hit database only when (and if) needed. Patch follows. nobody Ivan Sagalaev <Maniac@SoftwareManiacs.Org> performance 0 1 1 0 0 0
3437 2007-02-06 00:11:36 2007-02-10 03:56:21 2019-06-24 00:51:50.982744 Unreviewed closed Core (Other)     master fixed djang.http.HttpResponse logic for _is_string is invalid code currently does effectively thus- {{{ #!python if hasattr(content, '__iter__'): self._is_string = False self._container = content else: self._is_string = True self._container = [content] }}} Problem is that string objects support iteration. Fix for it's simple; just do {{{ #!python if not isinstance(content, basestring) and hasattr(content, '__iter__'): }}} (yes y'all prefer seperate patches, but it's a one liner ;) adrian (removed)   0 0 0 0 0 0
3438 2007-02-06 00:38:40 2007-02-26 06:16:19 2019-06-24 00:51:51.605826 Unreviewed closed Core (Other)     master fixed django.db.models.base.__init__ refactoring Short version; for iteration over records, there model's __init__ is rather unfriendly to the way the args are passed in. At least for sqlite, the sql row is passed in as args- issue is that __init__ shoots through self._model.fields playing with kwargs prior, doing rather costly exception catching, pulling default values, etc, then *finally* does args processing. If you're dealing in one or two records, this doesn't show up much, but if you're dealing in 53k records (my usage is slightly weird admittedly), it's a pretty heavy slow down. attached is a patch to refactor __init__, knocking around a third off the __init__ cost via refactoring the args/kwargs processing, essentially reversing the actual flow while maintaining the same behaviour as before. Have been using it for a few days, and passes tests; comments welcome, mainly since I need to get this integrated for my uses. adrian (removed)   0 1 0 0 0 0
3439 2007-02-06 01:07:33 2007-02-26 03:42:25 2019-06-24 00:51:52.271342 Accepted closed Core (Other)     master fixed django.dispatch.* is grossly slow Attached is a refactoring chopping off a good chunk of dispatch's overhead; hard to test it standalone, so testing was done for simple iteration over records and isolating the diff in the profiling for the refactoring. Short version, attached patch shows 5x boost in dispatch speed; for iteration (just that, no rendering) over 53k records, time drops from ~15.5s to ~11.6s just by cleaning up dispatch.* The internal data structs dispatch is using are still fairly innefficient- scaling will be an issue the more receivers there are for dispatched signals. So... can clean that up further, but there isn't any documentation re: the expectations of dispatcher. For example- order of connection to a signal, must the order be maintained for notifications at a specific sender/signal level? If I connect (in this order) func f1, func f2, both to object("foo") signal Any, must they be notified in order f1,f2? I realize pydispatcher is a seperate project- that said, they've already moved onto 2.0, and there are several 1.0.x's for pydispatcher released already- djangos' bundled copy is still at 1.0.0. Whats the intention? Intending on keeping it in sync, or is it just a fork point? Either way, the attached refactoring is not covered by tests at the moment- mainly since there are no tests in django for dispatcher. Would like to get feedback on the expectations of dispatcher (f1/f2 from above for example) prior to writing those tests, since the implementation (and google for that matter) lack any material on it. Finally, due to the massive number of calls to send (thus to getAllReceivers and friends), normal seperation (getAllReceivers using getReceivers for example) was intentionally broken down a bit- in other words, inlined a few functions. The codes invoked enough that the overheads seperation really isn't worth it, especially if you're not actually using signals for the most part (thus dispatcher is pretty much pure time waste). adrian (removed)   0 1 0 0 0 0
3440 2007-02-06 01:23:30 2008-04-27 02:50:16 2019-06-24 00:51:52.883965 Fixed on a branch closed Database layer (models, ORM)     queryset-refactor fixed DateQuerySet.iterator not iterable if empty The changes in r4394 to support empty QuerySets does not work for `DateQuerySet.iterator()` because the method is not a generator, but instead returns an iterable. Instead of raising a `StopIteration` it should return an empty list. Also, the other methods that are generators (e.g. `QuerySet.iterator()`) raise a `StopIteration` when they could simply return. adrian ashleywalsh@gmail.com qs-rf-fixed 0 1 0 0 0 0
3441 2007-02-06 01:52:28 2007-02-06 14:01:13 2019-06-24 00:51:53.524305 Design decision needed closed Template system     master fixed django.template.VariableDoesNotExist.__init__ prototype forces work to be done up front that is typically thrown away Kind of a cornercase, but VariableDoesNotExist derives from Exception, overriding nothing- meaning the str/repr for it must be done up front. Thus django.template.resolve_variable raises it via {{{ raise VariableDoesNotExist, "Failed lookup for key [%s] in %r" % (bits[0], current) }}} So... it's effectively raising VariableDoesNotExist(msg). Problem here is that a rather large amount of code just catches the exception, and substitutes a different value, TEMPLATE_STRING_IF_INVALID for example- in other words, they don't even *care* about the msg, the exception is just a passing mechanism. Thus the msg creation is pure overhead to most codeblocks I've found in django. Said overhead can add up; a context level lookup ( {{ foo }} for example), raising VariableDoesNotExist results in repr(context), repr'ing all mappings in context- if say your base template is just checking for a var, if so, outputing a queryset, else not outputting it, the current code forces a repr on context, in other words forcing the query to be executed. Which is fairly daft, if pretty much all code just throws out the exception, substituting a different value in. Attached is a patch changing VariableDoesNotExist's __init__ to (self, msg, params=()); via that, can delay the actual msg creation until it's required, making catching the exception just to substitute a different value far cheaper. Within the code, only resolve_variable throws the exception- google code search, nobody else is throwing it, thus it looks pretty safe to change the __init__ to delay the cost. Alternative, just derive NewStyleVariableDoesNotExist from VariableDoesNotExist, and have resolve_variable throw that; either way, it's work being done that isn't needed so should be tweaked. adrian (removed)   0 1 0 1 0 0
3442 2007-02-06 12:27:22 2008-03-06 00:30:47 2019-06-24 00:51:54.183201 Accepted closed Forms     master duplicate [patch] ChoiceField should allow for nested choice sets It would be really useful for the ChoiceField choices parameter to allow grouped sets of chioces (much like the Admin class allows for grouped fields). That way, the default widget could output HTML which encloses groups of OPTION tags within OPTGROUP tags. thejaswi_puthraya pmpowell@gmail.com sprintdec01 0 1 0 0 0 0
3443 2007-02-06 17:02:51 2007-02-10 00:55:33 2019-06-24 00:51:54.789933 Ready for checkin closed Documentation     master fixed Please update my entry in Authors Good morning, I wanted to update my entry in authors to have my name and website, not just my email address. I'll include a patch to make it super-easy - Joe jacob Joe Heck   0 1 0 0 0 0
3444 2007-02-06 19:01:56 2007-02-10 01:05:50 2019-06-24 00:51:55.394947 Unreviewed closed Database layer (models, ORM)     master duplicate Symmetrical Many-to-Many all() failing Hi, I've noticed that in the current development version, symmetrical many-to-many relationships can call all() AT MOST one time. Using the supplied example supplied in the documentation, I get the following: {{{ >>> from core.models import * >>> a = Person(name='Anne') >>> a.save() >>> b = Person(name='Bill') >>> b.save() >>> c = Person(name='Chuck') >>> c.save() >>> d = Person(name='David') >>> d.save() >>> a.friends.add(b,c) >>> d.friends.add(a,c) >>> a.friends.all() Traceback (most recent call last): File "<console>", line 1, in ? File "/sw/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/db/models/query.py", line 101, in __repr__ return repr(self._get_data()) File "/sw/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/db/models/query.py", line 444, in _get_data self._result_cache = list(self.iterator()) File "/sw/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/db/models/query.py", line 177, in iterator select, sql, params = self._get_sql_clause() File "/sw/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/db/models/query.py", line 458, in _get_sql_clause joins2, where2, params2 = self._filters.get_sql(opts) File "/sw/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/db/models/query.py", line 618, in get_sql joins2, where2, params2 = val.get_sql(opts) File "/sw/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/db/models/query.py", line 669, in get_sql return parse_lookup(self.kwargs.items(), opts) File "/sw/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/db/models/query.py", line 789, in parse_lookup joins2, where2, params2 = lookup_inner(path, lookup_type, value, opts, opts.db_table, None) File "/sw/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/db/models/query.py", line 890, in lookup_inner raise TypeError, "Cannot resolve keyword '%s' into field" % name TypeError: Cannot resolve keyword 'person' into field >>> }}} This problem does n… adrian flip.sasser@gmail.com   0 0 0 0 0 0
3445 2007-02-06 21:52:31 2007-12-01 17:44:53 2019-06-24 00:51:56.044457 Design decision needed closed Core (Other)     master wontfix all caching-related code should be collected into its own cache application There are various modules related to caching spread throughout the django tree. They should be collected into a "cache" package/application. nobody Gary Wilson <gary.wilson@gmail.com>   0 1 0 0 0 0
3446 2007-02-06 21:57:45 2007-10-28 21:58:14 2019-06-24 00:51:56.670127 Accepted closed Core (Other)     master wontfix use a standard utililty function for importing a module from a string There are several instances throughout the django code that roll their own module importing from a string. They should all use a single utility function instead. gregorth Gary Wilson <gary.wilson@gmail.com>   0 0 0 0 0 0
3447 2007-02-07 04:18:01 2007-02-07 22:56:53 2019-06-24 00:51:57.292466 Accepted closed contrib.admin     master fixed Attempt to add new inline-edited item in admin interface results in ProgrammingError ERROR: invalid input syntax for integer: "". Used to work in older SVN snapshot. Consider the following extremely-simple inline-edited relationship: {{{ class Case(models.Model): name = models.CharField(maxlength=100) class Admin: pass class Label(models.Model): case = models.ForeignKey(Case, edit_inline=models.TABULAR) name = models.CharField(maxlength=100, core=True) class Admin: pass }}} In this case, if I try to add a new Label to a Case (while editing the Case via its admin interface view), I get the following error: {{{ Exception Type: ProgrammingError Exception Value: ERROR: invalid input syntax for integer: "" SELECT 1 FROM "peopledb_label" WHERE "id"='' LIMIT 1 }}} The following were the arguments from the HTTP POST operation when I clicked Save: {{{ label.0.id '' name 'Case1' label.0.name 'TestLabel1' }}} It appears that when trying to determine if an old record should be updated rather than inserted into the database, an invalid query was built. I've encountered this problem now on three different django projects. This used to work in a version of django from a SVN snapshot around 12/15/2006, and does work if I revert my installed django to that version. adrian mdkemp edit_inline, ProgrammingError 0 0 0 0 0 0
3448 2007-02-07 04:29:42 2007-02-26 05:19:32 2019-06-24 00:51:57.899357 Ready for checkin closed Documentation     master fixed python help() parsing problem for django.core.mail == Error when accessing django.core.mail through python help() == {{{ EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined }}} In python help(), if I do: {{{ help> django.core.mail }}} I get: {{{ problem in django.core.mail - EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined. }}} Other things in the django.core package display their docstrings and such.. It seems like something basic, but I didn't see anything obvious. I'm on OS X 10.4.8, python 2.4.4, installed the source from the svn repository, e.g. 'python setup.py install' jacob Michael VanLandingham <m.vanland@gmail.com> django.core.mail, help, docs 0 1 0 0 0 0
3449 2007-02-07 04:46:36 2007-02-09 22:09:08 2019-06-24 00:51:58.538418 Ready for checkin closed Testing framework     master fixed rev 4460 test failures rev 4460 changed ChoiceField exception msg, but tests weren't updated... adrian (removed)   0 1 0 0 0 0
3450 2007-02-07 06:44:26 2007-04-25 10:18:56 2019-06-24 00:51:59.137501 Ready for checkin closed Database layer (models, ORM)     master fixed Make IntegrityError available from django.db This is related to ticket #3083, however the issue I'd like to address is just a subset of that ticket, so I figured it's best to create a separate ticket. The attached patch will allow developers to import IntegrityError from django.db thus avoiding a dependency on any specific db module. I mentioned the rationale for this patch in [http://groups.google.de/group/django-users/browse_thread/thread/0357be5fcc49e4bc/ this thread] on django-users. I have tested the changes on the postgresql and postgresql_psycopg2 backends, and I've looked at api/source for the oracle, mysql, ado_mssql and sqlite3 db modules recommended for use with the other backends. From what I could gather they all provide an IntegrityError as specified by the [http://www.python.org/dev/peps/pep-0249/ Python DB-API 2.0]... still would be best if someone actually tested all those backends :) adrian enlight   0 1 0 0 0 0
3451 2007-02-07 09:24:24 2007-02-15 00:19:45 2019-06-24 00:51:59.764578 Ready for checkin closed Translations     master fixed [patch] Small fix to Finnish translation Talleta -> Tallenna Talleta = deposit Tallenna = save hugo jtorma i18n l10n finnish 0 1 0 0 0 0
3452 2007-02-07 17:30:16 2007-02-21 20:51:40 2019-06-24 00:52:00.393554 Unreviewed closed Testing framework     master worksforme Need mechanism for disabling exception supression when running in test context BaseHandler.get_response is currently an exception black hole - if an exception occurs anywhere in a Django application there appears to be no circumstance in which it will not be turned in to an HttpResponse of some sort - the DEBUG setting merely influences if the error message is highly descriptive (in debug mode) or user-friendly. This is great for 99% of situations, but is an absolute nuisance when using in-process testing against Django, for example using django.test.client.Client. It would be really useful if there was a way of telling Django to raise any exceptions caught in that last naked 'except' clause (line 108), for purposes of unit testing. adrian Simon Willison   0 0 0 0 0 0
3453 2007-02-07 23:03:50 2007-09-21 04:00:33 2019-06-24 00:52:01.011170 Accepted closed Template system     master fixed resolve_variable usage leads to redundant work Yet more refactoring ;) resolve_variable does a chunk of setup work for each invocation, checking for if the variable is a number, checking if its quoted (thus exempted from lookup rules), and finally splitting of the variable into it's component parts. The issue is that this work is utterly redundant the second time an attempt is made to resolve the variable- for loops for example. This patch splits out a Variable class which does the common setup work up once in init, with a resolve method to do the actual resolution against a context. The actual resolve is still a good chunk of time, but for my particular usage scenario (3 level deep for loop being the main cost), this shaves just shy of 25% of the runtime off via killing the redundant work. From a backwards compatibility standpoint, there isn't any issue- resolve_variable just becomes {{{ def resolve_variable(arg, context): return Variable(arg).resolve(context) }}} which admittedly will be slightly slower then whats in place now for simple lookups- this is offset by the greater efficiency of Variable usage within default tags/templates, and via killing off a quadratic op in resolve_variable- currently, it splits the arg, then does poplefts on the list. Problem there is that python lists are literal arrays; you delete the first item, every item after has to be moved one to the left, thus quad in execution. Fortunately var depth isn't usually deep enough for it to rear its head. jacob (removed) performance 0 1 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
3455 2007-02-08 05:19:43 2007-02-26 21:40:16 2019-06-24 00:52:02.275961 Ready for checkin closed Documentation     master fixed Documentation for "choices" should mention "get_FOO_display" The documentation for the `choices` attribute on model fields mentions that `choices` should be a tuple of 2-tuples, including an actual value and a human-readable name, but documentation on how to retrieve the human-readable name of the selected choice from an instance of the model lives elsewhere, in the database API documentation, under the unintuitive name of `get_FOO_display`. This hinders a new user of Django trying to understand how best to make use of `choices`. At the very least, the model documentation should include, under `choices`, a link to the `get_FOO_display` entry in the DB documentation for an explanation of how to get the human-readable name back out of a model instance. Ideally, we'd do that and come up with better titles for the sections on the various `get_FOO_display`/`get_next_by_FOO`/etc. methods. jacob ubernostrum choices get_FOO_display 0 1 0 0 0 0
3456 2007-02-08 16:42:40 2007-02-15 04:03:47 2019-06-24 00:52:02.909225 Accepted closed Forms     master fixed rendering help_text in newforms The help_text attribute in newforms should work the same as label in a template: {{{ {{ form.eggs.label }} }}} {{{ {{ form.eggs.help_text }} }}} (Fails) It took me a while to figure out why my labels were appearing on templates, but not my help text, until I specified fields: {{{ {{ form.fields.eggs.help_text }} }}} (Works) adrian Jeff Bauer <jbauer@rubic.com> help_text 0 0 0 0 0 0
3457 2007-02-08 16:49:13 2009-02-17 10:53:18 2019-06-24 00:52:03.564198 Accepted closed Forms     master fixed Allow overriding of error message for each newforms Field type Right now, the only field type that allows custom error messages is RegexField. For those of us that cannot display errors next to their respective field (for whatever reason), having 6 "This field is required." messages in a row just confuses users. I propose adding error_text to the base Field definition. Adding a simple {{{ #!python self.error_text = error_text or u'This field is required.' }}} The only design decision I see that needs to be made is how to handle fields that have multiple error messages, e.g., the min/max errors on IntegerField. Perhaps arguments would work there, too: max_error_text, min_error_text. nobody anonymous   0 1 1 0 0 0
3458 2007-02-08 19:12:32 2007-09-16 16:29:12 2019-06-24 00:52:04.190678 Accepted closed Validators     0.95 worksforme Blankable, non-nullable CharFields have a strange default behavior If you create a create a CharField in a model like so: {{{ some_field = models.CharField(blank=True, null=False) }}} then create the database via syncdb, the model/validation layer considers None to be a valid value even though it just created the database table with NOT NULL as an attribute for the some_field column. This leads to some trouble. For starters, if you neglect to include some_field in a form, the field will not produce any POST data, but the lack of a value won't trigger a model validation error. This is made worse by the fact that Fields seem to default their default values to None. Defaulting to None will always produce database errors here unless you somehow go behind Django's back and modify the database to allow NULL values while keeping null for the field equal to False. Thus, an invalid insertion will be sent to the database, causing a nasty exception... Since the preferred method for storing blank values in CharFields is to use an empty string, I feel this should really be handled by default differently. Some ideas: * For CharField, blank=True when used together with null=False could imply, unless otherwise specified, that the default value is an empty string (The documentation already says that empty strings are the preferred method of storing blank values in a CharField, so why is it defaulting to a bad value?) * When null=True for a field, Field.validate could raise an exception and warn when asked to validate None, since it is not, after all, a valid value for a field where NULL is not allowed. nobody hmason@mac.com   0 0 0 0 0 0
3459 2007-02-08 20:23:36 2007-02-25 16:18:46 2019-06-24 00:52:04.809705 Ready for checkin closed Database layer (models, ORM)     master fixed SET TIME ZONE called too often for postgresql_psycopg2 backend Analyzing our database logs I found that 25% of all traffic were calls to SET TIME ZONE. This is currently called for every cursor when using the postgrsql_psycopg2 backend. This only needs to be called when the connection is established. All cursors will get the correct timezone if it is set in the connection. I've attached a patch which calls SET TIME ZONE only on new connections. This eliminates a lot of wasted database traffic and can result in a large performance gain for loaded systems using this backend. adrian Jack Moffitt <metajack@gmail.com>   0 1 0 0 0 0
3460 2007-02-08 20:33:59 2011-09-28 16:12:20 2019-06-24 00:52:05.443714 Accepted closed Database layer (models, ORM)     master fixed Allow configuration of postgresql_psycopg2 isolation level Postgresql only has two transaction isolation levels: read committed and serializable. READ COMMITTED is the default and the one django expects to use. psycopg2 however defines three isolation levels: autocommit, read committed, and serializable. The difference between autocommit and read committed is that read committed in psycopg2 puts all statements inside a BEGIN/END block (or BEGIN/ROLLBACK or BEGIN/COMMIT). Inside the BEGIN it also executes SET TRANSACTION ISOLATION LEVEL READ COMMITTED (which is redundant as this isolation level is the default). Django currently uses psycopg2's read committed isolation level, and this leads to every query (almost) being surrounded by spurious BEGIN/END. In a heavily loaded system, this consumes a massive amount of the total database time. Django should be using the autocommit isolation level, which does not have this overhead. Anywhere explicit transaction blocks are needed they can be used. The attached patch switches the backend to the autocommit isolation level. I have tested this patch on our production system and it makes a noticeable speed improvement. NOTE: Django's ORM does an existence test followed by and UPDATE or INSERT when save() is called. The read committed isolation level does not protect against this failing even within a transaction block, and therefor this change should have no side effects on Django code. mtredinnick Jack Moffitt <metajack@gmail.com>   0 1 0 0 0 0
3462 2007-02-08 20:44:56 2007-12-01 17:14:26 2019-06-24 00:52:06.718248 Design decision needed closed Generic views     master wontfix model objects can fail during save Currently django uses an existence test (at least on postgresql_psycopg2 backend, but I assume it does the same thing everywhere) before and INSERT or UPDATE to decide which to do. This can fail if another connection does an INSERT or a DELETE while the existence test is running, even in a transaction block (unless the transaction isolation level is serializable) as each statement can potentially see a different view of the database depending on which transactions have already completed before that statement executes. I'm not sure how to fix this (serializable transactions are probably not the right answer), and it is probably an edge case for most applications, but I'm entered a bug for it so that people know this issue exists. nobody Jack Moffitt <metajack@gmail.com>   0 0 0 0 0 0
3463 2007-02-09 02:10:32 2007-02-10 05:38:39 2019-06-24 00:52:07.332328 Accepted closed Core (Other)     master fixed EmptyQuerySet's iterator() method does not return a generator {{{ #!python >>> User.objects.all().iterator() <generator object at 0xb76a714c> >>> User.objects.none().iterator() Traceback (most recent call last): File "<console>", line 1, in ? File "./django/db/models/query.py", line 596, in iterator raise StopIteration StopIteration }}} adrian Gary Wilson <gary.wilson@gmail.com>   0 1 0 0 0 0
3464 2007-02-09 06:34:15 2007-04-30 15:26:54 2019-06-24 00:52:07.955506 Unreviewed closed Database layer (models, ORM)     other branch fixed Oracle representation of the IPAddressField The IPAddressField is defined in creation.py as CHAR(15). To my understanding this means that all values in that column will be allocated enough memory to store 15 characters of data regardless if the string being stored is in fact 15 characters long. I have discovered that for an IP address such as 192.168.1.210 where there are only 13 characters, the data base will pad out my IP address with space characters so that it becomes '192.168.1.210 '. This causes problems when performing searches unless I use '__istartswith'. jacob benk Oracle, IPAddessField 0 0 0 0 0 0
3465 2007-02-09 14:17:02 2007-02-27 20:25:27 2019-06-24 00:52:08.561180 Accepted closed Template system     master fixed template variable list-index lookup on an unsubscriptable object raises TypeError For example, if the template variable "`foobar`" with value of None is passed to a template that uses: {{{ {{ foobar.13 }} }}} The following traceback is produced {{{ #!python Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in render_node 718. result = node.render(context) File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in render 768. output = self.filter_expression.resolve(context) File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in resolve 561. obj = resolve_variable(self.var, context) File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in resolve_variable 667. current = current[int(bits[0])] TypeError at /it/ unsubscriptable object }}} The expected result would be for `{{ foobar.13 }}` to fail silently. adrian Gary Wilson <gary.wilson@gmail.com>   0 1 0 0 0 0
3466 2007-02-09 19:17:39 2007-06-02 04:07:52 2019-06-24 00:52:09.200821 Accepted closed Core (Serialization)     master fixed 'fields' and 'stream' options not working for json serializer I'm attempting to use the 'fields' option with the json serializer without any luck. The same call with the xml serializer works fine: serializers.serialize("json", (Something.objects.get(pk=1), ), fields='myfield' ) breaks with: Traceback (most recent call last): File "<console>", line 1, in ? File "C:\Python24\lib\site-packages\django\core\serializers\__init__.py", line 55, in serialize s.serialize(queryset, **options) File "C:\Python24\lib\site-packages\django\core\serializers\base.py", line 49, in serialize self.end_serialization() File "C:\Python24\lib\site-packages\django\core\serializers\json.py", line 19, in end_serialization simplejson.dump(self.objects, self.stream, cls=DateTimeAwareJSONEncoder, **self.options) File "C:\Python24\lib\site-packages\django\utils\simplejson\__init__.py", line 134, in dump check_circular=check_circular, allow_nan=allow_nan, indent=indent, TypeError: __init__() got an unexpected keyword argument 'fields' Trying: serializers.serialize("xml", (Something.objects.get(pk=1), ), fields='myfield' ) works fine however. jacob Parand Darugar <tdarugar@yahoo.com>   0 1 0 0 0 0
3467 2007-02-09 19:54:29 2007-06-07 16:12:47 2019-06-24 00:52:09.843105 Design decision needed closed *.djangoproject.com     master wontfix "Search docs via Google" should search only the documentation directory, not the entire site. It's hard to find things otherwise, as everything from code.djangoproject.com is getting displayed as well. All the old documentation seems to pollute the search results as well. Maybe it is possible to have the search ignore directories `/\d+_\d+/` in the URL? jacob Gary Wilson <gary.wilson@gmail.com>   0 1 0 0 0 0
3468 2007-02-09 21:40:55 2007-02-09 22:01:13 2019-06-24 00:52:10.483489 Unreviewed closed Template system     master fixed Trivial - Typo in django/template/__init__.py (self.mgs instead of self.msg) there is a small typo in django/template/__init__.py in class VariableDoesNotExist: {{{ def __str__(self): return self.mgs % self.params }}} <-- should be self.msg adrian Herbert Poul <herbert.poul@gmail.com> typo template VariableDoesNotExist mgs self.mgs 0 1 0 0 0 0
3469 2007-02-09 22:55:47 2011-09-28 16:12:23 2019-06-24 00:52:11.128518 Ready for checkin closed Documentation     master fixed Django.utils is not documented There are a lot of useful utilities and datastructures in django.utils, but the lack of good user documentation limits the extent to which these utilities are used. For example, `DotExpandedDict` is a useful but undocumented data structure. It can be very helpful for complex form parsing and it'd be good to mention somewhere in documentation. Rupe SmileyChris   0 1 1 0 0 0
3471 2007-02-10 01:45:25 2007-02-10 03:12:48 2019-06-24 00:52:12.415723 Unreviewed closed Database layer (models, ORM)     master duplicate Bad error message for misspelled query I wrote: {{{ TimeDivision.objects.filter(when__ge=datetime(2007,5,14)) }}} Note `ge` instead of `gte`. The resulting error was: {{{ UnboundLocalError: local variable 'new_opts' referenced before assignment }}} adrian Dave Abrahams <dave@boost-consulting.com>   0 0 0 0 0 0
3472 2007-02-10 13:58:24 2009-05-26 18:19:19 2019-06-24 00:52:13.053685 Ready for checkin closed Core (Mail)     master fixed Convince send_mail to not base64-encode the email If you use utf8, mails will be base64-encoded by Python. That is a Bad Idea. This patch tells it not to do that. adrian Matthias Urlichs <smurf@smurf.noris.de> base64, send_mail 0 1 0 0 0 0
3473 2007-02-10 15:38:10 2007-03-31 02:23:35 2019-06-24 00:52:13.678107 Ready for checkin closed contrib.comments     master fixed Comments Karma creation broken When trying to vote for a comment... AttributeError at /comments/karma/vote/1/up/ 'KarmaScoreManager' object has no attribute 'objects' adrian scum   0 1 0 0 0 0
3474 2007-02-11 06:47:05 2007-12-01 17:49:41 2019-06-24 00:52:14.309459 Design decision needed closed Core (Other)     master wontfix Allow regex flags to be specified in url dispatcher It would be nice if the URL dispatcher allowed REs with the re.VERBOSE flag set so that we can set out our REs using triple-quoted, commented strings containing formatting whitespace. It probably even makes sense to have it on by default, as with URLs it's pretty unlikely they'll include meaningful intentional whitespace anyway. I think it would make my RE debugging taks much easier. Thanks. nobody admackin@gmail.com url re verbose flags 0 1 0 0 0 0
3475 2007-02-11 14:29:41 2007-12-01 17:55:19 2019-06-24 00:52:14.952778 Design decision needed closed Core (Management commands)     master wontfix Creating apps with certain names causes manage.py to stop working manage.py should not allow creating an app with a certain name when that could break manage.py itself. after doing ''manage.py startapp site'' I got the following error when trying to do something with manage.py {{{ Traceback (most recent call last): File "path\manage.py", line 2, in ? from django.core.management import execute_manager ImportError: No module named django.core.management }}} nobody svant manage.py, startapp 0 1 0 0 0 0
3476 2007-02-11 17:55:37 2007-02-11 18:58:22 2019-06-24 00:52:15.589482 Unreviewed closed Database layer (models, ORM)     master duplicate QuerySet UserProfile.objects.all().order_by('user.last_name') This expression isn't supported in fact, I can't seem to find a way to order by fields through a ForeignKey field. The documentation hints at a way to do it, but is not apparent how to write the expression. adrian Henrik Vendelbo <info@fashoncontent.com> order_by ForeignKey 0 0 0 0 0 0
3477 2007-02-11 20:05:46 2007-02-11 23:57:33 2019-06-24 00:52:16.219255 Unreviewed closed Uncategorized     master fixed Changeset 4485 broke django? At revision 4484 all is ok. After svn up I get this traceback: {{{ MOD_PYTHON ERROR ProcessId: 54687 Interpreter: 'www.sapmievangelisten.org' ServerName: 'www.sapmievangelisten.org' DocumentRoot: '/home/www/vhosts/www.sapmievangelisten.org/httpdocs' URI: '/admin/markdowneditor/image/' Location: '/' Directory: None Filename: '/home/www/vhosts/www.sapmievangelisten.org/httpdocs/admin' PathInfo: '/markdowneditor/image/' Phase: 'PythonHandler' Handler: 'django.core.handlers.modpython' Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 1202, in _process_target module = import_module(module_name, path=path) File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 304, in import_module return __import__(module_name, {}, {}, ['*']) File "/home/www/vhosts/django_newformsfile/django/core/handlers/modpython.py", line 1, in ? from django.core.handlers.base import BaseHandler File "/home/www/vhosts/django_newformsfile/django/core/handlers/base.py", line 3, in ? from django import http File "/home/www/vhosts/django_newformsfile/django/http/__init__.py", line 6, in ? from django.utils.translation import gettext as _ Showing traceback after svn up File "/home/www/vhosts/django_newformsfile/django/utils/translation/__init__.py", line 3, in ? if settings.USE_I18N: File "/home/www/vhosts/django_newformsfile/django/conf/__init__.py", line 27, in __getattr__ self._import_settings() File "/home/www/vhosts/django_newformsfile/django/conf/__init__.py", line 52, in _import_settings raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE EnvironmentError: Environment variable DJANGO_SETTINGS_MODU… jacob Øyvind Saltvik <oyvind.saltvik@gmail.com>   0 0 0 0 0 0
3478 2007-02-11 22:29:00 2007-02-11 22:46:20 2019-06-24 00:52:16.854142 Unreviewed closed Uncategorized     0.95 invalid Installation Question Hello I was searching for cms system which is very performant because I want to build a newssite and I found django, the references and the performance is preferct for me but I have a problem I have such webspace 250 mb Webspace 2 MySQL php Cgi can I install django on my webspace? you can see the server information of my webhoster with php() here www.tavernacilar.de/1.php what do I need to install django on my webspace? jacob tavernaci Installation 0 0 0 0 0 0
3479 2007-02-11 22:33:37 2007-02-12 03:06:55 2019-06-24 00:52:17.480439 Design decision needed closed Forms     master wontfix Passing external data to Form objects in newforms Forms may require external context when performing validation. Consider, for example, a 'change password' form. Validation of the current password is required to ensure correct authorization. To validate the current password, the form needs to know the user it is validating against. I am proposing an enhancement to newforms to allow this functionality... the 'extra' keyword argument for Form creation. This keyword is suggested to keep maintain similarity with 'extra_context' for generic views. Form instantiation example: {{{ #!python PasswordChangeForm(request.POST.copy(), extra={'user': request.user}) }}} Example of accessing this data from within the Form: {{{ #!python class PasswordChangeForm(forms.Form): current_password = forms.CharField(widget=forms.PasswordInput) ... def clean_current_password(self): u = self.extra.get('user', None) ... }}} This usage assumes that the passed argument is a dictionary, and that that dictionary will be stored in self.extra (e.g. self.extra!['user']). It would also be possible to make anything passed in 'extra' an attribute of the form itself (e.g. self.user). I'm not particularly partial to either implementation. adrian Benjamin Slavin   0 0 0 0 0 0
3480 2007-02-12 09:25:30 2007-12-17 06:02:35 2019-06-24 00:52:18.099442 Accepted closed Database layer (models, ORM)     master fixed sqlreset drops more tables than it should for GenericRelations to separate apps A model from app A has a GenericRelation to another model in app B. When I reset app A, Django outputs DROP TABLE statements for the model from B. Example: apps/test/models.py: {{{ #!python from django.db import models from generictestcase.apps.meta.models import Tag class Article(models.Model): tags = models.GenericRelation(Tag) }}} apps/meta/models.py: {{{ #!python from django.db import models from django.contrib.contenttypes.models import ContentType class Tag(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() object = models.GenericForeignKey() }}} I use "python manage.py syncdb" to create the database tables (sqlite3 in my case), then "python manage.py sqlreset '''test'''" to generate SQL: {{{ BEGIN; DROP TABLE "meta_tag"; DROP TABLE "test_article"; CREATE TABLE "test_article" ( "id" integer NOT NULL PRIMARY KEY ); COMMIT; }}} Django shouldn't drop the "meta_tag" table here, because it lives in the "meta" app. nobody rpuls@kcore.de   0 1 0 1 0 0
3481 2007-02-12 11:48:26 2007-07-10 18:27:02 2019-06-24 00:52:18.751756 Design decision needed closed Template system       wontfix request: else part for a for loop or make if to create variable When using the object_detail generic view: If you have for examle a blog entry Entry(), and comments Comment() on it; I would use this to loop for comments: {{{ {% for comment in object.comment_set.all %} {{ comment.body_text }} <hr> {% endfor%} }}} Now the problem is; it is impossible to display something in case there are no comments without hitting the database again. It could be fixed with an '{% elsefor %}' or by making it possible to assign object.comment_set.all to some var once. Another solution would be to make '{% if object.comment_set_all %}' create a variable 'if.result' or something. adrian jimmy@inet-solutions.be for if else loop 0 0 0 0 0 0
3482 2007-02-12 12:40:19 2007-12-01 23:43:02 2019-06-24 00:52:19.375164 Ready for checkin closed Forms     master fixed MultipleChoiceField validation against a list with a single null element MultipleChoiceField fails validation when required=False against a list with a single null value (as opposed to when value itself is null) {{{ >>> f = MultipleChoiceField(required=False, choices=[('1', '1'), ('2', '2')]) >>> f.clean(['']) Traceback (most recent call last): File "<stdin>", line 1, in ? File "django/newforms/fields.py", line 386, in clean if val not in valid_values: django.newforms.util.ValidationError: [u'Select a valid choice. is not one of the available choices.'] >>> }}} nobody Jeff Bauer <jbauer@rubic.com> MultipleChoiceField 0 1 0 0 0 0
3483 2007-02-12 15:04:59 2007-12-01 20:45:05 2019-06-24 00:52:19.991108 Accepted closed Documentation     master fixed Document AUTH_PROFILE_MODULE The AUTH_PROFILE_MODULE isn't documented, the whole "Profile" support is undocumented except for a small reference to the 'get_profile' method in [source:django/trunk/docs/authentication.txt authentication docs] maybe it should be documented somewhere, the best source of information I could find about it is [http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model this b-list post], there is also [wiki:ExtendedUserModel this] wiki page which should be updated to reflect this new setting maybe with a note to the documentation if it gets added. On the code you can get a few more information: [source:django/trunk/django/contrib/auth/models.py here] nobody Marc Fargas <telenieko@telenieko.com>   0 1 0 0 0 0
3484 2007-02-12 17:03:37 2007-09-16 16:35:13 2019-06-24 00:52:20.653126 Design decision needed closed Database layer (models, ORM)     master duplicate Poor error message (or functionality) when using unsaved models as foreign keys This reduced case untested, sorry. {{{ #!python from django.db import models class X(models.Model): pass class Y(models.Model): x = models.ForeignKey(X) x = X() Y(x=x).save() }}} The result, {{{IntegrityError: ERROR: null value in column "presenter_id" violates not-null constraint}}}, is cryptic at best. Maybe rather than improving the error message, it should recursively save all unsaved models? nobody Dave Abrahams <dave@boost-consulting.com>   0 0 0 0 0 0
3486 2007-02-13 00:21:51 2007-02-21 20:54:50 2019-06-24 00:52:21.907937 Unreviewed closed Database layer (models, ORM)     master worksforme Cryptic error message {{{ #!python class Conference(models.Model): name = models.CharField(maxlength=100, unique_for_year=start) # slug = models.SlugField(prepopulate_from=('name',)) start = models.DateField('Date on which to start the schedule') finish = models.DateField('Date on which to end the schedule') def __str__(self): return '%s %s' % (self.name,self.start.year) class Admin: pass }}} yields: {{{ ProgrammingError: ERROR: relation "auth_user" does not exist }}} adrian Dave Abrahams <dave@boost-consulting.com>   0 0 0 0 0 0
3487 2007-02-13 15:43:47 2007-05-27 11:36:15 2019-06-24 00:52:22.535798 Accepted closed Documentation     master invalid docs/models/generic_relations is orphaned and "does-not-exist" Which means it has no link from any other documents or that, more likely, I could not find it. On the other hand, generic_relations *is not* in SVN I supose it's a flatpage or something like that! could this document be brought to docs/ ? jacob Marc Fargas <telenieko@telenieko.com>   0 0 0 0 0 0
3488 2007-02-13 16:39:36 2007-02-28 16:18:55 2019-06-24 00:52:23.147990 Design decision needed closed Tools     master fixed DateFormat should have a b() method The date-based generic views use `%b` as the default month formatter: {{{ #!python def archive_day(... month_format='%b' ...): [snip] date = datetime.date(*time.strptime(year+month+day, '%Y'+month_format+day_format)[:3]) }}} and in my template I would like to link to the previous/next day with something like: {{{ <a href="/log/{{ previous_day|date:"Y/b/d/" }}">Previous day</a> }}} but can't since `django.utils.dateformat.DateFormat` has no `b()` method. Note that you could work around this using the `lower` template filter: {{{ <a href="/log/{{ previous_day|date:"Y/M/d/"|lower }}">Previous day</a> }}} but having to work around this seems silly since `%b` is the default used in the generic views. adrian Gary Wilson <gary.wilson@gmail.com>   0 1 0 0 0 0
3489 2007-02-13 17:12:51 2008-01-04 16:07:35 2019-06-24 00:52:23.791125 Accepted closed Forms     master fixed Altering self.fields in Form.__init__() fails take a look at the test {{{ #!python """ >>> TestForm({'text':"foo"}).is_valid() True >>> TestForm({'text':"foo"},need_name=True).is_valid() False >>> TestForm({'text':"foo"}).is_valid() #this one will fail True """ from django.newforms import * class TestForm(Form): name = CharField(max_length=30) text = CharField(widget=Textarea) def __init__(self,*k,**kw): need_name=kw.pop("need_name",False) Form.__init__(self,*k,**kw) if need_name: self.fields["name"].required=True }}} Just assigning {{{need_name}}} to {{{self.fields["name"].required}}} would create a race condition for multithreaded servers. insin Ronny Pfannschmidt   0 1 0 0 0 0
3490 2007-02-13 18:26:20 2007-02-20 10:18:31 2019-06-24 00:52:24.424957 Unreviewed closed Forms     master fixed [patch] Passing an iterable as choices to newforms. ChoiceField breaks. Passing a Generator as choices breaks printing the form twice as well as validating passed data. adrian Chris.Wesseling@cwi.nl newforms ChoiceField iterable choices 0 1 0 0 0 0
3491 2007-02-13 19:12:11 2007-09-20 06:59:13 2019-06-24 00:52:25.061812 Ready for checkin closed contrib.admin     master fixed [newforms-admin] Admin templates use relative links rather than url tag When I follow the example from the section "Custom admin views" in the djangobook chapter 18, I notice that the links in the upper right of the admin ie: "documentation", "change password", and "log out" no longer function correctly. For example, when viewing the page "admin/bookstore/report" the links in the upper right point to "admin/bookstore/report/doc" instead of "admin/doc". The Logout link points to "admin/bookstore/report/logout" instead of "admin/logout". Clicking the links results in a 404 Not Found error. nobody saintsjd@gmail.com   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
3493 2007-02-13 21:59:49 2007-02-13 22:09:43 2019-06-24 00:52:26.324931 Unreviewed closed Template system     0.95 duplicate Circular "extends" reference in template causes core dump I discovered this after making a search-and-replace mistake in one of my admin-extending templates. My admin/base_site.html had `{% extends "admin/base.html" %}` at the top. Result: Dev server crashed, Python dumped core. Ouch! adrian Paul Bx <pb@e-scribe.com>   0 0 0 0 0 0
3494 2007-02-14 00:51:02 2007-02-15 00:21:33 2019-06-24 00:52:26.955517 Ready for checkin closed Translations     master fixed German djangojs.po missing two strings (Show/Hide) The German translation strings in djangojs.po were missing the two commands for showing and hiding collapsed fieldsets in the Django admin. Trivial, but it bothered me... see attached patch. hugo jonasvp@gmx.de german translation javascript 0 1 0 0 0 0
3495 2007-02-14 04:39:33 2007-02-14 23:57:10 2019-06-24 00:52:27.603702 Design decision needed closed Core (Other)     master worksforme created_models doesn't match post_syncdb's app When post_syncdb triggers a signal for one app, the "created_models" includes models created in other apps. {{{ from django.dispatch import dispatcher from django.db.models import signals def show_it(sender, app, created_models, verbosity, interactive): print app, created_models dispatcher.connect(show_it,signal=signals.post_syncdb) }}} Put that in the __init__.py in one app of a multi-app project and try running "manage.py test"- notice that for every app, show_it is called with "created_models" that don't necessarily match "app". adrian Yary H <spam-django@yary.ack.org>   0 0 0 0 0 0
3496 2007-02-14 09:07:33 2011-03-15 11:48:59 2019-06-24 00:52:28.229657 Unreviewed closed Core (Other)     master fixed WSGI handler dies on a form containing only empty checkboxes WSGI handler hangs when submitting a form containing only empty checkboxes. Because checkboxes are unchecked, HTTP POST request has zero content-length in this case. This zero is passed forward to a socket read function which never returns. I have attached a patch which modifies WSGI to propeply deal with this case. Cheers, Mikko Ohtamaa Oulu, Finland nobody mikko@redinnovation.com wsgi checkbox post request zero 0 1 0 0 0 0
3497 2007-02-14 13:42:12 2007-02-14 15:21:39 2019-06-24 00:52:28.858645 Unreviewed closed *.djangoproject.com     master duplicate Recent code changes RSS doesn't work A link to the recent code changes RSS from the weblog page just returns an error: {{{ Internal Error Ticket changes, Ticket details event provider (TicketModule) failed: AttributeError: 'NoneType' object has no attribute 'lower' You may want to see the other kind of events from the Timeline }}} jacob anonymous   0 0 0 0 0 0
3498 2007-02-14 17:31:21 2007-02-14 22:38:14 2019-06-24 00:52:29.506233 Unreviewed closed Documentation     master invalid Django tutorial lists wrong 'installed apps' entry On http://www.djangoproject.com/documentation/tutorial1/, the tutorial explains that I should put 'mysite.polls' into INSTALLED_APPS. If I do that, I get an error (when running sql polls) {{{django.core.exceptions.ImproperlyConfigured: App with label polls could not be found}}} However, if I just put 'polls' into that list, the sql command succeed. NB. I have not used 'mysite' as the project name, but a different string, and used that everywhere the tutorial says 'mysite'. jacob martin@v.loewis.de   0 0 0 0 0 0
3499 2007-02-15 06:33:03 2007-10-27 01:26:29 2019-06-24 00:52:30.181934 Accepted closed Core (Other)     master wontfix Add a "redirect_to" attribute (similar to status_code) to HttpResponseRedirect and HttpResponsePermanentRedirect to help with testing Consider this test: {{{ response = self.client.post(url, params) self.failUnlessEqual(response.status_code, 302) self.failUnlessEqual(response.headers['Location'], some_other_url) }}} It would be easier to do the following instead, treating redirect_to as an attribute. {{{ self.failUnlessEqual(response.redirect_to, some_other_url) }}} nobody egmanoj@gmail.com HttpResponseRedirect , redirect_to 0 1 0 0 0 0
3500 2007-02-15 16:20:24 2007-02-17 01:27:55 2019-06-24 00:52:30.808186 Ready for checkin closed Translations     master fixed Update Japanese(ja) translation file for trunk(r4525) Update Japanese(ja) translation file for trunk(r4525) hugo makoto tsuyuki <mtsuyuki@gmail.com> l10n japanese 0 1 0 0 0 0
3501 2007-02-15 16:38:46 2009-03-01 02:24:33 2019-06-24 00:52:31.437179 Accepted closed Database layer (models, ORM)     master fixed [patch] sqlite selection on datetime members fail when datefield is null Doing selects like {{{model.objects.filter(datefield__year=2007)}}} fail when a datefield contains a NULL value. Patch follows as a code block: {{{ Index: django/db/backends/sqlite3/base.py =================================================================== --- django/db/backends/sqlite3/base.py (revision 4501) +++ django/db/backends/sqlite3/base.py (working copy) @@ -119,6 +119,7 @@ return 'django_extract("%s", %s)' % (lookup_type.lower(), table_name) def _sqlite_extract(lookup_type, dt): + if not dt: return None try: dt = util.typecast_timestamp(dt) except (ValueError, TypeError): }}} Thanks for all the good work! Niels Poppe baumer1122 anonymous sqlite 0 1 0 1 0 0
3502 2007-02-15 21:00:53 2007-10-20 14:54:38 2019-06-24 00:52:32.064187 Ready for checkin closed Contrib apps     master fixed Added "Time To Live" option to RSS2.1 Looking through the documentation I found no instance of the "time to live" option for the RSS2.0+ which is needed by some readers. I have attached two diff files of the modified files from SVN revision r4489. toke jason.sidabras@gmail.com syndication, sprintsept14   1 0 0 0  
3503 2007-02-15 21:12:43 2007-02-15 21:26:44 2019-06-24 00:52:32.694041 Unreviewed closed Contrib apps     master fixed Add UKPostcodeField to localflavor module Patch to add a uk module to the new django.contrib.localflavor module, containing a UKPostcodeField. Tests are included. adrian Jonathan Buchanan <jonathan.buchanan@gmail.com>   0 1 0 0 0 0
3504 2007-02-15 21:57:37 2007-02-25 16:11:46 2019-06-24 00:52:33.316007 Ready for checkin closed Documentation     master fixed Missing self in authentification doc There is a typo in authentification doc, in part ow writing an authentification bakend: class MyBackend: def authenticate(username=None, password=None): # Check the username/password and return a User. class MyBackend: def authenticate(token=None): # Check the token and return a User. There should be a self in arguments list, as they are class methods. jacob bugs@almad.net   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
3506 2007-02-15 22:37:26 2007-02-15 22:43:43 2019-06-24 00:52:34.582693 Ready for checkin closed Forms     master fixed newforms: empty help_text is rendered as "None" in templates An empty string should be rendered when trying to display the help_text of a form field that has no help_text. adrian Thomas Steinacher <tom@eggdrop.ch>   0 1 0 0 0 0
3507 2007-02-15 23:05:04 2007-02-16 19:37:52 2019-06-24 00:52:35.218643 Unreviewed closed Contrib apps     master worksforme sessions race condition Regarding this piece of code in django/contrib/sessions/models.py: {{{ while 1: session_key = md5.new(str(random.randint(0, sys.maxint - 1)) + str(random.randint(0, sys.maxint - 1)) + settings.SECRET_KEY).hexdigest() try: self.get(session_key=session_key) except self.model.DoesNotExist: break return session_key }}} There is a very very small chance that a race condition exists between finding a uniq session, and saving it; which would result in one user ending up with a session owned by someone else. I know the chance is very small, but I do worry about it. Maybe it would be possible to also include remote_addr into the to be hashed string? I also want to add that it would be nice to make a configuration option to make it impossible to use a session from another remote_addr. I might be to paranoid. adrian jimmy@inet-solutions.be sessions save 0 0 0 0 0 0
3508 2007-02-16 01:57:40 2010-09-10 19:24:25 2019-06-24 00:52:35.876163 Ready for checkin closed Core (Other)     master fixed MergeDict needs more descriptive return values from __str__ and __repr__ Since MergeDict is a subclass of object, it inherits the default __str__ and __repr__ methods. The default methods are very generic and not as useful as they could be, especially when you're trying to inspect objects. I'm submitting a patch that gives a detailed representation of the instance data when you run str(myMergeDict) and returns an "eval-able" value when you run repr(myMergeDict).   thebanana   0 1 0 1 0 0
3509 2007-02-16 06:16:20 2007-09-14 14:36:27 2019-06-24 00:52:36.448403 Design decision needed closed Forms     master invalid [patch] django.newforms.util.smart_unicode() is not smart enough :) Guys django.newforms.util.smart_unicode() needs to be smarter to don't unicode None, True and False values and leave them as they are. The patch is attached. nobody Anton Khalikov <anton@khalikov.ru>   0 1 0 0 0 0
3510 2007-02-16 11:54:54 2007-02-19 23:54:55 2019-06-24 00:52:37.080677 Ready for checkin closed Forms     master fixed Validation errors should be escaped for html I think validation error messages should be escaped when the form outputs html. For example, in a custom clean method you might raise a ValidationError which includes the value the user input: {{{ #!python def clean_username(self): raise ValidationError(u"Sorry, username '%s' is not allowed" % self.clean_data['username']) }}} Whatever the user enters would currently be output unescaped in the validation error message. You could argue the input values should be escaped when building the custom ValidationError, but I think it's just a string at that point and escaping should be done when the html is generated - in this case in Form._html_output. Patch is attached, though I'm not sure if I did the right thing with ErrorList - I'm new to Python. adrian scott@staplefish.com form validation escape 0 1 0 0 0 0
3511 2007-02-16 20:15:02 2007-12-12 22:59:37 2019-06-24 00:52:37.715079 Ready for checkin closed Database layer (models, ORM)     master fixed use a MultipleObjectsReturned exception instead of assert statement in QuerySet.get() discussion: http://groups.google.com/group/django-developers/browse_thread/thread/685c52d252173bf4/#   Gary Wilson <gary.wilson@gmail.com> sprintsept14 sprintdec01 0 1 0 0 0 0
3513 2007-02-16 22:05:55 2007-02-19 20:52:17 2019-06-24 00:52:38.982687 Unreviewed closed Documentation     master invalid Adding Django documentation to KDevelop I spent a little time creating a KDevelop TOC file for the Django documentation. It's pretty easy to add to the listing in the Documentation sidebar, following the instructions here: http://docs.kde.org/development/en/kdevelop/kdevelop/setup-docu.html#setup-docu-general-toc Just click Settings->Configure KDevelop->Documentation->Add, select KDevelopTOC as type and point it at this file. jacob david@dawninglight.net kdevelop 0 0 0 0 0 0
3514 2007-02-16 22:53:15 2007-09-16 16:38:57 2019-06-24 00:52:39.616451 Design decision needed closed contrib.admin     master wontfix Include extrabody block to admin's base.html template It'll be very usefull to everybody that needs to customize admin behavior by including javascript functionality by using body onload/onclose methods. Example: To include a map from google map that can be used to add data to a localization form by using listeners. nobody anonymous   0 0 0 0 0 0
3515 2007-02-17 00:42:46 2009-08-18 00:22:42 2019-06-24 00:52:40.247546 Design decision needed closed Forms     master duplicate CSS improvements for newforms Example -- myfield = forms.DateField(required=True, css='vDateField') nobody Simon Litchfield <simon@slicmedia.com>   0 1 0 1 1 0
3516 2007-02-17 09:50:23 2007-02-19 23:59:13 2019-06-24 00:52:40.887887 Design decision needed closed Forms     master worksforme Support filesize attribute for FileInput widgets This feature was requested for oldforms in #1687 and should be considered for newforms. adrian Simon G. <dev@simon.net.nz> newforms filesize 0 0 0 0 0 0
3517 2007-02-17 17:38:32 2007-02-26 08:18:59 2019-06-24 00:52:41.530202 Ready for checkin closed Translations     master fixed [patch] Updated Slovenian translation Attached is updated Slovenian (sl_SI) translation. hugo Jure Cuhalev <gandalf@owca.info> l10n 0 1 0 0 0 0
3518 2007-02-17 18:50:30 2007-02-25 16:09:30 2019-06-24 00:52:42.185242 Ready for checkin closed Template system     master fixed Unittests for humanize template filters This is a patch to add unittests to humanize template filters. adrian Jyrki Pulliainen <jyrki.pulliainen@gmail.com> unittest, humanize 0 1 0 0 0 0
3519 2007-02-17 22:07:51 2007-07-10 01:37:54 2019-06-24 00:52:42.821531 Accepted closed contrib.admin     master invalid IndexError when creating related objects in admin I have a model with `ForeignKey(Entry, edit_inline=models.TABULAR)` field. When i try to edit the Entry object in admin and ask to create Topic object too, django throws and IndexError: {{{ Traceback (most recent call last): File "/usr/lib/site-python/django/core/handlers/base.py" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/site-python/django/contrib/admin/views/decorators.py" in _checklogin 55. return view_func(request, *args, **kwargs) File "/usr/lib/site-python/django/views/decorators/cache.py" in _wrapped_view_func 39. response = view_func(request, *args, **kwargs) File "/usr/lib/site-python/django/contrib/admin/views/main.py" in change_stage 329. new_object = manipulator.save(new_data) File "/usr/lib/site-python/django/db/models/manipulators.py" in save 163. if rel_new_data[related.opts.pk.name][0]: IndexError at /admin/news/entry/1/ string index out of range }}} {{{ POST data: ... topic.0.id: '' ... }}} adrian dp_wiz edit_inline 0 1 1 1 0 0
3520 2007-02-18 13:18:44 2007-12-01 18:47:59 2019-06-24 00:52:43.453716 Design decision needed closed Database layer (models, ORM)     master wontfix [patch] New search_filter for default manager Simple convenience method to run filter() using field lookups and values from supplied dicts. {{{ mysearch = {'myfield': 'myfield', 'mytext': 'mytext__startswith', 'mydate': 'mydata__lte', } formdata = {'myfield': 'somevalue', 'mytext': 'h', 'mydate': '' } results = MyObject.objects.search_filter(lookups=mysearch, data=formdata) }}} Would be exactly the same as -- {{{ filter(myfield='somevalue', mytext__startswith='h') }}} Skips empty values. Useful for searching against form or request data. nobody Simon Litchfield <simon@slicmedia.com> search form filter request post get field lookup dict 0 0 0 0 0 0
3521 2007-02-18 14:30:37 2007-02-19 17:09:59 2019-06-24 00:52:44.058538 Unreviewed closed *.djangoproject.com     master invalid Semantic disconnect on djangoproject.com homepage Suggestion from BarCamp London. The front page of http://www.djangoproject.com/ links to the Django Book and the download for the latest release - but if you try to follow the book using the latest release you'll run in to all kinds of problems. jacob Simon Willison   0 0 0 0 0 0
3522 2007-02-18 21:22:08 2007-09-11 11:59:55 2019-06-24 00:52:44.650457 Design decision needed closed contrib.admin     master duplicate [newforms-admin] global name '_get_deleted_objects' is not defined Under the newforms-admin branch, deleting an object through the admin results in the following error: Request Method: GET[[BR]] Request URL: http://djangotest/admin/sandbox/book/2/delete/ [[BR]] Exception Type: NameError[[BR]] Exception Value: global name '_get_deleted_objects' is not defined[[BR]] Exception Location: /usr/lib/python2.4/site-packages/django/contrib/admin/options.py in delete_view, line 466[[BR]] {{{ models.py: from django.db import models # Create your models here. class Book(models.Model): name = models.CharField(maxlength=100) class Admin: pass }}} nobody rpercy@gmail.com newforms-admin _get_deleted_objects 0 1 0 0 0 0
3523 2007-02-18 21:58:25 2007-06-08 11:58:03 2019-06-24 00:52:45.275286 Ready for checkin closed Template system     master fixed Extend "for" tag to allow unpacking of lists As discussed here: http://groups.google.com/group/django-developers/browse_thread/thread/5c0de4476c12029f Basically, rather than having to do this: {{{ {% for post in posts %} {{ post.0 }} - {{ post.1 }} {% endfor %} }}} We should be able to do this: {{{ {% for name, description in posts %} {{ name }} - {{ description }} {% endfor %} }}} russellm SmileyChris for loop 0 1 0 0 0 0
3524 2007-02-19 00:53:21 2007-02-19 00:55:07 2019-06-24 00:52:45.866160 Unreviewed closed Uncategorized     master invalid Models: Sub String for a character field I was wondering if in a Model you can substring For example State = models.Charfield(maxlength=3)[[BR]] Fileid = models.Charfield(maxlength=10)[[BR]] Date = models.DateField[[BR]] and the following definition[[BR]] def save(self):[[BR]] d = self.Date[[BR]] state = self.State[[BR]] self.Fileid = dateformat.format(d, "Y")+self.state(1,1) <------- This is where I would substring I assume.[[BR]] super(case_file, self).save() #Calls the real Save function[[BR]] This doesn't appear to work, would you have any suggestions?[[BR]] Regards[[BR]] jacob richard.freitag@aigroup.asn.au   0 0 0 0 0 0
3525 2007-02-19 08:09:32 2007-09-16 16:41:33 2019-06-24 00:52:46.472325 Accepted closed Template system     master fixed {% url path.to.view %} fails with multiple patterns for the same function If there are multiple patterns matching the same view function, it seems like, only the first match is considered. Lets say a function has an optional "id" parameter which defaults to None and below is the patterns pointing that function. {{{ #!python (r'^(?P<slug>[-\w]+)/$', views.myfunc), (r'^(?P<slug>[-\w]+)/(?P<id>\d+)/$', views.myfunc), }}} In that case, {{{ #!python {% url views.myfunc slug=something,id=someint %} }}} fails to match anything, where we can expect it to match the second pattern and return "/something/someint/" nobody omat@gezgin.com url, template 0 0 0 0 0 0
3526 2007-02-19 13:09:59 2007-08-11 09:37:43 2019-06-24 00:52:47.119463 Ready for checkin closed Core (Other)     master fixed HttpResponse object should have 'content_type' argument (in additon to / instead of 'mimetype') I can never remember the 'mimetype' argument to HttpResponse; I always have to look it up. The corresponding HTTP header is 'Content-Type'; I think that content_type would be a more memorable and more accurate argument. For example: {{{ return HttpResponse(simplejson.dumps({ 'airports': airports }), mimetype='application/json; charset=utf-8') }}} Should be: {{{ return HttpResponse(simplejson.dumps({ 'airports': airports }), content_type='application/json; charset=utf-8') }}} The charset=utf-8 bit further demonstrates that mimetype should be renamed - charset=utf-8 is a parameter, not part of the actual mime media type. I suggest adding content_type as an alternative to mimetype; I see no particular need to deprecate mimetype and break existing code, although it may be something that should be removed in the future. adrian Simon Willison httpresponse 0 1 0 0 1 0
3527 2007-02-19 13:30:45 2007-09-14 10:04:45 2019-06-24 00:52:47.746993 Design decision needed closed Core (Other)     master wontfix better debug traceback with code executing... The django debug traceback ist good. But the colubrids one is better: http://trac.pocoo.org/browser/colubrid/trunk/colubrid/debug.py With this debug traceback you can execute python code via a small AJAX script. Everything is in the debug.py file from above. nobody Jens debug, traceback 0 1 0 0 0 0
3528 2007-02-19 16:47:35 2008-01-04 16:07:28 2019-06-24 00:52:48.374082 Design decision needed closed Core (Management commands)     master wontfix simple cli extensions for django-admin.py and manage.py just ran across the point where its nice to have custom commands for the cli it would simplify setting up daily actions and other tasks wich arent well-suited for the web interface it would be nice to have something like {{{ #!sh ./manage.py run $myapp $mycommand $myargs ## examples ./manage.py run sessions clean ./manage.py run notifications daily ./manage.py run forum update post_cache }}} adrian Ronny Pfannschmidt   0 0 0 0 0 0
3529 2007-02-19 19:25:08 2010-11-24 00:36:36 2019-06-24 00:52:49.016860 Ready for checkin closed Documentation     master fixed Context.update doesn't do what it says it does `Context.update()` currently looks like: {{{ #!python def update(self, other_dict): "Like dict.update(). Pushes an entire dictionary's keys and values onto the context." self.dicts = [other_dict] + self.dicts }}} but really to act like `dict.update()` it should it look like: {{{ #!python self.dicts[0].update(other_dict) }}} ggetzie SmileyChris   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
    );
Powered by Datasette · Query took 591.89ms