django_tickets
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7879 | 2008-07-22 00:09:18 | 2009-02-25 19:51:44 | 2022-03-06 03:40:48.681647 | Design decision needed | closed | Core (Other) | dev | wontfix | reverse/url tag assumes view is a module-level callable | **django.core.urlresolvers.reverse**, when called with a string argument, requires that string to reference a view inside a module, which means that the following won't work, since **site** is a class, and **admin** is the module. {{{ reverse('django.contrib.admin.site.root') }}} The faulty code is **get_callable** inside urlresolvers.py. | nobody | miracle2k | 0 | 0 | 0 | 0 | 0 | 0 | |||
7880 | 2008-07-22 01:34:51 | 2011-09-28 16:12:16 | 2022-03-06 03:40:48.842324 | Accepted | closed | contrib.admin | dev | fixed | DateField dont work with choices | The admin interface doesnt show the choices for the 'Fecha' field I have a model like this one: http://dpaste.com/66580/ It works before the newforms-admin branch update, but after i did the update it in the admin interface the choices doesnt work, i try to change to CharField, and it works rigth, but when i back to DateField it wont work anymore. {{{ >>svn info Path: . URL: http://code.djangoproject.com/svn/django/trunk Repository Root: http://code.djangoproject.com/svn Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37 Revision: 8035 Node Kind: directory Schedule: normal Last Changed Author: jacob Last Changed Rev: 8035 Last Changed Date: 2008-07-21 20:15:43 -0500 (Mon, 21 Jul 2008) }}} | nobody | camilonova | 0 | 0 | 0 | 0 | 0 | 0 | |||
7881 | 2008-07-22 02:22:41 | 2011-09-28 16:12:17 | 2022-03-06 03:40:49.029242 | Accepted | closed | contrib.admin | dev | fixed | raw_id_fields and limit_choices_to with an __in query results in no output in popup list | Here is a contrived example: {{{ class Author(models.Model): name = models.CharField(max_length=64) class Book(models.Model): name = models.Charfield(max_length=64) author = models.ForeignKey(Author, limit_choices_to = {'name__in': ('Oscar','Hugo')}) class AuthorAdmin(admin.ModelAdmin): pass class BookAdmin(admin.ModelAdmin): raw_id_fields = ('author',) admin.site.register(Author, AuthorAdmin) admin.site.register(Book, BookAdmin) }}} {{{ >>> from models import Author >>> Author.objects.create(name='Oscar') >>> Author.objects.create(name='Matthew') >>> Author.objects.create(name='Hugo') }}} Now in the Admin when editing a Book if I click on the magnifying glass to select an Author then the list in the popup is empty. If I change BookAdmin to be: {{{ class BookAdmin(admin.ModelAdmin): pass }}} then the select drop down lists the right options. | jamesturk | Matthew Flanagan <mattimustang@gmail.com> | 0 | 1 | 0 | 0 | 0 | 0 | |||
7882 | 2008-07-22 03:13:16 | 2008-07-22 03:32:45 | 2022-03-06 03:40:49.211713 | Unreviewed | closed | *.djangoproject.com | dev | fixed | install using python setup.py install as described above | On http://www.djangoproject.com/download/, the {{{setup.py install}}} instructions actually show up ''below'' the text. Just nitpicking. | nobody | kcarnold | 0 | 0 | 0 | 0 | 0 | 0 | |||
7883 | 2008-07-22 03:22:07 | 2008-07-22 07:12:29 | 2022-03-06 03:40:49.356797 | Unreviewed | closed | Core (Other) | dev | fixed | Misleading deprecation warning | I think the second "Representing uploaded files as dictionaries is deprecated." warning in django/db/models/base.py (line 497) should read "Representing uploaded files as strings is deprecated." | nobody | seanl | 0 | 0 | 0 | 0 | 0 | 0 | |||
7884 | 2008-07-22 03:59:10 | 2010-10-04 03:33:27 | 2022-03-06 03:40:49.502141 | Accepted | closed | Testing framework | dev | fixed | Test framework needs option to run tests and return statuses | Currently the test framework just uses a unittest.TextTestRunner to run tests and output results to stderr. It would be nice to support an alternate TestRunner that would return results instead. This would be particularly useful for running automated tests and storing test results. Currently for our automated testing, I'm having to regex the stderr for results. Not ideal. I'm going to go ahead and write a patch for this | devin | devin | 0 | 1 | 0 | 0 | 0 | 0 | |||
7885 | 2008-07-22 06:46:45 | 2011-09-28 16:12:16 | 2022-03-06 03:40:49.670091 | Ready for checkin | closed | contrib.admin | dev | fixed | Prevent duplicates in fields and fieldsets declarations | The patch I did for #4305 was only fixing the issue for 'fieldsets', so I closed it in favour of this ticket, which also takes care of 'fields'. The attached patch prevents the multiple declarations of fields in the 'fields' and 'fieldsets' attributes. This is to prevent some confusion, having a same field multiple times in a form not making much sense and potentially leading to some unexpected behaviour when saving. Patch also contains tests. | wamberg | julien | 0 | 1 | 0 | 0 | 0 | 0 | |||
7886 | 2008-07-22 08:31:37 | 2008-07-27 18:38:56 | 2022-03-06 03:40:49.826134 | Unreviewed | closed | Database layer (models, ORM) | dev | fixed | select_related handling with Oracle is (likely) broken | I don't have any way to test this right now, but whilst fixing #7813, I realised there's some broken code in `Query.results_iter`. We have these lines {{{ #!python if resolve_columns: if self.select_fields: fields = self.select_fields + self.related_select_fields else: fields = self.model._meta.fields }}} (starting at line 200 in r8053). The problem is that `self.related_select_fields` isn't populated until `pre_sql_setup()` is called by `as_sql()`, which is called as part of the `execute_sql()` call lower down in that method. Thus, when we are querying for specific fields plus something using `select_related()`, we're going to be using an empty list as the second piece of the RHS, when it's really just a list that hasn't been populated yet. I haven't really worked out how to fix this yet. Noting it so that I don't forget to do so later. Calling `pre_sql_setup()` earlier looks fragile. Maybe we have to populate the resolve-columns `fields` list inside the loop if it hasn't been populated yet (so on the first iteration), or something like that. We also need to write a test for this. I can't immediately see how that branch is triggered, but that could be because it's late right at the moment. (ikelly: adding you to the CC in case you have any good ideas here. Feel free to remove yourself, of course, if you're not interested.) | mtredinnick | mtredinnick | 0 | 0 | 0 | 0 | 0 | 0 | |||
7887 | 2008-07-22 10:41:15 | 2008-07-22 11:23:35 | 2022-03-06 03:40:49.994605 | Unreviewed | closed | Template system | dev | duplicate | Allow empty constants in templates | The {{{Variable}}} class does not accept empty constants ("") in templates. The error message is: {{{ Could not find variable at start of "" }}} I traced the error to the {{{__init__}}} method of {{{FilterExpression}}}. The attached diff fixes the error. I think some of the surrounding {{{if <var>}}} statements should also be rewritten as {{{if <var> is not None}}}, but the diff is restricted to fixing this bug. | nobody | jcassee | 0 | 1 | 0 | 0 | 0 | 0 | |||
7888 | 2008-07-22 12:30:56 | 2011-09-28 16:12:17 | 2022-03-06 03:40:50.164666 | Accepted | closed | Forms | dev | fixed | BaseModelFormSet cannot resolve instances of inherited models when saving | When you create a !BaseModelFormSet for a Model which inherits from a user-defined Model, the save operation fails with a !KeyError (key is None). This is because the primary key's attribute name is not what it expects it to be. As far as i can see the following is supposed to take place: * creates a !BaseModelFormSet, loads initials from model_to_dict for all forms from a !QuerySet, including the 'id'-field * !ModelFormSet adds a hidden field via add_fields named pk.attname to each form which will contain the primary key. In normal (most?) cases, this attname is 'id' * The form uses initial data when cleaning, outputing the pk nicely in the hidden field. * When saving, use the hidden field to retrieve the object it refers to and save it. The fact that the attributename of a pk for an inherited model is "<parentmodel>_ptr_id" screws things up. This can be fixed in three ways: * Patch model_to_dict to include the actual pk.attrname: pk key/value-pair or... * Setup the hiddenfield in add_fields of !BaseModelFormSet to include a initial value * Some clever way I did not think of yet. I really love these formsets, they reduce coding time with large factors instead of reducing it by a few minutes :-) | brosner | bpeschier | modelformset, inheritance | 0 | 1 | 1 | 0 | 0 | 0 | ||
7889 | 2008-07-22 12:47:04 | 2008-07-22 21:54:57 | 2022-03-06 03:40:50.360397 | Accepted | closed | *.djangoproject.com | fixed | http://www.djangoproject.com/documentation/newforms/ is a 404 | http://www.djangoproject.com/documentation/newforms/ should ideally 301 redirect to http://www.djangoproject.com/documentation/forms/ | nobody | muffinresearch | 0 | 0 | 0 | 0 | 0 | 0 | ||||
7890 | 2008-07-22 12:59:58 | 2008-07-22 15:58:49 | 2022-03-06 03:40:50.555509 | Unreviewed | closed | *.djangoproject.com | dev | invalid | tutorial code - don't know where to insert | on http://www.djangoproject.com/documentation/tutorial02/ you write: ---- Customize the admin change list[[BR]] #...[[BR]] [...]But you can change that by giving that method a short_description attribute: {{{ def was_published_today(self): return self.pub_date.date() == datetime.date.today() was_published_today.short_description = 'Published today?' }}} ---- I'm a Python beginner, and for me it is not clear where to put the last line, because in the models.py this def "was_published_today" is a sub method of the Poll class. But the above code snippet in your tutorial is not intendated, it is no tab in front of it. At least I don't know where to input that... (Maybe you'll laugh and say 'learn python' - but the rest of your tutorial is EXCELLENT for absolute beginners as well...) | nobody | droetker | 0 | 0 | 0 | 0 | 0 | 0 | |||
7891 | 2008-07-22 13:03:28 | 2008-07-22 14:29:02 | 2022-03-06 03:40:50.729467 | Unreviewed | closed | contrib.auth | dev | worksforme | Auth Test Suite not always valid | Hello, the PasswordReset TestCase is not always valid, specifically the: {{{ def test_email_not_found(self): "Error is raised if the provided email address isn't currently registered" response = self.client.get('/password_reset/') self.assertEquals(response.status_code, 200) response = self.client.post('/password_reset/', {'email': 'not_a_real_email@email.com'}) self.assertContains(response, "That e-mail address doesn't have an associated user account") self.assertEquals(len(mail.outbox), 0) }}} In my case, the url /password_reset/ doesn't exist. | tolano | testcase test authentication email not found | 0 | 0 | 0 | 0 | 0 | 0 | |||
7892 | 2008-07-22 14:05:15 | 2008-07-22 14:40:39 | 2022-03-06 03:40:50.922141 | Unreviewed | closed | Uncategorized | dev | invalid | erratic Internal Server Error problem with new update | Hi, I have a problem with the latest development release that I suspect is caused by a bug. I already put a request for help on the Users List. I am not an expert user. I upgraded from dev version 7933. With the latest version, I get an erratic error when I try to load pages. Sometimes I get an internal server error message in Apache error.log (Apache & Django errors below). Sometimes I get the standard 500 page. And sometimes there's no problem & the page is loaded. It doesn't look like an Apache problem as I'm running another very simple Django project on the same server & that has no problems. I suspect it's a bug as (a) I don't think there's anything wrong with my template, contrary to what the Django error says and (b) the problem is erratic. Many thanks to anyone who can look into this. ######################################################[[BR]] Apache error.log[[BR]] ######################################################[[BR]] [Mon Jul 21 18:42:47 2008] [error] [client 131.111.39.48] PythonHandler django.core.handlers.modpython: Traceback (most recent call last): [Mon Jul 21 18:42:47 2008] [error] [client 131.111.39.48] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 287, in HandlerDispatch\n log=debug) [Mon Jul 21 18:42:47 2008] [error] [client 131.111.39.48] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 457, in import_module\n module = imp.load_module(mname, f, p, d) [Mon Jul 21 18:42:47 2008] [error] [client 131.111.39.48] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 7, in ?\n from django.core.urlresolvers import set_script_prefix [Mon Jul 21 18:42:47 2008] [error] [client 131.111.39.48] PythonHandler django.core.handlers.modpython: ImportError: cannot import name set_script_prefix #################################################################[[BR]] Django debug=True error page. says <a href="{% url main %}"> on line 45 is the problem[[BR]] ###########################################################[[BR]] TemplateSyntaxError at /trypanofan/main/ Caught an exception while rendering: Tried change_stage in module django.contrib.admin.views.main. Error was: 'module' object has no attribute 'change_stage' Original Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/template/debug.py", line 71, in render_node result = node.render(context) File "/usr/lib/python2.4/site-packages/django/template/defaulttags.py", line 364, in render return reverse(self.view_name, args=args, kwargs=kwargs) File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 306, in reverse return iri_to_uri(u'%s%s' % (prefix, get_resolver(urlconf).reverse(viewname, File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 289, in reverse if lookup_view in self.reverse_dict: File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 225, in _get_reverse_dict for key, value in pattern.reverse_dict.iteritems(): File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 228, in _get_reverse_dict self._reverse_dict[pattern.callback] = (pattern,) File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 191, in _get_callback raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e)) ViewDoesNotExist: Tried change_stage in module django.contrib.admin.views.main. Error was: 'module' object has no attribute 'change_stage' Request Method: GET Request URL: http://trypanofan.path.cam.ac.uk/trypanofan/main/ Exception Type: TemplateSyntaxError Exception Value: Caught an exception while rendering: Tried change_stage in module django.contrib.admin.views.main. Error was: 'module' object has no attribute 'change_stage' Original Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/template/debug.py", line 71, in render_node result = node.render(context) File "/usr/lib/python2.4/site-packages/django/template/defaulttags.py", line 364, in render return reverse(self.view_name, args=args, kwargs=kwargs) File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 306, in reverse return iri_to_uri(u'%s%s' % (prefix, get_resolver(urlconf).reverse(viewname, File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 289, in reverse if lookup_view in self.reverse_dict: File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 225, in _get_reverse_dict for key, value in pattern.reverse_dict.iteritems(): File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 228, in _get_reverse_dict self._reverse_dict[pattern.callback] = (pattern,) File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 191, in _get_callback raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e)) ViewDoesNotExist: Tried change_stage in module django.contrib.admin.views.main. Error was: 'module' object has no attribute 'change_stage' Exception Location: /usr/lib/python2.4/site-packages/django/template/debug.py in render_node, line 81 Python Executable: /usr/bin/python Python Version: 2.4.3 Python Path: ['/home/administrator/django', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/HTMLgen', '/usr/lib/python2.4/site-packages/Numeric', '/usr/lib/python2.4/site-packages/PIL', '/usr/lib/site-python'] Server time: Tue, 22 Jul 2008 13:50:57 +0100 Template error In template /home/administrator/django/trypanofan/templates/menu.html, error at line 45 Caught an exception while rendering: Tried change_stage in module django.contrib.admin.views.main. Error was: 'module' object has no attribute 'change_stage' 35 <TR><TD ALIGN=CENTER BGCOLOR=#eeeeff COLSPAN=2><FONT COLOR=#001762><IMG SRC="{{glyph_images_url}}/Tryp_logo.gif" ALT=tryp_logo WIDTH=150 HEIGHT=100/></FONT><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2></FONT></FONT></FONT></TD></TR> 36 37 <TR><TD BGCOLOR=#e8e8ff COLSPAN=2><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 38 39 <TR><TD HEIGHT=10 BGCOLOR=#e3e3ff COLSPAN=2><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=10 HEIGHT=10/></FONT></FONT></FONT></TD></TR> 40 41 <TR><TD ALIGN=RIGHT HEIGHT=25 BGCOLOR="#d2d8f8"><FONT COLOR="#7b0101"><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=5 HEIGHT=5/></FONT></FONT></FONT><FONT FACE=arial><FONT SIZE=2><FONT COLOR="#001762"><B>TrypanoFAN:</B></FONT></FONT></FONT><FONT COLOR="#7b0101"><FONT FACE=arial><FONT SIZE=2></FONT></FONT></FONT></TD><TD BGCOLOR="#d2d8f8"><FONT COLOR="#7b0101"><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 42 43 <TR><TD ALIGN=RIGHT BGCOLOR=#8a8688 HEIGHT=1></TD><TD BGCOLOR=#8a8688></TD></TR> 44 45 <TR><TD ALIGN=RIGHT HEIGHT=25 BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><a href="{% url main %}">Main</a></FONT></FONT></FONT></TD><TD BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 46 47 <TR><TD ALIGN=RIGHT BGCOLOR=#8a8688 HEIGHT=1></TD><TD BGCOLOR=#8a8688></TD></TR> 48 49 <TR><TD ALIGN=RIGHT HEIGHT=25 BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><a href= "{% url search_advanced %}">Advanced Search</a></TD><TD BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 50 51 <TR><TD ALIGN=RIGHT HEIGHT=1 BGCOLOR=#8a8688></TD><TD BGCOLOR=#8a8688></TD></TR> 52 53 <TR><TD ALIGN=RIGHT HEIGHT=25 BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><a href ="{% url downloads %}">Downloads</a></FONT></FONT></FONT></TD><TD BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 54 55 <TR><TD ALIGN=RIGHT BGCOLOR=#8a8688 HEIGHT=1></TD><TD BGCOLOR=#8a8688></TD></TR> Traceback Switch to copy-and-paste view /usr/lib/python2.4/site-packages/django/core/handlers/base.py in get_response response = callback(request, *callback_args, **callback_kwargs) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/shortcuts/__init__.py in render_to_response return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/template/loader.py in render_to_string return t.render(context_instance) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/template/__init__.py in render return self.nodelist.render(context) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/template/__init__.py in render bits.append(self.render_node(node, context)) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/template/debug.py in render_node result = node.render(context) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/template/loader_tags.py in render return compiled_parent.render(context) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/template/__init__.py in render return self.nodelist.render(context) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/template/__init__.py in render bits.append(self.render_node(node, context)) ... ▶ Local vars /usr/lib/python2.4/site-packages/django/template/debug.py in render_node raise wrapped ... ▶ Local vars PythonConsoleTemplateSyntaxError at /trypanofan/main/Django Dpaste AgentDjangoEnvironment: Request Method: GET Request URL: http://trypanofan.path.cam.ac.uk/trypanofan/main/ Django Version: 1.0-alpha-SVN-8053 Python Version: 2.4.3 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'trypanofan.experiments'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware') Template error: In template /home/administrator/django/trypanofan/templates/menu.html, error at line 45 Caught an exception while rendering: Tried change_stage in module django.contrib.admin.views.main. Error was: 'module' object has no attribute 'change_stage' 35 : <TR><TD ALIGN=CENTER BGCOLOR=#eeeeff COLSPAN=2><FONT COLOR=#001762><IMG SRC="{{glyph_images_url}}/Tryp_logo.gif" ALT=tryp_logo WIDTH=150 HEIGHT=100/></FONT><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2></FONT></FONT></FONT></TD></TR> 36 : 37 : <TR><TD BGCOLOR=#e8e8ff COLSPAN=2><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 38 : 39 : <TR><TD HEIGHT=10 BGCOLOR=#e3e3ff COLSPAN=2><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=10 HEIGHT=10/></FONT></FONT></FONT></TD></TR> 40 : 41 : <TR><TD ALIGN=RIGHT HEIGHT=25 BGCOLOR="#d2d8f8"><FONT COLOR="#7b0101"><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=5 HEIGHT=5/></FONT></FONT></FONT><FONT FACE=arial><FONT SIZE=2><FONT COLOR="#001762"><B>TrypanoFAN:</B></FONT></FONT></FONT><FONT COLOR="#7b0101"><FONT FACE=arial><FONT SIZE=2></FONT></FONT></FONT></TD><TD BGCOLOR="#d2d8f8"><FONT COLOR="#7b0101"><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 42 : 43 : <TR><TD ALIGN=RIGHT BGCOLOR=#8a8688 HEIGHT=1></TD><TD BGCOLOR=#8a8688></TD></TR> 44 : 45 : <TR><TD ALIGN=RIGHT HEIGHT=25 BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><a href=" {% url main %} ">Main</a></FONT></FONT></FONT></TD><TD BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 46 : 47 : <TR><TD ALIGN=RIGHT BGCOLOR=#8a8688 HEIGHT=1></TD><TD BGCOLOR=#8a8688></TD></TR> 48 : 49 : <TR><TD ALIGN=RIGHT HEIGHT=25 BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><a href= "{% url search_advanced %}">Advanced Search</a></TD><TD BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 50 : 51 : <TR><TD ALIGN=RIGHT HEIGHT=1 BGCOLOR=#8a8688></TD><TD BGCOLOR=#8a8688></TD></TR> 52 : 53 : <TR><TD ALIGN=RIGHT HEIGHT=25 BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><a href ="{% url downloads %}">Downloads</a></FONT></FONT></FONT></TD><TD BGCOLOR=#d2d8f8><FONT COLOR=#7b0101><FONT FACE=arial><FONT SIZE=2><IMG SRC="{{glyph_images_url}}/blank.gif" ALT=blank WIDTH=20 HEIGHT=22/></FONT></FONT></FONT></TD></TR> 54 : 55 : <TR><TD ALIGN=RIGHT BGCOLOR=#8a8688 HEIGHT=1></TD><TD BGCOLOR=#8a8688></TD></TR> Traceback: File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response 87. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.4/site-packages/django/shortcuts/__init__.py" in render_to_response 18. return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) File "/usr/lib/python2.4/site-packages/django/template/loader.py" in render_to_string 107. return t.render(context_instance) File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in render 176. return self.nodelist.render(context) File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in render 751. bits.append(self.render_node(node, context)) File "/usr/lib/python2.4/site-packages/django/template/debug.py" in render_node 71. result = node.render(context) File "/usr/lib/python2.4/site-packages/django/template/loader_tags.py" in render 97. return compiled_parent.render(context) File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in render 176. return self.nodelist.render(context) File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in render 751. bits.append(self.render_node(node, context)) File "/usr/lib/python2.4/site-packages/django/template/debug.py" in render_node 81. raise wrapped Exception Type: TemplateSyntaxError at /trypanofan/main/ Exception Value: Caught an exception while rendering: Tried change_stage in module django.contrib.admin.views.main. Error was: 'module' object has no attribute 'change_stage' Original Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/template/debug.py", line 71, in render_node result = node.render(context) File "/usr/lib/python2.4/site-packages/django/template/defaulttags.py", line 364, in render return reverse(self.view_name, args=args, kwargs=kwargs) File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 306, in reverse return iri_to_uri(u'%s%s' % (prefix, get_resolver(urlconf).reverse(viewname, File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 289, in reverse if lookup_view in self.reverse_dict: File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 225, in _get_reverse_dict for key, value in pattern.reverse_dict.iteritems(): File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 228, in _get_reverse_dict self._reverse_dict[pattern.callback] = (pattern,) File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 191, in _get_callback raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e)) ViewDoesNotExist: Tried change_stage in module django.contrib.admin.views.main. Error was: 'module' object has no attribute 'change_stage' Share this traceback on a public Web siteRequest information GET No GET data POST No POST data COOKIES Variable Value __utma '196754605.1070604480.1197474644.1197474644.1197474644.1' META Variable Value AUTH_TYPE None CONTENT_LENGTH 0L CONTENT_TYPE None GATEWAY_INTERFACE 'CGI/1.1' HTTP_ACCEPT 'text/html, image/jpeg, image/png, text/*, image/*, */*' HTTP_ACCEPT_CHARSET 'utf-8, utf-8;q=0.5, *;q=0.5' HTTP_ACCEPT_ENCODING 'x-gzip, x-deflate, gzip, deflate' HTTP_ACCEPT_LANGUAGE 'en' HTTP_CONNECTION 'Keep-Alive' HTTP_COOKIE '__utma=196754605.1070604480.1197474644.1197474644.1197474644.1' HTTP_HOST 'trypanofan.path.cam.ac.uk' HTTP_USER_AGENT 'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.2 (like Gecko) Kubuntu 6.06 Dapper' PATH_INFO u'/trypanofan/main/' PATH_TRANSLATED None QUERY_STRING None REMOTE_ADDR '127.0.1.1' REMOTE_HOST None REMOTE_IDENT None REMOTE_USER None REQUEST_METHOD 'GET' SCRIPT_NAME '' SERVER_NAME 'trypanofan.path.cam.ac.uk' SERVER_PORT 0 SERVER_PROTOCOL 'HTTP/1.1' SERVER_SOFTWARE 'mod_python' Settings Using settings module trypanofan.settings Setting Value ABSOLUTE_URL_OVERRIDES {} ADMINS () ADMIN_FOR () ADMIN_MEDIA_PREFIX '/media/' ALLOWED_INCLUDE_ROOTS () APPEND_SLASH True AUTHENTICATION_BACKENDS ('django.contrib.auth.backends.ModelBackend',) BANNED_IPS () CACHE_BACKEND 'locmem://' CACHE_MIDDLEWARE_KEY_PREFIX '' CACHE_MIDDLEWARE_SECONDS 600 COMMENTS_ALLOW_PROFANITIES False COMMENTS_BANNED_USERS_GROUP None COMMENTS_FIRST_FEW 0 COMMENTS_MODERATORS_GROUP None COMMENTS_SKETCHY_USERS_GROUP None DATABASE_ENGINE 'mysql' DATABASE_HOST '' DATABASE_NAME 'trypanofan' DATABASE_OPTIONS {} DATABASE_PASSWORD '********************' DATABASE_PORT '' DATABASE_USER 'administrator' DATETIME_FORMAT 'N j, Y, P' DATE_FORMAT 'N j, Y' DEBUG True DEBUG_PROPAGATE_EXCEPTIONS False DEFAULT_CHARSET 'utf-8' DEFAULT_CONTENT_TYPE 'text/html' DEFAULT_FROM_EMAIL 'webmaster@localhost' DEFAULT_INDEX_TABLESPACE '' DEFAULT_TABLESPACE '' DISALLOWED_USER_AGENTS () EMAIL_HOST 'localhost' EMAIL_HOST_PASSWORD '********************' EMAIL_HOST_USER '' EMAIL_PORT 25 EMAIL_SUBJECT_PREFIX '[Django] ' EMAIL_USE_TLS False FILE_CHARSET 'utf-8' FILE_UPLOAD_HANDLERS ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 FILE_UPLOAD_TEMP_DIR None FIXTURE_DIRS () FORCE_SCRIPT_NAME None IGNORABLE_404_ENDS ('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php') IGNORABLE_404_STARTS ('/cgi-bin/', '/_vti_bin', '/_vti_inf') INSTALLED_APPS ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'trypanofan.experiments'] INTERNAL_IPS () JING_PATH '/usr/bin/jing' LANGUAGES (('ar', 'Arabic'), ('bn', 'Bengali'), ('bg', 'Bulgarian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('es', 'Spanish'), ('et', 'Estonian'), ('es-ar', 'Argentinean Spanish'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('ga', 'Irish'), ('gl', 'Galician'), ('hu', 'Hungarian'), ('he', 'Hebrew'), ('hr', 'Croatian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('ko', 'Korean'), ('km', 'Khmer'), ('kn', 'Kannada'), ('lv', 'Latvian'), ('lt', 'Lithuanian'), ('mk', 'Macedonian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('pl', 'Polish'), ('pt', 'Portugese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sr', 'Serbian'), ('sv', 'Swedish'), ('ta', 'Tamil'), ('te', 'Telugu'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')) LANGUAGES_BIDI ('he', 'ar', 'fa') LANGUAGE_CODE 'en' LANGUAGE_COOKIE_NAME 'django_language' LOCALE_PATHS () LOGIN_REDIRECT_URL '/accounts/profile/' LOGIN_URL '/accounts/login/' LOGOUT_URL '/accounts/logout/' MANAGERS () MEDIA_ROOT '/var/www/images/' MEDIA_URL '' MIDDLEWARE_CLASSES ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware') MONTH_DAY_FORMAT 'F j' PREPEND_WWW False PROFANITIES_LIST '********************' ROOT_URLCONF 'trypanofan.urls' SECRET_KEY '********************' SEND_BROKEN_LINK_EMAILS False SERVER_EMAIL 'root@localhost' SESSION_COOKIE_AGE 1209600 SESSION_COOKIE_DOMAIN None SESSION_COOKIE_NAME 'sessionid' SESSION_COOKIE_PATH '/' SESSION_COOKIE_SECURE False SESSION_ENGINE 'django.contrib.sessions.backends.db' SESSION_EXPIRE_AT_BROWSER_CLOSE False SESSION_FILE_PATH None SESSION_SAVE_EVERY_REQUEST False SETTINGS_MODULE 'trypanofan.settings' SITE_ID 1 TEMPLATE_CONTEXT_PROCESSORS ('django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media') TEMPLATE_DEBUG True TEMPLATE_DIRS ('/home/administrator/django/trypanofan/templates',) TEMPLATE_LOADERS ('django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source') TEMPLATE_STRING_IF_INVALID '' TEST_DATABASE_CHARSET None TEST_DATABASE_COLLATION None TEST_DATABASE_NAME None TEST_RUNNER 'django.test.simple.run_tests' TIME_FORMAT 'P' TIME_ZONE 'Europe/London' TRANSACTIONS_MANAGED False URL_VALIDATOR_USER_AGENT u'Django/1.0-alpha-SVN-8053 (http://www.djangoproject.com)' USE_ETAGS False USE_I18N True YEAR_MONTH_FORMAT 'F Y' You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page. | nobody | ajm.oreilly@googlemail.com | 0 | 0 | 0 | 0 | 0 | 0 | |||
7893 | 2008-07-22 14:33:56 | 2011-09-28 16:12:17 | 2022-03-06 03:40:51.100577 | Accepted | closed | Documentation | dev | fixed | in Admin doc, fieldsets keys are not distinct from ModelAdmin options | In the page documentation/admin/ , The list of fieldset options is indistinct visually from the list of ModelAdmin options, and it is included in it. It can be very misleading : one can understand by example that filter_horizontal is a fieldset possible key. Solution : use another level of indentation, use a bullet point list ... | brosner | anonymous | admin | 0 | 1 | 0 | 0 | 0 | 0 | ||
7894 | 2008-07-22 14:45:31 | 2009-02-25 19:51:44 | 2022-03-06 03:40:51.307365 | Design decision needed | closed | Core (Other) | dev | duplicate | Support handler optimisations for file downloads | Sometimes a django app wants to return a file in a response. You can currently do this by returning the data or an iterator for the data in the content of an HttpResponse. However WSGI provides an optional mechanism for higher performance file transmission... http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling ...and I imagine mod_python is capable of a similar speed up. In order to flag to the handler that the response is suitable for this speedup I suggest a new HttpResponseFileWrapper object that wraps a file like object. This response falls back to providing its content via an iterator that reads in block_size (a extra optional parameter) bytes at a time. The speedup mechanism can also use the block_size as a suggestion for reading data from the filelike object. So for example... {{{ from django.http import HttpResponseFileWrapper def view(request): return HttpResponseFileWrapper(open('foo.pdf'), block_size=8192) }}} | nobody | graham.carlyle@maplecroft.com | 0 | 1 | 0 | 0 | 0 | 0 | |||
7895 | 2008-07-22 14:58:03 | 2008-07-22 17:45:44 | 2022-03-06 03:40:51.468212 | Unreviewed | closed | Database layer (models, ORM) | dev | wontfix | Split Query add_filter and setup_joins into smaller methods for easier subclassing | Projects such as [http://http://code.google.com/p/django-multilingual/ Django Multilingual] use an highly customized django.db.models.sql.Query subclass to support advanced custom filters; in order to do so we need to copy the entire setup_joins and add_filter methods and apply our custom code inside them. The proposed patch splits add_filter and setup_joins in slightly smaller methods, allowing subclasses to inject custom code into filtering procedures in an easier and more maintainable way. Tested with Django trunk using the standard test suite. | nobody | fabiocorneti | query pluggables | 0 | 1 | 0 | 0 | 0 | 0 | ||
7896 | 2008-07-22 15:53:43 | 2008-07-26 00:27:51 | 2022-03-06 03:40:51.664814 | Ready for checkin | closed | Documentation | dev | fixed | Typo in fastcgi docs | http://www.djangoproject.com/documentation/fastcgi/ "In the cases where Django cannot work out the prefix correctly and where you wan the original" wan -> want | nobody | Thomas Steinacher <tom@eggdrop.ch> | 0 | 1 | 0 | 0 | 0 | 0 | |||
7897 | 2008-07-22 16:00:52 | 2008-07-23 22:30:25 | 2022-03-06 03:40:51.794847 | Accepted | closed | Documentation | dev | fixed | admin.txt: small spelling mistake near "InlineModelAdmin objects" | In Line 503 of admin.txt: {{{ These are called inlines. You can add them a model being specifing them in a ``ModelAdmin.inlines`` attribute: }}} "'''being'''" should be "'''by'''". | nobody | arthurk | 0 | 1 | 0 | 0 | 0 | 0 | |||
7898 | 2008-07-22 16:20:07 | 2011-09-28 16:12:16 | 2022-03-06 03:40:51.944206 | Accepted | closed | contrib.admin | 1.0-alpha | fixed | CollapsedFieldsets.js is not injected if 'collapse' used in admin.StackedInline admin classes | Test case: {{{ class InlineAdmin(admin.StackedInline): model = Inline fieldsets = ( (None, { 'fields': ('field0') }), ('Details', { 'classes': ('collapse',), 'fields': ('field1', 'field2', 'field3') }) ) class MainAdmin(admin.ModelAdmin): model = Main inlines = [InlineAdmin] }}} HTML rendered correctly with all fieldsets and the second fieldset has class='collapse' but CollapsedFieldsets.js is not injected into the page so collapse functionality does not work. | nobody | dima.kozlov@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | |||
7899 | 2008-07-22 16:53:56 | 2008-07-23 05:20:22 | 2022-03-06 03:40:52.111354 | Design decision needed | closed | Forms | dev | fixed | Some small changes to FormSets | This diff file contains two minor changes to !FormSets. 1. {{{_max_form_count}}} is renamed to {{{max_form_count}}} to make it constant with {{{extra}}}, etc. 2. {{{BaseInlineFormset}}} now accepts {{{prefix}}} so that you can have more than one on a age. | nobody | Peter of the Norse <RahmCoff@Radio1190.org> | 0 | 0 | 0 | 0 | 0 | 0 | |||
7900 | 2008-07-22 17:04:16 | 2011-09-28 16:12:17 | 2022-03-06 03:40:52.242676 | Design decision needed | closed | Core (Other) | dev | duplicate | Missing 'tell' in uploaded objects | To Make the 'File IO' like nature of the 2 Uploaded objects, need to add 'tell' as a method | nobody | magneto | files 2070-fix | 0 | 0 | 0 | 0 | 0 | 0 | ||
7901 | 2008-07-22 17:24:24 | 2011-09-28 16:12:17 | 2022-03-06 03:40:52.427307 | Accepted | closed | Documentation | dev | duplicate | Django Documentation - overview (old admin) | http://www.djangoproject.com/documentation/overview/#a-dynamic-admin-interface-it-s-not-just-scaffolding-it-s-the-whole-house Django overview tells about old admin. | nobody | SokolovR | small bug | 0 | 0 | 0 | 0 | 0 | 0 | ||
7902 | 2008-07-22 18:29:49 | 2008-09-03 15:22:59 | 2022-03-06 03:40:52.612861 | Accepted | closed | *.djangoproject.com | fixed | /password_change/ is 404 | After a password reset via: http://www.djangoproject.com/accounts/password/reset/ I got an e-mail which contains a link to http://www.djangoproject.com/password_change/ which returns 404. A working link would be http://www.djangoproject.com/accounts/password/change/ | nobody | toke | 0 | 1 | 0 | 0 | 0 | 0 | ||||
7903 | 2008-07-22 21:06:55 | 2011-09-28 16:12:17 | 2022-03-06 03:40:52.764521 | Ready for checkin | closed | contrib.admin | dev | fixed | Javascript errors with prepopulated_fields in admin | When I set the prepopulated_fields property in my ModelAdmin, I get the following Javascript error (as reported by firebug): {{{ None is not defined onkeyup() (line 149) if (!e._changed) { e.value = URL...ntById("id_description").value, None); } http://127.0.0.1/admin/network/path/add/ }}} My model: {{{ class Path(models.Model): circuit_id= models.CharField(max_length=16, db_index=True, unique=True) description=models.CharField(max_length=64) comments= models.TextField(blank=True) speed= models.CharField(max_length=8, blank=True) in_use= models.BooleanField(db_index=True) }}} The ModelAdmin for that model: {{{ class PathAdmin(admin.ModelAdmin): list_display=('circuit_id','description','comments','speed','in_use') list_filter=('in_use',) search_fields=('circuit_id',) prepopulated_fields= {'comments':('description',)} }}} The error results in the comments field not being prepopulated. This happens both on my Mac 10.5 running Firefox 2.0.0.11 and my Kubuntu Hardy computer running Firefox 3.0 | jacob | ElliottM | admin javascript prepopulated fields prepopulated_fields | 0 | 1 | 0 | 0 | 0 | 0 | ||
7904 | 2008-07-22 22:29:39 | 2008-08-05 16:13:29 | 2022-03-06 03:40:52.913358 | Unreviewed | closed | Core (Other) | dev | fixed | Manager 'get' overloading now fails / Accessing single related (parent) objects should not bypass manager | The fix to Issue #7666 caused Manage overloading for "get" to fail (rather it now fails to use the overloaded method) {{{ from django.db import models class M1Manager(models.Manager): def get(self, *args, **kwargs): """ over load 'get' to allow for more fined tuned actions """ #in this trivial example, all gets return none return None class M1(models.Model): col1 = models.CharField(max_length = 30) objects = M1Manager() __unicode__(self): return col1 class M2(models.Model): m1 = models.ForeignKey(M1) col2 = models.CharField() my_m1 = M1.objects.create(col1="m1_obj") my_m2 = M2.objects.create(m1 = my_m1, col2="my_m2") find_m2 = M2.objects.get(col2 = "my_m2") #prints "m1_obj" and should print None print find_m2.m1 }}} | nobody | magneto | 0 | 1 | 0 | 0 | 0 | 0 | |||
7905 | 2008-07-22 23:48:36 | 2011-09-28 16:12:16 | 2022-03-06 03:40:53.088708 | Ready for checkin | closed | Documentation | dev | fixed | document raw_id_fields option in InlineModelAdmin | A quick patch to document this option. {{{ Index: docs/admin.txt =================================================================== --- docs/admin.txt (revision 8051) +++ docs/admin.txt (working copy) @@ -569,6 +569,17 @@ .. _max_num in formsets: ../modelforms/#limiting-the-number-of-objects-editable +``raw_id_fields`` +~~~~~~~~~~~~~~~~~ + +By default, Django's admin uses a select-box interface (<select>) for +fields that are ``ForeignKey``. Sometimes you don't want to incur the +overhead of having to select all the related instances to display in the +drop-down. + +``raw_id_fields`` is a list of fields you would like to change +into a ``Input`` widget for the primary key. + ``template`` ~~~~~~~~~~~~ }}} | Matthew Flanagan <mattimustang@gmail.com> | 0 | 1 | 0 | 0 | 0 | 0 |