41 rows where "changetime" is on date 2010-09-11

View and edit SQL

Suggested facets: stage, component, type, version, owner, keywords, has_patch, needs_better_patch, needs_tests, needs_docs, created (date), last_pulled_from_trac (date)

changetime (date)

  • 2010-09-11 · 41
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
1105 2005-12-22 02:38:20 2010-09-11 18:46:08 2019-06-24 00:27:00.934063 Design decision needed closed Template system defect normal   duplicate [patch] simple_tag decorator enhancement Attached is a patch for a tag function decorator that I find useful. It's a simple extension of Robert's simple_tag. The tag function is passed the context as the first argument and also any arguments to the tag, resolved in the same way as for the simple_tag decorator. The decorated function can manipulate the context and either return a string, which will be inserted into the template, or None. For example, this tag puts the project settings into the context: {{{ @register.simple_tag_with_context def get_settings(context): """ Put the project settings into the context. Usage:: {% get_settings %} """ from django.conf import settings context['settings'] = settings }}} And this one is the equivalent of the existing simple_tag example in NewAdminChanges: {{{ @register.simple_tag_with_context def monkey_tag(context, verb): return "I %s no evil" % verb }}} julien django@kieranholland.com   0 1 1 1 1 0
2616 2006-08-29 17:28:46 2010-09-11 19:28:11 2019-06-24 00:43:04.356217 Design decision needed closed Database layer (models, ORM) enhancement normal   wontfix Add DB API support for lookup against IP address fields please add an additional key word for querysets when searching with the inet datatype.. and example would be assume a table constructed as follows. create table network_interfaces( id serial, ip inet, interface char(20) ) --The SQL Syntax --- SELECT * from network_interface where ip << '10.210.0.0/16'; --possible Django syntax --- Interfaces.objects.filter(ip_within='10.210.0.0/16') Thanks. Django is a great project. nobody kirk.reeves@gmail.com   0 0 0 0 0 0
3169 2006-12-20 03:16:54 2010-09-11 19:01:01 2019-06-24 00:49:01.501940 Design decision needed closed Template system enhancement normal master wontfix A template tag for listing/linking to nearby pages in pagination should be provided. object_list should pass a list of pages nearby so an index of links can be created. A list of links to pages near by the current page are is a common feature of pagination. So it seems sensible to implement it in this generic view. I understand generic views are meant to be simple but the majority of pagination has this feature and I would count it as a core feature of pagination. nobody Grimboy sprintsept14 0 1 0 0 0 0
3620 2007-03-01 17:37:13 2010-09-11 19:41:39 2019-06-24 00:53:45.990819 Design decision needed closed Core (Management commands)     master duplicate test suite aborts with mysql 4.1 With the test fixtures, the test suite aborts (not a regular failure!) with these messages: {{{ Doctest: modeltests.transactions.models.__test__.API_TESTS ... ok Doctest: modeltests.validation.models.__test__.API_TESTS ... ok Error: Database django_test_db couldn't be flushed. Possible reasons: * The database isn't running or isn't configured correctly. * At least one of the expected database tables doesn't exist. * The SQL was invalid. Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run. The full error: (1192, "Can't execute the given command because you have active locked tables or an active transaction") }}} If I go to the commit before the test fixtures, only the json tests fail (because of the forward reference problem). I use mysql 4.1.11a-4sarge7 from debian with InnoDB storage. nobody mir@noris.de   0 1 0 0 0 0
3695 2007-03-10 08:52:58 2010-09-11 17:55:09 2019-06-24 00:54:33.258252 Ready for checkin closed contrib.admin     master fixed duplicate html id's in doc pages Whilst trying to fix #2411 (Validation errors in template filters/tags documentation) I came across this minor issue. The templates loop over each tag/filter, and title them with something like {{{<h3 id="{{ tag.name|escape }}">{{ tag.name|escape }}</h3>}}}. When there are two template tags named the same, then there will be an id clash, causing an (x)html validation error (and the anchor tags won't work properly for the two duplicate id's): {{{ # Error Line 525 column 12: ID "filter" already defined. <h3 id="filter">filter</h3> An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element). }}} Currently, this is only an issue in template_tag_index.html, where we have a {{{filter}}} tag in the defaulttags section and in the admin_list section. It can be fixed by prepending the library name to the id, so that each one will be unique. I'll add a patch once I've finished up #2411 simeon Simon G. <dev@simon.net.nz> admin, docs, xhtml 0 1 0 0 0 0
4031 2007-04-13 02:16:26 2010-09-11 21:27:11 2019-06-24 00:58:03.881659 Design decision needed closed Internationalization     master wontfix Translate to a specified language (not necessarily the current session language) It would be very nice to be able to translate into any specified language at any time, especially in templates, e.g. {% trans "Change language to", "fr" %} {% trans "French", "fr" %} {% trans "Change language to", "es" %} {% trans "Spanish", "es" %} or {% setlang "fr" %} {% trans "Change language to" %} {% trans "French" %} {% setlang "es" %} {% trans "Change language to" %} {% trans "Spanish" %} nobody temp@barnettweb.net translatation translate i18n i18n-nofix 0 0 0 0 0 0
4196 2007-05-01 17:18:26 2010-09-11 20:03:25 2019-06-24 00:59:48.026250 Design decision needed closed Contrib apps     master wontfix [patch] Use select_related() when retrieving a user profile To start with an example: {{{ >>> from django.contrib.auth.models import User >>> u = User.objects.get(pk=1) >>> p = u.get_profile() >>> p.user.username 'dave' >>> from django.db import connection >>> len(connection.queries) 3 }}} Even though I'm dealing with two database objects (a User and its profile) three queries were executed. The first to get the user, the second to get the profile, and the third to get the user again. If [http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/models.py#L260 line 257 in django/contrib/auth/models.py] was changed to use {{{select_related}}} the database would only be hit twice. It's a minor thing, but I thought I'd mention it. You know, just in case you guys ran out of patches to test and such. (If a user profile has lots of foreign key fields this could result in a lot of objects being created, which is why I've limited the depth to 1.) nobody Matt Riggott   0 1 0 0 0 0
4238 2007-05-07 18:28:53 2010-09-11 21:31:30 2019-06-24 01:00:14.833550 Design decision needed closed Generic views     master wontfix django.views.generic.simple should have a method to redirect to the absolute_url() of an object Would be a handy addition to the generic views which would allow you to redirect a URL to the get_absolute_url of an object. This can be used in many situations, the most common being URL changes. '/myoldurl/(?P<id>[0-9]+)/', 'django.views.generic.simple.redirect_to_absolute_url', {'pk': '%(id)s'} nobody David Cramer <dcramer@gmail.com>   0 0 0 0 0 0
4311 2007-05-16 13:25:39 2010-09-11 21:45:22 2019-06-24 01:01:01.699993 Design decision needed closed Core (Other)     master fixed urlresolvers.resolve and friends should return the name they resolved to. Now that urlresolvers.reverse and named URLPatterns are in place, I think it'd be good for resolve to return the name in addition to the callable and args/kwargs. This would allow app-level branching depending on URL to be simpler. As an example from a django-users list thread: {{{ is_login = request.path in ( settings.LOGIN_REDIRECT_URL, settings.LOGIN_URL, settings.LOGOUT_URL) if ((not is_login) and ... }}} If urlresolvers.resolve() returned, (callable, args, kwargs, name) rather than (callable, args, kwargs), (where name is the name assigned in the URLPattern definition), you could have simpler code that inspected URL names and decided what to do with less muss. {{{ if urlresolvers.resolve(url)[3].startswith('contrib.auth.urls.') }}} The 3 is icky and auth doesn't actually include an urls file, but you get the point. ;-) Further, it'd be good if names were nested based on includes in a way that mirrors URLResolver includes so that the name of anything included by an app was prefixed by that app name. For example: {{{ urlpatterns = ( ('^admin/', include('django.contrib.admin.urls') ) }}} Assuming the admin urls definition was changed to include things like this: {{{ ('^([^/]+)/([^/]+)/$', 'django.contrib.admin.views.main.change_list', name='change_list'), }}} Then a request path resolving to the admin change list would include a return name of 'django.contrib.admin.urls.change_list'. I imagine the advice that urlconf names be global-ish is just due to current implementation limitation. :) http://www.djangoproject.com/documentation/url_dispatch/#naming-url-patterns nobody Jeremy Dunck <jdunck@gmail.com>   0 0 0 0 0 0
4794 2007-07-07 13:53:27 2010-09-11 20:14:43 2019-06-24 01:06:11.923873 Design decision needed closed *.djangoproject.com     master invalid Use CSS :target pseudo class That's a tiny tiny feature request: Use the :target pseudo class in the documentation. Wikipedia has it too. When you click an anchor the headline you want is highlighted. Would be cool. Just add {{{ #!css #content-main a:target }}} in the line where {{{ #!css #content-main a:hover }}} is. nobody anonymous feature request css 0 0 0 0 0 0
5023 2007-07-31 04:50:47 2010-09-11 20:15:54 2019-06-24 01:08:39.673628 Design decision needed closed Generic views     master wontfix Tighten security around generic views Forms with edit_inline fields include the PK in hidden inputs. However, this should not be trusted. If PK was specified and no related object was retrieved, then reset the PK to NULL. A new row will be created instead of modifying an existing row. You should be able to test this by adding a hidden input to the top of mymodel_form.html to an unpatched system. This will result in a child row being hijacked from another parent. {{{ Index: db/models/manipulators.py =================================================================== --- db/models/manipulators.py (revision 5773) +++ db/models/manipulators.py (working copy) @@ -168,7 +168,10 @@ try: old_rel_obj = getattr(self.original_object, related.get_accessor_name()).get(**{'%s__exact' % related.opts.pk.name: rel_new_data[related.opts.pk.attname][0]}) except ObjectDoesNotExist: - pass + # Security: PK should not be trusted as it comes from the web. + # if PK is in the POSTed data, and an object was not fetched from the database + # then reset it's PK to NULL + rel_new_data[related.opts.pk.name][0] = u'' for f in related.opts.fields: if f.core and not isinstance(f, FileField) and f.get_manipulator_new_data(rel_new_data, rel=True) in (None, ''): }}} nobody Chui Tey   0 1 0 0 0 0
5048 2007-08-01 19:26:24 2010-09-11 22:21:08 2019-06-24 01:08:55.779818 Design decision needed closed Template system     master wontfix Allow TypeError exceptions to propagate in templates This patch fixes a gotcha by counting the number of entries in the traceback. More than 1 entry means the exception happened somewhere in the method. nobody Jan Rademaker <j.rademaker@gmail.com>   0 1 0 0 0 0
5065 2007-08-03 03:21:06 2010-09-11 22:18:30 2019-06-24 01:09:06.772585 Design decision needed closed Core (Other)     master wontfix Add a post_reset signal to "manage.py reset <app>" Currently, there's no equivalent signal to syncdb's post_syncdb for reset. Since reset re-creates a given app's DB elements, it would be useful to be able to perform a subset of the similar types of activities that are done with post_syncdb. Also, this models the way that all apps are polled for their management.py during syncdb, in case resetting one app has effects on other apps that should be handled via the signal. nobody gav@thataddress.com post_syncdb post_reset reset management.py 0 1 0 0 0 0
5140 2007-08-12 15:02:04 2010-09-11 20:19:29 2019-06-24 01:09:55.870387 Design decision needed closed Template system     master worksforme url templatetag should raise exception on invalid path I just stumbled across the fact, that the '''url templatetag''' silently accepts any path to a view - no matter if it exists or not. In the module django.template.defaulttags I have seen, that after processing the templatetag an URLNode is generatet and afterwards rendered. {{{ def render(self, context): from django.core.urlresolvers import reverse, NoReverseMatch args = [arg.resolve(context) for arg in self.args] kwargs = dict([(smart_str(k,'ascii'), v.resolve(context)) for k, v in self.kwargs.items()]) try: return reverse(self.view_name, args=args, kwargs=kwargs) except NoReverseMatch: try: project_name = settings.SETTINGS_MODULE.split('.')[0] return reverse(project_name + '.' + self.view_name, args=args, kwargs=kwargs) except NoReverseMatch: return '' }}} The last try-catch-block which catches the second NoReverseMatch exception is causing the troubles. At least in my eyes.[[BR]] I would find it much more convenient if I actually get the exception when I cause such an error. This would have saved my some time today, as I created such an error during my Django studies. adrian oliver.andrich@gmail.com url templatetag 0 1 0 0 0 0
5293 2007-08-29 14:08:15 2010-09-11 20:20:11 2019-06-24 01:11:46.415739 Design decision needed closed Core (Other)     master wontfix adding sql functions to order_by clause handling The attached patch enables the use of a sql function in a order_by clause. example: Publication.objects.order_by("-year(date)") will produce the following SQL: ... ORDER BY YEAR(date) DESC use case: when ordering according to multiple fields to group by year, and then say by publication type, if we use the date to order, the publication type is used only if the whole date is the same. to group publications by year in the order clause, I could not find a solution. Publication.objects.order_by("-date.year", "author") does not work but Publication.objects.order_by("-year(date)", "author") does. I suspect there are other use cases. caveats: The provided patch does not changes the way the deprecated syntax for ordering is handled (in orderlist2sql) nobody rb.online@gmail.com order_by 0 1 0 1 0 0
5297 2007-08-29 21:55:06 2010-09-11 20:20:46 2019-06-24 01:11:49.506673 Design decision needed closed Template system     master wontfix Backwards incompatibility introduced in [5091]: obj.has_key(x) -> x in obj In [5091], Django was changed to favor "key in container" rather than "container.has_key(key)". This inadvertantly introduced a backwards incompatibility. " ...[I]f you have PyXML installed for all the extra goodies that supplies, that is transparently into the xml.* namespace (via _xmlplus) ... in that case, AttributesImpl is missing a feature." and " ...[P]ushing an instance of xml.sax.xmlreader.AttributesImpl onto my Context..., no matter what the value... is, what's passed to xml.sax.xmlreader.AttributesImpl is int(0). This was causing a KeyError in template attribute lookup. " On July 17, Malcolm said he'd back out the affecting changes, but it hasn't been done. This should either be backed out or noted as an incompatibility. And it'd be nice if PyXML were fixed. :) (See thread for more detail: http://groups.google.com/group/django-developers/browse_thread/thread/2ae80a504fa31d81/87b693ce3e52fcf2 ) nobody jdunck   0 0 0 0 0 0
5304 2007-08-30 17:39:30 2010-09-11 22:30:15 2019-06-24 01:11:54.881512 Design decision needed closed Database layer (models, ORM)     master invalid timezone aware datetime causes error when saving on mysql It appears that the mysql database engine doesn't support timezone aware datetimes. Although I always save datetime with the timezone set to the TIME_ZONE settings, I have an error. It works on Postgres. Way to reproduce it: - Create a Model with a DateTimeField field - Create an object and set this field to a timezone aware datetime - Save it: {{{ Traceback (most recent call last): File "<console>", line 1, in <module> File "/Volumes/MacData/Users/juju/mixin/events/models.py", line 472, in save super(MxEvent, self).save() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/models/base.py", line 251, in save ','.join(placeholders)), db_values) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/backends/util.py", line 19, in execute return self.cursor.execute(sql, params) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/MySQLdb/cursors.py", line 168, in execute if not self._defer_warnings: self._warning_check() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/MySQLdb/cursors.py", line 82, in _warning_check warn(w[-1], self.Warning, 3) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/warnings.py", line 62, in warn globals) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/warnings.py", line 102, in warn_explicit raise message Warning: Out of range value for column 'start_date' at row 1 }}} Work around: Save non timezone aware datetime. nobody jvisinand@gmail.com timezone aware datetime causes error when saving on mysql 0 0 0 0 0 0
5309 2007-08-31 01:42:07 2010-09-11 22:32:01 2019-06-24 01:11:58.112383 Design decision needed closed Database layer (models, ORM)     master fixed [Patch] Marking instances as db-stored via is_stored This patch adds a flag to instance called 'is_stored'. By default it is set to None. When a DB instance is available in the database it is True, and when its removed it is False. This corrects the need for Django guessing based on the PK value if it needs to try to do an update or insert, and should throw exceptions if you try to do an insert (.create) when a matching pk exists. nobody David Cramer <dcramer@gmail.com> is_stored feature 0 1 1 1 1 0
5354 2007-09-07 09:58:26 2010-09-11 20:23:16 2019-06-24 01:12:27.038305 Design decision needed closed Core (Other)     master wontfix django imports minidom (which imports pyexpat) causing a modpython segfault on certain setups Changeset [5990] introduces and uses the {{{django.utils.version.get_svn_revision()}}} function which uses minidom.parse(). With certain combinations of Apache and mod_python versions, the version mismatch of {{{libexpat}}} used by both of them causes an Apache crash (segmentation fault on Linux). Apparently the problem has been worked around in Python 2.5. For the inexperienced mod_python user this problem can be really hard to track down, since the symptoms are just empty web pages from the server and segmentation faults with no additional explanation in the Apache error log. Would it be wise to avoid using {{{minidom}}} to avoid potential frustration for new users who might have a problematic setup? Currently minidom is only used in {{{get_svn_revision()}}} and the {{{isValidHTML()}}} and {{{isWellFormedXml()}}} functions in {{{django.core.validators}}}. Maybe these cases could be solved with other tools? adrian akaihola crash segfault 0 0 0 0 0 0
5392 2007-09-10 17:11:15 2010-09-11 22:49:08 2019-06-24 01:12:51.904595 Design decision needed closed contrib.admin     newforms-admin fixed [newforms-admin] - hooks for template names I think it is possible to have more admin sites in one project. And it would be nice to have different default templates for these two sites - these templates should be independent on application. So I would like to have some hooks as changelist_templates, add_templates and so on. For example this code could be changed: {{{ #!python class ModelAdmin(BaseModelAdmin): def changelist_view(self, request): ### ... return render_to_response(['admin/%s/%s/change_list.html' % (app_label, opts.object_name.lower()), 'admin/%s/change_list.html' % app_label, 'admin/change_list.html'], context_instance=c) }}} New variant: {{{ #!python class ModelAdmin(BaseModelAdmin): def changelist_view(self, request): ### ... return render_to_response(self.changelist_templates(app_label, opts.object_name.lower()), context_instance=c) def changelist_templates(self, app_label, object_label): return ['admin/%s/%s/change_list.html' % (app_label, opts.object_name.lower()), 'admin/%s/change_list.html' % app_label, 'admin/change_list.html'] }}} I haven't need it yet so I have no patch. But it is no problem for me to create it - if you think it is a good idea. nobody Petr Marhoun <petr.marhoun@gmail.com> nfa-someday 0 0 1 0 0 0
5421 2007-09-13 16:04:20 2010-09-11 20:24:12 2019-06-24 01:13:10.973730 Design decision needed closed Database layer (models, ORM)     master fixed Add "db_select" hooks for database Fields I'm proposing a "db_select" method on the database {{{Field}}} class. This would specify the raw SQL to use when listing the field in the {{{SELECT}}} clause of an SQL statement. This will allow for more useful SELECTs in the case of opaque data types such as PostGIS "geometry" fields, which are returned by default as an encoded series of bytes. It could also allow certain fields, such as BLOBs, to *never* be returned in a SELECT statement. (I'm 50/50 on this particular idea.) {{{ #!python class Field: def db_select(self, table): # Default behavior is to select the column name. return '%s.%s' % (table, self.db_column) class GeometryField(Field): def db_select(self, table): # For a PostGIS geometry field, select the textual version of the geometry. return 'AsText(%s.%s)' % (table, self.db_column) class BlobField(Field): def db_select(self, table): # None means "Don't ever include this field in a SELECT list." return None }}} nobody adrian feature_request 0 0 0 0 0 0
5500 2007-09-15 20:09:20 2010-09-11 23:00:13 2019-06-24 01:14:05.297636 Design decision needed closed contrib.admin     master wontfix Add an adminindex templatetag The adminindex command ''[removed in r8548 --JKM]'' can only act on one site. Replacing its functionality with a templatetag, or possibly just an include would be a more robust solution. jezdez jkocherhans sprintdec01 edit inline add 0 1 1 0 0 0
5519 2007-09-17 01:12:24 2010-09-11 23:50:29 2019-06-24 01:14:17.697685 Design decision needed closed Internationalization     newforms-admin wontfix Capitalized names for czech language In Django this kind of translations is used for my language: {{{ msgid "Add %s" msgstr "%s: přidat" msgid "Change %s" msgstr "%s: změnit" }}} So "Add contact" is translated as "kontakt: přidat" - title is not capitalized. So I would like if admin capitalizes all titles. It is possible, I use it in my branch. I thought that this kind of change should be sent to django-developers mailing list first. But there was no answer so there is a ticket. I would like to create patch - if you think that it can be applied. garcia_marc Petr Marhoun <petr.marhoun@gmail.com> nfa-someday 0 1 0 0 0 0
5606 2007-09-26 09:17:19 2010-09-11 23:58:19 2019-06-24 01:15:13.898716 Design decision needed closed Template system     master wontfix urlize filter should recognize only the characters which URL RFC specifies. Current implementations of urlize filter which uses the code in utils/html.py recognizes URL by splitting the text into many words. But in Korean (or Japanese) language, this implementation may cause some problems. There is a concept of '조사 (postpositional word)' which is represented as one or more characters following an word ''without'' any spaces. For example,[[BR]] `"나는 http://example.com을 추천합니다."` means, `"I recommend http://example.com."`. [[BR]] The character '을' is not a part of URL, but the current urlize implementation recognizes it as a part of URL. Of course, because there may exist URLs including unicode Korean characters, deciding which character should be excluded from URL is somewhat confusing. However, those cases are very rare because most of Korean URLs are encoded like `'http://example.com/tags/%EB%B8%94%EB%A1%9C%EA%B7%B8'` (`'http://example.com/tags/블로그'` in utf-8 encoding). So I suggest you to modify the code using only characters US-ASCII code for URL auto-linking as specified in [http://www.faqs.org/rfcs/rfc1738.html RFC 1738]. nobody daybreaker12@gmail.com   0 0 0 0 0 0
6290 2007-12-30 20:21:28 2010-09-11 20:36:38 2019-06-24 01:22:35.867546 Design decision needed closed Contrib apps     master wontfix profanity filter A feature that would live somewhere in contrib-- It would contain a template filter that replaces profanity with *** or @!%#$(#! It would be easy to write, and it could be configured to use either a static list, or use the webpurify.com api. nobody programmerq template filter profanity 0 0 0 0 0 0
7435 2008-06-12 14:52:20 2010-09-11 00:20:36 2019-06-24 01:35:02.319748 Ready for checkin closed Core (Other)     master fixed get_{next,previous}_by_someDateField() on unsaved objects should throw meaningfull error As stated on [http://groups.google.com/group/django-developers/browse_thread/thread/ea2040fde4c62c0f this thread] when you call self.get_{next,previous}_by_someDateField() on an unsaved object Django says something like: "Cannot use None as a query" The error could be something easier to understand like "Cannot query over an unsaved object". telenieko telenieko   0 1 0 0 0 0
7815 2008-07-18 18:32:42 2010-09-11 19:16:33 2019-06-24 01:39:07.736566 Design decision needed closed Template system     master wontfix Let Context handle include, extends and inclusion_tag template loading * Add a `loader` kwarg to `Context` which should be something with a `get_template(name)` function. Default would be `django.template.loader`. * Provide `get_template()` and `select_template()` methods on `Context`, use these in include, extends and inclusion_tag. * Cache templates in `Context`, optionally: provide a way to populate this cache. * Remove `ConstantIncludeNode` since caching would provide the same benefits and it causes problems with recursive includes. This would fix * #2949 - templating engine too tightly tied to TEMPLATE_DIRS in the settings * #3544 - recursive includes * #4278 - get_template should accept a dirs argument * #6834 - support for templates to be loaded from dynamically-selected directories Example: {{{ #!python class PrefixLoader: def __init__(self, prefix_list): self.prefix_list = prefix_list def get_template(name): from django.template.loader import select_template return select_template(['%s/%s' % (prefix, name) for prefix in self.prefix_list]) tpl.render(Context({}, loader=PrefixLoader(['a', 'b', 'c']))) }}} nobody emulbreh feature 0 0 0 1 1 0
7952 2008-07-25 05:48:19 2010-09-11 04:22:16 2019-06-24 01:40:36.300084 Design decision needed closed contrib.auth     master fixed Auth messages should accept a label parameter If one wants to differenciate an user message created with auth to an user, this *one* should be able to. Like, request.user.message_set.create(label="warning", message="Do not poke your nose!") Label could/should be optional. Or something like that. So, the developer would be able to color the output message easyly. This seems like a useful and simple ticket.   italomaia message, user, coloring 0 0 0 0 0 0
8765 2008-09-01 16:41:34 2010-09-11 03:25:44 2019-06-24 01:50:24.925910 Ready for checkin closed HTTP handling     master fixed mod_python handler requires explicit str() cast for HttpResponse(mimetype=...) mod_python assumes content_type to be an ASCII string, while django uses unicode strings everywhere. For example, the following code: {{{ #!python att = Attachment.objects.get() return HttpResponse(content=att.file, mimetype=att.content_type) }}} works in django dev server, but crashes in mod_python: {{{ Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", line 210, in handler return ModPythonHandler()(req) File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", line 193, in __call__ req.content_type = response['Content-Type'] TypeError: content_type must be a string }}} so the only way to make it work is to cast explicitely: {{{ #!python return HttpResponse(content=att.file, mimetype=str(att.content_type)) }}} The str() cast needs to be moved into core/handlers/modpython.py, which already applies it for all headers except Content-Type (since it's handled separately). nobody semenov mod_python content-type mimetype 0 1 0 0 0 0
9966 2009-01-05 15:38:27 2010-09-11 08:37:25 2019-06-24 02:03:19.565303 Ready for checkin closed Generic views     1.0 fixed Generic view "redirect_to" to carry existing query string The "redirect_to" generic view currently does not pass along any query string that may exist in the original request. An extra parameter could be added to "redirect_to", specifying if the original query string should be appended or not. See the following thread: http://groups.google.com/group/django-users/browse_frm/thread/4566f4040cef518a/8bfcd6ddd4ebb9f5 nobody FilipeCorreia   0 1 0 0 0 0
12632 2010-01-18 00:39:06 2010-09-11 02:30:39 2019-06-24 02:32:12.163900 Ready for checkin closed Core (Other)     master fixed Creation of SortedDict's has non-linear performance Specifically line 81 causes this: http://code.djangoproject.com/browser/django/trunk/django/utils/datastructures.py#L67, resulting in O(n**2) performance. There are 2 solutions that I can see, 1) maintain an auxilliary set() containing names that were already inserted in __init__, alternatively just use the update() implementation here. A third possible option is to drop our own implementation of SortedDict and bundle the OrderedDict implementation from CPython 3.1/2.7. Alex Alex   0 1 0 0 0 0
13149 2010-03-18 22:42:40 2010-09-11 18:38:25 2019-06-24 02:37:58.763580 Ready for checkin closed contrib.admin     1.2 fixed ForeignKeyRawIdWidget doesn't handle invalid values #11465 added a check for values which do not exist but does not help in the case where a user or fuzzer enters a non-integer value into a raw id field. Ticket #9209 tracks the change to !ModelChoiceField to add a validation error but !ForeignKeyRawIdWidget.label_for_value will trigger another attempting to label the invalid value. The attached patch or http://github.com/acdha/django/commit/fb87e1a3bba33fd9fae7a0a0fe3a380d7b25d05c addresses this as well. acdha acdha raw_id_fields, sprintSep2010 0 1 0 0 0 0
13215 2010-03-26 02:27:59 2010-09-11 02:03:33 2019-06-24 02:38:41.860833 Accepted closed Core (Other)     1.1 fixed Random OperationalError when using FastCGI prefork + PostgreSQL To reproduce: 1. Setup a Django project with FCGI in prefork mode python manage.py runfcgi method=prefork 2. Use psycopg2 as the database handler 3. Setup an async FCGI web server to use your daemon (Cherokee, Lighttpd, Nginx) Randomly, some requests will result in the following traceback: {{{ File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 140, in root if not self.has_permission(request): File "/usr/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 99, in has_permission return request.user.is_authenticated() and request.user.is_staff File "/usr/lib/python2.6/site-packages/django/contrib/auth/middleware.py", line 5, in __get__ request._cached_user = get_user(request) File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py", line 83, in get_user user_id = request.session[SESSION_KEY] File "/usr/lib/python2.6/site-packages/django/contrib/sessions/backends/base.py", line 46, in __getitem__ return self._session[key] File "/usr/lib/python2.6/site-packages/django/contrib/sessions/backends/base.py", line 172, in _get_session self._session_cache = self.load() File "/usr/lib/python2.6/site-packages/django/contrib/sessions/backends/db.py", line 16, in load expire_date__gt=datetime.datetime.now() File "/usr/lib/python2.6/site-packages/django/db/models/manager.py", line 93, in get return self.get_query_set().get(*args, **kwargs) File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 304, in get num = len(clone) File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 160, in __len__ self._result_cache = list(self.iterator()) File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 275, in iterator for row in self.query.results_iter(): File "/usr/lib/pyt… jbronn hcarvalhoalves   0 0 0 0 0 0
13390 2010-04-20 17:35:57 2010-09-11 21:28:00 2019-06-24 02:40:34.557440 Ready for checkin closed Forms     1.2-beta fixed Using AdminSplitDateTime and clean method in DateTimeField '''models.py''' {{{ class Order(models.Model): delivery_time_start = models.DateTimeField('Delivery Start', blank=True, null=True) delivery_time_end = models.DateTimeField('Delivery End', blank=True, null=True) }}} '''forms.py''' {{{ from django.contrib.admin import widgets class OrderForm(forms.ModelForm): class Meta: model = Order widgets = { 'delivery_time_start': widgets.AdminSplitDateTime(), 'delivery_time_end': widgets.AdminSplitDateTime(), } }}} When I try to leave field '''''delivery_time_start ''''' and '''''delivery_time_end''''' empty, I have error: ''"Enter a valid date/time."'' cause '''clean''' method in DateTimeField get value - list of 2 empty string [u"", u""]: {{{ def clean(self, value): """ Validates that the input can be converted to a datetime. Returns a Python datetime.datetime object. """ super(DateTimeField, self).clean(value) if value in EMPTY_VALUES: return None if isinstance(value, datetime.datetime): return value if isinstance(value, datetime.date): return datetime.datetime(value.year, value.month, value.day) if isinstance(value, list): # Input comes from a SplitDateTimeWidget, for example. So, it's two # components: date and time. if len(value) != 2: raise ValidationError(self.error_messages['invalid']) value = '%s %s' % tuple(value) }}} , but '''EMPTY_VALUES''' has only None and "". So, solution is - '''EMPTY_VALUES''' must contains list of 2 empty string. nobody vaxXxa AdminSplitDateTime 0 1 0 0 0 0
13531 2010-05-13 14:15:50 2010-09-11 00:08:20 2019-06-24 02:42:05.870491 Unreviewed closed Uncategorized     1.2-beta invalid django.core.files.File throws an exception on _get_size The File _get_size() function incorrectly uses self.file.name as a path. When using a custom FileStorage like storage object, the files name and actual path may be different. This will trigger an AttributeError even though the file actually exists on disk and is readable. tobias aarond10 File, Exception 0 0 0 0 0 0
13632 2010-05-27 14:22:22 2010-09-11 19:22:23 2019-06-24 02:43:10.367828 Unreviewed closed Documentation     master wontfix lack of builtin range checking of id fields The lack of builtin range checking for id fields is a vulnerability. {{{ /service/docserver/papers/3/ --> produces a document /service/docserver/papers/6578/ --> produces 404 page /service/docserver/papers/9999999999999999999/ --> throws OverflowError }}} Traceback is at http://paste.pocoo.org/show/218865/ I think the last case should throw !DoesNotExist instead of causing server error. In the case at hand I used generic views and sqlite3 DB backend. Of course, one can check this himself all over the places, however that would be against the DRY principle. Not to mention, it would be complicated when using generic views. glassresistor anonymous   0 0 0 0 0 0
14008 2010-07-26 10:42:37 2010-09-11 02:07:03 2019-06-24 02:47:19.444807 Unreviewed closed GIS     1.2 duplicate GeoDjango subquery fails with bad quoting This code (adapted from source code of http://github.com/mysociety/mapit ): {{{ areas = Area.objects.filter( polygons__polygon__contains = location, generation_low__lte = 13, generation_high__gte = 13 ) Code.objects.filter( area__in = areas ) }}} generates the following SQL (on a PostGIS database): {{{ SELECT "areas_code"."id", "areas_code"."area_id", "areas_code"."type", "areas_code"."code" FROM "areas_code" WHERE "areas_code"."area_id" IN ( SELECT U0."id" FROM "areas_area" U0 INNER JOIN "areas_geometry" U1 ON (U0."id" = U1."area_id") WHERE (ST_Contains("U1"."polygon", ST_GeomFromWKB('\\001\\001\\000\\000\\000\\000\\000\\000\\000\\000j\\030A\\000\\000\\000\\000\\200O\\022A', 27700)) AND U0."generation_high_id" >= 13 AND U0."generation_low_id" <= 13 ) ); }}} which gives this error: {{{ ERROR: missing FROM-clause entry in subquery for table "U1" LINE 1: ...U1 ON (U0."id" = U1."area_id") WHERE (ST_Contains("U1"."poly... }}} It appears that the "U1" must '''not''' be quoted in the first argument to ST_Contains, as then it works fine: {{{ SELECT "areas_code"."id", "areas_code"."area_id", "areas_code"."type", "areas_code"."code" FROM "areas_code" WHERE "areas_code"."area_id" IN ( SELECT U0."id" FROM "areas_area" U0 INNER JOIN "areas_geometry" U1 ON (U0."id" = U1."area_id") WHERE (ST_Contains(U1."polygon", ST_GeomFromWKB('\\001\\001\\000\\000\\000\\000\\000\\000\\000\\000j\\030A\\000\\000\\000\\000\\200O\\022A', 27700)) AND U0."generation_high_id" >= 13 AND U0."generation_low_id" <= 13 ) ); id | area_id | type | code -------+---------+---------+-------- 14532 | 9498 | unit_id | 148 14531 | 9498 | ons | 00CUGA 44890 | 65890 | unit_id | 24640 17586 | 11809 | unit_id | 41426 2324 | 2546 | unit_id | 72 2323 | 2546 | ons | 00CU (6 rows) }}} I did look at the code to try and see what does the quoting or inner joining, but I'm afraid I couldn't work it out, sorry. nobody Matthew   0 0 0 0 0 0
14071 2010-08-06 18:38:32 2010-09-11 00:08:57 2019-06-24 02:47:59.832006 Unreviewed closed contrib.admin     1.2 wontfix Row duplicated when modifying PK Create a model and add a field with primary_key=True Go into the django admin panel and change this primary key. A new entry is added with the new PK, but the old one remains as well. Sample model: class FlatPage(Model): title = CharField(max_length=50) key = SlugField(max_length=50, primary_key=True, help_text="Do not change.") content = TextField() created = DateTimeField(auto_now_add=True) updated = DateTimeField(auto_now=True) def __unicode__(self): return self.title class Meta: app_label = 'app' nobody mnbayazit   0 0 0 0 0 0
14125 2010-08-17 15:56:06 2010-09-11 00:48:42 2019-06-24 02:48:34.211331 Design decision needed closed Uncategorized     master duplicate 'Safe strings' are not force-escaped on development 500 page In the 'Local vars' section of the debugging 500 error page, strings that have been 'marked safe' are not escaped before output, which has often resulted in HTML from my variables being inserted into the page. While using 'mark_safe' on a string variable indicates that the string should not be escaped further, I think an exception should be made for the debugging 500 page, based on my assumption that most developers would rather see a string's value than the resultant HTML elements. I have attached a patch that uses 'force_escape' in lieu of 'escape'. elijahr elijahr debug.py 500 escape 0 1 0 1 0 0
14218 2010-09-02 18:14:16 2010-09-11 23:04:32 2019-06-24 02:49:33.817930 Unreviewed closed Uncategorized     1.2 wontfix Paginator just implement the __iter__ function Right now, when you want to iter into all the pages of a Paginator object you to use the page_range function. It would be more logical and naturel to use the normal python of doing that by implementing the __iter__ function like that: {{{ def __iter__(self): for page_num in self.page_range: yield self.page(page_num) }}} nobody mlhamel   0 0 0 0 0 0
14239 2010-09-09 11:54:36 2010-09-11 22:37:06 2019-06-24 02:49:46.975752 Unreviewed closed HTTP handling     1.2 wontfix Form input button embedded in <a /> crashes Django server I am running Ubuntu Lucid and got the default Django project setup without any apps included, created from Eclipse/Pydev. This only happens with Firefox but I reckon the problem is on the Django side, managing the HTTP requests, even though Firefox seems to send a double GET with the following setup. With the Pydev(1.6.2) debug server running in Eclipse, I constantly get this bug. With the server running from terminal, I get the bug only once at the beginning. The bug happens after pushing the input button (<input type="button">) in the browser. {{{ urls.py: def view(request): return HttpResponse('<html><body><a href="/"><input type="button"></a></body></html>') urlpatterns = patterns('', (r'^/?$', 'urls.view'), ) }}} ERROR: {{{ Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 281, in run self.finish_response() File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 321, in finish_response self.write(data) File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 400, in write self.send_headers() File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 464, in send_headers self.send_preamble() File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 382, in send_preamble 'Date: %s\r\n' % http_date() File "/usr/lib/python2.6/socket.py", line 300, in write self.flush() File "/usr/lib/python2.6/socket.py", line 286, in flush self._sock.sendall(buffer) error: [Errno 32] Broken pipe }}} nobody leeezly input button firefox 0 0 0 0 0 0

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
    );