tickets_full

29,846 rows sorted by severity

View and edit SQL

Suggested facets: stage, status, type, severity, resolution, easy, has_patch, needs_better_patch, needs_tests, ui_ux

These facets timed out: needs_docs

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
3317 2007-01-18 00:46:09 2007-01-19 03:18:51 2019-06-24 00:50:34.979581 Ready for checkin closed Documentation     master fixed Typoes in testing.txt Hi, I was reading [source:django/trunk/docs/testing.txt] and I found what seem two typoes, at least I think so ;) I attach a patch with the differences. jacob Marc Fargas <telenieko@telenieko.com>   0 1 0 0 0 0
3318 2007-01-18 01:37:31 2007-01-19 03:17:23 2019-06-24 00:50:35.641431 Ready for checkin closed Documentation     master fixed Out of date info on contributing.txt [source:django/trunk/docs/contributing.txt] has some info about patches that is actually outdated and includes a link to a report which no longer exists. The attached patch replaces the link to the no longer existing report 8 to a Custom Query to all tickets with the "Has Patch" checkbox marked. I didn't use the already available report [http://code.djangoproject.com/query?status=new&status=assigned&status=reopened&stage=Ready+for+checkin Tickets with patches ready for checkin] because on context the link should point to "all" tickets that have a patch, not only the ones marked ready for checkin. jacob Marc Fargas <telenieko@telenieko.com>   0 1 0 0 0 0
3319 2007-01-18 10:11:55 2007-02-26 21:36:14 2019-06-24 00:50:36.273166 Ready for checkin closed Documentation     master fixed [patch] django-admin.py/manage.py documentation missing a couple options The [http://www.djangoproject.com/documentation/django_admin/ official documentation] for `django-admin.py` and `manage.py` are missing documentation for two options: `reset` and `runfcgi`. The `reset` docs should be fairly simple to add, and I can work up a patch easily enough. I'm not sure about the best way to handle `runfcgi`, though; perhaps it should give a short summary (e.g., "launches the project as a FastCGI application") and link to the [http://www.djangoproject.com/documentation/fastcgi/ FastCGI deployment docs] for further information? jacob ubernostrum   0 1 0 0 0 0
3320 2007-01-18 11:16:25 2007-01-30 22:48:06 2019-06-24 00:50:36.902948 Ready for checkin closed Core (Serialization)     master fixed [patch] update simplejson to the 1.5 version Bob Ippolito just released simplejson 1.5, here are the notes: '' simplejson 1.5 is a major update that provides better Python 2.5 and Windows compatibility, and two new features that control encoding (indent for pretty-printing, and separators for generating optimally compact JSON). '' This patch updates django.utils.simplejson from 1.3 to 1.5 jacob LawrenceOluyede <l.oluyede@gmail.com>   0 1 0 0 0 0
3321 2007-01-18 14:28:36 2007-01-20 17:34:48 2019-06-24 00:50:37.554362 Ready for checkin closed Documentation     master fixed One more typo in docs/testing.txt In docs/testing.txt, line 16: {{{ framework, and range of utilities that can be used to stimulate and }}} the next-to-last word should be "simulate"! Although Django ''is'' stimulating, too. :) jacob russblau@imapmail.org   0 1 0 0 0 0
3322 2007-01-18 18:33:23 2011-10-09 12:44:57 2019-06-24 00:50:38.204769 Accepted closed Database layer (models, ORM)     master fixed [patch] UnicodeCursorWrapper does not accept dict-style format objects Django supports pyformat style format parameters (eg. http://code.djangoproject.com/changeset/3038). The change intended to add unicode support for postgresql queries restricts format objects to lists and tuples. The following patch reinstates dict format object passing. adrian kurtiss@meetro.com unicode-branch 0 1 0 0 0 0
3323 2007-01-18 19:06:43 2007-12-02 23:18:40 2019-06-24 00:50:38.832713 Ready for checkin closed Database layer (models, ORM)     master fixed Unhelpful error message in case of unresolved string relation ('str' object has no attribute '_meta') imagine the following model: {{{ class Test(models.model): rel = models.ForeignKey("bleh") }}} if the relation is not resolvable, in case of a typo or if it's in a different file, the user gets a rather unhelpful exception: {{{ Unhandled exception in thread started by <function inner_run at 0x2af9aa4e9668> Traceback (most recent call last): File "/home/alex/source/svn/django/django/core/management.py", line 1108, in inner_run validate() File "/home/alex/source/svn/django/django/core/management.py", line 1070, in validate num_errors = get_validation_errors(outfile) File "/home/alex/source/svn/django/django/core/management.py", line 936, in get_validation_errors for r in rel_opts.get_all_related_objects(): File "/home/alex/source/svn/django/django/db/models/options.py", line 127, in get_all_related_objects if f.rel and self == f.rel.to._meta: AttributeError: 'str' object has no attribute '_meta' }}} a quick hacky fix is attached, but i guess it should be done in django.core.management.validate nobody alex@gc-web.de sprintsept14 sprintdec01 0 1 0 0 0 0
3324 2007-01-18 20:08:19 2007-05-21 01:29:58 2019-06-24 00:50:39.460238 Ready for checkin closed Core (Serialization)     master fixed FloatFields are converted to decimal and simplejson cannot serialize when serializing objects from a MySQL DB containing FloatFields to JSON, the float values are converted to Decimal objects, which are not understood by simplejson: {{{ Traceback (most recent call last): File "blah/test.py", line 18, in ? test() File "blah/test.py", line 16, in test print serialize("json", Blah.objects.all()) File "/home/alex/source/svn/django/django/core/serializers/__init__.py", line 55, in serialize s.serialize(queryset, **options) File "/home/alex/source/svn/django/django/core/serializers/base.py", line 49, in serialize self.end_serialization() File "/home/alex/source/svn/django/django/core/serializers/json.py", line 19, in end_serialization simplejson.dump(self.objects, self.stream, cls=DateTimeAwareJSONEncoder, **self.options) File "/home/alex/source/svn/django/django/utils/simplejson/__init__.py", line 119, in dump for chunk in iterable: File "/home/alex/source/svn/django/django/utils/simplejson/encoder.py", line 220, in _iterencode for chunk in self._iterencode_list(o, markers): File "/home/alex/source/svn/django/django/utils/simplejson/encoder.py", line 143, in _iterencode_list for chunk in self._iterencode(value, markers): File "/home/alex/source/svn/django/django/utils/simplejson/encoder.py", line 223, in _iterencode for chunk in self._iterencode_dict(o, markers): File "/home/alex/source/svn/django/django/utils/simplejson/encoder.py", line 196, in _iterencode_dict for chunk in self._iterencode(value, markers): File "/home/alex/source/svn/django/django/utils/simplejson/encoder.py", line 223, in _iterencode for chunk in self._iterencode_dict(o, markers): File "/home/alex/source/svn/django/django/utils/simplejson/encoder.py", line 196, in _iterencode_dict for chunk in self._iterencode(value, markers): File "/home/alex/source/svn/django/django/utils/simplejson/encoder.py", line 231, in _iterencode for chunk in self._iterencode_default(o, markers): File "/home/alex/source/svn/djan… jacob alex@gc-web.de json decimal 0 1 0 0 0 0
3325 2007-01-18 21:00:36 2007-02-26 23:23:01 2019-06-24 00:50:40.093102 Ready for checkin closed Documentation     master fixed Include distribution specific notes The installation document does not cover distribution specific notes (like which packages to install and so on) and, belive or not, there are distributions that provide Django packages!! On the attachments there is: * install.diff where a note has been added linking to "distribution specific notes" * distributions.txt where distribution specific notes could be placed, I added the ones for Debian. I put it on a separate file as those instructions can get larger and there are lots of distributions around there. To advocate for the patch: * It makes it easier for people: "apt-get install python-django python-sqlite2" and you're on the road! * User gets Django upgraded automatically (that's the nice thing of having software packaged) * It places one more site that talks about Debian hehehehe. Hope it's ok, could not find any info about "extending" the documentation. jacob Marc Fargas <telenieko@telenieko.com>   0 1 0 0 0 0
3326 2007-01-19 00:08:16 2007-09-20 16:21:57 2019-06-24 00:50:40.695641 Ready for checkin closed *.djangoproject.com     master fixed Timeline RSS feed broken Try this link: [http://code.djangoproject.com/timeline?ticket=on&ticket_details=on&changeset=on&wiki=on&max=50&daysback=90&format=rss] It's the RSS feed for the timeline with all checkboxes marked (daysback=90 is set by TRAC) It gives that: {{{ 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 TracGuide — The Trac User and Administration Guide }}} nobody Marc Fargas <telenieko@telenieko.com> sprintsept14 0 1 0 0 0 0
3327 2007-01-19 02:38:51 2007-08-28 04:33:14 2019-06-24 00:50:41.301790 Accepted closed *.djangoproject.com       fixed no way to reopen tickets sorry, this might be a bother, but i was told to reopen my ticket when replying with some info. there's no way to do that, though. i don't know how you all review tickets, so i just wanted to make sure it gets seen. thanks! ticket number is #3279. jacob wbyoung@mcdonogh.org   0 0 0 0 0 0
3328 2007-01-19 03:08:05 2007-09-16 16:06:46 2019-06-24 00:50:41.919241 Design decision needed closed Database layer (models, ORM)     master wontfix null=True should imply blank=True For models, I can't ever think of a case when you would want `null=True` and '''not''' want `blank=True`. If there is, it's definitely rare, so having to enter both for the normal case seems redundant. Currently, for model fields, `blank` always defaults to `False`. This proposal is that `blank` is set to whatever `null` is set to unless explicitly given. nobody SmileyChris   0 1 0 0 0 0
3329 2007-01-19 10:28:25 2007-02-15 00:07:08 2019-06-24 00:50:42.544141 Ready for checkin closed Internationalization     master fixed [patch] Catalan translation Attached are the .po files for the Catalan translation. Just take this in consideration: * I'm not a Catalan teacher, and never was a good student at the subject. my only real trouble is with à è é í ó ò ú, if somebody finds a mistake please update ;) * On latin laguanges (at least) it's common to refer to the reader in a modality of the second person ("You" > "Usted", "Vosté") which has no direct translation to English, on personal sites you'd better use the usuarl second person translation ("You" > "tu"). This translation is written with the first case in mind (hence, for professional websites). Just take this in consideration, I'll write to i18n group about the implications of every approach :) anonymous Marc Fargas <telenieko@telenieko.com> i18n catalan 0 1 0 0 0 0
3330 2007-01-19 10:43:23 2007-01-19 11:13:35 2019-06-24 00:50:43.182936 Unreviewed closed Forms     master invalid importing newforms in shell throws AttributeError on URL_VALIDATOR_USER_AGENT In newforms/fields.py line 275 and on a check is done on the existence of URL_VALIDATOR_USER_AGENT with an exception handler on ImportError. But if you import newsforms on the shell (manage.py shell), an dAttributeError is thrown instead of an ImportError. suggested fix: add AttributeError to the exception handler in newforms/fields.py linke 278 adrian Fred   0 0 0 0 0 0
3331 2007-01-19 11:48:38 2007-07-21 05:19:26 2019-06-24 00:50:43.822990 Accepted closed Testing framework     master wontfix Client.login() fails when URL contains character requiring urlencoding I wrote a unittest using the Test Client. It was failing to log in to a page protected by @login_required, using the login() method. My path for the login method is '/video/+sub/'. The login() method was returning False, signifying login not possible, even though the username and password were correct. The reason for the login() failure is that the URL '/video/+sub/' becomes urlencoded as '/video/%2Bsub/' in the redirect to the login form, and the resulting redirect fails. (Why?) Workarounds are: * use a url without a '+' (not optimal in my application) * call login() on a different page first, then get() on my page with '+' in the url * Perhaps the handling of the urlencoded value is failing when it should succeed? That's beyond my current debugging experience. * change client.py as in the attached patch - a one line change to use the non-urlencoded value in ''path'' instead of the value passed through in ''next''. adrian Morgan Collett <morgan.collett@gmail.com> unittest urlencode 0 1 0 0 0 0
3332 2007-01-19 14:48:18 2007-01-19 18:20:31 2019-06-24 00:50:44.460623 Unreviewed closed contrib.admin     master duplicate field.attname should be used rather than using field.column field.attname should be used rather than using field.column line: 136 on django/contrib/admin/views/main.py {{{ def original_value(self): if self.original: # return self.original.__dict__[self.field.column] return self.original.__dict__[self.field.attname] }}} Otherwise, when "db_column" is used in primary_key field with foreign key, it will be error. adrian annonymous   0 0 0 0 0 0
3333 2007-01-19 17:26:48 2007-03-08 08:50:33 2019-06-24 00:50:45.107512 Ready for checkin closed Documentation     master fixed Documentation should use relative links, not hard-coded djangoproject.com links As suggested in [http://groups-beta.google.com/group/django-developers/browse_thread/thread/2ff4ccdcd9c0ad26/2e47d4d7d4685fa0 this django-developers thread], every document in our {{{docs}}} directory should have its {{{http://www.djangoproject.com/documentation/}}} links converted to relative links. This will make it easier for people to view documentation as HTML locally (see #528) and will solve the problem of old documentation linking to new documentation. I made an example change in [4358]. jacob adrian   0 1 0 0 0 0
3334 2007-01-19 18:02:37 2007-01-27 22:07:08 2019-06-24 00:50:45.716514 Accepted closed Forms     master fixed Dynamic Creation of newforms Persists field data Attached is a patch to the tests for newforms, showing that when passing in fields to dynamically created forms, the fields are persisting across multiple instances of the form. The current test fails as attached, returning field1, field2, field3, and field4 on the second print statement, when it should just return field3 and field4. adrian Deryck Hodge <deryck@samba.org>   0 0 0 0 0 0
3335 2007-01-19 19:31:53 2008-05-17 18:03:39 2019-06-24 00:50:46.339683 Design decision needed closed Contrib apps     master wontfix Flatpages with DEBUG=False requires 404.html While I think it is bad to '''not''' have a 404.html, I think this could be cleaner since it '''does''' work when DEBUG=False. This could lead to a broken site when it is deployed by simply changing the DEBUG setting, which I think is bad. If flatpages and DEBUG=False and 404.html doesn't exist it throws the error: {{{ Traceback (most recent call last): File "/opt/local/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 272, in run self.result = application(self.environ, self.start_response) File "/opt/local/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 614, in __call__ return self.application(environ, start_response) File "/opt/local/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 189, in __call__ response = self.get_response(request) File "/opt/local/lib/python2.4/site-packages/django/core/handlers/base.py", line 103, in get_response return callback(request, **param_dict) File "/opt/local/lib/python2.4/site-packages/django/views/defaults.py", line 78, in page_not_found t = loader.get_template(template_name) File "/opt/local/lib/python2.4/site-packages/django/template/loader.py", line 79, in get_template source, origin = find_template_source(template_name) File "/opt/local/lib/python2.4/site-packages/django/template/loader.py", line 72, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: 404.html }}} When DEBUG=False, get_response in core/handlers/base.py triggers the callback to the handler404 which is 'django.views.defaults.page_not_found' which eventually loads the template 404.html. If it doesn't exist, you get the error above. When DEBUG=True, get_response loads the django.views.debug.technical_404_response. I see two options for a fix (and one isn't really a "fix")... 1. Change documentation to say that flatpages require that you have a 404.html template. 2. Fix this so it works the same in both DEBUG states. If !#2 is the best … adrian Rob Hudson <treborhudson@gmail.com>   0 0 0 0 0 0
3336 2007-01-19 21:31:29 2007-01-23 16:28:31 2019-06-24 00:50:46.978772 Ready for checkin closed *.djangoproject.com       fixed Link to Ticket System on "Community" page is broken The link to the "Ticket system" on the [http://www.djangoproject.com/community/ community] page (under "Get Involved" in the right sidebar) links to http://code.djangoproject.com/newticket which now requires TICKET_CREATE privileges under the new ticket triage system. The result is an error message. The link should point to http://code.djangoproject.com/simpleticket instead. jacob ned.phillips@gmail.com   0 1 0 0 0 0
3337 2007-01-20 13:36:43 2007-01-20 17:26:00 2019-06-24 00:50:47.597638 Accepted closed Forms     master fixed [patch] newforms-fields better calls super(CLASS,self) instead class-method Field I looked into django.newforms.fields and saw that in the __init__() and the clean() method always calls to the Field.__init__() and Field.clean() method are made. In an more object oriented way those calls should be better super(CLASSNAME, self).__init__() and super(CLASSNAME, self).clean() adrian Dirk Datzert <dummy@habmalnefrage.de> super 0 1 0 0 0 0
3338 2007-01-20 18:04:12 2009-05-27 18:03:14 2019-06-24 00:50:48.255365 Design decision needed closed Uncategorized     master fixed build_rpm problems I build Django rpms on different python versions and different rpm versions. I always struggled over the INSTALLED_FILES where directories not prefixed with %dir any longer. This stopps some rpm build process to stop packaging since files under those directories resulted in an 'File listed twice' error. A simple rpm_install-script will fix this. jacob Dirk Datzert <dummy@habmalnefrage.de> build_rpm 0 0 0 0 0 0
3339 2007-01-20 18:32:33 2007-01-20 23:01:00 2019-06-24 00:50:48.897212 Unreviewed closed *.djangoproject.com     master duplicate RSS on code.djangoproject.com/timeline doesn't work after upgrade *Subj*. It fails with following error message: {{{ Internal Error Ticket changes, Ticket details event provider (TicketModule) failed: AttributeError: 'NoneType' object has no attribute 'lower' }}} jacob eugene@lazutkin.com   0 0 0 0 0 0
3340 2007-01-20 21:06:48 2007-01-20 21:12:20 2019-06-24 00:50:49.525329 Unreviewed closed contrib.admin     new-admin invalid Admin behavior when DEBUG is True (newforms version) While the new-admin interface is being built, I'd like to lobby for more shortcuts (e.g. less safeguards) when DEBUG is True. Usually this is the case when you're in development mode and using Admin. Specifically, in this mode it would be nice to delete single/multiple items from a list without having to confirm each deletion. adrian Jeff Bauer <jbauer@rubic.com>   0 0 0 0 0 0
3341 2007-01-21 03:56:03 2007-08-18 14:46:13 2019-06-24 00:50:50.156134 Accepted closed Documentation     master duplicate Man pages for executable scripts in django/bin/ I've been talking with people who maintain packages of Django for Linux distributions, and one concern that's come up is that they want to install the scripts from `django/bin/` into systemwide locations like /usr/bin/, but doing so usually requires a `man` page; it'd make their lives easier if we could provide properly-formatted `man` pages documenting those scripts. jacob ubernostrum man documentation 0 0 0 0 0 0
3342 2007-01-21 17:47:58 2007-01-23 10:23:13 2019-06-24 00:50:50.780672 Unreviewed closed Forms     master duplicate ForeignKey relation doesn't work with newforms form_for_model() save When having a model with ForeignKey(), clean_data returns unicoded integer of related-field, but django expects an instance of that model. Because of that model_save in newforms/models.py line 18, obj = self._model(**self.clean_data) fails. The solution is probably to resolve ForeignKey somewhere before but I'm not sure how to do this properly. adrian Jure Cuhalev <gandalf@owca.info> ForeignKey newforms 0 0 0 0 0 0
3344 2007-01-21 21:35:45 2011-10-09 12:44:57 2019-06-24 00:50:52.049125 Accepted closed Forms     master fixed newforms UnicodeEncodeError in EmailField on non-successful validation newforms EmailField causes UnicodeEncodeError exception in case when value isn't correct. {{{ Exception Type: UnicodeEncodeError Exception Value: 'ascii' codec can't encode character u'\u017a' in position 33: ordinal not in range(128) Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/newforms/forms.py in _html_output, line 103 }}} I spent some time for debugging and I found that what probably causes the error is: {{{ RegexField.__init__(self, email_re, max_length, min_length, gettext(u'Enter a valid e-mail address.'), required, widget, label, initial) }}} newforms/fields.py, line 267 (rev. 4386) When for debug purposes I changed gettext(u'Enter a valid e-mail address.') to anything else (ex. gettext(u'aaa')), the problem didn't occur and the 'aaa' validation error message was displayed like it should. This is probably a problem with translation file or so, but I'm just a Python/django/gettext newbie and I'm just starting my adventure with all of them, so I'm unable to debug it more. adrian bartekr UnicodeEncodeError EmailField gettext Polish Norwegian unicode unicode-branch 0 1 0 0 0 0
3345 2007-01-22 01:37:10 2007-03-15 04:13:32 2019-06-24 00:50:52.673820 Design decision needed closed contrib.admin       invalid Admin Search Fields From Related Models I'm trying to in the Admin Change List Form have the ability to search records via information from a related model. Example When in case_files I would like to search by Company Name, this information is stored in a separate object. Can this be possible? Below is a sample of the models.py Regards {{{ class company_record(models.Model): midas_number = models.CharField(maxlength=10, verbose_name='Midas Number') company_name = models.CharField(maxlength=200, verbose_name='Company Name') midas_parent = models.CharField(maxlength=10, verbose_name='Midas Parent Member Number') parent_name = models.CharField(maxlength=200, verbose_name='Parent Company Name') company_status = models.CharField(maxlength=100, verbose_name='Member Current Status') company_cat = models.CharField(maxlength=10, verbose_name='Company Category') def __str__(self): return self.midas_number + " - " + self.company_name class Admin: pass list_display = ('midas_number', 'company_name', 'midas_parent', 'parent_name', 'company_status', 'company_cat') list_display_links = ('midas_number', 'company_name') list_filter = ('company_cat', 'company_status') search_fields = ['company_name'] class Meta: verbose_name = "Company Record" class case_file(models.Model): midas_number_id = models.AutoField(primary_key=True) midas_number = models.ForeignKey(company_record, edit_inline=models.STACKED, num_in_admin=1, verbose_name="Company Name") fileid = models.CharField(maxlength=10, core=True, primary_key=True, verbose_name='File ID') file_state = models.CharField(maxlength=3, core=True, verbose_name='State') file_status = models.CharField(maxlength=10, core=True, verbose_name='File Current Status') file_open_date = models.DateField('File Open Date', core=True) file_close_date = models.DateField('File Close Date', core=True) owning_officer = models.CharField(maxlength=200, core=True, verbose_name='"Owning" Officer')… adrian rfreitag@aigroup.asn.au   0 0 0 0 0 0
3346 2007-01-22 04:22:26 2007-01-23 02:01:34 2019-06-24 00:50:53.312573 Ready for checkin closed Documentation     master fixed Document that Admin search_fields can be from related models See [http://code.djangoproject.com/ticket/3345#comment:5 this comment] in #3345 {{{ #!python search_field = ['midas_number__company_name'] }}} This feature isn't documented as far as I can see. jacob SmileyChris   0 1 0 0 0 0
3347 2007-01-22 16:52:25 2007-01-22 17:08:21 2019-06-24 00:50:53.956866 Unreviewed closed Uncategorized     master fixed wiki page DjangoPoweredSites needs reverted Akismet won't allow any normal revert of the vandalism to DjangoPoweredSites, as it responds "too many external links" and dies http://code.djangoproject.com/wiki/DjangoPoweredSites needs reverted to http://code.djangoproject.com/wiki/DjangoPoweredSites?version=54 jacob Collin Grady <cgrady@the-magi.us>   0 0 0 0 0 0
3348 2007-01-22 19:57:59 2007-01-22 20:03:46 2019-06-24 00:50:54.600367 Ready for checkin closed Uncategorized     master fixed Reopen #1961 Still seems to be an issue. Reopen please. jacob SmileyChris   0 0 0 0 0 0
3349 2007-01-22 20:08:02 2011-09-28 16:12:27 2019-06-24 00:50:55.259503 Accepted closed Template system     master fixed If an ImportError occurs within some loaders a rather confusing exception is raised. The problem is, when Django attempts to load a custom tag library (in source:django/trunk/django/template/__init__.py, in the {{{get_library()}}} function), it ''traps'' all {{{ImportError}}}'s, regardless of where they are ''thrown'' from: {{{ try: mod = __import__(module_name, {}, {}, ['']) except ImportError, e: raise InvalidTemplateLibrary, "Could not load template library from %s, %s" % (module_name, e) }}} An example... If I have a "view" like so: {{{ def my_view(request): return render_to_response('my.tpl', {}) }}} ...And a corresponding template: {{{ {% load tag_lib %} <h1>my template</h1> ... }}} ...Now, here's the tag library {{{tag_lib}}}: {{{ import notthere ... }}} ...Invoking our view, now, will yield a not-very-easy-to-understand (unless you already know the problem) error message: {{{ TemplateSyntaxError at /my_view 'tag_lib' is not a valid tag library: Could not load template library from django.templatetags.tag_lib, No module named notthere Request Method: GET Request URL: http://localhost:8000/my_view Exception Type: TemplateSyntaxError Exception Value: 'tag_lib' is not a valid tag library: Could not load template library from django.templatetags.tag_lib, No module named notthere Exception Location: /usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/template/defaulttags.py in load, line 692 }}} You may need to look closely to notice that the root of the problem was that our tag library tried to load a module {{{notthere}}}; the problem ''was not'' that we tried to load a non-existant tag library. This is essentially the same message that you will get when trying to load a tag library that is completely non-existant - i.e., if our template were: {{{ {% load not_tag_lib %} <h1>my template</h1> ... }}} We would now see the error message: {{{ TemplateSyntaxError at /my_view 'not_tag_lib' is not a valid tag library: Could not load template library from django.templatetags.not_tag_lib, No module named n… nobody Chris Wagner <cw264701@ohiou.edu>   0 1 0 1 0 0
3350 2007-01-22 23:25:17 2007-09-15 18:11:44 2019-06-24 00:50:55.893254 Ready for checkin closed Core (Other)     master fixed Django should call time.tzset after setting TZ environment variable. After reading #2315 I spoted this on python's documentation: {{{ Note: Although in many cases, changing the TZ environment variable may affect the output of functions like localtime without calling tzset, this behavior should not be relied on. The TZ environment variable should contain no whitespace. }}} So, Django should call tzset after setting the TZ environment variable! Origin: [http://docs.python.org/lib/module-time.html] anonymous Marc Fargas <telenieko@telenieko.com>   0 1 0 0 0 0
3351 2007-01-23 01:39:49 2007-02-12 00:22:22 2019-06-24 00:50:56.556627 Ready for checkin closed Template system     master fixed Add block name to endblock (feature request) For some large pages, I find it useful to add comments showing the names of the blocks that an "endblock" is for: {{{ {% block outer %} .. many lines here ... {% block inner %} .. etcetera .. {% block questions %} .. a whole lot of stuff here .. {% endblock %} {# questions #} ... etc ... {% endblock %} {# inner #} ... blah ... {% endblock %} {# outer #} }}} The {{{ {# endblock comments #} }}} help me keep my sanity. What I'd like to do is write: {{{ {% endblock questions %} ... etc ... {% endblock inner %} ... blah ... {% endblock outer %} }}} and have django make sure that the endblocks match with the named block. Helps with the "internal documentation" and helps me see the structure and catch cut/paste errors. The endblock naming would be purely optional, of course! adrian yary h <spm-django@yary.ack.org>   0 1 0 0 0 0
3353 2007-01-23 11:21:25 2007-01-24 00:43:57 2019-06-24 00:50:57.876725 Unreviewed closed Translations     master duplicate NullBooleanField is not translated When using NullBooleanField, the values (Unknown, Yes, No) are not translated in the admin-interface. hugo patrick@vonautomatisch.at   0 0 0 0 0 0
3354 2007-01-23 12:14:52 2007-02-26 05:15:52 2019-06-24 00:50:58.532413 Ready for checkin closed Documentation     master fixed Tutorial pages on website should direct users to django-users with problems I've just cleaned up #2592 and cross-referenced it with comments on the tutorials. Most of the comments on there are simple misconfigurations, or errors where the user hasn't followed the tutorial closely enough, and these should be directed to django-users/#django where they can be helped quickly, or asked to file a ticket if there's a bug. This would also have two follow on effects: First, it would leave a better impression on people than having 15-20 outdated and contradictory comments complaining that Django doesn't work. Second, it would increase visibility of common issues that people have with the tutorials so they can be fixed (because these are the first encounter with Django, we need to make them as smooth as possible). For example: {{{ If you have any problems with this tutorial, please post a message to django-users (http://groups.google.com/group/django-users) or drop by #django on IRC (irc://irc.freenode.net/django) and we'll try to help. If you think you've found a bug, please file open a ticket at http://code.djangoproject.com/simpleticket }}} jacob Simon G. <dev@simon.net.nz> docs 0 1 0 0 0 0
3355 2007-01-23 16:19:20 2007-07-16 17:26:42 2019-06-24 00:50:59.248159 Accepted closed Database layer (models, ORM)     master invalid filter() with related table stomps on extra(tables) I started a discussion here with no responses so I thought I'd file a bug so this doesn't get lost... http://groups.google.com/group/django-developers/browse_thread/thread/a88046d26172908d/?hl=en# Summary: If you're using extra() to specify extra tables to add to your query AND you're using filter() with a related table, the extra() table gets lost. Example (also found in the above message): This correctly adds "page_item" to the FROM clause by using extra(). Notice I'm not yet referencing a related table in the filter() clause since template_id is contained in the Page object. {{{ In [29]: Page.objects.extra( tables=['page_item'], where=['page_item.page_id=page_page.id']) .filter(template__id='1')._get_sql_clause() Out[29]: (['`page_page`.`id`', '`page_page`.`number`', '`page_page`.`title`', '`page_page`.`template_id`', '`page_page`.`description`'], ' FROM `page_page` , `page_item` WHERE page_item.page_id=page_page.id AND (`page_page`.`template_id` = %s)', ['1']) }}} But adding the related table lookup for the 'name' column in the filter() clause breaks the extra() tables and "page_item" disappears... {{{ In [30]: Page.objects.extra( tables=['page_item'], where=['page_item.page_id=page_page.id']) .filter(template__name='Default Template') ._get_sql_clause() Out[30]: (['`page_page`.`id`', '`page_page`.`number`', '`page_page`.`title`', '`page_page`.`template_id`', '`page_page`.`description`'], ' FROM `page_page` INNER JOIN `page_template` AS `page_page__template` ON `page_page`.`template_id` = `page_page__template`.`id` , `page_item` WHERE page_item.page_id=page_page.id AND (`page_page__template`.`name` = %s)', ['Default Template']) }}} adrian Rob Hudson <treborhudson@gmail.com>   0 0 0 0 0 0
3356 2007-01-23 19:59:56 2007-12-01 14:15:48 2019-06-24 00:50:59.898660 Design decision needed closed Generic views     master wontfix Ability to turn off new message in the Message framework when using create/edit/delete generic view It would be great if Django provided a parameter to disable creating a new message when using create/update/delete generic view. It would be enabled by default. Something like: def delete_object(request, model, post_delete_redirect ...., create_info_message=True) ... if request.user.is_authenticated() and create_info_message: request.user.message_set.create(message=gettext("The %(verbose_name)s was deleted.") % {"verbose_name": model._meta.verbose_name}) return HttpResponseRedirect(post_delete_redirect) nobody anonymous generic views, message 0 0 0 0 0 0
3358 2007-01-24 08:29:19 2007-12-09 07:44:44 2019-06-24 00:51:01.135375 Accepted closed Database layer (models, ORM)       duplicate select_related() should work with ValuesQuerySets (Some of you may be reading this for the second or third time since I brought it up both on the django-developers list and IRC) There appears to be no way to make a query like this through the django models without using SQL or hitting the database twice: {{{ SELECT trackback.title, blog.name, blog.url FROM trackback INNER JOIN blog ON trackback.blog_id = blog.id }}} As far as I know, selecting with table fields is preferred above using a SELECT * any time possible. I understand this would break the model object to table row mapping of the !QuerySet (objects woulnd't be complete if some fields were missing), perhaps a new kind of !QuerySet or !ValueQuerySet is needed? If this is something that would be a welcome addition to the codebase, I could probably help out. nobody dbr <daniel.brandt@gmail.com>   0 0 0 0 0 0
3359 2007-01-24 13:48:06 2007-06-07 16:45:38 2019-06-24 00:51:01.770579 Design decision needed closed *.djangoproject.com       wontfix Add "Current server time" to the bottom of code.djangoproject.com It's completelly wishlist so feel absolutely free to close as wontfix ;) For those living in other timezones than djangoproject.com it would be a bit usefull to have the server time printed at the bottom of the page in code.djangoproject.com, so we don't need to calculate it ourselves when looking at the "timeline" and tickets. Again, it's just wish*whish*whishlist jacob Marc Fargas <telenieko@telenieko.com>   0 0 0 0 0 0
3360 2007-01-24 15:29:25 2007-11-29 22:14:23 2019-06-24 00:51:02.378580 Ready for checkin closed *.djangoproject.com     master fixed One Django badge on community page is cut off. Hello, '''80x15''' A Django site (grey) badge on the community page is cut off on the left side, few pixels are missing... jezdez hi@brand84.com badge, community, sprintsept14 0 1 0 0 0 0
3362 2007-01-24 16:34:27 2007-10-27 06:08:04 2019-06-24 00:51:03.577188 Design decision needed closed Core (Other)     master wontfix Add HttpResponseNoContent response type Add a {{{django.http.HttpResponseNoContent}}} class which encapsulates the 204 response from the HTTP spec. This should be used when input is sent to the server, but no response is received. An Ajax callback is a good example of where this is relevant. nobody afternoon@uk2.net http status response 0 1 0 1 0 0
3363 2007-01-24 20:52:40 2007-01-25 00:41:43 2019-06-24 00:51:04.210692 Unreviewed closed Uncategorized     master fixed Please reopen a few tickets Hi Jacob, these tickets should be reopened, I only closed them temporarily to wait for feedback. #3075, #3279, #3309, #3320 thanks, Michael jacob mir@noris.de   0 0 0 0 0 0
3364 2007-01-25 00:13:10 2007-08-14 16:27:06 2019-06-24 00:51:04.839928 Design decision needed closed Documentation     master fixed install.txt states psycopg2 is in beta and recommends psycopg1 install.txt: {{{ * If you're using PostgreSQL, you'll need the psycopg_ package (version 1.1 -- not version 1.0 or version 2, which is still in beta). If you're on Windows, check out the unofficial `compiled Windows version`_. }}} Note that psycopg1 is now "obsolete" ([http://www.initd.org/tracker/psycopg]) and psycopg2 is no longer 'beta' (as far as I saw on the site). At least the "which is still in beta" should be removed. And maybe it's time to recommend psycopg2 instead of 1 if there are no big issues with that. I'll upload two patches now, one for each option :) jacob Marc Fargas <telenieko@telenieko.com> MESSAGE 0 1 0 0 0 0
3365 2007-01-25 05:02:52 2007-01-25 05:14:03 2019-06-24 00:51:05.471832 Unreviewed closed Uncategorized     master invalid Error in permission docs The permission docs page raises a 404 error jacob anonymous   0 0 0 0 0 0
3366 2007-01-25 05:20:28 2007-06-14 01:15:16 2019-06-24 00:51:06.102356 Accepted closed Core (Mail)     master fixed Replace datatuple with object in send_mass_mail parameters With the features wanting to be added for sending mail (attachements #1541, bcc's #3307, etc.), the datatuple is starting to get out of hand. I propose some sort of `EmailMessage` class for storing all these different data pieces as attributes. This way, the attachment, bcc, etc. parameters can be optional keyword arguments for the `EmailMessage` constructor. adrian Gary Wilson <gary.wilson@gmail.com>   0 1 0 1 1 0
3367 2007-01-25 15:24:48 2007-03-13 01:03:58 2019-06-24 00:51:06.716369 Unreviewed closed Database layer (models, ORM)     master worksforme Overloading save_<fieldname>_file for Filefields and ImageFields broken The save_<fieldname>_file is not called when an object of a class containing a FileField or an ImageField is saved. adrian Jam filefield imagefield save 0 0 0 0 0 0
3368 2007-01-25 23:37:01 2007-02-20 00:38:32 2019-06-24 00:51:07.347281 Design decision needed closed Forms     master fixed Add USStateField and PhoneNumberfield to django.newforms.fields The summary says it all. adrian jkocherhans   0 1 0 0 0 0
3369 2007-01-26 06:31:13 2007-09-16 16:13:51 2019-06-24 00:51:07.981318 Design decision needed closed Database layer (models, ORM)     master duplicate reverse caching of foreign keys It would be nice if Django were to cache the reverse value of foreign keys when they're looked up. That might not be entirely clear, so let me give an example: {{{ class Company(Model): name = models.CharField(maxlength=100) class Employee(Model): company = models.ForeignKey(Company) c = Company.objects.all()[0] e = c.employee_set.all()[0] # e now really must have a company of c... there's no reason it wouldn't be c e.company # accesses the database }}} I tried implementing this, but got lost in some of the model code. My approach was to use an auto_cache 'filter' for QuerySets. The above code would look like this: {{{ c = Company.objects.all()[0] e = c.employee_set.auto_cache(company=c).all()[0] e.company # no database accesses }}} Which eventually I would have made automatic for all sets. I got far enough to realize that each foreign key will potentially query the database even after an attribute has explicitly been assigned. For example: {{{ c = Company.objects.all()[0] e = c.employee_set.all()[0] new_company = Company() e.company = new_company e.company == new_company # database accesses for e.company and not equal to the new object }}} I'd love to see a feature like this, so if it's not something that you all want to implement, point me in the right direction. nobody wbyoung@mcdonogh.org   0 1 0 0 0 0
3370 2007-01-26 06:35:57 2011-10-09 12:44:57 2019-06-24 00:51:08.605543 Accepted closed Forms     master fixed [patch] newforms: form.save() raises UnicodeEncodeError when form contains any non latin characters Hello everyone I've found the following bug with newforms: when one uses form_for_model/form_for_instance methods and then does save() and form contains any non-latin (national) characters, UnicodeEncodeError is raised. Example (console encoding = ru_RU.UTF-8) {{{ >>> from myproject.models import Payment >>> from django import newforms as forms }}} Let's try form_for_model: {{{ >>> PaymentForm1 = forms.models.form_for_model(Payment) >>> form1 = PaymentForm1({'description': 'превед now', 'event_date': '2007-01-26', 'user': '1', 'pay_type': 'cash', 'amount':'50.3'}) >>> form1.is_valid() True >>> form1.save() Traceback (most recent call last): File "<console>", line 1, in ? File "/usr/lib/python2.4/site-packages/django/newforms/models.py", line 25, in model_save obj.save() File "/usr/lib/python2.4/site-packages/netangels/models/payment.py", line 26, in save super(Payment, self).save() File "/usr/lib/python2.4/site-packages/django/db/models/base.py", line 204, in save ','.join(placeholders)), db_values) File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 148, in execute query = query % db.literal(args) File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 232, in literal return self.escape(o, self.encoders) File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 179, in unicode_literal return db.literal(u.encode(unicode_literal.charset)) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-5: ordinal not in range(256) }}} now let's try form_for_instance {{{ >>> payment = Payment.objects.get(pk=2) >>> PaymentForm2 = forms.models.form_for_instance(payment) >>> form2 = PaymentForm2({'description': 'превед now', 'event_date': '2007-01-26', 'user': '1', 'pay_type': 'cash', 'amount':'50.3'}) >>> form2.is_valid() True >>> form2.save() Traceback (most recent call last): File "<console>", line 1, in ? File "/usr/lib/python2.4/site-packages/django/newforms/models.py", l… adrian anton@khalikov.ru newforms utf8 unicode-branch 0 1 1 1 0 0
3372 2007-01-26 18:55:44 2007-08-25 05:11:46 2019-06-24 00:51:09.841156 Design decision needed closed Contrib apps     master fixed django.contrib.auth.views.password_change is tied to the URL /accounts/login/ There's a problem when trying to set up your login/auth URLs different than Django's defaults. The one I've been unable to work around without copying/pasting all of the function is django.contrib.auth.views.password_change. Here's the gist of the problem... 1. password_change is decorated with Django's default login_required decorator. 2. The default login_required decorator uses the (un-overridable) LOGIN_URL variable. 3. The LOGIN_URL variable is set to "/accounts/login/". I see 2 fixes... '''1) Move LOGIN_URL to global_settings.py''' This would allow the default Django login_required decorator to be easily overridden, making things much easier across the board. (Anything decorated with login_required is fixed, the shortcut methods like "redirect_to_login" and "logout_then_login" are fixed. And there's already variables for the contrib.comments system in global_settings.py so there's already precedent for having contrib apps with stuff in global_settings.py. :) '''2) Provide an un-decorated password_change method''' Having a password_change method that isn't decorated allows me to decorate it with my own login_required decorator, which redirects to my own login URL if not authenticated. Either of these should be possible without breaking backwards compatibility. I have a patch for either. Should I submit both patches? Or should I wait for a design decision and submit the patch for what's decided (if either of the above)? adrian Rob Hudson <treborhudson@gmail.com> login 0 0 0 0 0 0
3374 2007-01-26 21:36:49 2007-02-17 16:36:44 2019-06-24 00:51:11.122512 Unreviewed closed contrib.admin     master worksforme Errors on "Save as new" preclude saving a new record If you save a record with "Save as new" and there are errors, you are left in an add_stage so that "Save as new" is no longer available (it's replaced with "Save and add another".) So now, the user may correct the error, but each of their submit options will actually modify the record rather than create a new one as originally intended. I could not find a context variable that django.contrib.admin.templatetags.admin_modify.submit_row could use to determine that show_save_as_new should be True. adrian David S. <davidschein@alumni.tufts.edu>   0 0 0 0 0 0
3375 2007-01-26 23:31:53 2007-02-15 00:15:13 2019-06-24 00:51:11.747910 Ready for checkin closed Translations     master fixed [patch] swedish translation update Works for me :) hugo mikko@sorl.net i18n swedish 0 1 0 0 0 0
3376 2007-01-26 23:45:26 2007-02-15 05:46:31 2019-06-24 00:51:12.363321 Design decision needed closed Forms     master wontfix newforms.Form.clean_data is not read-only Is it possible to make newforms.Form.clean_data immutable? I'm kind of surprised it isn't, but I don't know the meaning or purpose of all things. {{{ $ python manage.py shell Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from django import newforms >>> class form(newforms.Form): ... a = newforms.IntegerField() ... b = newforms.CharField() ... >>> d = {'a': 1, 'b': 'field b'} >>> f = form(d) >>> f.is_valid() True >>> f.clean_data {'a': 1, 'b': u'field b'} >>> f.clean_data['a'] = 2 >>> f.clean_data {'a': 2, 'b': u'field b'} }}} adrian jfindlay@gmail.com   0 0 0 0 0 0
3377 2007-01-27 03:47:50 2007-02-13 06:06:09 2019-06-24 00:51:13.004273 Ready for checkin closed Database layer (models, ORM)     master fixed [patch] Infinite loop in LazyDate {{{__getattr__}}} and {{{__get_value__}}} methods of LazyDate creates infinite recursion if object hasn't got a delta attribute. Normally it shouldn't happen, but in some case, for example if we try to unpickle LazyDate object, it starts looping. adrian Brut[all] <brut.alll@gmail.com> LazyDate pickle 0 1 0 0 0 0
3379 2007-01-27 22:38:02 2007-04-25 09:44:07 2019-06-24 00:51:14.290210 Ready for checkin closed Core (Other)     master fixed last_login not updated During normal login the last_login field of the user is not updated. Shouldn't the login function do this (as attached). I could only find some code in staff_member_required (which could be removed if the login function does the work). adrian arvin last_login, login 0 1 0 0 0 0
3380 2007-01-28 18:13:12 2007-02-09 08:09:20 2019-06-24 00:51:14.906717 Design decision needed closed contrib.admin     master wontfix Add restore/backup action to the admin interface First I'm sorry if there's any error in my submission. I am not used to submit a patch. In fact, it may well be the first time... On the other hand, I'm French so I could have misunderstand points in your guidelines. My patch add a support for backup in the admin interface. It backups the current objects in the database, for a given table. It uses the cPickle module. It is useful for development server, when you want to add items to your table, and then want to add these writings to your real server, without having to use tools like phpmyadmin, ... I would be happy if it helps somebody. adrian Charlax <ca.dein@free.fr> admin restore backup db management 0 1 1 1 0 0
3382 2007-01-28 23:17:07 2007-12-01 14:20:55 2019-06-24 00:51:16.202343 Design decision needed closed Database layer (models, ORM)     master wontfix FloatField values get rounded on save() Django uses the %s format code to insert FloatField values into SQL command strings to send to the database. However, the %s format code rounds floating point numbers to 12 significant digits, which may cause unexpected rounding when the FloatField is configured to store more than 12 digits. I would have expected Django to use the '%.xf' format code, where x = decimal_places specified for the FloatField in the model definition, which would prevent rounding when saving to the database. nobody rfugger at gmail dot com float rounding 0 0 0 0 0 0
3383 2007-01-28 23:47:33 2007-01-28 23:57:22 2019-06-24 00:51:16.844995 Unreviewed closed Template system     master duplicate Images Won't Include When I try to include an image like I would in any other website, the image does not display. How do I configure the urls to treat an image like an image so they can be displayed? adrian anonymous image template problem 0 0 0 0 0 0
3384 2007-01-28 23:47:46 2007-01-28 23:57:56 2019-06-24 00:51:17.462276 Unreviewed closed Template system     master invalid Images Won't Include When I try to include an image like I would in any other website, the image does not display. How do I configure the urls to treat an image like an image so they can be displayed? adrian nate.radebaugh@gmail.com image template problem 0 0 0 0 0 0
3385 2007-01-29 00:18:36 2007-01-29 00:25:36 2019-06-24 00:51:18.054618 Unreviewed closed Uncategorized     master fixed "Template inheritance" from "design philosophies" Link goes to 404. Url = "http://www.djangoproject.com/documentation/design_philosophies/templates/#template-inheritance" jacob miker@sundialservices.com   0 0 0 0 0 0
3386 2007-01-29 02:48:56 2007-01-29 05:37:21 2019-06-24 00:51:18.673146 Unreviewed closed Core (Other)     master duplicate add PYTHONSTARTUP capability to manage.py shell Responding to this thread on Django Users: http://tinyurl.com/2rferr This patch adds PYTHONSTARTUP capability to manage.py shell when: 1. PYTHONSTARTUP is defined in the environment 2. .pystartup is present in the user's home directory Use of the {{{--plain}}} option disables execution of PYTHONSTARTUP. adrian Jeff Bauer <jbauer@rubic.com> PYTHONSTARTUP 0 1 0 0 0 0
3387 2007-01-29 09:49:34 2007-01-30 02:35:13 2019-06-24 00:51:19.306676 Unreviewed closed Core (Other)     master worksforme UnicodeEncodeError on contains and icontains I got UnicodeEncodeError when I try to search with "__icontains" and unicode string. {{{ In [26]: Product.objects.filter(name=unicode('Fantasia - ķiršu','utf-8')) Out[26]: [<Product: Fantasia - ķiršu>] In [27]: Product.objects.filter(name__icontains=unicode('Fantasia - ķiršu','utf-8')) --------------------------------------------------------------------------- exceptions.UnicodeEncodeError Traceback (most recent call last) ............ /home/***/django/db/models/fields/__init__.py in <lambda>(x) 23 24 # prepares a value for use in a LIKE query ---> 25 prep_for_like_query = lambda x: str(x).replace("\\", "\\\\").replace("%", "\%").replace("_", "\_") 26 27 # returns the <ul> class for a given radio_admin value UnicodeEncodeError: 'ascii' codec can't encode character u'\u0137' in position 11: ordinal not in range(128) }}} adrian Gacha UnicodeEncodeError 0 1 1 1 0 0
3388 2007-01-29 09:51:06 2007-01-29 18:50:26 2019-06-24 00:51:19.929288 Accepted closed Forms     master invalid [patch] newforms: form.save() fails with DoesNotExist exception when form contains ForeignKey field Hello everyone SVN version of newforms contains a bug with merging Jeff Hilyard's patch: when one does form.save() with a form contained ForeignKey field, it fails with DoesNotExists exception. Patch to fix it is attached. adrian anton@khalikov.ru   0 1 0 1 0 0
3389 2007-01-29 12:31:11 2007-01-29 16:09:47 2019-06-24 00:51:20.551408 Design decision needed closed Database layer (models, ORM)     master fixed Allow m2m sets to be assigned by primary key value At present, m2m relations must be specified using a list of object instances: {{{ john = Author(...) john.save() fred = Author(...) fred.save() Article.authors = [john, fred] }}} This proposal (and patch) would allow m2m relations be specified using primary key values in place of the object instance: {{{ Article.authors = [john.id, fred.id] # or, if you know the pk values to begin with... Article.authors = [4,7] }}} The reason for this is twofold: 1. For parity with the ability to set m2o related objects by primary key (using Article.author_id = 3) 2. To simplify deserialization, removing the need for a query to find related objects while deserializing m2m sets. adrian russellm m2m primary key 0 1 0 0 1 0
3390 2007-01-29 13:02:55 2007-02-26 17:33:28 2019-06-24 00:51:21.200766 Design decision needed closed Core (Serialization)     master fixed Deserializer cannot handle circular and forward references to object instances The current deserializers are not able to represent circular references between objects, or forward references to objects. This is because the reconstruction of m2o and m2m relations calls on the database API to resolve the ID's mentioned in the serialization string into object instances which can be saved. Therefore, if an object has not been saved, it cannot be successfully referenced in a serialization file. This is a serious impediment to the use of serialization files for test fixtures and database migration (see ticket #2333). To overcome this, I submit this modification to the deserializer that bypasses the database lookup step. The revised deserializer saves the primary key values defined in the serialization file directly into the object. This is the equivalent of doing: {{{ Article.author_id = 3 }}} instead of: {{{ Article.author = Author.objects.get(pk=3) }}} As well as being more flexible, it has the advantage of being faster (in that it requires less database lookups). In order to work for m2m relations, this patch requires that patch #3389 be applied (this patch allows assignment of m2m sets using pk values). This relatively simple approach works fine for all database backends except one - Postgres. Because Postgres has and enforces data consistency, it is not possible to INSERT an object with a foreign key value that does not have a corresponding entry in the foreign table. To work around this problem, I have modified table declarations to make all cross-table references DEFERRABLE INITIALLY DEFERRED. This has the effect that the row constraints and consistency checks are not executed until the end of each transaction, rather than after every insert (although if transactions are not in use, there is no difference in behaviour). In this way, if the deserialization process is placed inside a transaction, it is possible to deserialize an arbitrarily complex graph of foreign key relationships, and consistency is only checked once the entire graph has been deserialize… jacob russellm JSON deferrable deserialization circular forward reference 0 1 1 0 0 0
3391 2007-01-29 17:09:42 2007-02-02 16:18:01 2019-06-24 00:51:21.845259 Design decision needed closed Generic views     master duplicate [patch] django.views.generic.list_detail.object_list - add context variables on pagination The patch is for django.views.generic.list_detail.object_list and the docs. It adds the following variables to context, when the paginated object_list is required: 1. pages_list - the list of page numbers; 2. page_start - the number of the first item on the page; 3. page_end - the number of the last item on the page. They are obviously missing, and are very useful when one need to construct pagination control like this: {{{ PREV 1 2 3 4 5 6 7 NEXT showing 10-20 of 100 items }}} the template source will be like this: {{{ <a href="#">PREV</a> {% for page_num in pages_list %} {{ page_num }} {% endfor %} <a href="#">NEXT</a> showing {{ page_start }}-{{ page_end }} of {{ hits }} }}} jacob Max Derkachev <mderk@yandex.ru>   0 1 0 0 0 0
3392 2007-01-29 18:59:48 2007-01-30 12:11:39 2019-06-24 00:51:22.475690 Unreviewed closed *.djangoproject.com     0.95 duplicate "Recent code changes" link on /documentation/ in TicketModule This is the full URL: http://code.djangoproject.com/timeline?daysback=90&max=50&wiki=on&ticket=on&changeset=on&milestone=on&format=rss I'm sure someone else has reported this or that you already know in some other way, but here's the error message: Ticket changes, Ticket details event provider (TicketModule) failed: AttributeError: 'NoneType' object has no attribute 'lower' jacob hwinther@wshosting.org timeline,rss 0 0 0 0 0 0
3393 2007-01-29 19:36:47 2011-09-28 16:12:17 2019-06-24 00:51:23.101459 Accepted closed Contrib apps     master fixed login view assumes 'set_test_cookie' has been called Currently, `django.contrib.auth.views.login` instantiates `AuthenticationForm` by passing it the request, which is optional; when this happens, `AuthenticationForm` will fail on valid logins unless `set_test_cookie` has been called previously. The `login` view itself does this, but this prevents easy reusability -- it's a fairly common use case to want to display a login box on each page for non-authenticated users, which means that each view in use must call `set_test_cookie` to ensure that the POST to `login` won't fail. A simple solution to this would be to stop passing the request to `AuthenticationForm`. Perhaps a more flexible solution would be for `login` to begin taking a keyword argument to determine whether it should pass the request or not (and hence, whether `set_test_cookie` will be required or not) jacob ubernostrum auth login set_test_cookie 0 1 1 0 0 0
3394 2007-01-29 19:49:45 2007-02-13 06:27:29 2019-06-24 00:51:23.744345 Ready for checkin closed contrib.admin     master fixed min_num_in_admin is ignored for new parent objects The documentation for min_num_in_admin states "However, no fewer than min_num_in_admin related objects will ever be displayed." This isn't true, though - when a new parent object is first created, there are always num_in_admin inline children even if this is fewer than the minimum. Attached (trivial) patch fixes this :) adrian torne-django@wolfpuppy.org.uk   0 1 0 0 0 0
3395 2007-01-29 20:51:11 2007-02-22 19:48:42 2019-06-24 00:51:24.363548 Design decision needed closed Forms     master duplicate UnicodeError with newforms and non-english error messages When I use {{{ LANGUAGE_CODE = 'cs' }}} and have some errors in newforms, the template rendering fails because the errors are unicode strings, and the rest of the system fails to handle that correctly (so trying {{ form.field.errors|join:", " }} fails horribly). I attached a patch that takes care of the problem by encoding all the errors using {{{ settings.DEFAULT_CHARSET }}} in {{{ ValidationError }}}. All tests pass adrian Honza Král <Honza.Kral@gmail.com> unicode newforms errors 0 1 0 0 0 0
3396 2007-01-29 22:20:20 2007-02-26 19:01:09 2019-06-24 00:51:25.020720 Accepted closed Testing framework     master fixed test_client unittest fails under python 2.3 Running the Unittests for Django the following errors occur. {{{ $python runtests.py --settings=testdj.settings ====================================================================== ERROR: Request a page that is protected with @login, but use bad credentials ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/www/local/django/tests/modeltests/test_client/models.py", line 101, in test_view_with_bad_login self.assertFalse(response) AttributeError: 'ClientTest' object has no attribute 'assertFalse' ====================================================================== ERROR: Request a page that is protected with @login_required ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/www/local/django/tests/modeltests/test_client/models.py", line 92, in test_view_with_login self.assertTrue(response) AttributeError: 'ClientTest' object has no attribute 'assertTrue' ====================================================================== FAIL: POST an empty dictionary to a view ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/www/local/django/tests/modeltests/test_client/models.py", line 53, in test_empty_post self.assertEqual(response.status_code, 200) File "/usr/lib/python2.3/unittest.py", line 302, in failUnlessEqual raise self.failureException, \ AssertionError: 500 != 200 ---------------------------------------------------------------------- Ran 68 tests in 6.298s FAILED (failures=1, errors=2) }}} adrian Robert Myers <myer0052@gmail.com>   0 1 1 0 0 0
3397 2007-01-29 22:59:20 2011-03-03 00:04:04 2019-06-24 00:51:25.642880 Accepted closed contrib.admin     master fixed Add tests for 'Allow DB-level ordering by non-fields in changelist view' admin functionality The attached patch lets you specify a field to sort a non-field column in the admin list view. I created it for the django-multilingual library, but there are more cases where this could prove useful. See the example in docs/model-api.txt diff. nobody marcink@elksoft.pl nfa-changelist 0 0 0 1 0 0
3398 2007-01-30 01:52:30 2007-05-18 18:23:34 2019-06-24 00:51:26.276268 Unreviewed closed Core (Mail)     master duplicate send_mass_mail confused by non-ascii characters send_mass_mail barfs with UnicodeEncodeError when handed a non-ascii unicode instance, here's a q&d fix. {{{ Index: mail.py =================================================================== --- mail.py (wersja 4451) +++ mail.py (kopia robocza) @@ -50,6 +50,8 @@ if not recipient_list: continue from_email = from_email or settings.DEFAULT_FROM_EMAIL + if isinstance(message, unicode): + message = message.encode(settings.DEFAULT_CHARSET) msg = SafeMIMEText(message, 'plain', settings.DEFAULT_CHARSET) msg['Subject'] = subject msg['From'] = from_email }}} adrian anonymous unicode 0 1 0 1 0 0
3399 2007-01-30 03:18:49 2007-01-30 19:34:41 2019-06-24 00:51:26.901191 Accepted closed *.djangoproject.com     master wontfix Reports tab isn't highlighted in Trac After clicking on the Reports tab in Trac, the Wiki tab is highlighted -- not the Reports tab. jacob Lachlan Cannon <django@illuminosity.net>   0 0 0 0 0 0
3400 2007-01-30 05:59:29 2011-09-28 16:12:27 2019-06-24 00:51:27.523334 Accepted closed contrib.admin     newforms-admin fixed Support for lookup separator with list_filter admin option This patch adds support for using the lookup separator in the list_filter option, for example: {{{ class Town(models.Model): name = models.CharField() class House(models.Model): town = models.ForeignKey(Town) class Room(models.Model): house = models.ForeignKey(House) class Booking(models.Model): room = models.ForeignKey(Room, raw_id_admin=True) class Admin: list_filter = ('room__house__town',) }}} Will add a filter "For town:" that spans multiple foreign keys. DrMeers nick@intv.com.au edc nfa-someday list_filter FilterSpec nfa-changelist ep2008 0 1 0 0 0 0
3401 2007-01-30 11:36:53 2007-01-30 15:50:01 2019-06-24 00:51:28.130322 Unreviewed closed Forms     master duplicate [patch] newforms: models.CharField with choices should be displayed as forms.ChoiceField according to oldforms behavior Hello Adrian With oldforms any model.CharField(..., choices=(...)) is displayed as <select ...> ...choices...</select> In newforms this feature seem to be unimplemented yet and model.CharField is always displayed as forms.CharField. This behavior is unexpected. Attached patch fixes this. adrian anton@khalikov.ru   0 1 0 0 0 0
3402 2007-01-30 16:29:24 2007-02-13 16:42:27 2019-06-24 00:51:28.750005 Design decision needed closed Core (Other)     master wontfix Enable the 'stem' part of the matched URL to be passed to the view Currently, when django is doing url matching, and it reaches a point where the urls.py file is including another urls.py, it will discard the part that was mathced so far, and then begin matching inside the included urls.py. This patch will enable passing that discarded part (here called stem) to the view that will be eventually called. This will be useful in the case where one view is called by many url patterns from many urls.py files. It will enable the view to know where it was called from. This patch is fully backwards compatible. adrian medhat   0 1 0 0 0 0
3403 2007-01-30 19:50:39 2007-01-30 20:18:38 2019-06-24 00:51:29.388259 Unreviewed closed Forms     master duplicate smart_unicode unaware of charset setting smart_unicode for non-string objects does not pass settings.DEFAULT_CHARSET adrian boobsd@gmail.com SelectDateWidget 0 1 0 0 0 0
3404 2007-01-31 00:37:23 2007-09-16 16:17:49 2019-06-24 00:51:30.015877 Unreviewed closed contrib.admin     master worksforme raw_id_admin does not work when modifying admin interface using 'fields' I'm not sure if this is a bug or a feature, but I haven't found it listed in tickets, so I though I'd add it. I have a modified admin form for editing Member profiles, which are related to Users. I used 'fields' to organise it better and collapse it's parts. As the list of user in my database grows, I wanted to use 'raw_id_admin' to switch from a dropdown select widget to a new window listing all my users. However this doesn't work. When I remove 'fields' from Admin class in my Profile model, 'raw_id_admin' works. nobody pat.j.anderson@gmail.com raw_id_admin fields 0 0 0 0 0 0
3405 2007-01-31 06:00:24 2007-01-31 06:02:20 2019-06-24 00:51:30.646979 Unreviewed closed Forms     master duplicate [patch] newforms: choices checking should unicode choices list before comparing to a value Hello everyone There is a mistake in django/newforms/fields.py: when one uses ChoiceField to select a value from predefined choices it tries to validate selected choice against a list of string values, should be a list of unicode values as it's done in MultipleChoiceField Without the patch one always gets "Select a valid choice. %s is not one of the available choices." ValidationError. Patch works with my previous #3401 adrian anton@khalikov.ru   0 1 0 0 0 0
3406 2007-01-31 06:00:41 2011-10-09 12:44:57 2019-06-24 00:51:31.311827 Accepted closed Forms     master fixed [patch] newforms: choices checking should unicode choices list before comparing to a value Hello everyone There is a mistake in django/newforms/fields.py: when one uses ChoiceField to select a value from predefined choices it tries to validate selected choice against a list of string values, should be a list of unicode values as it's done in MultipleChoiceField Without the patch one always gets "Select a valid choice. %s is not one of the available choices." ValidationError. Patch works with my previous #3401 adrian anton@khalikov.ru unicode unicode-branch 0 1 0 1 0 0
3407 2007-01-31 16:51:31 2007-09-16 16:20:46 2019-06-24 00:51:31.965613 Accepted closed contrib.admin     master fixed [patch] added 'default_next' parameter to django.core.auth.views.login just as in #377, having default next hardcoded doesn't feel good, pythonic, etc., but a simple hack has come to remedy that: {{{ Index: views.py =================================================================== --- views.py (wersja 4454) +++ views.py (kopia robocza) @@ -8,7 +8,7 @@ from django.contrib.auth.decorators import login_required from django.contrib.auth import LOGIN_URL, REDIRECT_FIELD_NAME -def login(request, template_name='registration/login.html'): +def login(request, template_name='registration/login.html', default_next='/accounts/profile/'): "Displays the login form and handles the login action." manipulator = AuthenticationForm(request) redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, '') @@ -17,7 +17,7 @@ if not errors: # Light security check -- make sure redirect_to isn't garbage. if not redirect_to or '://' in redirect_to or ' ' in redirect_to: - redirect_to = '/accounts/profile/' + redirect_to = default_next from django.contrib.auth import login login(request, manipulator.get_user()) request.session.delete_test_cookie() }}} I'm aware that it's not a generic view, but it doesn't make sense for so much to be hardcoded just for what seems purely naming reasons. nobody imbaczek@gmail.com auth login next 0 1 0 0 0 0
3408 2007-01-31 16:56:32 2007-03-20 10:49:35 2019-06-24 00:51:32.572215 Ready for checkin closed Database layer (models, ORM)     master worksforme DateField, TimeField, and DateTimeField to_python() handles null values incorrectly DateField, TimeField, and DateTimeField all throw errors incorrectly during serialization and validation when they have a null value even if the model specifies that a null value is acceptable. The patch included simply checks for None as the value, then either returns that value, or raises an appropriate validation error if the field cannot be null. adrian Brantley <deadwisdom@gmail.com> to_python, validation, model 0 1 0 0 0 0
3409 2007-01-31 20:27:33 2007-02-15 05:05:44 2019-06-24 00:51:33.184442 Ready for checkin closed Forms     master fixed PasswordInput that doesn't render value in newforms The PasswordInput widget in newforms renders its value to html which means the password is in cleartext in the html. That's fine in some situations, but it's common for security to output an empty password field and have the user enter it again (e.g. if log in fails or registration form does not validate). I suggest either: A separate widget, e.g. PrivatePasswordInput, see widgets.diff Or a parameter for the existing PasswordInput, see widgets2.diff adrian scott@staplefish.com PasswordInput security widget 0 1 0 0 0 0
3410 2007-02-01 03:46:03 2007-03-12 08:35:15 2019-06-24 00:51:33.792924 Design decision needed closed Internationalization     master fixed make-messages has warnings while running xgettext on validators.py, /contrib/admin/views/doc.py, and /utils/html.py I'm getting these errors when I run {{{ ./bin/make-messages.py -l pt_BR }}} from the root django directory: {{{ errors happened while running xgettext on validators.py ./core/validators.py:364: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments. }}} hugo mirrorballu2@gmail.com gettext 0 1 0 0 0 0
3411 2007-02-01 03:56:45 2011-02-26 02:19:30 2019-06-24 00:51:34.388839 Someday/Maybe closed contrib.admin     other branch wontfix [Django Multi DB Tree]: modifying objects via the admin interface generates an operational error Using the Django Multi Database tree, any attempt to modify an object via the admin interface generates the Operational Error (1048, "Column 'action_time' cannot be null") when it attempts to create the django_admin_log log entry. /usr/lib/python2.4/site-packages/django_mdb_src/django/contrib/admin/views/main.py {{{ LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, str(new_object), ADDITION) }}} /usr/lib/python2.4/site-packages/django_mdb_src/django/db/backends/util.py in execute {{{ 5. def __init__(self, cursor, db): 6. self.cursor = cursor 7. self.db = db 8. 9. def execute(self, sql, params=()): 10. start = time() 11. try: 12. return self.cursor.execute(sql, params) ... 13. finally: 14. stop = time() 15. # If params was a list, convert it to a tuple, because string 16. # formatting with '%' only works with tuples or dicts. 17. if not isinstance(params, (tuple, dict)): 18. params = tuple(params) }}} {{{ Local vars Variable Value params (None, 1L, 10L, 3L, 'niner niner', 1, '') self <django.db.backends.util.CursorDebugWrapper object at 0xa943ee8c> sql 'INSERT INTO `django_admin_log` (`action_time`,`user_id`,`content_type_id`,`object_id`,`object_repr`,`action_flag`,`change_message`) VALUES (%s,%s,%s,%s,%s,%s,%s)' }}} If I manually attempt to INSERT this SQL with the params fields for values I get the same error. I've diff'ed all the files in the error chain against headrev and django_mdb tree and don't see any glaring obvious differences that would affect this but clearly I'm missing something. I should also note that only changing my site-packages 'django' symlink from django_src ( headrev ) to django_mdb_src ( mdb tree ) the problem goes away. nobody jamie@dool.ca admin LogEntry multiple-db-support 0 0 0 0 0 0
3412 2007-02-01 12:31:26 2007-02-12 03:16:10 2019-06-24 00:51:35.020685 Accepted closed Forms     master fixed Search unicode string in DB I try to search records in my DB and the information I give contains non-ascii characters. I used {{{__icontains}}} for the search. This leads to a unicode error in django. This is the View that is used to search into DB: ---- {{{ def search_entreprise(request): form = EntrepriseSearchForm() if request.method=='POST': new_data = request.POST.copy() form = EntrepriseSearchForm(new_data) if form.is_valid(): data = form.clean_data entreprise_list = Entreprise.objects.all() if data['domaine']: entreprise_list=entreprise_list.filter(domaine=data['domaine']) if data['entrepriseMere']: entreprise_list=entreprise_list.filter(entrepriseMere=data['entrepriseMere']) if data['nom']: entreprise_list=entreprise_list.filter(nom__icontains=data['nom']) return render_to_response('stagesECL/entreprise_list.html',{'list':entreprise_list,}) return render_to_response('stagesECL/entreprise_search.html',{'form':form,}) }}} ---- where in this case the only information given is the entreprise name (nom) which had the value "hé". Here is the error I get: ---- {{{ UnicodeEncodeError at /entreprise/search/ 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128) Request Method: POST Request URL: http://localhost/entreprise/search/ Exception Type: UnicodeEncodeError Exception Value: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128) Exception Location: c:\Python25\lib\site-packages\django\db\models\fields\__init__.py in , line 25 }}} ---- And finally this is the backtrace: ---- {{{ Traceback (most recent call last): File "c:\Python25\lib\site-packages\django\template\__init__.py" in render_node 712. result = node.render(context) File "c:\Python25\lib\site-packages\django\template\defaulttags.py" in render 100. len_values = len(values) File "… adrian Sébastien ( khepin@gmail.com ) unicode 0 1 0 1 0 0
3413 2007-02-01 15:28:45 2007-02-14 09:45:32 2019-06-24 00:51:35.672610 Unreviewed closed Database layer (models, ORM)     master invalid You can't use AnonymousUser in the database API My situation is this: I have a model with a !OneToOne field to the User model to support the extended features that I need my users to have. In one of my views I used code like the following to branch based on whether the user is logged in: {{{ try: app_user = AppUser.objects.get(user=request.user) # show personal view for this user: ... except AppUser.DoesNotExist: # user isn't logged in; show some other view: ... }}} I think that this code worked for me with the MySQL backend, but when I changed over to sqlite3 it gave me !InterfaceError. But, I vaguely remember updating my checked-out copy of django SVN at that time, so perhaps there was a change to the codebase that caused my results. Either way, I've done some preliminary tracing and found that the sqlite3 backend code is sending SQL that looks like this: {{{ SELECT columns FROM the_table WHERE ("app_user"."user_id" = ?) with <class 'django.contrib.auth.models.AnonymousUser'> as a parameter. }}} When an actual User is given instead of !AnonymousUser, the parameter is that user's numerical id. I haven't dug deep enough into django's code to determine how !AnonymousUser should be handled in this case to produce a !DoesNotExist error (assuming that's the desired behavior), but ticket #2144 looks related. As an aside: I've changed my code to branch on request.user.is_authenticated(), and that works fine. adrian Mason Simon <masonsimon+django@gmail.com>   0 0 0 0 0 0
3414 2007-02-01 16:36:03 2008-10-24 03:46:34 2019-06-24 00:51:36.290214 Accepted closed Core (Other)     master fixed middleware/common.py and SCGI bug - string index out of range (caused by missing PATH_INFO) I wanted to use Cherokee with SCGI to test my site but I get this exception when trying to view it in the browser (/ main page): {{{ Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/scgi_base.py", line 185, in run File "/usr/lib64/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/scgi_base.py", line 456, in handler File "/usr/lib64/python2.4/site-packages/django/core/handlers/wsgi.py", line 148, in __call__ response = self.get_response(request.path, request) File "/usr/lib64/python2.4/site-packages/django/core/handlers/base.py", line 59, in get_response response = middleware_method(request) File "/usr/lib64/python2.4/site-packages/django/middleware/common.py", line 40, in process_request if settings.APPEND_SLASH and (old_url[1][-1] != '/') and ('.' not in old_url[1].split('/')[-1]): IndexError: string index out of range }}} Django + SCGI + Cherokee worked for me some time ago without any problems. Now on 0.9.5.1 it throws this exception. nobody Piotr Maliński <riklaunim@gmail.com>   0 1 0 0 0 0
3415 2007-02-01 16:40:10 2010-09-10 19:36:51 2019-06-24 00:51:36.906312 Ready for checkin closed Uncategorized     master fixed django allows invalid TIME_ZONE in settings.py django didn't complain at all when my TIME_ZONE was "America/New York" instead of "America/New_York". It'd be nice if django at least printed a warning somewhere. It would have saved me some time tracking down the issue (which appeared to be a bug, since datetime.datetime.now() always returned the wrong time, but only in manage.py shell, not in a normal python shell). -Forest nobody forest@alittletooquiet.net datetime TIME_ZONE settings.py 0 1 0 0 0 0
3416 2007-02-01 19:16:31 2007-09-16 16:23:41 2019-06-24 00:51:37.550189 Accepted closed contrib.admin     master fixed Model API documentation section 'Modifying initial Manager QuerySets' misleads about Admin behaviour It says: {{{ If you use custom Manager objects, take note that the first Manager Django encounters (in order by which they're defined in the model) has a special status. Django interprets the first Manager defined in a class as the "default" Manager. Certain operations -- such as Django's admin site -- use the default Manager to obtain lists of objects, so it's generally a good idea for the first Manager to be relatively unfiltered. }}} But if you have your custom manager in a model even called 'objects' admin anyway will display all records from model regardless specified custom manager. The only way i found to tell admin to use custom manager is to use 'manager' attribute in inner Admin class in a model. So i guess reference to admin should be removed from here for now and 'manager' attribute of inner Admin class documented instead. nobody Alex Dedul   0 0 0 0 0 0
3417 2007-02-02 13:11:11 2007-11-30 21:22:58 2019-06-24 00:51:38.205928 Design decision needed closed contrib.admin     0.95 wontfix Admin interface template tags expect ADMIN_MEDIA_PREFIX to be a complete URL. The template tags for django.contrib.admin, when correcting the relative urls for static data, either expect settings.ADMIN_MEDIA_PREFIX to be a complete URL instead of prepending it with settings.MEDIA_URL. I've created a patch affecting admin_list.py, admin_modify.py, and adminmedia.py. Two things I'm not certain of, the affects the patch has on the adhoc javascript function SelectFilter in admin_modify.py, and also how it affects the functionality of having the development server serve static data. nobody henry.baldursson@gmail.com   0 1 0 0 1 0
3418 2007-02-02 17:03:36 2008-07-07 14:58:40 2019-06-24 00:51:38.856557 Design decision needed closed Tools     master invalid MSSQL and OverflowError for django/utils/tzinfo.py {{{ Exception Type: OverflowError Exception Value: mktime argument out of range Exception Location: C:\opt\Python25\lib\site-packages\django\utils\tzinfo.py in _isdst, line 50 }}} This kind of errors appears when you work with SQL Server (or transfered data from MSSQL to MySQL). SQL Server converts NULLs in its datetime field into year 1900! And this raise exception OverflowError with message "mktime argument out of range" for pythonic function time.mktime() used in utils/tzinfo.py at line 50: {{{ def _isdst(self, dt): tt = (dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.weekday(), 0, -1) stamp = time.mktime(tt) tt = time.localtime(stamp) return tt.tm_isdst > 0 }}} This is monkey patched code which solves this problem: {{{ def _isdst(self, dt): year = dt.year if year == 1900: # or < 1970 year = 1970 tt = (year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.weekday(), 0, -1) stamp = time.mktime(tt) tt = time.localtime(stamp) return tt.tm_isdst > 0 }}} Used Django SVN rev.4455, WinXP Pro. nobody Jaroslaw Zabiello ado_mssql datetime overflow 0 1 1 0 0 0
3419 2007-02-02 20:36:13 2007-09-14 23:04:59 2019-06-24 00:51:39.492046 Accepted closed Uncategorized     0.95 fixed exception value not html-escaped in exception view when raising an exception whose exception value contains html metachars like "<", these are not properly escaped in the exception view. example: {{{ # Create your view here. from myapp.models import mydbobject function throwexc(request): raise Exception, mydbobject.objects.all() }}} gives you: {{{ Exception at /throwexc/ [<foo>, <bar>] Request Method: GET Request URL: http://localhost:8000/throwexc/ Exception Type: Exception: Exception Value: [, ] }}} ([, ] having html source code [<foo>, <bar>]) nobody webograph@eml.cc   0 0 0 0 0 0
3420 2007-02-03 03:35:59 2008-07-13 17:56:09 2019-06-24 00:51:40.135397 Accepted closed Core (Management commands)     master fixed manage.py validate [app] should display line numbers for syntax errors When running validate for an app whose models.py file or any file it includes contains a error (most commonly syntax or function argument errors), the listing does not display the offending line/line number/file. This can make deciphering the source of the error difficult--or simply inconvenient, as the info can be obtained by attempting to import the offending model. nobody Paul Collier   0 1 1 0 0 0
3421 2007-02-03 05:12:37 2007-09-14 02:11:24 2019-06-24 00:51:40.770037 Ready for checkin closed Forms     master fixed URLField does not validate IP addresses, or localhost This URL {{{ http://127.0.0.1:8000/ }}} doesn't validate. I think it should, because that's where Django's own server runs. Also sites can be run without a domain, only using the IP. This doesn't validate either: {{{ http://201.27.42.72/ }}} nobody mirrorballu2@gmail.com URLField 0 1 0 0 0 0
3423 2007-02-03 10:52:41 2007-03-17 20:47:01 2019-06-24 00:51:42.069692 Unreviewed closed Core (Management commands)     0.95 duplicate admin zone error Hello, I'm using django 0.95.1 and I got this error in when I try to log in the admin zone: Traceback (most recent call last): File "/var/lib/python-support/python2.4/django/core/handlers/base.py" in get_response 74. response = callback(request, *callback_args, **callback_kwargs) File "/var/lib/python-support/python2.4/django/contrib/admin/views/decorators.py" in _checklogin 49. if request.user.is_authenticated() and request.user.is_staff: File "/var/lib/python-support/python2.4/django/contrib/auth/__init__.py" in get_user 71. user_id = request.session[SESSION_KEY] File "/var/lib/python-support/python2.4/django/contrib/sessions/middleware.py" in __getitem__ 18. return self._session[key] File "/var/lib/python-support/python2.4/django/contrib/sessions/middleware.py" in _get_session 57. self._session_cache = s.get_decoded() File "/var/lib/python-support/python2.4/django/contrib/sessions/models.py" in get_decoded 61. encoded_data = base64.decodestring(self.session_data) TypeError at /admin/ a2b_base64() argument 1 must be string or read-only character buffer, not array.array I have tested it with python 2.4 and 2.5 Could you help me please? Thank you. adrian aribao@gmail.com login error 0 0 0 0 0 0
3424 2007-02-03 11:38:43 2007-03-17 20:45:31 2019-06-24 00:51:42.680135 Unreviewed closed Core (Management commands)     0.95 duplicate Admin zone breaks Hello, I'm using Debian sid, python 2.4 (and 2.5), django 0.95.1, and mysql 5. The tables created have collation utf8-bin. When I tried to open the admin zone, I got this error: {{{ Traceback (most recent call last): File "/var/lib/python-support/python2.4/django/core/handlers/base.py" in get_response 74. response = callback(request, *callback_args, **callback_kwargs) File "/var/lib/python-support/python2.4/django/contrib/admin/views/decorators.py" in _checklogin 49. if request.user.is_authenticated() and request.user.is_staff: File "/var/lib/python-support/python2.4/django/contrib/auth/__init__.py" in get_user 71. user_id = request.session[SESSION_KEY] File "/var/lib/python-support/python2.4/django/contrib/sessions/middleware.py" in __getitem__ 18. return self._session[key] File "/var/lib/python-support/python2.4/django/contrib/sessions/middleware.py" in _get_session 57. self._session_cache = s.get_decoded() File "/var/lib/python-support/python2.4/django/contrib/sessions/models.py" in get_decoded 61. encoded_data = base64.decodestring(self.session_data) TypeError at /admin/ a2b_base64() argument 1 must be string or read-only character buffer, not array.array }}} I solved it changing the collation of the field session_data in the django_session table from utf8-bin to latin1_general_ci. There is a bug using utf8-bin in that field. Thank you. adrian aribao@gmail.com django, a2b_base64(), admin, mysql 5, collation 0 0 0 0 0 0
3425 2007-02-03 22:31:20 2007-12-09 08:52:43 2019-06-24 00:51:43.295836 Unreviewed closed contrib.admin     master invalid admin with edit_inline deleting data If I define !UserProfile, and connect it to User via AUTH_PROFILE_MODULE in settings.py, and edit User model, !UserProfile model object is getting deleted if I use edit_inline option. I am attaching a minimal example to demonstrate this. nobody Amit Upadhyay <upadhyay@gmail.com>   0 0 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 3233.983ms