{"id": 8328, "created": "2008-08-15 00:34:12", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:57.740539", "stage": "Accepted", "status": "closed", "component": "Documentation", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "[8240] contained undocumented backwards incompatible change", "description": "Changeset [8240] added code to override the default widget for certain field types in the admin. This is a backwards incompatible change and should be listed on the doc page for such changes. \r\n\r\n(I was using a custom field which subclassed IntegerField and specified its own custom widget, which I would guess isn't such a rare use case, and this change broke my code. My workaround was just to manually delete 'widget' from kwargs in the constructor for my field class, but the lack of documentation meant it took a while to track down the problem.)", "owner": "nobody", "reporter": "mmulley", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8331, "created": "2008-08-15 03:05:46", "changetime": "2008-08-15 07:41:36", "last_pulled_from_trac": "2022-03-06 03:41:58.224901", "stage": "Unreviewed", "status": "closed", "component": "Core (Management commands)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "manage.py sqlclear and friends crash, for unknown reasons", "description": "When I run manage.py sqlclear, it often crashes with the following traceback:\r\n\r\n{{{\r\n$ ./manage.py sqlclear tests\r\nTraceback (most recent call last):\r\n File \"./manage.py\", line 11, in \r\n execute_manager(settings)\r\n File \"/Library/Python/2.5/site-packages/django/core/management/__init__.py\", line 334, in execute_manager\r\n utility.execute()\r\n File \"/Library/Python/2.5/site-packages/django/core/management/__init__.py\", line 295, in execute\r\n self.fetch_command(subcommand).run_from_argv(self.argv)\r\n File \"/Library/Python/2.5/site-packages/django/core/management/base.py\", line 77, in run_from_argv\r\n self.execute(*args, **options.__dict__)\r\n File \"/Library/Python/2.5/site-packages/django/core/management/base.py\", line 96, in execute\r\n output = self.handle(*args, **options)\r\n File \"/Library/Python/2.5/site-packages/django/core/management/base.py\", line 146, in handle\r\n app_output = self.handle_app(app, **options)\r\n File \"/Library/Python/2.5/site-packages/django/core/management/commands/sqlclear.py\", line 10, in handle_app\r\n return u'\\n'.join(sql_delete(app, self.style)).encode('utf-8')\r\n File \"/Library/Python/2.5/site-packages/django/core/management/sql.py\", line 98, in sql_delete\r\n output.extend(connection.creation.sql_destroy_model(model, references_to_delete, style))\r\n File \"/Library/Python/2.5/site-packages/django/db/backends/creation.py\", line 263, in sql_destroy_model\r\n output.extend(self.sql_remove_table_constraints(model, references_to_delete, style))\r\nTypeError: sql_remove_table_constraints() takes exactly 3 arguments (4 given)\r\n}}}\r\n\r\nAs far as I can tell, though, sql_remove_table_constraints() does actually want four arguments (including self).\r\n\r\nAn example for which this happens is a simple project, with only the one app installed, whose models.py looks like\r\n\r\n{{{\r\nfrom django.db import models\r\n\r\nclass Watcher(models.Model):\r\n user = models.ForeignKey('User')\r\n\r\nclass User(models.Model):\r\n pass\r\n}}}\r\n\r\nIf you switch the order of the definitions, however, it works fine (outputting the appropriate DROP statements).", "owner": "nobody", "reporter": "d00gs", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8332, "created": "2008-08-15 04:26:05", "changetime": "2008-08-15 15:22:32", "last_pulled_from_trac": "2022-03-06 03:41:58.366254", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "delete generates faulty sql for subclasses of non-abstract parents", "description": "Stack trace is attached.\r\n\r\nStudent is a subclass of Person. Person has a ForeignKey field pointing to Address. delete() calls the sql\r\n'''UPDATE \"tables_student\" SET \"address_id\" = NULL WHERE \"person_ptr_id\" IN'''\r\nSince address_id is a field of tables_person, this throws an exception.\r\n\r\nAssuming CollectedObjects() is doing the right thing, the (a?) correct behavior would be to pass over address_id in line 836 of db/models/query.py (see below) when it shows up as a field of Student. After deleting the Student record, delete_objects will reach the related Person record, which has the real address_id field, set that to Null, and then delete the Address record.\r\n\r\nThe code I'm proposing changing:\r\n{{{\r\n831 del_query.delete_batch_related(pk_list)\r\n832\r\n833 update_query = sql.UpdateQuery(cls, connection)\r\n834 for field in cls._meta.fields:\r\n835 if field.rel and field.null and field.rel.to in seen_objs:\r\n836 -> update_query.clear_related(field, pk_list)\r\n}}}\r\n\r\nI'm interested in testing the boundaries of this bug and writing a patch. I'm hoping someone can tell me if there's an easy way to test (line 835) whether field is local to cls or inherited from a parent.", "owner": "bergey", "reporter": "bergey", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 1, "needs_docs": 0, "ui_ux": 0} {"id": 8333, "created": "2008-08-15 04:31:22", "changetime": "2008-08-15 07:20:51", "last_pulled_from_trac": "2022-03-06 03:41:58.514041", "stage": "Unreviewed", "status": "closed", "component": "File uploads/storage", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "FileField upload of large files looping and failing", "description": "Tripped on this while trying to update photologue, testing a large zip file.\r\nThen tried some of my own code and found that wasn't working with large files either.\r\nUploads work fine for 1 meg files\r\nTried 20meg files and it goes into an upload loop during the save.\r\nUploads the file, lets say \"BIG_FILE\", then \"BIG_FILE_\" and so on \"BIG_FILE_..._\" until it fails on a filename of 215+ characters.\r\nAll the files that are uploaded are complete and are not corrupt.\r\nI'm running on Windows with Apache and mod_python.\r\n\r\nMODEL\r\n\r\n{{{\r\nclass UploadedDocument( models.Model ):\r\n file = models.FileField( upload_to = 'uploads/documents/')\r\n description = models.CharField( max_length=255, blank=True, help_text='Description of document.')\r\n uploaded_by = models.ForeignKey( User )\r\n}}}\r\n\r\nFORM\r\n\r\n{{{\r\nclass DocumentField(forms.FileField): \r\n def __init__(self, *args, **kwargs): \r\n super(DocumentField, self).__init__(*args, **kwargs) \r\n self.label = 'New File' \r\n self.help_text = 'Select a doc, rtf, or pdf document' \r\n\r\n def clean(self, data, UNKNOWN_FIELD): \r\n f = super(DocumentField, self).clean(data)\r\n\r\n if data in (None, ''):\r\n \" Required=False and no data... \"\r\n return None\r\n file_types = ('application/msword', 'application/rtf', 'application/pdf') \r\n file_exts = ('.doc', '.rtf', '.pdf') \r\n if (not splitext(f.name)[1].lower() in file_exts) and (not data['content-type'] in file_types): \r\n raise forms.ValidationError('Document types accepted: %s' % ' '.join(file_exts))\r\n return f\r\n\r\nclass UploadedDocumentForm(ModelForm):\r\n file = DocumentField(required=True, \r\n widget=forms.FileInput(attrs={'size':'80'}))\r\n description = forms.CharField(required=True,\r\n help_text=UploadedDocument._meta.get_field('description').help_text,\r\n widget=forms.Textarea(attrs={'style':'width:98%; height:3em;' }))\r\n \r\n class Meta:\r\n model = UploadedDocument\r\n fields = ( 'file', 'description')\r\n}}}\r\n\r\nVIEW (SAVE PIECE)\r\n\r\n{{{\r\ndoc = UploadedDocument(uploaded_by = request.user)\r\ndoc.file.save(f.name, f, save=False)\r\ndoc.description = form.cleaned_data['description']\r\ndoc.save()\r\n}}}\r\n", "owner": "nobody", "reporter": "tapautler", "keywords": "filefield upload looping", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8334, "created": "2008-08-15 06:38:37", "changetime": "2011-04-26 22:33:16", "last_pulled_from_trac": "2022-03-06 03:41:58.666114", "stage": "Accepted", "status": "closed", "component": "Database layer (models, ORM)", "type": "New feature", "severity": "Normal", "version": "dev", "resolution": "duplicate", "summary": "Allow add/create on m2m intermediate tables if all the non-FK fields have defaults or are NULLable", "description": "Add/create is currently disabled on m2m relations that use an intermediate table. This is due to the fact that values to populate the intermediate table cannot be provided using the add/create calls.\r\n \r\nHowever, what if the intermediate model has reasonable default values, so\r\none can assign model A to B without extra info?\r\n\r\nIn my case, I just want to syncronize 2 databases, and I would like to\r\nmark relationships, that are already synced. So, in my case, the\r\nintermediate table contains a boolean, which defaults to false, and\r\nwill become true, when the data is synced.\r\n\r\nIn this case adding relations without explicitly creating the intermediate table would be great.\r\n\r\n(based on [http://groups.google.com/group/django-users/browse_thread/thread/a40f1005760f80b5 this thread in the ML])", "owner": "nobody", "reporter": "pihentagy", "keywords": "manytomany through default add create", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8335, "created": "2008-08-15 06:50:39", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:58.830786", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "django.get_version() does not return SVN revision", "description": "I#m using current SVN co. Revision 8363. Since 1.0 beta2 SVN revision is not returned by django.get_version(), instead there's just 'SVN-unknown'.", "owner": "nobody", "reporter": "marcusti", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8338, "created": "2008-08-15 08:34:15", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:59.251121", "stage": "Unreviewed", "status": "closed", "component": "Template system", "type": null, "severity": null, "version": "dev", "resolution": "worksforme", "summary": "Admin panel generating HTML table without fields if variable contains \"_A\" string", "description": "= Main information =\r\nAdmin panel generating HTML table to enter data. [[BR]]\r\nBut if object contains '_' char and after that is letter 'A' [[BR]]\r\n( for example: 'Foo_Address' ) [[BR]]\r\nadv_forms don't creates fields ( INPUT field in HTML) [[BR]]\r\n\r\n\r\n== Django version ==\r\nDjango ver: SVN-checkout: rev.8365 [[BR]]\r\n\r\n\r\n\r\n{{{\r\n# -*- coding: utf-8 -*-\r\n\r\nfrom django.db import models\r\nfrom django.contrib import admin\r\nfrom django.utils.translation import ugettext as _\r\n\r\n\r\nclass Foo(models.Model):\r\n foo = models.CharField(verbose_name=_('FOO'), max_length=11)\r\n\r\nclass Foo_Address(models.Model):\r\n foo = models.ForeignKey(Foo)\r\n bar = models.CharField(max_length=11)\r\n\r\nclass Foo_Faddress(models.Model):\r\n foo = models.ForeignKey(Foo)\r\n bar = models.CharField(max_length=11)\r\n\r\nclass Foo_Address_Inline(admin.TabularInline):\r\n model = Foo_Address\r\n extra = 1\r\n\r\nclass Foo_Faddress_Inline(admin.TabularInline):\r\n model = Foo_Faddress\r\n extra = 1\r\n\r\nclass Foo_Admin(admin.ModelAdmin):\r\n inlines = [Foo_Address_Inline, Foo_Faddress_Inline]\r\n\r\n\r\n\r\nadmin.site.register(Foo, Foo_Admin)\r\n}}}\r\n\r\n\r\n[http://img367.imageshack.us/img367/3876/zrzutekranuba1.png Screenshot]\r\n", "owner": "nobody", "reporter": "bartosak", "keywords": "no input fields html admin panel", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8339, "created": "2008-08-15 09:33:37", "changetime": "2008-08-15 14:24:48", "last_pulled_from_trac": "2022-03-06 03:41:59.420076", "stage": "Unreviewed", "status": "closed", "component": "contrib.admin", "type": null, "severity": null, "version": "dev", "resolution": "invalid", "summary": "Problem with behaviour of ManyToManyField", "description": "I have a problem using the ManyToManyFied with an already existing database. I have two tables called AVAILABILITY and TESTDEF that are linked together according to a n-n relationship. I have defined them as following in my models.py file (with the help of inspectdb). The names of the columns in the tables are the same as the python names.\r\n\r\n{{{\r\nclass Testdef(models.Model):\r\n testid = models.DecimalField(max_digits=38, decimal_places=0, primary_key=True)\r\n testname = models.CharField(max_length=100)\r\n testtitle = models.CharField(max_length=255, blank=True)\r\n testabbr = models.CharField(max_length=50, blank=True)\r\n def __unicode__(self):\r\n return self.testname+' ('+self.testabbr+')'\r\n class Meta:\r\n db_table = u'TESTDEF'\r\n\r\nclass Availability(models.Model):\r\n availabilityid = models.AutoField(\"Id\", primary_key=True, null=False)\r\n availabilityname = models.CharField(\"Name\", max_length=255)\r\n bdiiflag = models.CharField(\"BDii\", max_length=1, choices=(('Y', \"Yes\"),('N', \"No\"),))\r\n void = models.ForeignKey(Vo, db_column='void')\r\n tests = models.ManyToManyField(Testdef, db_table='AVAILABILITYTESTCRITICALITY', related_name='availabilityid')\r\n def __unicode__(self):\r\n return self.availabilityname\r\n class Meta:\r\n db_table = u'AVAILABILITY'\r\n verbose_name_plural = u'Availabilities'\r\n}}}\r\n\r\nThe linking table is called AVAILABILITYTESTCRITICALITY, and has the following fields: AVAILABILITYID, TESTID\r\n\r\nI use this environment:\r\n{{{\r\nEnvironment:\r\n\r\nRequest Method: GET\r\nRequest URL: http://localhost:8000/admin/avl/availability/6/\r\nDjango Version: 1.0-alpha_2-SVN-unknown\r\nPython Version: 2.3.4\r\nInstalled Applications:\r\n['django.contrib.auth',\r\n 'django.contrib.contenttypes',\r\n 'django.contrib.sessions',\r\n 'django.contrib.sites',\r\n 'django.contrib.admin',\r\n 'django.contrib.databrowse',\r\n 'mysite.avl']\r\nInstalled Middleware:\r\n('django.middleware.common.CommonMiddleware',\r\n 'django.contrib.sessions.middleware.SessionMiddleware',\r\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\r\n 'django.middleware.doc.XViewMiddleware')\r\n}}}\r\n\r\nThe code as given above, doesn't work, and I get this error when trying to access an AVAILABILITY item from the admin application:\r\n{{{\r\nTraceback:\r\nFile \"/usr/lib/python2.3/site-packages/django/core/handlers/base.py\" in get_response\r\n 86. response = callback(request, *callback_args, **callback_kwargs)\r\nFile \"/usr/lib/python2.3/site-packages/django/contrib/admin/sites.py\" in root\r\n 172. return self.model_page(request, *url.split('/', 2))\r\nFile \"/usr/lib/python2.3/site-packages/django/views/decorators/cache.py\" in _wrapped_view_func\r\n 44. response = view_func(request, *args, **kwargs)\r\nFile \"/usr/lib/python2.3/site-packages/django/contrib/admin/sites.py\" in model_page\r\n 189. return admin_obj(request, rest_of_url)\r\nFile \"/usr/lib/python2.3/site-packages/django/contrib/admin/options.py\" in __call__\r\n 275. return self.change_view(request, unquote(url))\r\nFile \"/usr/lib/python2.3/site-packages/django/db/transaction.py\" in _commit_on_success\r\n 198. res = func(*args, **kw)\r\nFile \"/usr/lib/python2.3/site-packages/django/contrib/admin/options.py\" in change_view\r\n 657. form = ModelForm(instance=obj)\r\nFile \"/usr/lib/python2.3/site-packages/django/forms/models.py\" in __init__\r\n 197. object_data = model_to_dict(instance, opts.fields, opts.exclude)\r\nFile \"/usr/lib/python2.3/site-packages/django/forms/models.py\" in model_to_dict\r\n 117. data[f.name] = [obj.pk for obj in f.value_from_object(instance)]\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/query.py\" in _result_iter\r\n 176. self._fill_cache()\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/query.py\" in _fill_cache\r\n 604. self._result_cache.append(self._iter.next())\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/query.py\" in iterator\r\n 266. for row in self.query.results_iter():\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/sql/query.py\" in results_iter\r\n 200. for rows in self.execute_sql(MULTI):\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/sql/query.py\" in execute_sql\r\n 1614. cursor.execute(sql, params)\r\nFile \"/usr/lib/python2.3/site-packages/django/db/backends/util.py\" in execute\r\n 19. return self.cursor.execute(sql, params)\r\nFile \"/usr/lib/python2.3/site-packages/django/db/backends/oracle/base.py\" in execute\r\n 343. return Database.Cursor.execute(self, query, self._param_generator(params))\r\n\r\nException Type: DatabaseError at /admin/avl/availability/6/\r\nException Value: ORA-00904: \"AVAILABILITYTESTCRITICALITY\".\"TESTDEF_ID\": invalid identifier\r\n}}}\r\n\r\nAfter renaming the TESTID field in my linking table as TESTDEF_ID, I get this other error, as if django had completely forgotten about the primary keys I have defined before (it seems that the field it tries to access is the default name of the primary key).\r\n\r\n{{{\r\nTraceback:\r\nFile \"/usr/lib/python2.3/site-packages/django/core/handlers/base.py\" in get_response\r\n 86. response = callback(request, *callback_args, **callback_kwargs)\r\nFile \"/usr/lib/python2.3/site-packages/django/contrib/admin/sites.py\" in root\r\n 172. return self.model_page(request, *url.split('/', 2))\r\nFile \"/usr/lib/python2.3/site-packages/django/views/decorators/cache.py\" in _wrapped_view_func\r\n 44. response = view_func(request, *args, **kwargs)\r\nFile \"/usr/lib/python2.3/site-packages/django/contrib/admin/sites.py\" in model_page\r\n 189. return admin_obj(request, rest_of_url)\r\nFile \"/usr/lib/python2.3/site-packages/django/contrib/admin/options.py\" in __call__\r\n 275. return self.change_view(request, unquote(url))\r\nFile \"/usr/lib/python2.3/site-packages/django/db/transaction.py\" in _commit_on_success\r\n 198. res = func(*args, **kw)\r\nFile \"/usr/lib/python2.3/site-packages/django/contrib/admin/options.py\" in change_view\r\n 657. form = ModelForm(instance=obj)\r\nFile \"/usr/lib/python2.3/site-packages/django/forms/models.py\" in __init__\r\n 197. object_data = model_to_dict(instance, opts.fields, opts.exclude)\r\nFile \"/usr/lib/python2.3/site-packages/django/forms/models.py\" in model_to_dict\r\n 117. data[f.name] = [obj.pk for obj in f.value_from_object(instance)]\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/query.py\" in _result_iter\r\n 176. self._fill_cache()\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/query.py\" in _fill_cache\r\n 604. self._result_cache.append(self._iter.next())\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/query.py\" in iterator\r\n 266. for row in self.query.results_iter():\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/sql/query.py\" in results_iter\r\n 200. for rows in self.execute_sql(MULTI):\r\nFile \"/usr/lib/python2.3/site-packages/django/db/models/sql/query.py\" in execute_sql\r\n 1614. cursor.execute(sql, params)\r\nFile \"/usr/lib/python2.3/site-packages/django/db/backends/util.py\" in execute\r\n 19. return self.cursor.execute(sql, params)\r\nFile \"/usr/lib/python2.3/site-packages/django/db/backends/oracle/base.py\" in execute\r\n 343. return Database.Cursor.execute(self, query, self._param_generator(params))\r\n\r\nException Type: DatabaseError at /admin/avl/availability/6/\r\nException Value: ORA-00904: \"AVAILABILITYTESTCRITICALITY\".\"TESTDEF_ID\": invalid identifier\r\n}}}\r\n\r\nIs it just me (maybe I have missed an option in the definition of the ManyToManyField), or is it a real bug?", "owner": "nobody", "reporter": "guneeyoufix", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8340, "created": "2008-08-15 09:36:25", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:59.581553", "stage": "Accepted", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "MySQL case sensitivity and utf8_bin / 2710", "description": "As noted in the documentation, I tried to change the collation within my Django-database. \r\n\r\nSo I dumped the database and changed \"utf8_german_ci\" to \"utf8_bin\". After restoring the data and trying to open one page, I'll get the following error (I'm using the latest svn-version 8366):\r\n\r\n{{{\r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] mod_python (pid=2259, interpreter='dms', phase='PythonHandler?', handler='django.core.handlers.modpython'): Application error \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] ServerName?: 'www.dms.bildung.hessen.de' \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] DocumentRoot?: '/srv/www/htdocs' \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] URI: '/news/index.html' \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] Location: None \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] Directory: None [Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] Filename: '/srv/www/htdocs/news' \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] PathInfo?: '/index.html' \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] Traceback (most recent call last):\r\n\r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/lib64/python2.5/site-packages/mod_python/importer.py\", line 1537, in HandlerDispatch?\\n default=default_handler, arg=req, silent=hlist.silent) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/lib64/python2.5/site-packages/mod_python/importer.py\", line 1229, in _process_target\\n result = _execute_target(config, req, object, arg) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/lib64/python2.5/site-packages/mod_python/importer.py\", line 1128, in _execute_target\\n result = object(arg) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/core/handlers/modpython.py\", line 210, in handler\\n return ModPythonHandler?()(req) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/core/handlers/modpython.py\", line 183, in call\\n response = self.get_response(request) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/core/handlers/base.py\", line 67, in get_response\\n response = middleware_method(request) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/middleware/locale.py\", line 16, in process_request\\n language = translation.get_language_from_request(request) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/utils/translation/init.py\", line 97, in get_language_from_request\\n return real_get_language_from_request(request) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/utils/translation/trans_real.py\", line 351, in get_language_from_request\\n lang_code = request.session.get('django_language', None) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/contrib/sessions/backends/base.py\", line 50, in get\\n return self._session.get(key, default) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/contrib/sessions/backends/base.py\", line 147, in _get_session\\n self._session_cache = self.load() \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/contrib/sessions/backends/db.py\", line 19, in load\\n return self.decode(s.session_data) \r\n[Fri Aug 15 08:52:23 2008] [error] [client 192.168.0.222] File \"/usr/local/lib64/python2.5/site-packages/django/contrib/sessions/backends/base.py\", line 80, in decode\\n encoded_data = base64.decodestring(session_data)\r\n\r\n}}}\r\n", "owner": "mtredinnick", "reporter": "hrauch", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8343, "created": "2008-08-15 10:56:19", "changetime": "2008-08-15 15:14:21", "last_pulled_from_trac": "2022-03-06 03:42:00.095353", "stage": "Unreviewed", "status": "closed", "component": "Uncategorized", "type": null, "severity": null, "version": "dev", "resolution": "worksforme", "summary": "Using umlauts with blocktrans results in TemplateSyntaxError", "description": "/project/app/locale/de/django.po:\r\n\r\nmsgid \"foomsg %(val)s %(val)s\"\r\nmsgstr \"F\u00f6\u00f6 bar %(val)s foo %(val2)s%\r\n\r\n/project/app/templates/foo.html:\r\n{% blocktrans with c.foo as val and c.bar as val2 %}foomsg {{ val }}{{ val2 }}{% endblocktrans %}\r\n\r\nResult:\r\n\r\nPage is not rendered but a TemplateSyntaxError is thrown: Caught an exception while rendering: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)", "owner": "nobody", "reporter": "oliverw", "keywords": "localization", "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8346, "created": "2008-08-15 15:52:23", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:42:00.663341", "stage": "Accepted", "status": "closed", "component": "Forms", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "overriding widget in ModelChoiceField doesn't work as expected", "description": "Using below custom ModelChoiceField will not use RadioSelect widget as expected.\r\n\r\n{{{\r\nclass MyModelChoiceField(forms.ModelChoiceField):\r\n widget = forms.RadioSelect\r\n}}}\r\n\r\nYou can work around that issue by overriding __init__ like so:\r\n\r\n{{{\r\nclass MyModelChoiceField(forms.ModelChoiceField):\r\n def __init__(self, *args, **kwargs):\r\n return super(MyModelChoiceField, self).__init__(widget=forms.RadioSelect, *args, **kwargs)\r\n}}}\r\n\r\nI guess this is a bug either with ModelChoiceField or with the documentation.", "owner": "nobody", "reporter": "derelm", "keywords": null, "easy": null, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": null} {"id": 8349, "created": "2008-08-15 16:57:26", "changetime": "2008-08-25 15:57:49", "last_pulled_from_trac": "2022-03-06 03:42:01.092511", "stage": "Unreviewed", "status": "closed", "component": "Core (Management commands)", "type": null, "severity": null, "version": "dev", "resolution": "wontfix", "summary": "syncdb doesn't make all the necessary changes with the Oracle backend", "description": "I'm using the Oracle backend, with an already existing database. I had to make changes to the output of the inspectdb command so that my models.py and the actual database matched.\r\n\r\nHowever, no matter how often I issue the syncdb command, some sequences and triggers won't be created (basically all of the triggers that are directly related to my application).\r\n\r\nI have attached the output of the sqlall command for the concerned app.\r\n\r\n", "owner": "nobody", "reporter": "guneeyoufix", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8352, "created": "2008-08-15 20:15:23", "changetime": "2008-08-15 21:14:22", "last_pulled_from_trac": "2022-03-06 03:42:01.554018", "stage": "Unreviewed", "status": "closed", "component": "Documentation", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Misspelling near the end of contenttypes doc", "description": "In the last paragraph of http://www.djangoproject.com/documentation/contenttypes/ (the paragraph titled: Generic relations in forms and admin), In the first sentence the module is described as:\r\n\r\ndjango.contrib.contenttypes.genric\r\n\r\nit should be:\r\n\r\ndjango.contrib.contenttypes.generic\r\n", "owner": "nobody", "reporter": "cjs", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8353, "created": "2008-08-15 21:33:35", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:42:01.720543", "stage": "Accepted", "status": "closed", "component": "contrib.admin", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "TemplateSyntaxError when adding user in admin", "description": "When trying to add a user in admin you get a TemplateSyntaxError (url: /admin/auth/user/add/). It's in the file: django/contrib/admin/templates/admin/change_form.html on line 61\r\n{{{\r\n \t{% prepopulated_fields_js %}\r\n}}}\r\nWhen outcommented, the error disappear. ", "owner": "brosner", "reporter": "marzim", "keywords": null, "easy": 0, "has_patch": 0, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8329, "created": "2008-08-15 01:39:48", "changetime": "2011-12-22 22:17:13", "last_pulled_from_trac": "2022-03-06 03:41:57.926726", "stage": "Accepted", "status": "closed", "component": "Core (Management commands)", "type": "New feature", "severity": "Normal", "version": "dev", "resolution": "fixed", "summary": "django shouldn't delete the startproject command", "description": "but put a warning in it's place", "owner": null, "reporter": "IanHolsman", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 1, "needs_docs": 0, "ui_ux": 0} {"id": 8330, "created": "2008-08-15 02:40:10", "changetime": "2008-08-15 02:45:29", "last_pulled_from_trac": "2022-03-06 03:41:58.059140", "stage": "Unreviewed", "status": "closed", "component": "contrib.admin", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "Cannot add new filterspecs without modifining filterspecs.py", "description": "Adding your own filter specs works easily by simply using this code within an applications admin.py\r\n{{{\r\n#!python\r\nfrom django.contrib.admin.filterspecs import FilterSpec\r\n\r\nclass MyFilterSpec(FilterSpec):\r\n...\r\n\r\nFilterSpec.register(...)\r\n}}}\r\n\r\nHowever, since the last default FilterSpec is always evaluated as True, and new FilterSpec's never get tested. It doesn't seem right to require a library file be modified in order to add a a feature to an application (for example, django-tagging which is what I was messing with when I found this.)\r\n\r\nSince I don't know exactly what channels I should be going through to submit this as a patch, I'll just put the solution I found here. It's easy to fix if you add the following the FilterSpec.\r\n\r\n{{{\r\n#!python\r\nclass FilterSpec(object):\r\n filter_specs = []\r\n default = None #added\r\n...\r\n def create(cls, f, request, params, model, model_admin):\r\n for test, factory in cls.filter_specs:\r\n if test(f):\r\n return factory(f, request, params, model, model_admin)\r\n ### added after this point\r\n if callable(default):\r\n return default(f, request, params, model, model_admin)\r\n create = classmethod(create)\r\n\r\n # new method\r\n def set_default(cls, factory):\r\n\tif callable(factory):\r\n\t\tcls.default = factory\r\n set_default = classmethod(set_default)\r\n}}}\r\n\r\nThen, just replace the last line (which registers AllValuesFilterSpec) with:\r\n{{{\r\n#!python\r\nFilterSpec.set_default(AllValuesFilterSpec)\r\n}}}", "owner": "nobody", "reporter": "elwaywitvac ", "keywords": "Filters", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8336, "created": "2008-08-15 07:07:48", "changetime": "2009-07-17 16:28:38", "last_pulled_from_trac": "2022-03-06 03:41:58.967262", "stage": "Design decision needed", "status": "closed", "component": "django-admin.py runserver", "type": null, "severity": null, "version": "dev", "resolution": "wontfix", "summary": "runserver option for disabling admin static files serving", "description": "Okay, it's handy not to worry about admin media files static serving, when running simple dev server..\r\n\r\nBut if you want to do something special with admin media files, like not touching the original ones in `django.contrib.admin` and add some of your own, like we do with very simple static serving view (serve from one dir and fallback to another), you must set `ADMIN_MEDIA_PREFIX = 'http://localhost:8000'`, which is not very portable solution, or symlink files from various dirs and let runserver serve admin static files from there.\r\n\r\nIf people have in their urls.py something for static media serving when `DEBUG == True` - why not to have there the same for admin?\r\n\r\nI'll attach patch that adds an option for runserver management command which gives you the chance just to disable builtin magical serving.", "owner": "nobody", "reporter": "jakub_vysoky", "keywords": "admin media runserver", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8337, "created": "2008-08-15 08:32:33", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:41:59.104779", "stage": "Ready for checkin", "status": "closed", "component": "Documentation", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Minor typo in model api doc", "description": "Just a small typo in [8365] ;)", "owner": "nobody", "reporter": "julien", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8341, "created": "2008-08-15 09:40:21", "changetime": "2012-06-26 11:49:37", "last_pulled_from_trac": "2022-03-06 03:41:59.764814", "stage": "Accepted", "status": "closed", "component": "contrib.admin", "type": "Uncategorized", "severity": "Normal", "version": "dev", "resolution": "fixed", "summary": "InlineModelAdmin is missing `can_delete` and `can_order`", "description": "`InlineModelAdmin` causes one to override whole function (`get_formset`) because it is missing, `can_delete` and `can_order` from the `inlineformset_factory` call.\r\n\r\nP.S. Not related to this patch: Also there should be ability to give different form for `change_view` and `add_view` without such a big overriding.", "owner": "nobody", "reporter": "ciantic@mbnet.fi", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8342, "created": "2008-08-15 10:01:49", "changetime": "2013-08-04 12:08:17", "last_pulled_from_trac": "2022-03-06 03:41:59.925849", "stage": "Accepted", "status": "closed", "component": "contrib.admin", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "The admin wrongly assumes you can't login with your email", "description": "On one of my sites, I have a custom authentication backend which allows you to login with your email, and just your email (the `username` attribute is basically ignored in the process).\r\nIt works fine, you can login both on the front-end site and on the admin site with your email.\r\n\r\nHowever, if you mistype the email address or try to login with an email that doesn't exist, in the admin, then you get the message \"Usernames cannot contain the '@' character.\".\r\n\r\nI don't know what's the best approach to fix this. I report now and will try to think of a patch.\r\n\r\nThis is something that I think is important to fix before 1.0, as that error message is quite misleading.", "owner": "nobody", "reporter": "julien", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8344, "created": "2008-08-15 12:11:35", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:42:00.247435", "stage": "Accepted", "status": "closed", "component": "contrib.auth", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "contrib.auth.models.User.get_profile() throws AttributeError not SiteProfileNotAvailable", "description": "On line [http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/models.py?rev=8366#L289 line 289] it checks if {{{settings.AUTH_PROFILE_MODULE}}} is set. This throws an {{{AttributeError}}} instead of the {{{SiteProfileNotAvailable}}} exception, if the setting is not given.\r\n\r\nThe attached patch fixes the issue.\r\n\r\n", "owner": "jezdez", "reporter": "jezdez", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8345, "created": "2008-08-15 13:55:16", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:42:00.520300", "stage": "Accepted", "status": "closed", "component": "Translations", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "Dutch translations, getting ready for 1.0 string-freeze", "description": "I updated the Dutch translations after beta-1 for Django 1.0 got realeased. It's 100% complete. I've attached the complete .po file since a diff would also be rather big. The djangojs.po did not change. I'm planning to keep this ticket up-to-date until the strings are completely frozen.", "owner": "nobody", "reporter": "Rudolph", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8347, "created": "2008-08-15 16:05:44", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:42:00.811914", "stage": "Accepted", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "missing fields/definitions in sqlite3 introspection module", "description": "The floatfield is missing in sqlite3 introspection module, 'real' fields in sqlite3 are suppose to use FloatField in Django ORM.\r\n\r\nAttached is a very simple patch to add it to the base_data_types_reverse list.", "owner": "nobody", "reporter": "trbs", "keywords": "sqlite, missing, fields, introspection", "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8348, "created": "2008-08-15 16:31:47", "changetime": "2014-06-06 20:33:08", "last_pulled_from_trac": "2022-03-06 03:42:00.941851", "stage": "Accepted", "status": "closed", "component": "Core (Management commands)", "type": "New feature", "severity": "Normal", "version": "dev", "resolution": "fixed", "summary": "Feature request: -n/--no-act option to syncdb", "description": "I'm about to run {{{syncdb}}} on a project I help maintain, but I don't know what it's going to add to the database because I may not have been the last one to touch it.\r\n\r\nIt would be helpful to have a {{{-n/--no-act}}} option that would report what it would do, but not actually do it.\r\n", "owner": "anonymous", "reporter": "kcarnold", "keywords": "syncdb", "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8350, "created": "2008-08-15 17:25:23", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:42:01.252629", "stage": "Ready for checkin", "status": "closed", "component": "Documentation", "type": null, "severity": null, "version": "dev", "resolution": "duplicate", "summary": "Part 2 of Tutorial references get_admin_app_list as app_list", "description": "In Tutorial 2, in the section titled Customize the admin index page, the tutorial tells you to copy django/contrib/admin/templates/admin/index.html and informs you that the tag {% get_admin_app_list as app_list %} gets the list of apps. get_admin_app_list appears to no longer be used.", "owner": "swillmon", "reporter": "Jacob Fenwick ", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8351, "created": "2008-08-15 19:06:06", "changetime": "2008-08-16 15:54:37", "last_pulled_from_trac": "2022-03-06 03:42:01.396868", "stage": "Unreviewed", "status": "closed", "component": "contrib.sessions", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "load() method of the cache SessionStore backend returns None", "description": "As of [8440], the `load()` method of the cache `SessionStore` backend returns None instead of `{}` if the `session_data` is None.", "owner": "mtredinnick", "reporter": "trevor", "keywords": null, "easy": 0, "has_patch": 1, "needs_better_patch": 0, "needs_tests": 0, "needs_docs": 0, "ui_ux": 0} {"id": 8354, "created": "2008-08-15 21:48:01", "changetime": "2011-09-28 16:12:17", "last_pulled_from_trac": "2022-03-06 03:42:01.865581", "stage": "Accepted", "status": "closed", "component": "Database layer (models, ORM)", "type": null, "severity": null, "version": "dev", "resolution": "fixed", "summary": "MySQL rejects datetimes with unusual unicode() representations", "description": "The database adapters assume that {{{unicode(datetime.datetime)}}} will return a string that can be passed to the database. Unfortunately, this assumption is false. Datetime objects with timezones will be formatted as a string that can't be read by MySQL:\r\n\r\n{{{\r\n>>> test_date\r\ndatetime.datetime(2008, 8, 15, 21, 31, 8, tzinfo=)\r\n>>> print unicode(test_date)\r\n2008-08-15 21:31:08+00:00\r\n}}}\r\n\r\nI've patched the MySQL database adapter to use {{{datetime.strftime()}}} instead of {{{unicode}}} (patch attached). This sort of patch should probably be adapted to other database adapters, so they have more consistent datetime formatting.", "owner": "nobody", "reporter": "jmillikin", "keywords": "1.0-blocker", "easy": 0, "has_patch": 1, "needs_better_patch": 1, "needs_tests": 1, "needs_docs": 0, "ui_ux": 0}