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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | 2005-07-13 19:04:45 | 2007-07-03 23:04:18 | 2022-03-06 03:19:23.301840 | Accepted | closed | contrib.admin | defect | normal | fixed | Calendar popup - next/previous month links close the popup in Safari | In Safari 2.0 on Tiger, the next/previous month links close the popup. There's no way to get to a different month. | jacob | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
6 | 2005-07-13 19:13:41 | 2006-10-07 21:25:13 | 2022-03-06 03:19:23.963614 | Unreviewed | closed | Metasystem | defect | minor | fixed | Remove has_related_links option from models | The current (undocumented) {{{has_related_links}}} code is too Ellington-specific and doesn't belong in Django. Let's remove it. We'll have to come up with a more generic way of associating content_type_id/object_id relationships, such as related links, to a model. | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
7 | 2005-07-13 19:14:41 | 2007-07-03 23:04:26 | 2022-03-06 03:19:24.105352 | Design decision needed | closed | contrib.admin | defect | minor | fixed | Patch: Changelist date range filters don't maintain state as expected | The changelist filter by a date doesn't behave as expected. '''What happens:''' When I click "This month", it correctly displays the objects for this month and drills down the date nav to the appropriate context, but the filter on the right does not indicate which range is currently applied. The "Any date" link does not reset the date drill down. '''What should happen:''' The date filter on the sidebar should update to show which range is currently applied. The "Any date" option should reset the date context. Alternatively, the filter "by date" options could be removed entirely to avoid conflict with the date drilldown. | adrian | wilson | 0 | 0 | 0 | 0 | 0 | 0 | ||
8 | 2005-07-13 19:15:25 | 2007-07-03 23:03:55 | 2022-03-06 03:19:24.252139 | Unreviewed | closed | contrib.admin | defect | minor | fixed | Date and time fields should accept multiple formats | Date and time fields should be able to adapt to multiple formats of user input (a la Simon's [http://simon.incutio.com/archive/2003/10/06/betterDateInput date parser]). As a basic example, a user should be able to enter "Today" or "Wednesday" for the date and have it converted to the correct format for today's date or this Wednesday's. For time fields, a user should be able to enter 6pm instead of 18:00. | jacob | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
11 | 2005-07-13 19:17:13 | 2007-07-03 23:03:30 | 2022-03-06 03:19:24.708876 | Ready for checkin | closed | Metasystem | defect | minor | wontfix | replaces_module should handle "admin" more intelligently | Currently if you add or remove fields via the {{{replaces_module}}} framework, you have to redefine {{{admin}}} for the object. Ideally {{{admin}}} would be handled automatically. | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
14 | 2005-07-13 19:20:55 | 2008-01-14 18:07:24 | 2022-03-06 03:19:25.261243 | Accepted | closed | contrib.admin | defect | normal | wontfix | PIE-IN-THE-SKY: Add spell-check capability to admin textareas | It'd be nice if every textarea throughout our admin offered users the option to spell-check its contents. | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
15 | 2005-07-13 19:22:11 | 2006-08-29 10:03:03 | 2022-03-06 03:19:25.461869 | Unreviewed | closed | Metasystem | defect | normal | duplicate | Metasystem unique_together doesn't work for an object that's related inline | See {{{unique_together}}} in {{{music.MusicianInBand}}}, which causes this when ManipulatorAdd is instantiated: {{{ Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/worldonline/cms/core/handler.py", line 123, in get_response return callback(request, **param_dict) File "/usr/lib/python2.3/site-packages/worldonline/cms/views/admin/main_new.py", line 608, in change_stage manipulator = mod.ChangeManipulator(object_id) File "/usr/lib/python2.3/site-packages/worldonline/cms/models/meta.py", line 77, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.3/site-packages/worldonline/cms/models/meta.py", line 1008, in manipulator_init self.fields.extend(f.get_manipulator_fields(rel_opts, self, name_prefix='%s.%d.' % (rel_opts.object_name.lower(), i), rel=True)) File "/usr/lib/python2.3/site-packages/worldonline/cms/models/meta.py", line 1279, in get_manipulator_fields params['validator_list'].append(getattr(manipulator, 'isUnique%sFor%s' % (i, j))) AttributeError: BandManipulatorChange instance has no attribute 'isUniquemusician_idForband_id' }}} | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
22 | 2005-07-13 19:33:33 | 2008-10-06 03:46:01 | 2022-03-06 03:19:29.513777 | Unreviewed | closed | contrib.admin | defect | normal | duplicate | [patch] FileUploadField should allow for clearing the field | It's currently not possible to clear the value of a FileUploadField. | adrian | adrian | 0 | 1 | 0 | 0 | 0 | 0 | ||
24 | 2005-07-13 19:35:15 | 2008-08-21 16:09:48 | 2022-03-06 03:19:30.618279 | Design decision needed | closed | Metasystem | defect | normal | wontfix | edit_inline support for OneToOne relationships | An object should be able to edit a OneToOne related object inline on the original object's page. For example, users should be able to edit lawrence.com Restaurants on the Place admin screen. (Restaurants are a one-to-one extension of Places.) | nobody | adrian | subclassing | 0 | 0 | 0 | 0 | 0 | 0 | |
30 | 2005-07-13 22:12:36 | 2007-07-03 23:04:02 | 2022-03-06 03:19:31.569913 | Design decision needed | closed | Tools | defect | normal | 1.0 | fixed | django-admin shouldn't copy "." directories from the template. | It's creating spurious ".svn" directories when used from svn; that's not so hot. | adrian | jacob | 0 | 0 | 0 | 0 | 0 | 0 | |
31 | 2005-07-15 13:09:24 | 2007-10-03 00:37:21 | 2022-03-06 03:19:31.719348 | Ready for checkin | closed | Documentation | defect | trivial | fixed | Spelling corrections from Template Guide page. | There are a few spelling errors on http://www.djangoproject.com/documentation/templates/ : 1. Under "What's a Variable?" the last sentence in the first paragraph has "be replaces with" and should have "be replaced with". 2. Under "What's a Filter?" the second sentence in the first paragraph has "This display the" and should be "This displays the". | jacob | shalofin@gmail.com | nitpick | 0 | 0 | 0 | 0 | 0 | 0 | |
32 | 2005-07-15 14:35:30 | 2007-07-03 23:03:51 | 2022-03-06 03:19:31.860139 | Unreviewed | closed | *.djangoproject.com | defect | normal | fixed | Really dead link at http://www.djangoproject.com/documentation/faq/ | http://www.djangoproject.com/documentation/admin_css/ at the bottom of http://www.djangoproject.com/documentation/faq/ dies with: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@djangoproject.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. | jacob | Martin | 0 | 0 | 0 | 0 | 0 | 0 | ||
33 | 2005-07-16 02:37:35 | 2007-07-03 23:03:44 | 2022-03-06 03:19:32.011351 | Design decision needed | closed | *.djangoproject.com | defect | normal | fixed | frontpage typo | Minor nitpick: there's a typo in the title attribute of the DIY acronym on the frontpage of http://www.djangoproject.com/ | jacob | anonymous | typo | 0 | 0 | 0 | 0 | 0 | 0 | |
34 | 2005-07-16 11:28:55 | 2005-07-16 12:05:30 | 2022-03-06 03:19:32.197738 | Unreviewed | closed | Core (Other) | defect | normal | fixed | Tutorial Import and Attribute errors while using MySQL. | I'm following the tutorial using Windows2k, MySQL 4.1 and Python 2.4.1. I've passed thru the installation phase, directory structure creation and database table creation withou problems, but i'm getting strange errors when i try to exec command described in "Playing with the API". a little note, i guess that the "export" command in the tutorial must be replaced with a "set" on windows: {{{ set DJANGO_SETTINGS_MODULE=myproject.settings.main }}} Here's the first traceback i have: {{{ >>> from django.models.polls import polls, choices Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Data\Dev\myproject\apps\polls\models\polls.py", line 1, in ? from django.core import meta File "C:\Python\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\meta.py", line 2, in ? from django.core import db File "C:\Python\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\__init __.py", line 18, in ? dbmod = __import__('django.core.db.backends.%s' % DATABASE_ENGINE, '', '', [ '']) File "C:\Python\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\backen ds\postgresql.py", line 8, in ? import psycopg as Database ImportError: No module named psycopg >>> ^Z }}} the system seems to ignore the settings specified in the main.py (although they was correctly used in the table creation pahse). hacking the Django global_settings.py file and set DATABASE_ENGINE key to "mysql" makes me skipt that error, but i've got another one: {{{ >>> from django.models.polls import polls, choices Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python\Lib\site-packages\django-1.0.0-py2.4.egg\django\models\__in _.py", line 8, in ? for mod in meta.get_installed_models(): File "C:\Python\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\meta.p line 76, in get_installed_models for a in settings.INSTALLED_APPS: AttributeError: 'module' object has no attribute 'INSTALLED_APPS' }}} Now i'm stuck. ;( | adrian | deelan | 0 | 0 | 0 | 0 | 0 | 0 | ||
35 | 2005-07-16 12:15:35 | 2007-07-03 23:03:50 | 2022-03-06 03:19:32.361893 | Unreviewed | closed | Database layer (models, ORM) | defect | blocker | 1.0 | invalid | django-admin.py init problem for postgresql 8.0.3/win32 | I try to pas step by step from http://www.djangoproject.com/documentation/tutorial1/ using PostgreSQL 8.0.3 (Winddows XP Pro SP2, Python 2.4.1, Apache 2.0.54, SVN version of django). I cannot initialize default django tables: C:\opt\Python24\Lib\site-packages\myproject>django-admin.py init Traceback (most recent call last): File "C:\opt\Python24\Scripts\django-admin.py", line 4, in ? pkg_resources.run_script('django==1.0.0', 'django-admin.py') File "C:\opt\Python24\Lib\site-packages\setuptools-0.5a12-py2.4.egg\pkg_resources.py", line 111, in run_script require(dist_spec)[0].metadata.run_script(script_name, ns) File "C:\opt\Python24\Lib\site-packages\setuptools-0.5a12-py2.4.egg\pkg_resources.py", line 634, in run_script execfile(script_filename, namespace, namespace) File "C:\opt\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\EGG-INFO\scripts\django-admin.py", line 399, in ? init() File "C:\opt\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\EGG-INFO\scripts\django-admin.py", line 275, in init from django.core import db, meta File "C:\opt\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\__init__.py", line 18, in ? dbmod = __import__('django.core.db.backends.%s' % DATABASE_ENGINE, '', '', ['']) File "C:\opt\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\backends\postgresql.py", line 65, in ? Database.register_type(Database.new_type((1082,), "DATE", typecasts.typecast_date)) !AttributeError: 'module' object has no attribute 'register_type' | adrian | JZ | 0 | 0 | 0 | 0 | 0 | 0 | |
36 | 2005-07-16 12:17:46 | 2007-07-17 21:19:58 | 2022-03-06 03:19:32.501188 | Design decision needed | closed | Core (Other) | defect | normal | 1.0 | invalid | how do I config the apache+mod_python? | hi, I have successfully created the project and app as the tutorial wrote. but i can not make it work under the apache+mod_python. I put the block {{{ <Directory "d:/myproject/django/trunk"> AddHandler mod_python .py PythonHandler django.core.handler PythonDebug On </Directory> }}} in httpd.conf, so i can use url:'http://localhost:8080/a.py' to call the handler. however , how can i use url:'http://localhost:8080/2005/12/35678' to read an article? wait the answer , thanks. | adrian | james | web server | 0 | 0 | 0 | 0 | 0 | 0 |
37 | 2005-07-16 12:45:48 | 2007-07-03 23:03:23 | 2022-03-06 03:19:32.645139 | Design decision needed | closed | Documentation | defect | normal | fixed | Homepage link 'tutorial' is broken. | The referred page is missing. Might be that it should refer to tutorial1 which exists. | jacob | sirpete@iki.fi | 0 | 0 | 0 | 0 | 0 | 0 | ||
39 | 2005-07-16 21:08:21 | 2007-07-03 23:03:26 | 2022-03-06 03:19:32.951816 | Design decision needed | closed | Database layer (models, ORM) | defect | major | fixed | Get obj.save() working in all MySQL versions | Some versions of MySQL tables (InnoDB?), with certain versions of MySQLdb, require that commit() be manually called. Others assume autocommit is turned on. We need to fix this. | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
40 | 2005-07-17 01:32:23 | 2006-10-22 16:14:52 | 2022-03-06 03:19:33.109198 | Unreviewed | closed | Database layer (models, ORM) | defect | major | fixed | Attempt to set a many to many relation throws exception unless model specifies ordering. | I've got two basic models, with a ManyToManyField connecting them. An exception is thrown while trying to set the relation: {{{ class Foo(meta.Model) fields = ( meta.CharField('name', 'name', maxlength=100), ) class Bar(meta.Model) fields = ( meta.CharField('name', 'name', maxlength=100), meta.ManyToManyField(Foo), ) >>> f = foos.get_object(id__exact=1) >>> b = bars.get_object(id__exact=1) >>> f.set_bars((b.id,)) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta.py", line 57, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/meta.py", line 897, in method_set_related_many_to_many if rel_field.rel.orderable: AttributeError: ManyToMany instance has no attribute 'orderable' }}} If I add an "ordering = (('name', 'ASC'),)" to Bar then it works as expected. The relation should work even without specifying an ordering, however orderable does not seem to be set at all unless I explicitly add ordering to the model. | adrian | jforeman@hark.org | ManyToMany | 0 | 0 | 0 | 0 | 0 | 0 | |
42 | 2005-07-17 05:47:13 | 2006-10-14 14:31:41 | 2022-03-06 03:19:33.463570 | Unreviewed | closed | Database layer (models, ORM) | defect | normal | fixed | OneToOneField missing from DATA_TYPES dict | revision 138 on trunk is missing entries for OneToOneField fields, and so sql generation fails if you have such a field in one of your models. below is a simple patch to add it to the backends. {{{ Index: django/core/db/backends/postgresql.py =================================================================== --- django/core/db/backends/postgresql.py (revision 134) +++ django/core/db/backends/postgresql.py (working copy) @@ -105,6 +105,7 @@ 'IPAddressField': 'inet', 'ManyToManyField': None, 'NullBooleanField': 'boolean', + 'OneToOneField': None, 'PhoneNumberField': 'varchar(20)', 'PositiveIntegerField': 'integer CHECK (%(name)s >= 0)', 'PositiveSmallIntegerField': 'smallint CHECK (%(name)s >= 0)', Index: django/core/db/backends/mysql.py =================================================================== --- django/core/db/backends/mysql.py (revision 134) +++ django/core/db/backends/mysql.py (working copy) @@ -95,6 +95,7 @@ 'IPAddressField': 'char(15)', 'ManyToManyField': None, 'NullBooleanField': 'bool', + 'OneToOneField': None, 'PhoneNumberField': 'varchar(20)', 'PositiveIntegerField': 'integer UNSIGNED', 'PositiveSmallIntegerField': 'smallint UNSIGNED', }}} the patch fixes sql generation for simple cases such as: {{{ class Piece(meta.Model): fields = ( meta.CharField('title', 'title', maxlength=256), meta.DateTimeField('publishDate', 'date published'), meta.ManyToManyField(Category), ) class ImagePiece(meta.Model): fields = ( meta.OneToOneField(Piece), meta.FileField('data', 'data', upload_to='pieces'), ) }}} but more complicated models haven't been tested. | adrian | nullstyle@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
43 | 2005-07-17 07:01:40 | 2007-07-03 23:03:29 | 2022-03-06 03:19:33.614661 | Ready for checkin | closed | contrib.admin | defect | minor | 1.0 | fixed | link to icon_searchbox.png is broken | Now the icon is added, it's still got an extra "/admin" in it. | adrian | django@sabi.net | 0 | 0 | 0 | 0 | 0 | 0 | |
44 | 2005-07-17 13:01:43 | 2007-07-03 23:03:28 | 2022-03-06 03:19:33.781615 | Ready for checkin | closed | Documentation | defect | normal | fixed | Missing view templates for djangoproject.com in Subersion repos. | I think it would be useful for documentation purposes to have templates files in SVN for the blog app which runs djangoproject.com, the folder /django_website/apps/blog/views is empty, while models and other stuff are curretly stored in the corresponding folders. | jacob | deelan | 0 | 0 | 0 | 0 | 0 | 0 | ||
45 | 2005-07-17 15:41:33 | 2007-07-03 23:03:54 | 2022-03-06 03:19:33.946561 | Design decision needed | closed | *.djangoproject.com | defect | normal | fixed | Website should emphasize that MySQL support isn't thoroughly tested | There seem to be lots of questions on the IRC channel about problems with MySQL - almost certainly bugs that exist because Django hasn't been comprehensively tested with that database. The website should emphasize the lack of stability in the MySQL bindings and encourage people to file bugs whenever they run in to a problem. | jacob | Simon Willison | 0 | 0 | 0 | 0 | 0 | 0 | ||
46 | 2005-07-17 15:44:25 | 2006-10-07 22:22:38 | 2022-03-06 03:19:34.112500 | Unreviewed | closed | contrib.admin | defect | normal | fixed | Refactor DATE_TRUNC() and EXTRACT() database code for MySQL | It's a Windows XP SP 2, Apache 2.0.54, Python 2.41, Mod_python 3.14, MySQL 4 setup. You can reproduce the bug in several cases. One of them is to click the filters in the Users page. Also ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''month' FROM polls_polls.pub_date) = '7' AND polls_polls.pub_date BETWEEN '2005-' at line 1") Another example would be using date_hierarchy = 'pub_date', to get ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('year', polls_polls.pub_date) FROM polls_polls GROUP BY 1 ORDER BY 1 ASC' at line 1") | adrian | Umair | 0 | 0 | 0 | 0 | 0 | 0 | ||
47 | 2005-07-17 15:53:38 | 2007-07-03 23:03:42 | 2022-03-06 03:19:34.257492 | Ready for checkin | closed | *.djangoproject.com | defect | normal | fixed | Get rid of the Roadmap link in Trac | It doesn't do anything, and unless it's going to be used it would be good to drop it from the template. (A Trac component for this kind of bug might be handy as well). | jacob | Simon Willison | 0 | 0 | 0 | 0 | 0 | 0 | ||
48 | 2005-07-17 16:11:23 | 2007-07-21 14:43:57 | 2022-03-06 03:19:34.417240 | Accepted | closed | Database layer (models, ORM) | defect | normal | fixed | Unit tests for MySQL support | Since more people are going to be using MySQL than PostgreSQL, but the MySQL support is new and mostly untested, let's build up a comprehensive set of unit tests for the MySQL stuff. We might even be able to share them with other database backends. This would make it much easier to add sqlite support (for example) later on. | adrian | Simon Willison | 0 | 0 | 0 | 0 | 0 | 0 | ||
49 | 2005-07-17 17:45:42 | 2007-07-03 23:03:32 | 2022-03-06 03:19:34.565641 | Accepted | closed | contrib.admin | defect | normal | fixed | Remove references to http://media.ljworld.com from the code | Apparently http://media.ljworld.com is scattered through the code: {{{ simon:~/src/trunk$ grep -R "media.ljworld.com" * | grep -v ".svn" media/js/admin/add_calendars.js: quickElement('img', cal_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_calendar.gif', 'alt', 'Calendar'); media/js/admin/DateTimeShortcuts.js: quickElement('img', clock_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_clock.gif', 'alt', 'Clock'); media/js/admin/DateTimeShortcuts.js: quickElement('img', cal_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_calendar.gif', 'alt', 'Calendar'); media/js/SelectFilter2.js: quickElement('img', filter_p, '', 'src', 'http://media.ljworld.com/img/admin/selector-search.gif'); media/js/SelectFilter2.js: quickElement('img', selector_filter, '', 'src', 'http://media.ljworld.com/img/admin/selector-add.gif', 'alt', 'Add'); }}} | adrian | Simon Willison | 0 | 0 | 0 | 0 | 0 | 0 | ||
50 | 2005-07-17 21:05:22 | 2007-07-03 22:52:28 | 2022-03-06 03:19:34.717632 | Ready for checkin | closed | Documentation | defect | minor | fixed | Tutorial#1 section Initial Setup directory listing is missing settings/urls folder | After django_admin.py startproject myproject is called new project now has a 'settings/urls' folder. Tutorial#1 section 'Initial Setup' has a directory listing of the new project. The listing is missing settings/urls folder. | jacob | sirpete@iki.fi | django_admin startproject | 0 | 0 | 0 | 0 | 0 | 0 | |
52 | 2005-07-18 00:39:10 | 2006-10-22 16:22:27 | 2022-03-06 03:19:35.028090 | Unreviewed | closed | Documentation | defect | normal | fixed | A couple of minor errors in the documentation on the site | On this page: http://www.djangoproject.com/documentation/model_api/ there are a couple of small errors. 1. It doesn't specify that maxlength must be set for a CommaSeparatedIntegerField. 2. That the FloatField requires max_digits=14 and decimal_places=4, it currently says those are optional. Thanks For all the hard work! | jacob | Dobbes | 0 | 0 | 0 | 0 | 0 | 0 | ||
53 | 2005-07-18 02:22:50 | 2007-07-03 22:57:14 | 2022-03-06 03:19:35.179425 | Ready for checkin | closed | Tools | defect | normal | fixed | djonga-admin.py sqlclear fails with entries in auth_permissions tables | Running the sql output from djonga-admin.py sqlclear blog BEGIN; DELETE from content_types WHERE package = 'blog'; DELETE FROM packages WHERE label = 'blog'; DROP TABLE blog_entries; COMMIT; Returns the following error: ERROR: update or delete on "packages" violates foreign key constraint "auth_permissions_package_fkey" on "auth_permissions" DETAIL: Key (label)=(blog) is still referenced from table "auth_permissions". This is pretty much what it says that there are still fields in the auth_permissions table that reference the blog package, so it can't be deleted. I created the simple patch for it and will attach. | adrian | Dobbes | 0 | 0 | 0 | 0 | 0 | 0 | ||
54 | 2005-07-18 03:06:17 | 2007-07-03 23:01:12 | 2022-03-06 03:19:35.324390 | Unreviewed | closed | Documentation | defect | normal | fixed | pattern in url_dispatch.txt maybe wrong | {{{ >>> import re >>> a = r'^/articles/(?P\d{4})/$' >>> re.compile( a ) Traceback (most recent call last): File "<input>", line 1, in ? File "C:\Python24\Lib\sre.py", line 180, in compile return _compile(pattern, flags) File "C:\Python24\Lib\sre.py", line 227, in _compile raise error, v # invalid expression error: unknown specifier: ?P\d >>> a = r'^/articles/(?P<year>\d{4})/$' >>> re.compile( a ) <_sre.SRE_Pattern object at 0x01093350> }}} Should we add the group name in patterns? | jacob | james | 0 | 0 | 0 | 0 | 0 | 0 | ||
55 | 2005-07-18 05:42:08 | 2007-07-03 23:03:50 | 2022-03-06 03:19:35.483780 | Accepted | closed | Tools | defect | normal | wontfix | add a logger to django | insert the block into django.conf.settings file at line 32. {{{ #python a = me.SETTINGS_MODULE.split( '.' ) if 'settings' in a: idx = a.index( 'settings' ) if idx > 0: projname = a[idx-1] projmod = __import__( projname , '', '', ['']) else: projname = 'django' import django as projmod logdir = os.path.split( projmod.__file__ )[0] + os.sep + 'logs' if not os.access( logdir , os.W_OK ): raise 'Cannot write log file in dir: ' + logdir import logging logger = logging.getLogger( projname ) hdlr = logging.FileHandler( logdir + os.sep + projname + '.log' ) formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') hdlr.setFormatter(formatter) logger.addHandler( hdlr ) logger.setLevel( logging.DEBUG ) __builtins__['log'] = logger log.info( 'project logger start' ) }}} make sure you have created 'logs' folder at your project or django src. then you can use log object anywhere. ATTENTION: NOT fully tested. | adrian | james | log | 0 | 0 | 0 | 0 | 0 | 0 | |
57 | 2005-07-18 08:54:22 | 2006-08-29 10:24:58 | 2022-03-06 03:19:35.722229 | Unreviewed | closed | Documentation | defect | normal | fixed | Add to Apache configuration for tutorial (part 2) | Possibly include PythonDebug On in the sample config, gives at least an error message you can work with instead of the rather non-descript 500 Internal Server Error. Also, at least in my case the PYTHONPATH I exported on the commandline didn't carry over to the one mod_python was using. In this case, PythonPath "['/var/www/django/http'] + sys.path" solved my problem. | jacob | Manuzhai <mail@manuzhai.nl> | 0 | 0 | 0 | 0 | 0 | 0 | ||
58 | 2005-07-18 09:26:59 | 2007-07-03 23:03:52 | 2022-03-06 03:19:35.920339 | Design decision needed | closed | Database layer (models, ORM) | defect | normal | invalid | Creating user from interactive interpreter doesn't work with MySQL | from django.models.auth import users doesn't seem to work with MySQL. I get the following error: {{{ Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/models/__init__.py", line 1, in ? from django.core import meta File "/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/meta.py", line 2, in ? from django.core import db File "/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/db/__init__.py", line 22, in ? raise ImproperlyConfigured, "Your DATABASE_ENGINE setting, %r, is invalid. Is it spelled correctly?" % DATABASE_ENGINE django.core.exceptions.ImproperlyConfigured: Your DATABASE_ENGINE setting, 'mysql', is invalid. Is it spelled correctly? }}} I tried checking out the source code to see what caused the error, but this is a little hard, as there is a circular import from db.__init__ and db.backends.mysql, so it seems I can't really see where the problem is coming from. | adrian | Manuzhai <mail@manuzhai.nl> | 0 | 0 | 0 | 0 | 0 | 0 | ||
59 | 2005-07-18 09:45:00 | 2007-07-03 23:03:34 | 2022-03-06 03:19:36.121419 | Design decision needed | closed | contrib.admin | defect | normal | fixed | Hard-coded references to password_change and logout | Sorry for another ticket, but I really like what I've seen so far. :D If you'd rather I comment on the tutorial page itself, that's alright too, I'm just used to working with Trac myself. They don't actually point to the admin, just to the root of the web server. It would seem to me this is a problem with the template stuff, but it could be just a documentation problem that I have to change something else. | adrian | Manuzhai <mail@manuzhai.nl> | 0 | 0 | 0 | 0 | 0 | 0 | ||
60 | 2005-07-18 16:14:09 | 2006-10-08 00:18:02 | 2022-03-06 03:19:36.271218 | Unreviewed | closed | Core (Other) | defect | normal | invalid | Built in webserver | Are you aware that they CherryPy team has implemented a python standalone wsgi server that they use for development? Perhaps that could be adapted, instead of having to reinvint the wheel? I apologize for putting this in a bug report, I couldn't find another way of contact on the website. | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
66 | 2005-07-18 16:57:22 | 2007-07-03 23:03:50 | 2022-03-06 03:19:37.305226 | Design decision needed | closed | Core (Other) | defect | normal | wontfix | [patch] Give views access to application root from urlconf | When using include with urlpatterns, there should be a variable available to the views that will give us the root of the application. For instance, for: {{{ (r'^polls/', include('myproject.apps.polls.urls.polls')), }}} ...it would be "/polls/". | adrian | slashzero | 0 | 1 | 0 | 0 | 0 | 0 | ||
68 | 2005-07-18 17:32:08 | 2007-07-03 23:03:24 | 2022-03-06 03:19:37.636827 | Ready for checkin | closed | Documentation | defect | minor | fixed | Tutorial 02 shows deprecated mod_python config | Per changeset:169, the mod_python config should specify django.core.handlers.modpython as handler. {{{ --- docs/tutorial02.txt Mon Jul 18 11:10:22 2005 +++ docs/tutorial02_update.txt Mon Jul 18 13:24:01 2005 @@ -65,7 +65,7 @@ <Location "/admin/"> SetHandler python-program - PythonHandler django.core.handler + PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin PythonDebug On </Location> }}} | jacob | pb@e-scribe.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
70 | 2005-07-18 19:48:49 | 2007-07-03 23:04:04 | 2022-03-06 03:19:37.946907 | Ready for checkin | closed | *.djangoproject.com | defect | normal | fixed | Community link not there from within Code. | Probably should add it to the Trac templates. ;) How come, by the way, the addition of Community is not visible in the Timeline? The djangoproject.com website is also in SVN, right? | jacob | Manuzhai <mail@manuzhai.nl> | 0 | 0 | 0 | 0 | 0 | 0 | ||
71 | 2005-07-18 20:26:25 | 2007-07-03 23:04:07 | 2022-03-06 03:19:38.102279 | Ready for checkin | closed | Documentation | defect | minor | fixed | Consider using "example.com" instead of "mysite.com" | Kind of a [http://www.rfc-editor.org/rfc/rfc2606.txt fussy detail], but in the example files it might be better to use example.(com|org|net) instead of mysite.com, especially since the URL shows up as a live link at the top of the admin. Locations as of [181]: {{{ > grep -rn "mysite.com" * | grep -v ".svn" django/bin/django-admin.py:283: cursor.execute("INSERT INTO %s (domain, name) VALUES ('mysite.com', 'My Django site')" % core.Site._meta.db_table) django/conf/admin_templates/base_site.html:7:<h2 id="site-url"><a href="http://www.mysite.com/">mysite.com</a></h2> docs/faq.txt:223: example, if you're going to "http://www.mysite.com/admin/" in your browser, docs/faq.txt:224: set ``REGISTRATION_COOKIE_DOMAIN = 'www.mysite.com'``. docs/tutorial02.txt:446:Clearly having "Django administration" and "mysite.com" at the top of each }}} | jacob | pb@e-scribe.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
72 | 2005-07-18 20:54:10 | 2012-11-23 02:29:52 | 2022-03-06 03:19:38.257291 | Accepted | closed | Core (Other) | defect | normal | fixed | Django should add charset info to output HTTP headers | It seems Django doesn't add the "charset=utf8" field to "Content-type: text/html" header while sending headers to the browser. This cause pages encoded as UTF-8 look wrong in the browser (Firefox assumes page is encoded using iso-8859-1, which is the default HTTP encoding). Sample headers sent by Django: {{{ Date: Mon, 18 Jul 2005 20:51:43 GMT Server: Apache/2.0.54 (Win32) mod_python/3.1.4 Python/2.4.1 Connection: close Transfer-Encoding: chunked Content-Type: text/html 200 OK }}} Patching Content-type header to look like "Content-Type: text/html; charset=utf-8" would make clear which encoding is used by the server. [http://www.w3.org/International/O-HTTP-charset More info about charset param here.] | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
74 | 2005-07-18 21:05:56 | 2006-10-22 16:23:53 | 2022-03-06 03:19:38.590324 | Unreviewed | closed | *.djangoproject.com | defect | normal | duplicate | add djangoproject.com templates into SVN | For transparency and instruction-by-example, it would be nice to have the templates for djangoproject.com in SVN. Then people can see how brilliant minds like mine hack the template system to do terrible things. | adrian | wilson | 0 | 0 | 0 | 0 | 0 | 0 | ||
75 | 2005-07-18 21:17:26 | 2007-07-03 23:04:01 | 2022-03-06 03:19:38.754661 | Accepted | closed | Metasystem | defect | normal | fixed | Add support for recursive ManyToManyFields | {{{ManyToManyField}}}s should be able to be related to {{{"self"}}}, as {{{ForeignKey}}}s can. | adrian | slashzero | 0 | 0 | 0 | 0 | 0 | 0 | ||
76 | 2005-07-18 21:21:48 | 2007-07-03 23:04:02 | 2022-03-06 03:19:38.911572 | Accepted | closed | Tools | defect | normal | fixed | Development server should serve admin images, too | The simple server started by {{{django-admin.py runserver}}} should serve admin images. It's a pain to have to set up Apache just to serve those. | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
79 | 2005-07-19 02:27:56 | 2007-07-03 23:03:51 | 2022-03-06 03:19:39.339636 | Accepted | closed | contrib.admin | defect | normal | invalid | Unable to run admin interface via stand-alone server | Under revision 191. Running: > django-admin.py runserver 8888 When accessing admin URL receive below. ===== There's been an error: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/django/core/handlers/wsgi.py", line 184, in get_response callback, param_dict = resolver.resolve(path) File "/usr/lib/python2.3/site-packages/django/core/urlresolvers.py", line 85, in resolve raise Http404, app_path Http404: admin/ | adrian | jyap@raywoodcommunications.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
80 | 2005-07-19 05:32:08 | 2005-07-19 17:36:30 | 2022-03-06 03:19:39.487275 | Unreviewed | closed | contrib.admin | defect | critical | worksforme | Browsing to http://127.0.0.1:8000 fails when running django-admin.py runserver | Following the tutorial 2 instructions to run django-admin.py runserver causes the following to be shown in the browser: There's been an error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 184, in get_response callback, param_dict = resolver.resolve(path) File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py", line 85, in resolve raise Http404, app_path Http404 This occurs on a Ubuntu 5.04 system running Python 2.4.1, Django SVN version 193. | adrian | pkropf@gmail.com | 0 | 0 | 0 | 0 | ||||
81 | 2005-07-19 06:38:29 | 2007-01-17 22:12:17 | 2022-03-06 03:19:39.671244 | Unreviewed | closed | contrib.admin | defect | major | fixed | Setting primary_key=True on an non-integer field isn't yet supported | The admin interface appears to want to keep the primary_key numerical, and so breaks if you have set a field as primary_key=True. Model: {{{ class Airfield(meta.Model): fields = ( meta.CharField('code', 'airfield code', maxlength=4, primary_key=True), meta.CharField('name', 'name', maxlength=50), ) admin = meta.Admin( fields = ( (None, {'fields': ('code', 'name')}), ), ) def __repr__(self): return self.name }}} Result from trying to add an item through the admin interface: {{{ There's been an error: Traceback (most recent call last): File "/sw/lib/python2.3/site-packages/django/core/handlers/wsgi.py", line 190, in get_response return callback(request, **param_dict) File "/sw/lib/python2.3/site-packages/django/views/admin/main.py", line 769, in add_stage log.log_action(request.user.id, opts.get_content_type_id(), getattr(new_object, opts.pk.name), repr(new_object), log.ADDITION) File "/sw/lib/python2.3/site-packages/django/models/auth.py", line 293, in _module_log_action e.save() File "/sw/lib/python2.3/site-packages/django/core/meta.py", line 57, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/sw/lib/python2.3/site-packages/django/core/meta.py", line 748, in method_save (opts.db_table, ','.join(field_names), ','.join(placeholders)), db_values) File "/sw/lib/python2.3/site-packages/django/core/db/base.py", line 10, in execute result = self.cursor.execute(sql, params) ProgrammingError: ERROR: invalid input syntax for integer: "EGKR" INSERT INTO auth_admin_log (action_time,user_id,content_type_id,object_id,object_repr,action_flag,change_message) VALUES ('2005-07-19 01:31:40',1,17,'EGKR','Redhill',1,'') }}} | adrian | jmb@atuin.co.uk | 0 | 0 | 0 | 0 | 0 | 0 | ||
82 | 2005-07-19 06:59:18 | 2007-07-03 23:03:59 | 2022-03-06 03:19:39.839173 | Ready for checkin | closed | Core (Other) | defect | trivial | fixed | Config snippet for mod_python users doing tutorial 3 | Would be nice, if we could still continue the mod_python path... I don't think the httpd.conf for this site is in SVN either, right? | adrian | Manuzhai <mail@manuzhai.nl> | 0 | 0 | 0 | 0 | 0 | 0 | ||
83 | 2005-07-19 11:02:41 | 2005-07-19 14:44:38 | 2022-03-06 03:19:40.255427 | Unreviewed | closed | Core (Other) | defect | trivial | fixed | Spelling error in Environment not found exception | {{{File "/usr/lib/python2.4/site-packages/django/conf/settings.py", line 25, in ? raise EnvironmentError, "Environemnt variable DJANGO_SETTINGS_MODULE is undefined."}}} --- Environenmt. | adrian | Manuzhai <mail@manuzhai.nl> | 0 | 0 | 0 | 0 | 0 | 0 | ||
84 | 2005-07-19 13:06:51 | 2006-10-16 15:33:56 | 2022-03-06 03:19:40.498117 | Unreviewed | closed | Database layer (models, ORM) | defect | major | fixed | Foreign keys don't work in MySQL | Django generates: post_id mediumint(9) unsigned auto_increment NOT NULL REFERENCES posts_posts (slug) This doesn't work. In MySQL, only one column can have auto_increment, and that same column has to be the PRIMARY KEY. I think there should be a separate DATATYPE for ForeignKeys (it seems to just reuse the AutoField). | adrian | Manuzhai | 0 | 0 | 0 | 0 | 0 | 0 | ||
85 | 2005-07-19 13:47:36 | 2007-01-17 22:12:17 | 2022-03-06 03:19:40.679016 | Unreviewed | closed | contrib.admin | defect | normal | worksforme | Admin login doesn't work with Konqueror | Logging into admin interface does not work for konqueror, but works for firefox. The console output of django-admin.py runserver: localhost.localdomain - - [19/Jul/2005 08:44:24] "POST /admin/ HTTP/1.1" 302 0 localhost.localdomain - - [19/Jul/2005 08:44:24] "GET /admin/ HTTP/1.1" 200 1638 The login time gets updated in database, but konqueror returns to login page. svn revision 201, Konqueror 3.4.1 | adrian | hruske@kiberpipa.org | konqueror admin | 0 | 0 | 0 | 0 | 0 | 0 | |
86 | 2005-07-19 15:37:19 | 2006-10-22 16:17:36 | 2022-03-06 03:19:40.838369 | Unreviewed | closed | Core (Other) | defect | normal | invalid | Custom External TemplateTag module | I know that you can add template tags to a project by placing them in an apps' TemplateTag module, but is it possible to add an external TemplateTag module to a project. I'm currently working on an Ajax middleware for Django and I'd like to create a templatetag to load the javascript libraries needed. I don't want to make the users put the custom template tag library into the django.templatetags module because that would be messing with the djangocore. Maybe allow the user to specify a tuple called EXTERNAL_TEMPLATETAG_MODULES in the settings module. Thanks | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
88 | 2005-07-19 16:57:51 | 2007-07-03 23:03:29 | 2022-03-06 03:19:41.163208 | Accepted | closed | Core (Other) | defect | trivial | fixed | Configuration should be more forgiving to users who forget the trailing comma. | It is really easy for users to forget the trailing comma in configuration settings that should be a tuple, resulting in weird errors. In order to help keep (new) users from getting frustrated, a string should be converted into a tuple for these settings. Here is a patch to implement this: {{{ Index: django/conf/settings.py =================================================================== --- django/conf/settings.py (revision 211) +++ django/conf/settings.py (working copy) @@ -29,9 +29,16 @@ except ImportError, e: raise EnvironmentError, "Could not import DJANGO_SETTINGS_MODULE '%s' (is it on sys.path?): %s" % (me.SETTINGS_MODULE, e) + +# a list of settings that should be converted into tuples if they are strings: +tuple_settings = ["INSTALLED_APPS","TEMPLATE_DIRS"] + for setting in dir(mod): if setting == setting.upper(): - setattr(me, setting, getattr(mod, setting)) + setting_value = getattr(mod, setting) + if setting in tuple_settings and type(setting_value) == str: + setting_value = (setting_value,) #In case the user forgot the comma. + setattr(me, setting, setting_value) # save DJANGO_SETTINGS_MODULE in case anyone in the future cares me.SETTINGS_MODULE = os.environ.get('DJANGO_SETTINGS_MODULE', '') }}} Note that I only put two entries in the tuple_settings list, as they are the only ones I know of. If there are more, they should be added. | adrian | mmarshall | 0 | 0 | 0 | 0 | 0 | 0 | ||
89 | 2005-07-19 18:06:39 | 2006-04-23 22:52:28 | 2022-03-06 03:19:41.329410 | Unreviewed | closed | contrib.admin | defect | minor | 1.1 | fixed | DateTimeFields with auto_now_add = True in admin | Expose a DateTimeField with auto_now_add = True to the admin, try to add a new object. You can see the date field with empty values (no calendar, etc). Save the object, you'll get a validation error. Example model: {{{ class Article(meta.Model): fields = ( meta.CharField('title', 'title', maxlength=200, core=True), meta.TextField('data','data'), meta.DateTimeField('date','date',auto_now_add=True), ) admin = meta.Admin( fields = ( (None, {'fields': ('title', 'date','data',)}), ), ) }}} If i un-expose the 'date' field from admin, everything works fine. | adrian | philippe.normand@gmail.com | date | 0 | 0 | 0 | 0 | 0 | 0 |
92 | 2005-07-19 22:08:06 | 2007-07-03 23:04:10 | 2022-03-06 03:19:41.790772 | Design decision needed | closed | Metasystem | defect | normal | fixed | Make meta.Admin.fields optional | If {{{meta.Admin.fields}}} isn't defined, it should default to all the fields in the model. | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
93 | 2005-07-19 22:43:48 | 2007-03-26 21:39:52 | 2022-03-06 03:19:41.901224 | Design decision needed | closed | Tools | defect | major | fixed | django-admin startproject can create invalid settings/admin.py on windows | Following part 2 of the tutorial, I get the following error when trying to view /admin/: There's been an error: Traceback (most recent call last): File "C:\play\python\django\trunk\django\core\handlers\wsgi.py", line 187, in get_response response = middleware_method(request, callback, param_dict) File "C:\play\python\django\trunk\django\middleware\admin.py", line 46, in process_view return self.display_login_form(request, message) File "C:\play\python\django\trunk\django\middleware\admin.py", line 91, in display_login_form t = template_loader.get_template(self.get_login_template_name()) File "C:\play\python\django\trunk\django\core\template_loader.py", line 13, in get_template return get_template_from_string(load_template_source(template_name)) File "C:\play\python\django\trunk\django\core\template_file.py", line 22, in load_template_source raise TemplateDoesNotExist, error_msg TemplateDoesNotExist: Tried ['C:\\play\\python\\django\trunk\\django/conf/admin_templates\\login.html'] The \t in django\trunk is a tab character. This is coming from the settings/admin.py file created by django-admin startproject. At line 349 in django-admin.py, where it is populating the TEMPLATE_DIRS setting, the %r format specifier should be used to ensure that the path is rendered correctly into the file, and r needs to be put in the string before it to ensure that it is interpreted as a raw string. So line 349 should be: settings_contents = re.sub(r'(?s)\b(TEMPLATE_DIRS\s*=\s*\()(.*?)\)', "\\1\n r%r,\\2)" % ADMIN_TEMPLATE_DIR, settings_contents) | adrian | xtian@toysinabag.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
94 | 2005-07-19 23:26:58 | 2007-07-03 23:03:40 | 2022-03-06 03:19:42.023629 | Ready for checkin | closed | contrib.admin | defect | normal | fixed | Mysterious error | I am trying to create a module for news, but with the code below, it reports a mysterious error. When trying to add a news item, it says "Please correct the errors below.", but it doesn't show any like it normally does. :/ I'm thinking it's just a stupid mistake on my part as I'm new to this (oh, I guess pretty much every one is right now ;) ) and rather new to python programming (and I've done little with object oriented coding). So if someone could help me out, that would be great! {{{ # 'news' module code: from django.core import meta from django.models import auth, core # Create your models here. class News(meta.Model): fields = ( meta.ForeignKey(auth.User, raw_id_admin=True), meta.CharField('title', maxlength=200), meta.DateTimeField('pub_date', 'date published'), meta.TextField('body',), meta.ManyToManyField(auth.Group, blank=True, help_text="Select which user groups will see this news article."), ) admin = meta.Admin( fields = ( (None, {'fields': ('title','body')}), ('Date information', {'fields': ('pub_date',)}), ('Groups', {'fields': ('groups',)}), ), list_display = ('title', 'pub_date', 'groups', 'was_published_today'), list_filter = ('pub_date', ), search_fields = ('title', ), date_hierarchy = 'pub_date', ) def __repr__(self): return self.title def was_published_today(self): if self.pub_date.date() == datetime.date.today(): return "Yes" else: return "No" was_published_today.short_description = 'Was published today' }}} | adrian | Joey Marshall | 0 | 0 | 0 | 0 | 0 | 0 | ||
95 | 2005-07-20 00:05:06 | 2007-07-03 23:03:41 | 2022-03-06 03:19:42.133120 | Design decision needed | closed | Core (Other) | defect | normal | fixed | Encourage people to change the TAMPER_SECRET | TAMPER_SECRET in source:django/trunk/django/middleware/admin.py#3 should be unique (and secret) for every deployed Django application. This needs to be mentioned in the documentation. The constant should probably be moved to settings.py rather than living in the middleware module. | adrian | Simon Willison | 0 | 0 | 0 | 0 | 0 | 0 | ||
97 | 2005-07-20 00:13:39 | 2005-07-20 15:14:00 | 2022-03-06 03:19:42.450355 | Unreviewed | closed | Core (Other) | defect | normal | fixed | Refactor django-admin.py so it only contains command-line interface code | Move the bulk of django-admin.py into something like django/core/management.py, for code cleanliness and so other code can import from django.core.management. | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
100 | 2005-07-20 01:21:07 | 2007-07-03 23:04:10 | 2022-03-06 03:19:44.511817 | Ready for checkin | closed | Documentation | defect | normal | fixed | document ForeignKey('self') hack, please | assuming I got it right this time :-) | jacob | maney@two14.net | 0 | 0 | 0 | 0 | 0 | 0 | ||
102 | 2005-07-20 02:21:13 | 2007-07-03 23:04:15 | 2022-03-06 03:19:45.338216 | Ready for checkin | closed | Core (Other) | defect | normal | fixed | Exceptions aren't html-quoted | Exceptions that contain <> (like <Foo.bar at 0x139413>) aren't HTML quoted, and the text disapears. | adrian | ianb@colorstudy.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
103 | 2005-07-20 03:37:24 | 2007-07-03 23:06:11 | 2022-03-06 03:19:45.513585 | Design decision needed | closed | *.djangoproject.com | defect | normal | fixed | "Get current version: 1.0" is misleading | The front page link to the download page says "Get current version: 1.0". This is misleading - there is no version 1.0 yet. The text should read "Get development version" or something similar which reinforces the fact that Django has not yet made it to a marked version. I would also argue that going straight to 1.0 isn't necessarily a good idea. If you look at Rails, they spent months and months rolling through the 0.9 etc releases before everything was considered stable enough for a 1.0. This seems like a smart model to follow. | jacob | Simon Willison | 0 | 0 | 0 | 0 | 0 | 0 | ||
104 | 2005-07-20 06:12:21 | 2007-07-03 23:04:05 | 2022-03-06 03:19:45.679376 | Design decision needed | closed | Core (Other) | defect | normal | 1.0 | duplicate | i18n for internal strings | Maybe it would be a good idea to start using gettext for internal string resources, so people could start translating stuff? I think especially about internal strings like those in the validators. | adrian | hugo | i18n | 0 | 0 | 0 | 0 | 0 | 0 |
106 | 2005-07-20 09:41:37 | 2008-11-12 16:25:37 | 2022-03-06 03:19:45.998838 | Accepted | closed | contrib.admin | defect | normal | fixed | [patch] Problem with some js/select box on IE | Extract from Tutorial 1: 'When you click "Add Another," you'll get a popup window with the "Add poll" form. If you add a poll in that window and click "Save," Django will save the poll to the database and dynamically add it as the selected choice on the "Add choice" form you're looking at.' This (dynamically add it) works on Mozilla 1.0.4 Win. It is not true on IE 6. A blank string is shown instead of name of the new poll. Just after a manual refresh of the page things appear correctly. | kmtracey | paolo | 0 | 1 | 1 | 1 | 1 | 0 | ||
107 | 2005-07-20 10:26:01 | 2006-11-03 13:48:06 | 2022-03-06 03:19:46.151000 | Unreviewed | closed | Metasystem | defect | normal | fixed | [patch] Leaving out ID parameters | For models with an AutoField, it should be possible when creating a new instance (for example in the interactive interpreter) to leave out the id = None parameter. Django should be smart enough to add this by itself. | adrian | Manuzhai <mail@manuzhai.nl> | 0 | 1 | 0 | 0 | 0 | 0 | ||
108 | 2005-07-20 11:52:18 | 2007-07-03 23:03:57 | 2022-03-06 03:19:46.320550 | Unreviewed | closed | *.djangoproject.com | defect | normal | fixed | WikiFormatting page is not there | When I am entering a new ticket, just above the main textarea the link to the WikiFormatting points to an empty page. I think it needs to be restored from the default Trac installation. | jacob | verbosus | 0 | 0 | 0 | 0 | 0 | 0 | ||
109 | 2005-07-20 13:17:49 | 2007-07-03 23:03:46 | 2022-03-06 03:19:46.472589 | Accepted | closed | contrib.admin | defect | blocker | fixed | Patch: Customizing Date(Time)Field displays | In the admin interface, dates are displayed as July 11, 2005, 8:39 p.m., while I'd at the least prefer to have a 24-hour format for the time. I think there should be options DATE_FORMAT, TIME_FORMAT and DATETIME_FORMAT which take care of the default formatting for these fields. | anonymous | Manuzhai | 0 | 0 | 0 | 0 | 0 | 0 | ||
111 | 2005-07-20 14:38:19 | 2006-10-07 16:23:30 | 2022-03-06 03:19:46.784333 | Unreviewed | closed | contrib.admin | defect | normal | duplicate | Filtering doesn't clean up arguments | When selecting different filters (DateTimeField-based, in this case), in order: * Today: ?datetime__day=20&datetime__month=7&datetime__year=2005 * Then, past 7 days: ?datetime__day=20&datetime__gte=2005-07-13&datetime__month=7&datetime__lte=2005-07-20%2023:59:59&datetime__year=2005 It seems any new arguments should clean up arguments that concern the same field. | adrian | Manuzhai | 0 | 0 | 0 | 0 | 0 | 0 | ||
112 | 2005-07-20 15:25:13 | 2006-09-14 00:37:53 | 2022-03-06 03:19:46.931692 | Unreviewed | closed | Core (Other) | defect | normal | fixed | WSGI requires a HTTP reason in the status | The WSGI-spec clearly requires a reason-phrase when calling start_response, and Apache breaks proxied responses that are missing the reason phrase. So the Django wsgi-adapter is quite broken in the respect. Below is a patch which fixes this. The mapping of HTTP reason-phrases is incomplete, but at least now Django works when being proxied by Apache. {{{ Index: core/handlers/wsgi.py =================================================================== --- core/handlers/wsgi.py (revision 241) +++ core/handlers/wsgi.py (working copy) @@ -1,6 +1,12 @@ from django.utils import datastructures, httpwrappers from pprint import pformat +reasons = { + 200: 'Ok', + 404: 'Not found', + 500: 'Internal Server Error', +} + class WSGIRequest(httpwrappers.HttpRequest): def __init__(self, environ): self.environ = environ @@ -121,7 +127,7 @@ for middleware_method in self._response_middleware: response = middleware_method(request, response) - status = str(response.status_code) + ' ' # TODO: Extra space here is a hack. + status = '%d %s' % (response.status_code, reasons.get(response.status_code, 'Unknown status-code')) response_headers = response.headers if response.cookies: response_headers['Set-Cookie'] = response.cookies.output(header='') }}} | adrian | sune.kirkeby@gmail.com | wsgi | 0 | 0 | 0 | 0 | 0 | 0 | |
113 | 2005-07-20 16:00:52 | 2006-10-07 21:45:17 | 2022-03-06 03:19:47.101602 | Unreviewed | closed | Core (Other) | defect | normal | fixed | auto-reload broken in standalone WSGI server | Auto reload is broken in the new standalone server (http://www.djangoproject.com/weblog/2005/jul/18/local_server/)... Let's bring auto reload back. The code for this borrow's from Peter Hunt and the CherryPy project (www.cherrypy.org), which in turn borrows from Ian Bicking's Paste (http://pythonpaste.org/) We'll need to check on Paste and CherryPy's licenses to make sure this is all kosher. | adrian | Jason Huggins | auto reload | 0 | 0 | 0 | 0 | 0 | 0 | |
114 | 2005-07-20 16:25:56 | 2006-10-07 19:00:07 | 2022-03-06 03:19:47.268097 | Unreviewed | closed | Core (Other) | defect | normal | fixed | DeprecationWarning when creating a new project (see patch) | I decided to start over with the newewst build and received the following when creating a new project: C:\www\webroot>django-admin.py startproject myproject C:\Python24\lib\whrandom.py:38: DeprecationWarning: the whrandom module is deprecated; please use the random module DeprecationWarning) This didn't happen the first couple of times, so I'm guessing that it has to do with the build. I'm running WinXP & Py 2.4.1. | adrian | sdelatorre@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
118 | 2005-07-20 18:47:08 | 2006-10-07 17:54:45 | 2022-03-06 03:19:47.868796 | Unreviewed | closed | Core (Other) | defect | trivial | fixed | flatfiles should be called flatpages | I keep forgetting that flatfiles live only in the database and start hunting around the filesystem for them (the ones for the Django site that is). Should they be called flatpages instead? | adrian | Simon Willison | 0 | 0 | 0 | 0 | 0 | 0 | ||
120 | 2005-07-20 19:49:48 | 2007-07-03 23:05:27 | 2022-03-06 03:19:48.191124 | Accepted | closed | Tools | defect | normal | fixed | djang-admin.py called without argument | Calling django-admin.py with no argument gives the following traceback: {{{ Traceback (most recent call last): File "./django-admin.py", line 102, in ? main() File "./django-admin.py", line 63, in main print_error("An 'action' is required.") TypeError: print_error() takes exactly 2 arguments (1 given) }}} And print_error function (defined line 43), effectively wants 2 arguments ;) I'm using rev 249 of Django's trunk. Attached is a trivial proposed patch. | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
123 | 2005-07-20 21:39:20 | 2006-10-07 18:13:53 | 2022-03-06 03:19:48.646860 | Unreviewed | closed | Documentation | defect | normal | fixed | Typo in the model_api/#field-types | Currently the ImageField says this. ImageField Like a FieldField, but validates that the ... I believe this should be Like a FileField, but validates that the ... | jacob | jay@skabber.com | documentation typo | 0 | 0 | 0 | 0 | 0 | 0 | |
124 | 2005-07-20 21:39:32 | 2007-07-03 23:04:49 | 2022-03-06 03:19:48.790734 | Ready for checkin | closed | Core (Other) | defect | normal | duplicate | Better handling of raw POST data | I'll come up with a patch for this, if slashzero doesn't. | adrian | Manuzhai | 0 | 0 | 0 | 0 | 0 | 0 | ||
125 | 2005-07-20 22:13:00 | 2007-07-03 23:03:55 | 2022-03-06 03:19:48.943232 | Ready for checkin | closed | contrib.admin | defect | normal | wontfix | View-Controller separation violation | For example, django.views.admin.main: {{{ if lookup_opts.admin.search_fields: raw_template.append('<div id="toolbar">\n<form id="changelist-search" action="" method="get">\n') raw_template.append('<label><img src="%simg/admin/icon_searchbox.png" /></label> ' % ADMIN_MEDIA_PREFIX) raw_template.append('<input type="text" size="40" name="%s" value="%s" id="searchbar" /> ' % \ (SEARCH_VAR, escape(query))) }}} Shouldn't it be done only with templates? | adrian | maurycy | 0 | 0 | 0 | 0 | 0 | 0 | ||
126 | 2005-07-20 22:19:29 | 2006-10-13 21:17:51 | 2022-03-06 03:19:49.068543 | Unreviewed | closed | contrib.admin | defect | normal | fixed | Patch to place the post_data into the request variable | This is a patch to put the post_data into the request variable. This is helpful for views that need access to the raw data. {{{ Index: wsgi.py =================================================================== --- wsgi.py (revision 256) +++ wsgi.py (working copy) @@ -20,6 +20,7 @@ # Populates self._post and self._files if self.environ['REQUEST_METHOD'] == 'POST': post_data = self.environ['wsgi.input'].read(int(self.environ["CONTENT_LENGTH"])) + self._post_data = post_data if self.environ.get('CONTENT_TYPE', '').startswith('multipart'): header_dict = dict([(k, v) for k, v in self.environ.items() if k.startswith('HTTP_')]) self._post, self._files = httpwrappers.parse_file_upload(header_dict, post_data) @@ -89,7 +90,18 @@ def _set_user(self, user): self._user = user + + def _set_post_data(self,post_data): + self._post_data = post_data + def _get_post_data(self): + if not hasattr(self, '_post_data'): + self._load_post_and_files() + if hasattr(self, '_post_data'): + return(self._post_data) + else: + return("") + GET = property(_get_get, _set_get) POST = property(_get_post, _set_post) COOKIES = property(_get_cookies, _set_cookies) @@ -97,6 +109,7 @@ REQUEST = property(_get_request) session = property(_get_session, _set_session) user = property(_get_user, _set_user) + post_data = property(_get_post_data,_set_post_data) class WSGIHandler: def __init__(self): Index: modpython.py =================================================================== --- modpython.py (revision 256) +++ modpython.py (working copy) @@ -21,10 +21,11 @@ def _load_post_and_files(self): "Populates self._post and self._files" + self._post_data = self._req.read() if self._req.headers_in.has_key('content-type') and self._req.headers_in['content-type'].startswith('multipart'): - self._post, self._files = httpwrappers.parse_file_upload(self._req.headers_in, self._req.read()) + self._post, self._files = httpwrappers.parse_file_upload(self._req.headers_in, self._post_data) else: - self._post, self._files = httpwrappers.QueryDict(self._req.read()), datastructures.MultiValueDict() + self._post, self._files = httpwrappers.QueryDict(self._post_data), datastructures.MultiValueDict() def _get_request(self): if not hasattr(self, '_request'): @@ -115,6 +116,18 @@ def _set_user(self, user): self._user = user + def _set_post_data(self,post_data): + self._post_data = post_data + + def _get_post_data(self): + if not hasattr(self, '_post_data'): + self._load_post_and_files() + if hasattr(self, '_post_data'): + return(self._post_data) + else: + return("") + + GET = property(_get_get, _set_get) POST = property(_get_post, _set_post) COOKIES = property(_get_cookies, _set_cookies) @@ -123,7 +136,8 @@ REQUEST = property(_get_request) session = property(_get_session, _set_session) user = property(_get_user, _set_user) - + post_data = property(_get_post_data,_set_post_data) + class ModPythonHandler: def __init__(self): self._request_middleware = self._view_middleware = self._response_middleware = None }}} | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
127 | 2005-07-20 22:20:16 | 2007-07-12 08:02:24 | 2022-03-06 03:19:49.185694 | Unreviewed | closed | Documentation | defect | normal | wontfix | Documentation how to setup djangoproject.com | Tutorial introduces only trivial application. There should be document describing more complicated one, for example djangoproject.com. Not necessary architecture and details, but how to setup and play with. | jacob | maurycy | 0 | 0 | 0 | 0 | 0 | 0 | ||
128 | 2005-07-20 23:39:49 | 2007-07-03 23:03:54 | 2022-03-06 03:19:49.317321 | Accepted | closed | Template system | defect | normal | worksforme | IndexError when using invalid {% extends %} in template should be replaced with better error message. | First of all the error {{{ There's been an error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 190, in get_response return callback(request, **param_dict) File "/home/espen/django/blog/apps/blog/views/blog.py", line 20, in details return HttpResponse(t.render(c)) File "/usr/lib/python2.4/site-packages/django/core/template.py", line 116, in render return self.nodelist.render(context) File "/usr/lib/python2.4/site-packages/django/core/template.py", line 437, in render bits.append(node.render(context)) File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 80, in render parent_is_child = isinstance(compiled_parent.nodelist[0], ExtendsNode) IndexError: list index out of range }}} The template file that trys to extend base.html: {{{ {% extends "base" %} {% block title %} Espen Grindhaug - Blog - {{ obj.headline }} {% endblock %} {% block content %} <h1>{{ obj.headline }}</h1> <p class="summary">{{ obj.summary }}</p> <p class="body">{{ obj.body }}</p> <p class="by">By {{ obj.author }} ({{ obj.pub_date }})</p> {% endblock %} }}} The weird thing here is that I get exactly the same error with completly different child template. base.html (the same as in [http://www.djangoproject.com/documentation/templates/#template-inheritance URL]): {{{ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link rel="stylesheet" href="style.css" /> <title>{% block title %}Espen Grindhaug{% endblock %}</title> </head> <body> <div id="sidebar"> {% block sidebar %} <ul> <li><a href="/">Home</a></li> <li><a href="/blog/">Blog</a></li> </ul> {% endblock %} </div> <div id="content"> {% block content %}{% endblock %} </div> </body> }}} The details function in blog.py that loads the template: {{{ def details(request, slug): try: obj = entries.get_object(slug__exact=slug) except entries.EntryDoesNotExist: raise Http404 t = template_loader.get_template('blog/details') c = Context(request, { 'obj':obj,}) return HttpResponse(t.render(c)) }}} | adrian | espen@grindhaug.org | 0 | 0 | 0 | 0 | 0 | 0 | ||
129 | 2005-07-21 00:02:52 | 2007-07-03 23:04:03 | 2022-03-06 03:19:49.437010 | Accepted | closed | Metasystem | defect | normal | fixed | Multiple ManyToManyField fields with same "to" reference tries to create duplicate tables | Revsion 257 added support for adding multiple !ManyToManyField fields with the same "to" class on the same class. I've tried adding two fields where one has an explicit rel_name option but running "django-admin.py sql myapp" is showing two CREATE TABLE statements with the same table name. I think I've tracked the problem down to the get_m2m_db_table method in the !ManyToManyField class in core/meta.py but I don't understand the code base enough yet to try to fix it. It looks like the code is returning the name as myapp_fromname_toname but I'd expect the name of the many-to-many table to be myapp_relname when the rel_name option is specified. I'm using the MySQL database engine but I don't think that has any bearing on this problem. | adrian | jason@diamond.name | 0 | 0 | 0 | 0 | 0 | 0 | ||
131 | 2005-07-21 03:40:23 | 2006-09-13 23:47:09 | 2022-03-06 03:19:49.664545 | Unreviewed | closed | Core (Other) | defect | normal | fixed | Included URL configurations do not receive parameters parsed from parent URL configurations | Example: {{{ settings/urls/main.py (r'^(?P<username>\w+)/blog/', include('fiji.apps.blog.urls.blog')), apps/blog/urls/blog.py (r'', 'blog.index'), }}} In this case, the username parameter caught by the main conf file does not get passed to the blog conf file, which is desired. | adrian | jcernelli@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
132 | 2005-07-21 07:33:38 | 2006-10-16 15:32:45 | 2022-03-06 03:19:49.783570 | Unreviewed | closed | Core (Other) | defect | normal | fixed | REMOTE_ADDR not in WSGI-environ | The WSGI-spec does not promise the presence of 'REMOTE_ADDR' in environ, but DjangoContext reads it unconditionally when checking if it is in INTERNAL_IPS. Here is a short patch to fix this, by using .get instead of []. {{{ Index: django/core/extensions.py =================================================================== --- django/core/extensions.py (revision 247) +++ django/core/extensions.py (working copy) @@ -13,7 +13,7 @@ self['user'] = request.user self['messages'] = request.user.get_and_delete_messages() self['perms'] = PermWrapper(request.user) - if DEBUG and request.META['REMOTE_ADDR'] in INTERNAL_IPS: + if DEBUG and request.META.get('REMOTE_ADDR') in INTERNAL_IPS: self['debug'] = True from django.core import db self['sql_queries'] = db.db.queries }}} | adrian | anonymous | wsgi | 0 | 0 | 0 | 0 | 0 | 0 | |
133 | 2005-07-21 09:24:39 | 2007-07-03 23:04:16 | 2022-03-06 03:19:49.903327 | Unreviewed | closed | Core (Other) | defect | trivial | fixed | Patch to improve DATABASE_ENGINE error message | I could not load the postgresql back end because psycopg was nog installed properly. However, that was not clear from the error message. Patch attached. It changes "Your DATABASE_ENGINE setting, %r, is invalid. Is it spelled correctly? Available options are: %s" into "Could not load database backend: %s. Is DATABASE_ENGINE (currently, %r) spelled correctly? Available options are: %s" displaying the error message from import. | adrian | Joeri van Ruth <jvr+djangotrac@dory.blub.net> | 0 | 0 | 0 | 0 | 0 | 0 | ||
134 | 2005-07-21 09:56:07 | 2007-07-03 23:05:23 | 2022-03-06 03:19:50.024083 | Unreviewed | closed | contrib.admin | defect | normal | fixed | Template for password change not included in source dist | It seems that there are probably templates for this, just not in the current dist? {{{ TemplateDoesNotExist: Tried ['/home/manuzhai/dev/django/django/conf/admin_templates/registration/password_change_form.html'] }}} | adrian | Manuzhai | 0 | 0 | 0 | 0 | 0 | 0 | ||
135 | 2005-07-21 11:19:17 | 2006-10-22 16:26:08 | 2022-03-06 03:19:50.149778 | Unreviewed | closed | Documentation | defect | normal | fixed | Document mod_python behavior with more than one SETTINGS in a vhost | URL resolving will be unstable if more than one DJANGO_SETTINGS_MODULE is referenced within a vhost (for example, in different locations) due to mod_python caching. This should be documented in the mod_python doc. | jacob | Manuzhai | 0 | 0 | 0 | 0 | 0 | 0 | ||
137 | 2005-07-21 12:47:53 | 2007-08-25 23:18:51 | 2022-03-06 03:19:50.412053 | Accepted | closed | Generic views | defect | normal | fixed | TypeError: can't compare datetime.datetime to datetime.date in date_based.py | R267: When accessing /weblog/.... url, object_detail in date_based.py throws exception: {{{ File "/Users/nesh/devel/workspace/django_src/django/views/generic/date_based.py", line 200, in object_detail if date >= now: TypeError: can't compare datetime.datetime to datetime.date }}} Solution: (diff) {{{ diff -u -r1.1 date_based.py --- date_based.py 21 Jul 2005 12:24:11 -0000 1.1 +++ date_based.py 21 Jul 2005 12:40:45 -0000 @@ -188,7 +188,7 @@ the object to be detailed """ try: - date = datetime.date(*time.strptime(year+month+day, '%Y%b%d')[:3]) + date = datetime.datetime(*time.strptime(year+month+day, '%Y%b%d')[:3]) except ValueError: raise Http404 mod = get_module(app_label, module_name) }}} | jacob | nesh@studioquattro.co.yu | 0 | 0 | 0 | 0 | 0 | 0 | ||
138 | 2005-07-21 14:57:54 | 2007-07-03 23:04:26 | 2022-03-06 03:19:50.564697 | Accepted | closed | Documentation | defect | normal | fixed | Error naming the "docs" directory in README | Inside README each occurrence of doc/ should be replaced with docs/. | adrian | paolo | 0 | 0 | 0 | 0 | 0 | 0 | ||
140 | 2005-07-21 18:27:01 | 2006-08-29 11:18:56 | 2022-03-06 03:19:50.829383 | Unreviewed | closed | Core (Cache system) | defect | normal | fixed | Memcached cache backend should support multiple servers | SSIA. | jacob | jacob | 0 | 0 | 0 | 0 | 0 | 0 | ||
141 | 2005-07-21 18:59:14 | 2007-07-03 23:04:25 | 2022-03-06 03:19:50.977458 | Ready for checkin | closed | Core (Other) | defect | normal | fixed | --settings option doesn't work as shown in the tutorial | When running '''django-admin.py init --settings='myproject.settings.main'''' (as specified in tutorial 1) I received: {{{ C:\www\webroot\myproject>django-admin.py init --settings='myproject.settings.main' Traceback (most recent call last): File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\bin\django-admin.py", line 103, in ? main() File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\bin\django-admin.py", line 68, in main ACTION_MAPPING[action]() File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\management.py", line 278, in init from django.core import db, meta File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\__init__.py", line 16, in ? from django.conf.settings import DATABASE_ENGINE File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\conf\settings.py", line 34, in ? raise EnvironmentError, "Could not import %s '%s' (is it on sys.path?): %s"% (ENVIRONMENT_VARIABLE, me.SETTINGS_MODULE, e) EnvironmentError: Could not import DJANGO_SETTINGS_MODULE ''myproject.settings.main'' (is it on sys.path?): No module named 'myproject.settings.main' }}} The problem is with the quotes around the module name (--settings='myproject.settings.main'). Running '''django-admin.py init --settings=myproject.settings.main''' (no quotes) works correctly. | adrian | sdelatorre@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
142 | 2005-07-21 19:14:25 | 2007-07-03 23:03:55 | 2022-03-06 03:19:51.131608 | Unreviewed | closed | Documentation | defect | normal | duplicate | tutorial 1 bug in init --settings | In tutorial1, rev 253, line 77: django-admin.py init --settings='myproject.settings.main' should be: django-admin.py init --settings=myproject.settings.main With Windows XP, Python 2.4.1, Django rev 282, I get this error when the quotes are present: {{{ C:\MyStuff\projects\django>c:\Python24\python.exe C:\Python24\Lib\site-packages\ django-1.0.0-py2.4.egg\django\bin\django-admin.py init --settings='myapp.setting s.admin' Traceback (most recent call last): File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\bin\django-a dmin.py", line 103, in ? main() File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\bin\django-a dmin.py", line 68, in main ACTION_MAPPING[action]() File "c:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\managem ent.py", line 278, in init from django.core import db, meta File "c:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\db\__in it__.py", line 16, in ? from django.conf.settings import DATABASE_ENGINE File "c:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\conf\setting s.py", line 34, in ? raise EnvironmentError, "Could not import %s '%s' (is it on sys.path?): %s" % (ENVIRONMENT_VARIABLE, me.SETTINGS_MODULE, e) EnvironmentError: Could not import DJANGO_SETTINGS_MODULE ''myapp.settings.admin '' (is it on sys.path?): No module named 'myapp.settings.admin' }}} When I remove the quotes, I don't get an error, and my database is initialized correctly. {{{ C:\MyStuff\projects\django>c:\Python24\python.exe C:\Python24\Lib\site-packages\ django-1.0.0-py2.4.egg\django\bin\django-admin.py init --settings=myapp.settings .admin C:\MyStuff\projects\django> }}} | jacob | Jason Huggins | tutorial django-admin init settings | 0 | 0 | 0 | 0 | 0 | 0 | |
143 | 2005-07-21 19:42:36 | 2007-07-03 23:04:38 | 2022-03-06 03:19:51.287209 | Accepted | closed | Core (Other) | defect | normal | fixed | Problem running the command line examples in Tut 1 when using --settings option | In tutorial 1, under "Playing with the API", none of the examples will work if you've been using the --settings option with django-admin.py (the DJANGO_SETTINGS_MODULE env variable was never set). To work, you have to do the following before importing the project objects: {{{ >>> import os >>> os.environ['DJANGO_SETTINGS_MODULE']='myproject.settings.main' >>> from django.models.polls import polls, choices }}} Is there a more user friendly way to do this? Maybe add a global variable to django.conf that is used to do the import? {{{ >>> django.conf.DJANGO_SETTINGS_MODULE='myproject.settings.main' }}} or possibly {{{ >>> django.settings_module='myproject.settings.main' }}} | adrian | sdelatorre@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
144 | 2005-07-21 23:29:46 | 2007-07-03 23:04:25 | 2022-03-06 03:19:51.429271 | Accepted | closed | contrib.admin | defect | normal | duplicate | Some admin media files are not viewable | When viewing the Polls site in tutorial 2 under "Click the 'What's up?' poll to edit it:" paragraph, I noticed that a few of the icons were missing (the save button, the checkbox icon when saving an item, the right side of the history button, etc.). The CSS and JS seem to load correctly, and the icons you have sourced at http://media.ljworld.com/ also load correctly. The problem lies with the CSS file which doesn't correctly go to http://media.ljworld.com/. Just to test, I changed the url to the tool-right.gif file in the css to http://media.ljworld.com/img/admin/tool-right.gif and it worked. | adrian | sdelatorre@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
145 | 2005-07-21 23:38:17 | 2006-10-07 21:08:21 | 2022-03-06 03:19:51.572680 | Unreviewed | closed | contrib.admin | defect | normal | fixed | Logout link and user name visible after logging out. | After logging out of the admin site, my user name and the "logout" link were still visible in the upper right hand side of the page. Clicking on the logout link again takes you to the login page, which then immediately logs you back out after you login. Note: this happened while using the built-in webserver (WinXP, Py 2.4.1) | adrian | sdelatorre@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
146 | 2005-07-22 03:37:46 | 2007-07-03 23:04:40 | 2022-03-06 03:19:51.714976 | Accepted | closed | Database layer (models, ORM) | defect | normal | fixed | Change order_by and ordering parameters to be less verbose | Instead of the following: {{{ ordering = (('pub_date', 'ASC'), ('name', 'DESC'), (None, 'RANDOM')) }}} ...we should use the following: {{{ ordering = ('pub_date', '-name', '?') }}} See http://groups-beta.google.com/group/django-developers/browse_thread/thread/f4945bd967defde1/f5f3cb3312f77fe5 | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
147 | 2005-07-22 03:55:27 | 2007-07-03 23:04:17 | 2022-03-06 03:19:51.878029 | Design decision needed | closed | contrib.admin | defect | normal | fixed | "sqlite" should be "sqlite3" in conf/project_template/settings/main.py | Problem: new users are just going to copy the suggested "sqlite" in settings/main.py and find that it doesn't work. Solution: Use "sqlite3" throughout. Apply the following patch. {{{ Index: django/conf/project_template/settings/main.py =================================================================== --- django/conf/project_template/settings/main.py (revision 288) +++ django/conf/project_template/settings/main.py (working copy) @@ -10,11 +10,11 @@ LANGUAGE_CODE = 'en-us' -DATABASE_ENGINE = 'postgresql' # 'postgresql', 'mysql', or 'sqlite' -DATABASE_NAME = '' # or path to database file if using sqlite -DATABASE_USER = '' # not used with sqlite -DATABASE_PASSWORD = '' # not used with sqlite -DATABASE_HOST = '' # Set to empty string for localhost; not used with sqlite +DATABASE_ENGINE = 'postgresql' # 'postgresql', 'mysql', or 'sqlite3' +DATABASE_NAME = '' # or path to database file if using sqlite3 +DATABASE_USER = '' # not used with sqlite3 +DATABASE_PASSWORD = '' # not used with sqlite3 +DATABASE_HOST = '' # Set to empty string for localhost; not used with sqlite3 SITE_ID = 1 }}} | adrian | rmunn@pobox.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
148 | 2005-07-22 09:09:34 | 2007-07-16 04:10:10 | 2022-03-06 03:19:52.027642 | Ready for checkin | closed | *.djangoproject.com | defect | trivial | fixed | Add some padding to the bottom of div#content-main | If you look at this page: http://www.djangoproject.com/community/ - it's clear that div#content-main would benefit from a tiny bit of extra padding at the bottom, to ensure the content doesn't come too close to the edge of the div. | wilson | Simon Willison | 0 | 0 | 0 | 0 | 0 | 0 | ||
149 | 2005-07-22 09:17:37 | 2007-08-14 14:58:27 | 2022-03-06 03:19:52.255404 | Design decision needed | closed | Core (Cache system) | defect | normal | 0.91 | fixed | Show latest comments on djangoproject.com | See title. An RSS feed of recently added comments would be very handy as well. | adrian | Simon Willison | delena | 0 | 0 | 0 | 0 | 0 | 0 |
150 | 2005-07-22 09:55:38 | 2007-07-17 21:52:51 | 2022-03-06 03:19:52.458021 | Accepted | closed | Core (Other) | defect | minor | fixed | Should put a notice to set an *absolute path', in the DATABASE_NAME variable if using sqlite3 | If you don't put an absolute path in the DATABASE_NAME variable in the settings/main.py file, Django works but erratically, as it will not always find the database as it's dependent on its running location. There should be warning on *always* setting an absolute path there! | adrian | lstep@adelux.fr | 0 | 0 | 0 | 0 | 0 | 0 | ||
151 | 2005-07-22 10:11:14 | 2006-05-18 14:03:00 | 2022-03-06 03:19:52.660265 | Unreviewed | closed | contrib.admin | defect | normal | fixed | javascript clock not dismissed by clicking "cancel"; several references to ljworld.com in the src code | While going through part 2 of the tutorial (web admin interface), I tried to click on the "Time published" clock" image. The "cancel" row does not appear to dismiss the pop up window. (OTOH clicking on "cancel" on the calendar widget correctly dismisses the calendar popup). I also saw a message on the browser status bar saying "transferring data from media.ljworld.com..." Looking at the source code I noticed that there are indeed several refs to media.ljworld.com: {{{ [davides@icarus django]$ pwd /localstore/computer/davides/tmp/django_src/django [davides@icarus django]$ find . | xargs grep 'media.ljworld.com' ./conf/admin_media/js/.svn/text-base/SelectFilter2.js.svn-base: quickElement('img', filter_p, '', 'src', 'http://media.ljworld.com/img/admin/selector-search.gif'); ./conf/admin_media/js/.svn/text-base/SelectFilter2.js.svn-base: quickElement('img', selector_filter, '', 'src', 'http://media.ljworld.com/img/admin/selector-add.gif', 'alt', 'Add'); ./conf/admin_media/js/admin/.svn/text-base/add_calendars.js.svn-base: quickElement('img', cal_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_calendar.gif', 'alt', 'Calendar'); ./conf/admin_media/js/admin/.svn/text-base/DateTimeShortcuts.js.svn-base: quickElement('img', clock_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_clock.gif', 'alt', 'Clock'); ./conf/admin_media/js/admin/.svn/text-base/DateTimeShortcuts.js.svn-base: quickElement('img', cal_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_calendar.gif', 'alt', 'Calendar'); ./conf/admin_media/js/admin/add_calendars.js: quickElement('img', cal_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_calendar.gif', 'alt', 'Calendar'); ./conf/admin_media/js/admin/DateTimeShortcuts.js: quickElement('img', clock_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_clock.gif', 'alt', 'Clock'); ./conf/admin_media/js/admin/DateTimeShortcuts.js: quickElement('img', cal_link, '', 'src', 'http://media.ljworld.com/img/admin/icon_calendar.gif', 'alt', 'Calendar'); ./conf/admin_media/js/SelectFilter2.js: quickElement('img', filter_p, '', 'src', 'http://media.ljworld.com/img/admin/selector-search.gif'); ./conf/admin_media/js/SelectFilter2.js: quickElement('img', selector_filter, '', 'src', 'http://media.ljworld.com/img/admin/selector-add.gif', 'alt', 'Add'); }}} This is with revision 291. | adrian | Davide | 0 | 0 | 0 | 0 | 0 | 0 | ||
153 | 2005-07-22 13:06:28 | 2007-07-03 23:04:14 | 2022-03-06 03:19:53.002455 | Accepted | closed | Documentation | defect | normal | fixed | Change docs to use new ordering syntax | See #146 and [292]. | jacob | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
154 | 2005-07-22 13:10:15 | 2012-11-27 08:55:38 | 2022-03-06 03:19:53.212034 | Accepted | closed | contrib.admin | defect | normal | fixed | Can't delete object with ManytoMany Relationship | If you have an object with a manytomany relationship you can't delete it within the admin interface. As it spits out this error. {{{ Traceback (most recent call last): File "/home/punteney/dobbes.com/django/core/handlers/modpython.py", line 214, in get_response return callback(request, **param_dict) File "/home/punteney/dobbes.com/django/views/admin/main.py", line 1057, in delete_stage obj.delete() File "/home/punteney/dobbes.com/django/core/meta.py", line 57, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/home/punteney/dobbes.com/django/core/meta.py", line 760, in method_delete cursor.execute("DELETE FROM %s WHERE %s=%%s" % (opts.db_table, opts.pk.name), [getattr(self, opts.pk.name)]) File "/home/punteney/dobbes.com/django/core/db/base.py", line 10, in execute result = self.cursor.execute(sql, params) IntegrityError: ERROR: update or delete on "blog_entries" violates foreign key constraint "$1" on "blog_entries_categories" DETAIL: Key (id)=(2) is still referenced from table "blog_entries_categories". DELETE FROM blog_entries WHERE id=2 }}} This is from trying to delete a blog entry that is tied to the categories. The line in the Entry model is: {{{ meta.ManyToManyField(Category, filter_interface=meta.HORIZONTAL), }}} I can't remove the category linking before I delete it as it is a required field so it comes back with an error message saying that the field is required. | adrian | Dobbes | 0 | 0 | 0 | 0 | 0 | 0 |