tickets
32,817 rows sorted by changetime
This data as json, CSV (advanced)
Suggested facets: resolution, has_patch, needs_better_patch, needs_tests, needs_docs, ui_ux, changetime (date), last_pulled_from_trac (date)
created (date) >30 ✖
- 2007-09-14 50
- 2008-09-01 45
- 2008-09-08 45
- 2008-08-27 44
- 2008-09-03 42
- 2008-08-29 39
- 2008-08-28 36
- 2005-07-20 34
- 2008-08-26 34
- 2008-09-02 32
- 2011-06-09 32
- 2008-08-19 31
- 2008-01-28 30
- 2005-07-13 29
- 2008-08-13 29
- 2008-08-11 28
- 2008-08-20 28
- 2008-07-22 27
- 2008-08-14 27
- 2008-08-15 27
- 2005-07-18 26
- 2008-07-19 26
- 2008-08-12 26
- 2008-09-04 26
- 2008-09-10 26
- 2007-12-01 25
- 2011-09-09 24
- 2007-09-10 23
- 2008-07-29 23
- 2008-08-09 23
- …
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | ||
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 | ||
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 | ||||
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 | ||
176 | 2005-07-24 16:07:54 | 2005-07-25 01:31:22 | 2022-03-06 03:19:57.483345 | Unreviewed | closed | Tools | defect | normal | invalid | Database settings should not be kept in settings.main for ease of packaging. | I'm currently developing a project which I hope will be reusable. This obviously includes a certain amoutn fo setting thins up in settings.main. However, when it comes to packaging this project, I'm goign to have to keep remembering to remove my database setting from the file before uploading. Ditto if I want to keep my project in a public svn repository. I propose moving the database settigns by default to settings/db.py which will be imported from within main.py This file will be created by {{{django-admin startproject}}} but a new command should be added to just add the skeleton db.py file to projects that have been distributed without it. | adrian | moof@metamoof.net | django-admin database settings distribution | 0 | 0 | 0 | 0 | 0 | 0 | |
181 | 2005-07-24 22:22:32 | 2005-07-25 16:34:09 | 2022-03-06 03:20:00.489419 | Unreviewed | closed | contrib.admin | defect | normal | invalid | Site and FlatFile don't appear in the Admin interface | As alluded to in your Model documentation, there's a FlatFile model, and a Site model. I was hoping to extend the Site model with a OneToOne relationship so that I could have multiple blogs in one admin interfacce, with its various options such as blog name and short name, and subtitle, and so on. For the moment I've created a separate blog object with this data, but I can only really create one, as I can't add or remove any sites. I tried monkey patching the Site object, but that doesn't seem to have worked. So please could you enable the Site object in the Admin interface, or document how to do so through some equivalent of monkey patching, or tell us why we shouldn't use the object ;) | adrian | moof@metamoof.net | 0 | 0 | 0 | 0 | 0 | 0 | ||
164 | 2005-07-22 18:01:43 | 2005-07-26 16:08:52 | 2022-03-06 03:19:55.195450 | Unreviewed | closed | Core (Cache system) | defect | normal | duplicate | mysql/pgsql not implemented in django.core.cache? | Am I just missing it? It looks like only simple and memcache are implemented. If so, the docs should reflect this. | jacob | sway | 0 | 0 | 0 | 0 | 0 | 0 | ||
217 | 2005-07-28 07:15:06 | 2005-07-28 14:52:01 | 2022-03-06 03:20:06.994135 | Unreviewed | closed | Metasystem | defect | normal | invalid | Multiple foreign keys to one table | It is not possible to have a model with 2 or more ForeignKeyField to one destination table For example i need a table LETTER with 2 FK to table RECIPIENTS, one FK is a 'From' field, second FK is 'To' field. It would be better, if FK fieldnames will be assigned from 'rel_name', not from destination object name, so i could use such syntax: {{{ ForeignKeyField(Recipients, rel_name='from_ppl') ForeignKeyField(Recipients, rel_name='to_ppl') }}} | adrian | mordaha@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
188 | 2005-07-25 06:35:09 | 2005-07-29 21:10:09 | 2022-03-06 03:20:01.785686 | Unreviewed | closed | contrib.admin | defect | normal | fixed | Can't login in admin, when TIME_ZONE set to 'Europe/Riga' in myproject.settings.main | {{{ TIME_ZONE='Europe/Riga' }}} Admin error traceback after submitting login form: {{{ There's been an error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 60, in get_response response = middleware_method(request, callback, param_dict) File "/usr/lib/python2.4/site-packages/django/middleware/admin.py", line 49, in process_view user = users.get_object(username__exact=username) File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 87, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 1032, in function_get_object obj_list = function_get_list(opts, klass, **kwargs) File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 1059, in function_get_list for row in cursor.fetchall(): File "/usr/lib/python2.4/site-packages/django/core/db/typecasts.py", line 30, in typecast_timestamp int(times[0]), int(times[1]), int(seconds.split('-')[0]), ValueError: invalid literal for int(): 35+03 }}} TIME_ZONE='America/Chicago' works fine though, as well as setting 'Europe/Riga' timezone in TZ environment variable. | adrian | edgars@way.lv | 0 | 0 | 0 | 0 | 0 | 0 | ||
190 | 2005-07-25 14:09:46 | 2005-08-01 05:46:24 | 2022-03-06 03:20:02.137205 | Unreviewed | closed | Template system | defect | normal | wontfix | Add which template a syntax error is occurring in when you raise TemplateSyntaxErrors | Right now, if there's a TemplateSyntaxError, django throws an exception telling you what's missing, or what's gone wrong. It would be nice for Django to tell me in which of the various nested templates I'm using on any given URL the syntax error occurs. Even better if you could manage a line number. | adrian | Moof <moof@metamoof.net> | 0 | 0 | 0 | 0 | 0 | 0 | ||
244 | 2005-08-01 16:27:26 | 2005-08-02 20:00:29 | 2022-03-06 03:20:11.435584 | Unreviewed | closed | Metasystem | enhancement | normal | wontfix | [patch] Make new get_values() function more forgiving of mistakes | Thanks for applying my patch from #214! There's one part of it that got omitted, though, and I'm wondering why: it's the part that Does The Right Thing if the user passes a string for the fields=... kwarg. When testing the patch, I found that when I only wanted one field, it was a natural mistake to forget to pass it as a list. I was doing things like "{{{get_values(fields='name', distinct=True}}}" instead of "{{{get_values(fields=['name'], distinct=True}}}". And this was my own code I was calling: if I was making that mistake, others will be also. In the same spirit as [213], I think we should be more forgiving of this mistake: what the user meant is unambiguous, so there's no harm in allowing it. Here's a patch to implement this idea: {{{ Index: django/core/meta.py =================================================================== --- django/core/meta.py (revision 359) +++ django/core/meta.py (working copy) @@ -1100,6 +1100,10 @@ except KeyError: # Default to all fields. fields = [f.name for f in opts.fields] + if isinstance(fields, basestring): + # Be forgiving of mistakes: convert to list + fields = [fields] + cursor = db.db.cursor() _, sql, params = function_get_sql_clause(opts, **kwargs) select = ['%s.%s' % (opts.db_table, f) for f in fields] }}} | adrian | rmunn@pobox.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
307 | 2005-08-11 13:44:10 | 2005-08-13 06:07:52 | 2022-03-06 03:20:21.431412 | Unreviewed | closed | Metasystem | defect | trivial | invalid | Use unicode strings u"bla-bla" in SQL-queries for compatibility with national languages | Use unicode string in SQL-queries for compatibility with national languages (when you pass SQL-query as python unicode - database backend (MySQLdb) authomaticaly converts it from python encoding to mysql-connection encoding) I found it in meta/fields.py (may be in some other places): {{{ def get_db_prep_lookup(self, lookup_type, value): ...skip... elif lookup_type in ('contains', 'icontains'): return ["%%%s%%" % prep_for_like_query(value)] # above string must be: # return [u"%%%s%%" % prep_for_like_query(value)] # using unicode elif lookup_type == 'iexact': }}} without that '''u''' queries like field_contains=unicode_string_with_national_characters will returns nothing | adrian | mordaha@gmail.com | unicode strings in sql queries | 0 | 0 | 0 | 0 | 0 | 0 | |
322 | 2005-08-15 07:57:39 | 2005-08-15 15:24:57 | 2022-03-06 03:20:24.290304 | Unreviewed | closed | contrib.admin | enhancement | normal | fixed | [patch] Admin unavailable in development server after [503] | Just updated from 494 to 503, and now the admin area is unavailable; going to /admin/ gets the following: {{{ There's been an error: Traceback (most recent call last): File "/var/www/django/django_src/django/core/handlers/base.py", line 62, in get_response return callback(request, **param_dict) File "/var/www/django/django_src/django/views/admin/main.py", line 50, in index c = Context(request, {'title': 'Site administration'}) File "/var/www/django/django_src/django/core/extensions.py", line 14, in __init__ self['messages'] = request.user.get_and_delete_messages() File "/var/www/django/django_src/django/models/auth.py", line 128, in get_and_delete_messages for m in self.get_message_list(): AttributeError: 'User' object has no attribute 'get_message_list' }}} This is using Python 2.4.1/MySQL 4.0.23. | adrian | jbennett@roanoke.edu | 0 | 1 | 0 | 0 | 0 | 0 | ||
324 | 2005-08-15 14:53:50 | 2005-08-15 15:47:29 | 2022-03-06 03:20:24.602837 | Unreviewed | closed | Database layer (models, ORM) | defect | normal | 1.0 | worksforme | IPAddressField fails | .I've a problem when I try enter an IP address. Example model: {{{ meta.IPAddressField('ip'), }}} {{{ p = interfaces.Interface(ip="192.168.1.17") ^ SyntaxError: invalid syntax }}} i get ^ point to the 3rd character always ---- == Django-r502 Python-2.3.5 sqlite-3.2.1 pysqlite-2.0.3 == | adrian | Bless | 0 | 0 | 0 | 0 | 0 | 0 | |
325 | 2005-08-15 15:06:44 | 2005-08-15 16:14:10 | 2022-03-06 03:20:24.770592 | Unreviewed | closed | Database layer (models, ORM) | defect | minor | 1.0 | invalid | Primary Key as SmallIntegerField | == I tried change the value of Primary Key in my model: == [[BR]] '''meta.PositiveSmallIntegerField('id', primary_key=True),''' [[BR]] I tried also:[[BR]] '''meta.SmallIntegerField('id', primary_key=True),''' but both fail. {{{ >>> p.save() >>> p.id '' >>> }}} So it isn't possible change the value of the Primary key, and its value is an integer.[[BR]] I think that it's a value large for store a bit of registers. | adrian | Bless | 0 | 0 | 0 | 0 | 0 | 0 | |
277 | 2005-08-05 06:51:30 | 2005-08-15 16:30:48 | 2022-03-06 03:20:16.502952 | Unreviewed | closed | Core (Other) | defect | normal | wontfix | CommonMiddleware URL rewriting discards POST data | The CommonMiddleware URL rewriting discards any POST data when it is triggered. This code in django/middleware/common.py needs to be fixed to pass along any possible POST data with the redirect. {{{ if new_url != old_url: # Redirect newurl = "%s://%s%s" % (os.environ.get('HTTPS') == 'on' and 'https' or 'http', new_url[0], new_url[1]) if request.GET: newurl += '?' + urlencode(request.GET) return httpwrappers.HttpResponseRedirect(newurl) }}} But I don't know how to fix it :( | adrian | adrian@exoweb.net | 0 | 0 | 0 | 0 | 0 | 0 | ||
336 | 2005-08-17 01:40:21 | 2005-08-17 02:05:53 | 2022-03-06 03:20:27.488458 | Unreviewed | closed | Documentation | defect | normal | fixed | generic views delete_object documentation typo | The following paragraph does not reflect current behavior: If fetched with GET, it uses the template app_label/module_name_s_confirm_delete by default. It uses no template if POSTed -- it simply deletes the object and redirects. The template it looks for is app_label/module_name_onfirm_delete | jacob | Matt Croydon | 0 | 0 | 0 | 0 | 0 | 0 | ||
352 | 2005-08-18 08:38:07 | 2005-08-18 09:10:42 | 2022-03-06 03:20:29.769389 | Unreviewed | closed | Tools | defect | normal | invalid | django-admin MySQLdb error | {{{ django@freebeer$ django-admin.py inspectdb simplystuck Traceback (most recent call last): File "/usr/local/bin/django-admin.py", line 116, in ? main() File "/usr/local/bin/django-admin.py", line 77, in main for line in ACTION_MAPPING[action](param): File "/usr/local/lib/python2.4/site-packages/django/core/management.py", line 444, in inspectdb cursor = db.db.cursor() File "/usr/local/lib/python2.4/site-packages/django/core/db/backends/mysql.py", line 33, in cursor passwd=DATABASE_PASSWORD, host=DATABASE_HOST, conv=django_conversions) File "/usr/local/lib/python2.4/site-packages/MySQLdb/__init__.py", line 66, in Connect return Connection(*args, **kwargs) File "/usr/local/lib/python2.4/site-packages/MySQLdb/connections.py", line 151, in __init__ self.converter[types.StringType] = string_literal TypeError: object does not support item assignment }}} | adrian | Boffbowsh | 0 | 0 | 0 | 0 | 0 | 0 | ||
355 | 2005-08-18 11:24:55 | 2005-08-18 11:32:34 | 2022-03-06 03:20:30.149579 | Unreviewed | closed | contrib.admin | defect | critical | invalid | A bug in middleware/admin.py with ModPython handler | When /admin/ requested: {{{ There's been an error: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\core\handlers\base.py", line 60, in get_response response = middleware_method(request, callback, param_dict) File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\middleware\admin.py", line 49, in process_view return self.display_login_form(request, message) File "C:\Python24\Lib\site-packages\django-1.0.0-py2.4.egg\django\middleware\admin.py", line 89, in display_login_form request.session.set_test_cookie() AttributeError: 'ModPythonRequest' object has no attribute 'session' }}} dir(request):['COOKIES', 'FILES', 'GET', 'META', 'POST', 'REQUEST', '__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', '_files', '_get_cookies', '_get_files', '_get_get', '_get_meta', '_get_post', '_get_raw_post_data', '_get_request', '_get_user', '_load_post_and_files', '_meta', '_post', '_raw_post_data', '_req', '_set_cookies', '_set_get', '_set_post', '_set_user', '_user', 'get_full_path', 'path', 'raw_post_data', 'user'] | adrian | mr_little | 0 | 0 | 0 | 0 | 0 | 0 | ||
353 | 2005-08-18 10:36:25 | 2005-08-18 12:45:34 | 2022-03-06 03:20:29.884116 | Unreviewed | closed | Database layer (models, ORM) | defect | normal | duplicate | mysql breaks on model sqlite3 likes | {{{ C:\dev\pytagger-svn>update At revision 535. At revision 535. C:\dev\pytagger-svn>django-admin.cmd sqlall tags C:\dev\pytagger-svn>python23 c:\dev\django-svn\trunk\django\bin\django-admin.py sqlall tags BEGIN; CREATE TABLE tags_tags ( id mediumint(9) unsigned auto_increment NOT NULL PRIMARY KEY, tag varchar(64) NOT NULL UNIQUE ); CREATE TABLE tags_destinations ( id mediumint(9) unsigned auto_increment NOT NULL PRIMARY KEY, url varchar(250) NOT NULL UNIQUE, urlhash varchar(32) NOT NULL UNIQUE ); CREATE TABLE tags_posts ( id mediumint(9) unsigned auto_increment NOT NULL PRIMARY KEY, user_id integer NOT NULL REFERENCES auth_users (id), destination_id integer NULL REFERENCES tags_destinations (id), posted datetime NOT NULL, title varchar(250) NOT NULL, desc varchar(250) NOT NULL ); CREATE TABLE tags_posts_tags ( id mediumint(9) unsigned auto_increment NOT NULL PRIMARY KEY, post_id integer NOT NULL REFERENCES tags_posts (id), tag_id integer NOT NULL REFERENCES tags_tags (id), UNIQUE (post_id, tag_id) ); INSERT INTO packages (label, name) VALUES ('tags', 'tags'); INSERT INTO content_types (name, package, python_module_name) VALUES ('tag', 'tags', 'tags'); INSERT INTO auth_permissions (name, package, codename) VALUES ('Can add tag', 'tags', 'add_tag'); INSERT INTO auth_permissions (name, package, codename) VALUES ('Can change tag', 'tags', 'change_tag'); INSERT INTO auth_permissions (name, package, codename) VALUES ('Can delete tag', 'tags', 'delete_tag'); INSERT INTO content_types (name, package, python_module_name) VALUES ('destination', 'tags', 'destinations'); INSERT INTO auth_permissions (name, package, codename) VALUES ('Can add destination', 'tags', 'add_destination'); INSERT INTO auth_permissions (name, package, codename) VALUES ('Can change destination', 'tags', 'change_destination') INSERT INTO auth_permissions (name, package, codename) VALUES ('Can delete destination', 'tags', 'delete_destination') INSERT… | adrian | garthk@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
370 | 2005-08-19 06:19:57 | 2005-08-19 13:12:52 | 2022-03-06 03:20:32.360130 | Unreviewed | closed | Core (Other) | defect | normal | duplicate | Omitting terminal slash in form action breaks POST data due to redirect | == Steps to repro == 1. Add an urlpattern to your app like so: {{{ (r'^search/$', 'search'), }}} 2. Add a search view that spits out debugging info: {{{ def search(request): return HttpResponse(linebreaks(escape(request))) }}} 3. Create a form that submits to this view: {{{ <form method="POST" action="/search"> <!-- Note missing terminal / --> }}} 4. Test the form. == Expected == Any data submitted via the form show up as key:value pairs in the request.POST. == Actual == The POST is empty, because the framework redirects the POST without the slash to the slashified URL as a GET. It should probably detect the POST and forward the dict full of useful form data. | adrian | mrtact@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
369 | 2005-08-19 01:23:22 | 2005-08-19 15:01:02 | 2022-03-06 03:20:32.238345 | Unreviewed | closed | contrib.admin | defect | normal | wontfix | put the D back in CRUD for FileField | Allow FileFields to delete their files in the dynamic admin, as well as add and overwrite them. This would be extremely useful for nested admin setups where a file upload is optional - for example an editable tracklist with optional mp3 for an album view. | adrian | jvoorhis | 0 | 0 | 0 | 0 | 0 | 0 | ||
341 | 2005-08-17 09:28:06 | 2005-08-19 20:53:45 | 2022-03-06 03:20:28.391521 | Unreviewed | closed | contrib.admin | enhancement | normal | 1.0 | wontfix | unique option | When you use meta.ForeignKey ([] ,unique=True) or a field with 'choices=... ,unique=True' option, it would be well that the select box in form could show us the valid options only. | adrian | Bless | 0 | 0 | 0 | 0 | 0 | 0 | |
375 | 2005-08-20 13:15:38 | 2005-08-20 13:17:54 | 2022-03-06 03:20:33.069446 | Unreviewed | closed | Generic views | defect | minor | invalid | Naming inconsistency in date_based.py | The functions archive_index() and archive_year() use "date_list" as the name of the object with the list of objects returned by the query, but the functions archive_month() and archive_day() use "object_list". I propose that the latter name is used :-) | jacob | Dagur | generic views date_based naming inconsitency | 0 | 0 | 0 | 0 | 0 | 0 | |
378 | 2005-08-21 01:13:02 | 2005-08-21 18:32:42 | 2022-03-06 03:20:33.409868 | Unreviewed | closed | Tools | enhancement | normal | wontfix | django-admin.py should give feedback | I don't want to say "Django should be more like Rails", but the 'rails' script and all of the things in a Rails project's scripts/ directory emit useful feedback which is reassuring at the very least. The django-admin.py script emits nothing unless there is an error - that is, unless it is a command that generates SQL. This can be confusing. My proposal is to at least provide a summary of what is the command does. Another idea: move the sql-generating commands to a separate script. This will help users know what to expect from the admin scripts. | adrian | jvoorhis@gmail.com | django-admin.py | 0 | 0 | 0 | 0 | 0 | 0 | |
388 | 2005-08-21 22:08:09 | 2005-08-22 18:25:15 | 2022-03-06 03:20:34.939864 | Unreviewed | closed | Metasystem | enhancement | normal | wontfix | Prefix for django table names | It's mentioned at http://www.djangoproject.com/documentation/legacy_databases/ you can't change the names of the django tables in the database. Proposal: use a prefix, like "_dj_", for all those tables. So you'd have in the database: _dj_sites _dj_packages _dj_content_types etc. This would make browsing your schema easier, since your application-specific schemas wouldn't be interspersed with django-specific metasystem tables in an alphabetical listing. It would also make migrating from legacy databases easier, or interoperation with non-django systems, or indeed any operation that requires direct use of the DB. | adrian | Brendan O'Connor <brenocon@gmail.com> | 0 | 0 | 0 | 0 | 0 | 0 | ||
401 | 2005-08-23 08:54:33 | 2005-08-23 09:07:56 | 2022-03-06 03:20:36.809154 | Unreviewed | closed | *.djangoproject.com | defect | normal | invalid | Overview Question | Either I am to stupid to answer this question myself or I ask prematurely without having read enough, the former i cant help, for the latter im sorry and will try to change it. However: - With Zope i figured there is a rather capable Netpublishing Framework out, can you explain in what way Django is preferrable/different? - Rubyonrails' nice scaffold feature pregenerates lots of code, it looks useful, how do you position Django against that, except that it is not implemented in Ruby? My understanding is that the wished for results of RubyonRails and Django are somewhat similar? | jacob | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
330 | 2005-08-16 02:49:47 | 2005-08-26 16:23:51 | 2022-03-06 03:20:25.562473 | Unreviewed | closed | Metasystem | defect | normal | invalid | get_relatedobject_count error with OneToOneFields | I have to use ForeignKey instead of OneToOneField lest I receive the following traceback when going to the detail for my object: """ There's been an error: Traceback (most recent call last): File "C:\django\django\core\handlers\base.py", line 62, in get_response return callback(request, **param_dict) File "C:\django\django\views\admin\main.py", line 855, in change_stage manipulator = mod.ChangeManipulator(object_id) File "C:\django\django\utils\functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "C:\django\django\core\meta\__init__.py", line 1368, in manipulator_init count = getattr(self.original_object, 'get_%s_count' % opts.get_rel_object_method_name(rel_opts, rel_field))() AttributeError: 'Participant' object has no attribute 'get_individual_count' """ My model looks like: from django.core import meta class Participant(meta.Model): fields = ( meta.PositiveIntegerField('auction_number', blank=False, null=False, unique=True), meta.CharField('address_1', maxlength=50, blank=True), meta.CharField('address_2', maxlength=50, blank=True), meta.CharField('city', maxlength=30, blank=True), meta.USStateField('state', blank=True), meta.CharField('zip', maxlength=9, blank=True), meta.PhoneNumberField('phone', blank=True), ) def __repr__(self): return "%s" % (self.id) class Individual(meta.Model): fields = ( meta.OneToOneField(Participant, edit_inline=meta.TABULAR, num_in_admin=1), meta.CharField('first_name', 'First', maxlength=25, core=True), meta.CharField('last_name', 'Last', maxlength=25, core=True), ) def __repr__(self): return "%s %s" % (self.first_name, self.last_name) | adrian | davidschein@alumni.tufts.edu | 0 | 0 | 0 | 0 | 0 | 0 | ||
422 | 2005-08-26 16:06:45 | 2005-08-26 16:53:16 | 2022-03-06 03:20:40.716887 | Unreviewed | closed | Core (Other) | enhancement | trivial | duplicate | define a default charset for web pages | On django/utils/httpwrappers.py the DEFAULT_MIME_TYPE is just "text/html". That means the web browsers sometimes show "weird things" when one uses non-ascii characters on the templates (example: customize base_site.html adding some utf-8 characters and open the http://.../admin/ login page). It would be better to define a default charset, changing that to DEFAULT_MIME_TYPE = 'text/html; charset=utf-8' (the same mimetype used on the admin interface). | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
426 | 2005-08-26 17:28:24 | 2005-08-26 17:38:55 | 2022-03-06 03:20:41.356434 | Unreviewed | closed | contrib.admin | defect | normal | fixed | ContentTypeDoesNotExist thrown whenever CRUD actions are performed in admin | Whenever I create, modify, or delete objects in the admin interface for my project I recieve the following error: {{{ There's been an error: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py", line 64, in get_response response = callback(request, **param_dict) File "/usr/lib/python2.3/site-packages/django/views/admin/main.py", line 894, in change_stage log.log_action(request.user.id, opts.get_content_type_id(), pk_value, repr(new_object), log.CHANGE, change_message) File "/usr/lib/python2.3/site-packages/django/core/meta/__init__.py", line 241, in get_content_type_id self._content_type_id = mod.get_object(python_module_name__exact=self.module_name, package__label__exact=self.app_label).id File "/usr/lib/python2.3/site-packages/django/utils/functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.3/site-packages/django/core/meta/__init__.py", line 1082, in function_get_object raise does_not_exist_exception, "%s does not exist for %s" % (opts.object_name, kwargs) ContentTypeDoesNotExist: ContentType does not exist for {'package__label__exact': 'myproject', 'python_module_name__exact': 'foos'} }}} The action always works, but this error is thrown nonetheless. | adrian | jmadson@techie.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
427 | 2005-08-26 17:51:19 | 2005-08-26 17:53:08 | 2022-03-06 03:20:41.470167 | Unreviewed | closed | *.djangoproject.com | defect | normal | duplicate | trac problem | Trying to list all tickets to complete milestone 1: ParseError: [/home/html/templates/djangoproject.com/trac_templates//query.cs:24] Undefined macro called: hdf_select_multiple(query.options.component, 'component', 4) | jacob | santagada@gmail.com | trac | 0 | 0 | 0 | 0 | 0 | 0 | |
358 | 2005-08-18 11:59:06 | 2005-08-26 18:05:21 | 2022-03-06 03:20:30.602004 | Unreviewed | closed | *.djangoproject.com | defect | normal | fixed | djangoproject.com should have Trac 0.9.pre | The bleeding-edge 0.9.pre version from the Trac trunk is usually very stable, and if used with SQLite 3, might prevent a lot of the problems with database locks we're currently seeing. I'm proposing the trunk version of Trac is used on the website. | jacob | Manuzhai | 0 | 0 | 0 | 0 | 0 | 0 | ||
382 | 2005-08-21 07:25:28 | 2005-08-27 10:02:52 | 2022-03-06 03:20:34.080867 | Unreviewed | closed | Core (Other) | defect | minor | wontfix | globals should show up in model methods and classes (like normal python classes) | I want to do this: {{{ import re class Note(meta.Model): #... def __repr__(self): if re.search(...) }}} Unfortunately, "re" isn't present in the namespace. The following exception occurs: {{{ File "c:\brendano\djblog\apps\blog\models\blog.py", line 25, in __repr__ if re.search(r'^\s*$', self.title): NameError: global name 're' is not defined }}} as a workaround I can just do "import re" inside the method. But the larger problem is, all module-level (global) variables don't appear inside any method namespaces. {{{ myglobal = 5 class Note(meta.Model): #... def __repr__(self): print myglobal }}} also gives the same error. In fact, a manual "global myglobal" statement fails to make it work. IMPORTANCE: so I guess the preferred django way of doing things is to make the model classes as sparse and declarative as possible. In that case the bug is a minor inconvenience. SUSPECTED CAUSE: maybe a bug in the ModelBase metaclass? SVN version: 541 | adrian | brenocon@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
430 | 2005-08-28 01:38:04 | 2005-08-28 01:42:54 | 2022-03-06 03:20:41.907694 | Unreviewed | closed | Documentation | defect | normal | invalid | Model examples need to be update to the new syntax | http://www.djangoproject.com/documentation/models/ needs to be updated to reflect the new model syntax. | jacob | MattCroydon | 0 | 0 | 0 | 0 | 0 | 0 | ||
431 | 2005-08-28 12:50:17 | 2005-08-28 14:06:18 | 2022-03-06 03:20:42.050046 | Unreviewed | closed | Template system | enhancement | normal | invalid | Templates should support multiple level of lookups | Let's say I have a dictionary with strings as keys and lists as values, like: {{{ 'dictionary': {'key1': [0, 0], 'key2': [0.25, 0.005076142131979695], 'key3': [0, 0], 'key4': [0, 0]} }}} When I pass that to a template, I would like to access the values of the lists from within the templates, like: {{{ {{ dictionary.key1.0 }} and {{ dictionary.key3.1 }} }}} Additionally, it would be nice to extend {{{for}}} for that: {{{ {% for key, val in dictionary %} ... {% endfor %} }}} I hope you understand what I try to explain. | adrian | lucky@knup.de | 0 | 0 | 0 | 0 | 0 | 0 | ||
441 | 2005-08-30 20:07:17 | 2005-08-30 20:13:26 | 2022-03-06 03:20:43.600682 | Unreviewed | closed | contrib.admin | defect | normal | invalid | A non-required DateTimeField produces an error on save | I have a simple model that contains 2 DateTimeField's. One required and one not. Upon save, if the non-required field does not have a value, django throws an error. Here is the model. from django.core import meta class Event(meta.Model): start_date = meta.DateTimeField('Start Date') end_date = meta.DateTimeField('End Date', blank=True) class META: admin = meta.Admin() def __repr__(self): return self.start_da and the error There's been an error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 64, in get_response response = callback(request, **param_dict) File "/usr/lib/python2.4/site-packages/django/views/admin/main.py", line 777, in add_stage new_object = manipulator.save(new_data) File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1463, in manipulator_save new_object.save() File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py", line 793, in method_save db_values = [f.get_db_prep_save(f.pre_save(getattr(self, f.column), True)) for f in opts.fields if not isinstance(f, AutoField)] File "/usr/lib/python2.4/site-packages/django/core/meta/fields.py", line 333, in get_db_prep_save value = value.replace(microsecond=0) TypeError: replace() takes no keyword arguments | adrian | jay@skabber.com | DateTImeField required replace | 0 | 0 | 0 | 0 | 0 | 0 | |
387 | 2005-08-21 18:41:23 | 2005-08-30 21:56:14 | 2022-03-06 03:20:34.807083 | Unreviewed | closed | contrib.admin | defect | normal | worksforme | Date field does not render, saving object fails with invisible error | I'm creating a sample application with a model very similar to the "blog" app powering the Django site. When I go to create a new Entry I do not see the javascript helpers for the pub_date field. I've tried this in Safari and Firefox, checked out the DOM trees and Javascript debuggers in both, and the problem does not seem to be on the client side. When I go to save an Entry I see "Please correct the error below," but no error below. I'm guessing it's failing on the lack of values for the DateTimeField, although I do have auto_now_add=True. | adrian | al3x@al3x.net | 0 | 0 | 0 | 0 | 0 | 0 | ||
444 | 2005-08-31 12:29:05 | 2005-08-31 16:13:39 | 2022-03-06 03:20:44.075679 | Unreviewed | closed | contrib.admin | defect | minor | invalid | FileField returns error when updating | When uploading a file via filefield (in the admin interface) it works correctly, however if I attempt to edit and upload a new file I receive the error "Enter a valid filename.", on editing the filename/link above the filefield is the actual system path, it would be good if this was a relative path or similar. I'm running via builtin server. my filefield is specified as follows: file = meta.FileField(upload_to="/tmp/") | adrian | ilikeprivacy@gmail.com | filefield | 0 | 0 | 0 | 0 | 0 | 0 | |
403 | 2005-08-23 12:44:38 | 2005-09-01 14:20:36 | 2022-03-06 03:20:37.072007 | Unreviewed | closed | Template system | defect | normal | fixed | [patch] floatformat error | When using floatformat with FloatField (MySQL)]: R545 {{{ File "/Users/nesh/devel/django/django/core/template.py", line 411, in resolve_variable_with_filters obj = registered_filters[name][0](obj, arg) File "/Users/nesh/devel/django/django/core/defaultfilters.py", line 31, in floatformat if text - int(text) < 0.1: File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/decimal.py", line 636, in __cmp__ other = _convert_other(other) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/decimal.py", line 2863, in _convert_other raise TypeError, "You can interact Decimal only with int, long or Decimal data types." TypeError: You can interact Decimal only with int, long or Decimal data types. }}} | adrian | nesh <nesh [at] studioquattro [dot] co [dot] yu> | 0 | 1 | 0 | 0 | 0 | 0 | ||
390 | 2005-08-21 23:43:41 | 2005-09-01 23:01:50 | 2022-03-06 03:20:35.218448 | Unreviewed | closed | Documentation | defect | trivial | invalid | corrections for model reference documentation | In using the ManyToOneField to relate a model to another model multiple times, it turned out to be necessary to use the name parameter (to avoid identical field names in SQL). This is done in the short piece of example code but not documented in the surrounding text. It is undocumented how to use unique_together with ManyToOneFields (whose field names are automagically generated), though it is possible to figure it out using the generated SQL. | jacob | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
314 | 2005-08-13 19:56:25 | 2005-09-01 23:02:41 | 2022-03-06 03:20:22.976085 | Unreviewed | closed | Documentation | defect | major | invalid | 'name' option doesn't exist / not obvious in model reference | On the model reference page, the "name" property isn't documented. | jacob | Boffbowsh | 0 | 0 | 0 | 0 | 0 | 0 | ||
331 | 2005-08-16 14:52:28 | 2005-09-01 23:07:13 | 2022-03-06 03:20:25.731318 | Unreviewed | closed | Tools | defect | normal | fixed | Unexpected model attributes crash install | Attributes in the model class that django isn't expecting cause {{{djangoadmin.py install <foo>}}} to crash with a particularly nondescript error ({{{AttributeError: '<whatever>' object has no attribute 'custom'}}}). Functions and expected non-function attributes are all parsed correctly, but it appears that when django encounters an unknown name it doesn't do type-checking (in this case, it was a tuple used as a choices argument, which can't be assigned values using {{{foo.bar}}}). Sample model: {{{ class Sample(meta.Model): FRAMEWORK_CHOICES = ( (0, "Django"), (1, "RoR"), (2, "Other"), ) fields = ( meta.IntegerField('framework', choices=Sample.FRAMEWORK_CHOICES) ), }}} nb: The problem was fixed by moving it to the module rather than the class, but it can no longer be referenced by custom functions, as they are generated in a different module. | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
354 | 2005-08-18 10:36:26 | 2005-09-01 23:07:46 | 2022-03-06 03:20:30.007004 | Unreviewed | closed | Tools | defect | normal | 1.0 | fixed | Unit tests fail with old version of MySQLdb | I changed to the 'tests' directory and attempted to run the tests with the following result: ~/Development/django/tests->python ./runtests.py Running tests with database 'mysql' Traceback (most recent call last): File "./runtests.py", line 202, in ? t.run_tests() File "./runtests.py", line 85, in run_tests db.connection.autocommit() TypeError: function takes exactly 1 argument (0 given) | adrian | ssteiner | 0 | 0 | 0 | 0 | 0 | 0 | |
392 | 2005-08-22 09:08:17 | 2005-09-01 23:09:59 | 2022-03-06 03:20:35.550266 | Unreviewed | closed | Core (Cache system) | defect | normal | fixed | django sets up memcache incorrectly when arguments are given | If your settings file is specifying a cache backend and giving arguments after the '?' you will see errors like this: MemCache: //127.0.0.1:9999: connect: Name or service not known. Marking dead. This is because the '//' is not trimmed correctly when there is a '?' in CACHE_BACKEND. Here is a patch: {{{ Index: django/core/cache.py =================================================================== --- django/core/cache.py (revision 544) +++ django/core/cache.py (working copy) @@ -243,7 +243,7 @@ qpos = rest.find('?') if qpos != -1: params = dict(parse_qsl(rest[qpos+1:])) - host = rest[:qpos] + host = rest[2:qpos] else: params = {} if host.endswith('/'): }}} | jacob | adrian@exoweb.net | 0 | 0 | 0 | 0 | 0 | 0 | ||
433 | 2005-08-29 20:14:37 | 2005-09-02 18:47:25 | 2022-03-06 03:20:42.364462 | Unreviewed | closed | Metasystem | enhancement | normal | duplicate | Add ability to delete multiple objects in a single call | There is a way to retrieve multiple objects using get_list function. There should be also a way to delete multiple objects on a single call. For example {{{ polls.delete(total_votes__lt=10) }}} | adrian | samuel | 0 | 0 | 0 | 0 | 0 | 0 | ||
432 | 2005-08-28 22:44:12 | 2005-09-02 18:48:04 | 2022-03-06 03:20:42.227383 | Unreviewed | closed | *.djangoproject.com | defect | normal | invalid | Trac throwing errors when attempting to replace attachment | Below is the traceback I got just now (while submitting a correction to #429). I had checked the "Replace existing attachment of the same name" box. No problems when I resubmitted after unchecking the box. {{{ Oops... Trac detected an internal error: 'module' object has no attribute 'TICKET_ADMIN' If you think this really should work and you can reproduce it. Then you should consider to report this problem to the Trac team. Go to http://trac.edgewall.com/ and create a new ticket where you describe the problem, how to reproduce it. Don't forget to include the python traceback found below. TracGuide — The Trac User and Administration Guide Python traceback Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 205, in handler dispatch_request(mpr.path_info, mpr, env) File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 139, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 107, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.3/site-packages/trac/attachment.py", line 265, in process_request self._do_save(req, attachment) File "/usr/lib/python2.3/site-packages/trac/attachment.py", line 327, in _do_save perm_map = {'ticket': perm.TICKET_ADMIN, AttributeError: 'module' object has no attribute 'TICKET_ADMIN' }}} | jacob | pb@e-scribe.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
429 | 2005-08-27 22:15:34 | 2005-09-02 18:51:21 | 2022-03-06 03:20:41.726531 | Unreviewed | closed | Core (Other) | enhancement | minor | fixed | Proposed minor cleanup of utils/html.py | The patch attached below makes minor changes to the variable names used for regular expression objects in utils/html.py, for the sake of internal consistency and consistency with other Django modules. The variable names in the patch are lowercase (as they are in core/validators.py and core/defaultfilters.py) and they all now end with "_re" (this was not consistent in html.py, but seems fairly consistent elsewhere). No other modules in the Django distribution appear to reference these names directly. I also edited the module docstring -- it contained what I think was the last reference to World Online in the codebase, and contained three variants of the word "use," which I thought excessive for a single sentence fragment :) | adrian | pb@e-scribe.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
404 | 2005-08-23 12:47:15 | 2005-09-02 20:46:10 | 2022-03-06 03:20:37.175278 | Unreviewed | closed | Metasystem | defect | normal | fixed | MySQL order_by=['?'] throws ProgrammingError | When attempting to get a list in random order with MySQL as the backend, this error is thrown: {{{ book_list = books.get_list(slug__ne=kwargs['book'], order_by=['?']) ... ProgrammingError: (1064, "You have an error in your SQL syntax near '()' at line 1") }}} I would guess it's a db abstraction issue. MySQL uses ORDER BY RAND() for random ordering, I believe. Revision 545, MySQL 3.23, Mac OS X.3.9 | adrian | mattycakes@gmail.com | mysql order order_by random | 0 | 0 | 0 | 0 | 0 | 0 | |
418 | 2005-08-25 21:20:52 | 2005-09-02 21:12:25 | 2022-03-06 03:20:39.386824 | Unreviewed | closed | contrib.admin | defect | trivial | invalid | No interface to change default site in sites table generated by django-admin.py init | There does not seem to be any interface to changing the "domain" and "name" fields on the sites table generated by {{{ django-admin.py init }}} It's fairly disconcerting to see "mysite.com" on the flat pages create/edit form and not have any idea how to modify it, short of changing it by hand in the database. | adrian | jmadson@techie.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
414 | 2005-08-24 06:44:57 | 2005-09-02 22:35:56 | 2022-03-06 03:20:38.824862 | Unreviewed | closed | Metasystem | defect | normal | invalid | radio_admin doesn't appear to work | I posted this to the groups, but didn't get a response. Perhaps nobody uses radio_admin. I have a need to display my many-to-many as a list of checkboxes...both in the admin UI and user forms. I've done the following: {{{ meta.ManyToManyField(DayToHelp, radio_admin=True, blank=True, null=True), }}} yet, I get a select list everywhere I try to reference that field. Should I expect this to work for user forms, too? The current way would *almost* not be a problem, as I can just do this in my form: {{{ <ul style="list-style: none;" id="daystohelp"> {% for choice in form.manipulator.daytohelps.choices %} <li> <input type="checkbox" name="daytohelps" value="{{ choice.0 }}"/> {{ choice.1 }} </li> {% endfor %} </ul> }}} However, it doesn't retain the selection when there's an error like it does for the rest of the fields. | adrian | dustin@spy.net | radio_admin radio admin manytomany select | 0 | 0 | 0 | 0 | 0 | 0 | |
434 | 2005-08-30 08:26:30 | 2005-09-06 10:02:12 | 2022-03-06 03:20:42.486885 | Unreviewed | closed | Core (Other) | defect | normal | worksforme | Does runserver takes 2 arguments? | After update django today (2005.8.30), when I type "django-admin.py runserver --settings=myproject.settings.main". I got this error message "TypeError: runserver() takes exactly 2 arguments (1 given)", while with it's help, I got ""options: -h, --help show this help message and exit --settings=SETTINGS Python path to settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used." show should i start my server? | adrian | Leo | runserver | 0 | 0 | 0 | 0 | 0 | 0 | |
477 | 2005-09-09 20:06:41 | 2005-09-09 21:41:16 | 2022-03-06 03:20:49.235034 | Unreviewed | closed | *.djangoproject.com | defect | minor | invalid | js errors in code.djangoproject.com | Konqueror 3.4.2 report the following two javascript errors: Error: http://code.djangoproject.com/: ReferenceError - Can't find variable: addHeadingLinks [[BR]] Error: http://code.djangoproject.com/: ReferenceError - Can't find variable: searchHighlight | jacob | jhernandez | 0 | 0 | 0 | 0 | 0 | 0 | ||
478 | 2005-09-09 20:38:45 | 2005-09-09 21:43:54 | 2022-03-06 03:20:49.390970 | Unreviewed | closed | contrib.admin | defect | normal | worksforme | error with sqlite and admin | When trying to load the admin page, it comes up with this error (I´m using sqlite): {{{ Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/home/joey/django_projects/django/core/handlers/modpython.py", line 164, in handler return ModPythonHandler()(req) File "/home/joey/django_projects/django/core/handlers/modpython.py", line 145, in __call__ response = middleware_method(request, response) File "/home/joey/django_projects/django/middleware/sessions.py", line 68, in process_response datetime.datetime.now() + datetime.timedelta(seconds=SESSION_COOKIE_AGE)) File "/home/joey/django_projects/django/models/core.py", line 148, in _module_save s.save() File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _curried File "/home/joey/django_projects/django/core/meta/__init__.py", line 801, in method_save ','.join(field_names), ','.join(placeholders)), db_values) File "/usr/lib/python2.4/site-packages/django/core/db/base.py", line 10, in execute File "/home/joey/django_projects/django/core/db/backends/sqlite3.py", line 67, in execute return Database.Cursor.execute(self, query, params) OperationalError: SQL logic error or missing database }}} | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
483 | 2005-09-10 01:52:05 | 2005-09-10 04:15:25 | 2022-03-06 03:20:50.123440 | Unreviewed | closed | contrib.admin | defect | normal | duplicate | Possibility to remove child records when doing the inline editing | It should be possible to remove child records when doing the inline editing using {{{ForeignKey}}} | adrian | brovienas@yahoo.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
487 | 2005-09-11 07:35:50 | 2005-09-11 15:12:44 | 2022-03-06 03:20:50.784799 | Unreviewed | closed | Documentation | defect | trivial | fixed | [patch] minor typo in cache.txt | The very first example uses DB_CACHE. Isn't it supposed to be CACHE_BACKEND? {{{ Index: cache.txt =================================================================== --- cache.txt (revision 632) +++ cache.txt (working copy) @@ -57,7 +57,7 @@ For example:: - DB_CACHE = "memcached://127.0.0.1:11211/?timeout=60" + CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=60" Invalid arguments are silently ignored, as are invalid values of known arguments. }}} | jacob | eugene@lazutkin.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
492 | 2005-09-12 10:45:11 | 2005-09-12 11:55:28 | 2022-03-06 03:20:51.682158 | Unreviewed | closed | Core (Other) | enhancement | normal | invalid | {elsif} and nested | Why Django templates use so ugly and primitive syntax for {if}? {if expression1}{if expression2} looks awfull and verbose. Why there is no obvious {if expression1 and expression2} syntax?? I do not know also why there is no {elsif} command.... | adrian | hipertracker@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
467 | 2005-09-06 18:11:13 | 2005-09-13 03:31:50 | 2022-03-06 03:20:47.782623 | Unreviewed | closed | Tools | defect | normal | fixed | Debugging code left behind in django.utils.text ? | From django/utils/text.py: 1. {{{ fix_microsoft_characters(s): return s }}} - it currently does nothing. Is this on purpose? 2. {{{ recapitalize(text) }}} - Currently has {{{ capwords = 'I Jayhawk Jayhawks Lawrence Kansas KS'.split() }}} hardcoded. Is this debugging code left behind? If this is known and for debugging purposes, sorry to have bothered you :-). | adrian | swaroop@swaroopch.info | typo | 0 | 0 | 0 | 0 | 0 | 0 | |
511 | 2005-09-14 18:09:56 | 2005-09-14 18:54:43 | 2022-03-06 03:20:55.199974 | Unreviewed | closed | Core (Management commands) | defect | critical | worksforme | django-admin.py init fails at rev 641 | espen@newauburn:~/django/web$ django-admin.py init --settings=web.settings.main Error: The database couldn't be initialized. Here's the full exception: ERROR: syntax error at or near "user" at character 70 CREATE TABLE auth_messages ( id serial NOT NULL PRIMARY KEY, user integer NOT NULL REFERENCES auth_users (id), message text NOT NULL ); root@newauburn:/home/espen/django_src # svn up At revision 641. | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
519 | 2005-09-16 07:51:27 | 2005-09-16 13:15:52 | 2022-03-06 03:20:56.596655 | Unreviewed | closed | Core (Other) | defect | normal | invalid | Dir structure and modules | These two things are against DRY in Django. The project directory structure is too long and makes the user repeat the same thing over and over. For example apps/bulletin/model/bulletin.py, apps/bulletin/view/bulletin.py, etc. It would be nice if the user had more control on the directory layout and could instruct Django to use another one (for example apps/bulletin/model.py and apps/bulletin/view.py). Another problematic thing is the django.models. package which causes that two models in two different apps with an identical name have to have different module_name's. So if I have a model 'Vote' in the 'poll' app and 'Vote' in the 'election' app, one of those has to have a different module_name since django will strangely try to push them both into django.models.votes. So why not make it django.models.poll.vote (why even pluralise it and make it more vague and problematic through the process?). Regards! | adrian | wojtek3@brandlay.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
4 | 2005-07-13 19:08:10 | 2005-09-16 17:01:24 | 2022-03-06 03:19:23.630870 | Design decision needed | closed | Core (Cache system) | enhancement | normal | duplicate | Add a db cache backend | We should have a db cache backend -- this will be very useful for people who can't/won't run memcached. | jacob | adrian | 0 | 0 | 0 | 0 | ||||
506 | 2005-09-14 10:15:11 | 2005-09-19 01:18:13 | 2022-03-06 03:20:54.322589 | Unreviewed | closed | Tools | enhancement | normal | fixed | [patch] runtests.py should allow models to be tested individually | While experimenting with some new unit tests I got frustrated having to wait for ALL the tests to run every time I used runtests.py. I've attached a patch which extends the script to take an optional list of model tests to run as command line arguments. If one or more models are specified, the additional (non-model) tests are not run. Example usage: {{{ $ runtests.py lookup m2m_intermediary -v 1 Running tests with database 'postgresql' Creating test database Initializing test database Running app tests lookup model: Importing lookup model: Installing lookup model: Running tests m2m_intermediary model: Importing m2m_intermediary model: Installing m2m_intermediary model: Running tests Deleting test database All tests passed. }}} I've also moved the "24 errors" error count message to the bottom of the output - when you have several errors the message was scrolling off the screen. | adrian | Simon Willison | 0 | 1 | 0 | 0 | 0 | 0 | ||
524 | 2005-09-19 08:59:50 | 2005-09-19 13:15:48 | 2022-03-06 03:20:57.411163 | Unreviewed | closed | Core (Other) | defect | normal | wontfix | Numerous excessive selects in the manipulator | The default ChangeManipulator does a number of selects on the database which I don't want. This enlarges the DB load significantly. How to get rid of that? The selects I mean are: 1. first it gets the original object that it is supposed to work on (even though the generic view it is invoked from does that anyway) 2. then it gets a list of objects that this one refers to, for each ForeignKey field (and I don't want that) | adrian | wojtek3@brandlay.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
525 | 2005-09-19 11:34:57 | 2005-09-20 03:47:43 | 2022-03-06 03:20:57.545626 | Unreviewed | closed | contrib.admin | defect | normal | fixed | list_filter doesn't work with models which primary key is not named 'id' | I'm using package model and when I'm set list_filter to 'package' I'm getting following traceback. It seems to that filter code doesn't work with models which primary key is not named 'id'. {{{ There's been an error: Traceback (most recent call last): File "/Users/nesh/devel/django/django/core/handlers/base.py", line 64, in get_response response = callback(request, **param_dict) File "/Users/nesh/devel/django/django/views/admin/main.py", line 211, in change_list filter_template.append('%r\n' % \ AttributeError: 'Package' object has no attribute 'id' }}} | adrian | nesh <nesh [at] studioquattro [dot] co [dot] yu> | 0 | 0 | 0 | 0 | 0 | 0 | ||
530 | 2005-09-21 05:28:51 | 2005-09-21 07:37:24 | 2022-03-06 03:20:58.293702 | Unreviewed | closed | Database layer (models, ORM) | defect | critical | invalid | Unable to initialize SQLite database | Plateform: Win2000; python2.4; pysqlite 2.0.4; django 654 revision While Initializing, got the error: Error: The database couldn't be initialized. unable to open database file p.s. did include absolute path in main.py for sqlite (such as c:\xxx\xxx) ======main.py========== DATABASE_ENGINE = 'sqlite3' # 'postgresql', 'mysql', or 'sqlite3'. DATABASE_NAME = 'C:\DjanGoProject\first_proj\sqlitedb' # 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. | adrian | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
533 | 2005-09-21 21:39:13 | 2005-09-21 21:41:57 | 2022-03-06 03:20:58.802927 | Unreviewed | closed | contrib.admin | defect | normal | fixed | Bug in the load_and_render function | {{{ #!python def load_and_render(template_name, dictionary=None, context_instance=None): dictionary = dictionary or {} t = template_loader.get_template(template_name) if context_instance: c = context_instance.update(dictionary) else: c = Context(dictionary) return HttpResponse(t.render(c)) }}} This doesn't work right, as context_instance.update doesn't return the context. This makes more sense: {{{ #!python def load_and_render(template_name, dictionary=None, context_instance=None): dictionary = dictionary or {} t = template_loader.get_template(template_name) if context_instance: context_instance.update(dictionary) else: context_instance = Context(dictionary) return HttpResponse(t.render(context_instance)) }}} | adrian | brantley (deadwisdom@gmail.com) | 0 | 0 | 0 | 0 | 0 | 0 | ||
538 | 2005-09-22 13:52:18 | 2005-09-22 14:29:35 | 2022-03-06 03:20:59.642873 | Unreviewed | closed | Tools | defect | trivial | fixed | django is not zip_safe | When installing on my gentoo system setuptools failed to detect that django wasn't zip safe, so it zipped the egg. This causes django-admin's start(project|app) to fail. Adding zip_safe = False, To the parameters in setup.py takes care of it. | adrian | grayrest@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
545 | 2005-09-23 09:10:33 | 2005-09-23 12:35:07 | 2022-03-06 03:21:01.042971 | Unreviewed | closed | Core (Other) | defect | critical | duplicate | Checkin [670] breaks modpython | Due to a chain of imports, the environment never gets updated in modpython after [671] Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 287, in HandlerDispatch log=debug) File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 457, in import_module module = imp.load_module(mname, f, p, d) File "/usr/lib/python2.3/site-packages/django/core/handlers/modpython.py", line 1, in ? from django.core.handlers.base import BaseHandler File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py", line 1, in ? from django.utils import httpwrappers File "/usr/lib/python2.3/site-packages/django/utils/httpwrappers.py", line 5, in ? from django.conf.settings import DEFAULT_MIME_TYPE File "/usr/lib/python2.3/site-packages/django/conf/settings.py", line 29, in ? raise EnvironmentError, "Environment variable %s is undefined." % (ENVIRONMENT_VARIABLE) EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined. | adrian | robert@wittams.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
543 | 2005-09-23 07:30:45 | 2005-09-23 13:25:09 | 2022-03-06 03:21:00.697514 | Unreviewed | closed | Core (Other) | defect | blocker | fixed | [patch] Django under mod_python broken | {{{ Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/local/opt/python/lib/python2.4/site-packages/mod_python/apache.py", line 287, in HandlerDispatch log=debug) File "/usr/local/opt/python/lib/python2.4/site-packages/mod_python/apache.py", line 457, in import_module module = imp.load_module(mname, f, p, d) File "/home/sune/django/django/core/handlers/modpython.py", line 1, in ? from django.core.handlers.base import BaseHandler File "/home/sune/django/django/core/handlers/base.py", line 1, in ? from django.utils import httpwrappers File "/home/sune/django/django/utils/httpwrappers.py", line 5, in ? from django.conf.settings import DEFAULT_MIME_TYPE File "/home/sune/django/django/conf/settings.py", line 29, in ? raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined. }}} This is what you get, if you do not set DJANGO_SETTINGS_MODULE in your environment before starting your mod_python-Apache. Some recent changeset did not heed the warning at the top of the modpython.py. I'll attach a patch in a moment. | adrian | sune.kirkeby@gmail.com | mod_python modpython | 0 | 1 | 0 | 0 | 0 | 0 | |
551 | 2005-09-23 19:27:12 | 2005-09-25 18:52:28 | 2022-03-06 03:21:02.152812 | Unreviewed | closed | *.djangoproject.com | defect | normal | fixed | patches in trac don't give the format=txt link for download of the actual patch | The template for patches on trac should give a link to the patch file with ?format=txt attached to allow downloading the actual patch. | jacob | hugo <gb@bofh.ms> | 0 | 0 | 0 | 0 | 0 | 0 | ||
234 | 2005-07-30 12:54:34 | 2005-09-25 22:33:47 | 2022-03-06 03:20:09.947484 | Unreviewed | closed | Core (Cache system) | defect | normal | fixed | Make simple cache thread-safe | Proposition for thread-safe SimpleCache: It's not tested, just a example. {{{ #!python import time from threading import Lock _cache = None _expire_info = None _max_entries = None _cull_frequency = None class _SimpleCache(_Cache): def __init__(self, host, params): _Cache.__init__(self, params) self._lock = Lock() if _cache is None: # ignore if cache is initialised _cache = {} _expire_info = {} max_entries = params.get('max_entries', 300) try: _max_entries = int(max_entries) except (ValueError, TypeError): _max_entries = 300 cull_frequency = params.get('cull_frequency', 3) try: _cull_frequency = int(cull_frequency) except (ValueError, TypeError): _cull_frequency = 3 # # def get(self, key, default=None): self._lock.acquire() try: now = time.time() exp = self._expire_info.get(key, now) if exp is not None and exp < now: del self._cache[key] del self._expire_info[key] return default else: return self._cache.get(key, default) finally: self._lock.release() # def set(self, key, value, timeout=None): self._lock.acquire() try: if len(self._cache) >= self._max_entries: self._cull() if timeout is None: timeout = self.default_timeout self._cache[key] = value self._expire_info[key] = time.time() + timeout finally: self._lock.release() # def delete(self, key): self._lock.acquire() try: try: del self._cache[key] except KeyError: pass try: … | jacob | nesh <nesh [at] studioquattro [dot] co [dot] yu> | 0 | 0 | 0 | 0 | 0 | 0 | ||
559 | 2005-09-26 06:55:32 | 2005-09-26 13:32:28 | 2022-03-06 03:21:03.839490 | Unreviewed | closed | Documentation | defect | minor | wontfix | Tutorials should use different project name | the tutorials use the project name polls and the app name polls, making it hard for beginners to under which polls the tutorial is talking about, i suggest renaming the polls project to polls_project. | jacob | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
561 | 2005-09-26 16:08:47 | 2005-09-26 16:20:14 | 2022-03-06 03:21:04.186327 | Unreviewed | closed | Metasystem | enhancement | normal | duplicate | Relate Objects to a choice of objects | I have a object that needs to be related to one of a number objects. I propose two new field types called ForeignChoice and ManyToManyChoice (name suggestions welcomed, because I think they suck to be honest) Proposed syntax: {{{ from django.core import meta COMPONENT_TYPES = ( TextInput, ColourChoice ) class Component(meta.Model): name = meta.CharField(max_length=32) input = meta.ForeignChoice(COMPONENT_TYPES) class TextInput(meta.Model): text = meta.TextField() class ColourChoice(meta.Model): name = meta.SlugField(primary_key=True) rgb = meta.CharField(max_length=7) }}} This would create a appname_components table with the id and name fields as you'd expect, but also input_class and input_id fields. input_class would be one of 'TextInput' or 'ColourChoice', and input_id would refer to the PK in that class. I'll start work on a patch soon, but ideas and comments would be very welcome | adrian | Boffbowsh | 0 | 0 | 0 | 0 | 0 | 0 | ||
563 | 2005-09-27 03:44:16 | 2005-09-27 04:25:08 | 2022-03-06 03:21:04.506590 | Unreviewed | closed | Documentation | defect | trivial | fixed | [patch] minor typo in cache.txt | {{{ Index: cache.txt =================================================================== --- cache.txt (revision 701) +++ cache.txt (working copy) @@ -41,7 +41,7 @@ testing. Note that this cache backend is NOT threadsafe! - locmem:/// A more sophisticaed local memory cache; + locmem:/// A more sophisticated local memory cache; this is multi-process- and thread-safe. ============================== =========================================== }}} | jacob | eugene@lazutkin.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
567 | 2005-09-27 16:19:25 | 2005-09-27 16:33:26 | 2022-03-06 03:21:05.138607 | Unreviewed | closed | Core (Other) | defect | normal | fixed | request.has_key | It would be neat to have that method and I'm probably not the only one who thinks so. Patch attached. | adrian | wojtek3@brandlay.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
568 | 2005-09-27 16:22:57 | 2005-09-27 16:34:10 | 2022-03-06 03:21:05.271210 | Unreviewed | closed | Core (Other) | enhancement | normal | fixed | the JING setting and the EMAIL_IDENT setting | This is a patch for two new settings: JING is the path to the jing executible for the XMLTextField and EMAIL_IDENT which is the sting that prefixes the adimn and manager emails. | adrian | slashzero | 0 | 0 | 0 | 0 | 0 | 0 | ||
570 | 2005-09-27 21:25:18 | 2005-09-29 02:53:38 | 2022-03-06 03:21:05.745430 | Unreviewed | closed | Core (Other) | defect | normal | duplicate | formfields.SelectField doesn't select correct value for ForeignKey | formfields.SelectField renders withou "selected" attribute set to the correct option. This happens because FormWrapper fetches 'data' for SelectField.render() by its field_name. However most of the times real data for the field is stored in form's dict under field_name+'_id' key. This effectively breaks every form with the ForeignKey generated by generic view 'update_object' or with Manipulators as described in docs at http://www.djangoproject.com/documentation/forms/ Patch follows... | adrian | Maniac <Maniac@SoftwareManiacs.Org> | 0 | 0 | 0 | 0 | 0 | 0 | ||
578 | 2005-09-29 21:07:58 | 2005-09-29 21:45:58 | 2022-03-06 03:21:07.042550 | Unreviewed | closed | contrib.admin | enhancement | normal | invalid | [patch] automatically do MD5 in admin backend | can perhaps close #61, but that depends if this satisfies its requirements. This patchs adds auto md5 encryption to the admin backend, it doesn't change anything else, so it's not 'good' yet, but its better. I am lookin to implement a meta.PasswordField which would automagically do the md5crypt and display 2 password boxes through HTML. this is a temporal workaround. | adrian | Hein-Pieter van Braam <hp@syntomax.com> | 0 | 1 | 0 | 0 | 0 | 0 | ||
363 | 2005-08-18 15:08:45 | 2005-09-29 23:23:12 | 2022-03-06 03:20:31.404382 | Unreviewed | closed | Metasystem | defect | normal | fixed | Patch to make sqlall use a database specific initial data file over the database agnostic one | In the app's sql folder, you can now have [module].[database engine].sql to load initial data when installing an app. | adrian | slashzero | 0 | 0 | 0 | 0 | 0 | 0 | ||
588 | 2005-10-03 20:13:58 | 2005-10-03 20:20:03 | 2022-03-06 03:21:08.738571 | Unreviewed | closed | Metasystem | defect | normal | invalid | kwarg error when using get_object across join | {{{ class Product (meta.Model): name = meta.TextField() class Variant (meta.Model): product = meta.ForeignKey(Product) }}} {{{ >>> p = products.get_object(variant__id__exact=1) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1094, in function_get_object obj_list = function_get_list(opts, klass, **kwargs) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1134, in function_get_list return list(function_get_iterator(opts, klass, **kwargs)) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1116, in function_get_iterator select, sql, params = function_get_sql_clause(opts, **kwargs) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1313, in function_get_sql_clause tables2, join_where2, where2, params2, _ = _parse_lookup(kwargs.items(), opts) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1301, in _parse_lookup _throw_bad_kwarg_error(kwarg) File "/usr/local/lib/python2.4/site-packages/django/core/meta/__init__.py", line 1192, in _throw_bad_kwarg_error raise TypeError, "got unexpected keyword argument '%s'" % kwarg TypeError: got unexpected keyword argument 'variants__id__exact' }}} Also tried {{{variant__id__exact}}}, {{{variant__pk}}} etc | adrian | Boffbowsh | 0 | 0 | 0 | 0 | 0 | 0 | ||
591 | 2005-10-04 09:42:06 | 2005-10-04 15:45:03 | 2022-03-06 03:21:09.260968 | Unreviewed | closed | Documentation | defect | normal | invalid | [patch] Docs: Subclassing wrong object | {{{ Index: /usr/local/django_src/docs/templates_python.txt =================================================================== --- /usr/local/django_src/docs/templates_python.txt (revision 764) +++ /usr/local/django_src/docs/templates_python.txt (working copy) @@ -267,7 +267,7 @@ from django.core.template import Context import datetime - class TimeContext(template.Context): + class TimeContext(Context): def __init__(self, *args, **kwargs): Context.__init__(self, *args, **kwargs) self['current_time'] = datetime.datetime.now() }}} | jacob | Boffbowsh | 0 | 1 | 0 | 0 | 0 | 0 | ||
592 | 2005-10-04 20:13:05 | 2005-10-04 20:15:47 | 2022-03-06 03:21:09.413377 | Unreviewed | closed | Documentation | defect | normal | invalid | Error in tutorial 2 | There's a comma too many in the example-code for adjusting the order. The last comma should go. {{{ admin = meta.Admin( fields = ( (None, {'fields': ('pub_date', 'question')}), ), ) }}} | jacob | pterk | 0 | 0 | 0 | 0 | 0 | 0 | ||
602 | 2005-10-10 10:22:57 | 2005-10-10 10:48:24 | 2022-03-06 03:21:11.010658 | Unreviewed | closed | Core (Other) | defect | major | fixed | Django error when getting the root of the site with FCGI | I'm running lighttpd with FCGI and redirecting all traffic to Django-fcgi using the "/" prefix in the lighttpd fcgi configuration. When I go to mysite.com/ I get the following error: {{{ 45 # trailing slash or a file extension. 46 print old_url 47 if settings.APPEND_SLASH and (old_url[1][-1] != '/') and ('.' not in old_url[1].split('/')[-1]): 48 new_url[1] = new_url[1] + '/' 49 if new_url != old_url: global settings = <module 'django.conf.settings' from '/opt/tomcat/django/conf/settings.pyc'>, settings.APPEND_SLASH = True, old_url = ['w4.grono.net:8000', ''], ].split undefined }}} When I print out the old_url variable it contains:[[br]] ['mysite.com', ''] I don't know an easy fix for this but you guys probably do :) | adrian | wojtek@brandlay.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
604 | 2005-10-10 20:09:40 | 2005-10-10 20:18:47 | 2022-03-06 03:21:11.767515 | Unreviewed | closed | Generic views | task | normal | fixed | Total number of results not available in paginated object_list generic view | The object_list generic view does not make the total number of results available. The number of results on the current page can be gotten with object_list|length, but I cannot output the total number of objects across all pages. | jacob | cygnus@cprogrammer.org | 0 | 0 | 0 | 0 | 0 | 0 | ||
621 | 2005-10-13 13:48:14 | 2005-10-13 14:50:36 | 2022-03-06 03:21:14.644634 | Unreviewed | closed | Core (Other) | defect | major | fixed | [i18n] make-messages don't catch all messages in templates | For example: {{{ {% if is_paginated %} <div id="footer_menu"> {% if has_previous %} <a href="?page=0" class="end">{{ _("First page") }}</a> <a href="?page={{ previous }}">‹ {% i18n _("Previous page") %}</a> {% endif %} {% i18n ngettext('page %(page)s of %(pages)s page', 'page %(page)s of %(pages)s pages', pages) %} {% if has_next %} <a href="?page={{ next }}">{{ _("Next page") }} ›</a> <a href="?page={{ pages|add:"-1" }}" class="end">{{ _("Last page") }}</a> {% endif %} </div> {% endif %} }}} I get all _() translations but none of {% i18n _() %} or {% i18n gettext() %} | adrian | nesh <nesh [at] studioquattro [dot] co [dot] yu> | 0 | 0 | 0 | 0 | 0 | 0 | ||
623 | 2005-10-13 21:23:14 | 2005-10-13 23:32:30 | 2022-03-06 03:21:14.970708 | Unreviewed | closed | Template system | enhancement | normal | duplicate | [patch] Allow ssi tag to use template dirs, making apps that use this feature much more portable | The current ssi template tag requires that files be specified using absolute paths. This makes apps much harder to redistribute, and limits the usefulness of this tag. Since a major use of this tag would be to factor out common code in templates, it makes sense to put these includes in template directories, and to allow the tag to search the TEMPLATE_DIRS for files to include. The patch attached implements this, keeping compatibility with existing code by only looking for a template file if the path specified is relative rather than absolute. This kind of overlaps with ticket #598, but this one could be added with no side effects for anyone else. | adrian | L.Plant.98@cantab.net | 0 | 1 | 0 | 0 | 0 | 0 | ||
597 | 2005-10-07 07:39:37 | 2005-10-14 03:49:36 | 2022-03-06 03:21:10.192736 | Unreviewed | closed | contrib.admin | defect | major | worksforme | django-admin.py createsuperuser (MySQL) broken | The "django-admin.py createsuperuser" using MySQL seems to be broken (recently, in revision 797). {{{ da createsuperuser Username (only letters, digits and underscores): stava E-mail address: stava@jonitec.se Password: Password (again): Traceback (most recent call last): File "/usr/bin/da", line 130, in ? main() File "/usr/bin/da", line 75, in main ACTION_MAPPING[action]() File "/usr/lib/python2.3/site-packages/django/core/management.py", line 444, in createsuperuser u = users.create_user(username, email, password) File "/usr/lib/python2.3/site-packages/django/models/auth.py", line 163, in _module_create_user user.save() File "/usr/lib/python2.3/site-packages/django/utils/functional.py", line 3, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.3/site-packages/django/core/meta/__init__.py", line 799, in method_save db_values = [f.get_db_prep_save(f.pre_save(getattr(self, f.column), True)) for f in opts.fields if not isinstance(f, AutoField)] File "/usr/lib/python2.3/site-packages/django/core/meta/fields.py", line 340, in get_db_prep_save value = value.replace(microsecond=0) TypeError: replace() takes no keyword arguments }}} Further investigation reveals that the SQL statement is also incorrect: {{{ INSERT INTO auth_users (date_joined, last_login, is_superuser, is_active, is_staff, password_md5, email, last_name, first_name, username) VALUES (username, , , email, passwd, False, True, False, 2005-10-07 02:10:25.732343, 2005-10-07 02:10:25.732343)' }}} The list of field names and the list of values does not correlate. | adrian | stava@jonitec.se | 0 | 0 | 0 | 0 | 0 | 0 | ||
630 | 2005-10-16 02:28:43 | 2005-10-16 19:42:16 | 2022-03-06 03:21:16.019487 | Unreviewed | closed | Documentation | defect | major | fixed | Error in docs | http://www.djangoproject.com/documentation/model_api/ Scan for the text "In your settings file, you'll need to define" and you'll find one line where a fixed width formatting goes on forever and really screws up one sentence. It looks like a wikiformatting issue. | jacob | ken@kenkinder.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
637 | 2005-10-17 18:16:30 | 2005-10-17 18:32:41 | 2022-03-06 03:21:17.138858 | Unreviewed | closed | contrib.admin | defect | normal | duplicate | Errors in tests - sqlite | v. 911 - Python 2.4.2 - sqlite-3.2.1 - pysqlite-2.0.4 ---- {{{ Running tests with database 'sqlite3' 'one_to_one' module: API test raised an exception ================================================= Code: "w = r.add_waiter(name='Joe')" Line: 40 Exception: File "/home/bless/django/django_src/tests/doctest.py", line 1243, in __r un compileflags, 1) in test.globs File "<doctest one_to_one[13]>", line 1, in ? w = r.add_waiter(name='Joe') File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _cur ried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py", line 950, in method_add_related obj = rel_mod.Klass(**init_kwargs) File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _cur ried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py", line 762, in method_init raise TypeError, "Invalid value: %r should be a %s instance, not a %s" % (f.name, f.rel.to, type(rel_obj)) TypeError: Invalid value: 'restaurant' should be a <Options for restaurants> instance , not a <class 'django.models.one_to_one.Restaurant'> 'one_to_one' module: API test raised an exception ================================================= Code: 'w.save()' Line: 41 Exception: File "/home/bless/django/django_src/tests/doctest.py", line 1243, in __r un compileflags, 1) in test.globs File "<doctest one_to_one[14]>", line 1, in ? w.save() NameError: name 'w' is not defined 'one_to_one' module: API test raised an exception ================================================= Code: 'w' Line: 42 Exception: File "/home/bless/django/django_src/tests/doctest.py", line 1243, in __r un compileflags, 1) in test.globs File "<doctest one_to_one[15]>", line 1, in ? w NameError: name 'w' is not defined 3 erro… | adrian | Bless | 0 | 0 | 0 | 0 | 0 | 0 | ||
493 | 2005-09-12 14:03:26 | 2005-10-20 11:54:39 | 2022-03-06 03:20:51.859163 | Unreviewed | closed | Metasystem | defect | normal | fixed | [patch] FileField.get_foo_url returns absolute path instead url | Quick fix: {{{ Index: django/core/meta/__init__.py =================================================================== --- django/core/meta/__init__.py (revision 635) +++ django/core/meta/__init__.py (working copy) @@ -999,7 +999,8 @@ def method_get_file_url(field, self): if getattr(self, field.name): # value is not blank import urlparse - return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name)).replace('\\', '/') + fname = getattr(self, field.name)[len(settings.MEDIA_ROOT):] # name is stored with filesystem full path + return urlparse.urljoin(settings.MEDIA_URL, fname).replace('\\', '/') return '' def method_get_file_size(field, self): }}} | adrian | nesh <nesh [at] studioquattro [dot] co [dot] yu> | 0 | 1 | 0 | 0 | 0 | 0 | ||
655 | 2005-10-20 06:53:07 | 2005-10-20 13:22:20 | 2022-03-06 03:21:19.962924 | Unreviewed | closed | Documentation | defect | normal | fixed | [doc] model_api - validator_list is incomplete | In .../documentation/model_api/ , the 'validator_list' option should say where find information about those extra validators (django.core.validators). | jacob | Bless | 0 | 0 | 0 | 0 | 0 | 0 | ||
656 | 2005-10-20 07:13:35 | 2005-10-20 13:28:46 | 2022-03-06 03:21:20.138983 | Unreviewed | closed | Documentation | defect | normal | invalid | Mention "Save as new" as a possible option in tutorial 2 | In "Explore the free admin functionality" section of Tutorial 2, it should be at least cited that under some circumstances it is also possible to have a "Save as new" option, used to "clone" the current object to a new one. | adrian | paolo | 0 | 0 | 0 | 0 | 0 | 0 | ||
668 | 2005-10-20 22:55:20 | 2005-10-20 22:58:34 | 2022-03-06 03:21:22.287934 | Unreviewed | closed | contrib.admin | defect | normal | fixed | change default 'site' URL to example.com not 'mysite.com' | in django/core/management.py you set up the default site to 'mysite.com'. you should either have this set to example.com, localhost, or a URL in the djangoproject.com saying what you need to change ;-) I found this when trying out the /r/ shortcut feature. | adrian | ian@holsman.net | 0 | 0 | 0 | 0 | 0 | 0 | ||
663 | 2005-10-20 21:16:48 | 2005-10-20 23:16:46 | 2022-03-06 03:21:21.357900 | Unreviewed | closed | contrib.admin | defect | normal | fixed | [patch] app_templates-loader broken for testapp | The app_templates-loader assumes that all application-names have at least one '.' in them, which is wrong for testapp. Also, it should turn probably turn ImportErrors into ImproperlyConfigureds. Short patch in-line here: {{{ === django/core/template/loaders/app_directories.py ================================================================== --- django/core/template/loaders/app_directories.py (revision 2981) +++ django/core/template/loaders/app_directories.py (local) @@ -2,14 +2,24 @@ from django.conf.settings import INSTALLED_APPS, TEMPLATE_FILE_EXTENSION from django.core.template import TemplateDoesNotExist +from django.core.exceptions import ImproperlyConfigured import os # At compile time, cache the directories to search. app_template_dirs = [] for app in INSTALLED_APPS: i = app.rfind('.') - m, a = app[:i], app[i+1:] - mod = getattr(__import__(m, '', '', [a]), a) + if i == -1: + m, a = app, None + else: + m, a = app[:i], app[i+1:] + try: + if a is None: + mod = getattr(__import__(m, '', '', []), a) + else: + mod = getattr(__import__(m, '', '', [a]), a) + except ImportError, e: + raise ImproperlyConfigured, 'ImportError %s: %s' % (app, e.args[0]) template_dir = os.path.join(os.path.dirname(mod.__file__), 'templates') if os.path.isdir(template_dir): app_template_dirs.append(template_dir) }}} | adrian | Sune Kirkeby <sune.kirkeby@gmail.com> | 0 | 1 | 0 | 0 | 0 | 0 | ||
479 | 2005-09-09 20:44:52 | 2005-10-22 21:38:01 | 2022-03-06 03:20:49.547511 | Unreviewed | closed | Database layer (models, ORM) | defect | normal | fixed | [patch] Implement timezone-formats in date-formatting | In db/typecast timezone-information from the database is discarded. This is bad, which this patch fixes. Also, the timezone-related formatting characters were NotImplemented in utils/dateformat, this patch also fixes that. (I assigned this to database-wrapper, but it's just as much template-system...) | adrian | sune.kirkeby@gmail.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
678 | 2005-10-21 23:37:44 | 2005-10-23 22:09:14 | 2022-03-06 03:21:24.089869 | Unreviewed | closed | Documentation | enhancement | normal | fixed | I would like to see a tutorial describing how to edit One-To-Many relationships | The current 'polls' tutorial is GREAT, and it REALLY helps new users come up to speed quickly. I love the style it is presented in. Currently the tutorial skips one important task. Creating a one -> many entry screen (ie the page to create a poll with multiple choices on it). It 'cheats' and goes to the command line/admin screens to do these. I would like to see a tutorial on how to do this. I belive the tutorial would cover a lot of material that I have issues with, and would go into detail on how the framework behaves. regards Ian. | jacob | Ian@holsman.net | 0 | 0 | 0 | 0 | 0 | 0 | ||
261 | 2005-08-04 10:17:05 | 2005-10-24 01:32:03 | 2022-03-06 03:20:13.915180 | Unreviewed | closed | contrib.admin | enhancement | normal | invalid | the administrator with edit_inline should give ordering choices | Both the ForeignKey() field definition and the generated interface should give possibilities for ordering. Currently it seems like it orders by the ID, but some data might be better ordered by different data. So it would be nice to have a order_list option for ForeignKeys much like we already have for the model classes. | adrian | hugo <gb@bofh.ms> | 0 | 0 | 0 | 0 | 0 | 0 | ||
691 | 2005-10-25 01:19:10 | 2005-10-25 01:19:55 | 2022-03-06 03:21:26.106784 | Unreviewed | closed | contrib.admin | defect | normal | duplicate | Model allowed me to 'hide' a required field, which produced unuseable error messages. | I had a data model which had a required field 'text'. When I was ordering the fields using the following syntax: admin = meta.Admin( # Add this to order the fields and even group them! fields = ( (None, {'fields': ('title', 'published_date')} ), ("Categories", {'fields': ('categories',)} ), ) ) I forgot to put in the 'text' field. Which meant that when I was adding a new item, it would complain that I should fix the 'error' below, but there was no error listed below, because the text field was never shown. The validate command should catch this maybe? But at the very least, if error messages aren't shown during the display of the form, they should be shown in a final list at the end. Or something. | adrian | lakin.wecker@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
585 | 2005-10-03 12:50:30 | 2005-10-26 21:57:07 | 2022-03-06 03:21:08.235500 | Unreviewed | closed | Documentation | task | normal | fixed | [Document] - Render your Django's data with specialized applications | This ticket regards Adrian's comment at this page: http://www.djangoproject.com/documentation/outputting_pdfs/ I hope you can find the document useful in some way. Feel free to use it as you want, if you want. It has been a pleasure to do something for you, in each case. --------------------------------------- {{{ ======================================================= Render your Django's data with specialized applications ======================================================= Django is brilliant for what concerns data-centric web applications. It offers an elegant solution to fill the distance that divide your data and users interested in them. It provides an object-to-relational mapper for easily retrieve data from the backend (actually PostgreSQL, MySQL, SQLite, more to come); an URL dispatcher to make you able to tailor URLs as you desire; a cache system to enable super-fast responses to queries; an admin interface automatically generated, commonly used for immediate prototiping and a lot of other great features. It faces another aspect that nowadays results very important from every perspective: Django also lets you exactly decide *how* to *present* data to the user. By default it prompts code that web browsers are able to understand, even if it is *not* the only code it is able to output. It is instead possible to output any kind of code, interpretable from different external applications. Demanding the rendering of your data to specialized applications, means that you can stop to abuse of web browsers to present information that instead would be better represented with other specific tools. The concept of 'views' make it is possible. Views, as the name suggests, provide the solution for organize your data in some format recognizable from some application. An excellent idea is to use views to adapt your data structure in a format that Open Office Writer can read and understand. Probably you know that Open Office documents *are* composed by *XML documents*. If … | adrian | paolo <paolo@php3.it> | 0 | 0 | 0 | 0 | 0 | 0 | ||
675 | 2005-10-21 15:19:08 | 2005-10-29 17:10:52 | 2022-03-06 03:21:23.613858 | Unreviewed | closed | Core (Other) | defect | normal | fixed | [Patch] PasswordField does not respect length and maxlength parameters | The render method of PasswordField does not make use of length and maxlength parameters. Simple patch included. | adrian | seancazzell@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
706 | 2005-10-30 06:42:01 | 2005-10-30 14:25:01 | 2022-03-06 03:21:28.472156 | Unreviewed | closed | Core (Management commands) | enhancement | normal | wontfix | rename of django-admin.py? | I would like to step thru django-admin.py in an IDE debugger. (Eclipse and Pydev). To do so I have attempted to run django-admin.py as follows: from django.bin import django-admin django-admin.main() # (pydev allows me to supply the parms) but the - in django-admin.py gives me a syntax error on both statements. If i rename django-admin.py to django_admin.py (- to _), all is well. Perhaps you would consider making this change. (I am a python newbie...so please cut me some slack if I am missing something simple.) thx, gerry rodman htp://www.gerryrodman.com | adrian | gerryrmail-dj@yahoo.com | 0 | 0 | 0 | 0 | 0 | 0 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE tickets ( id int primary key, created datetime, changetime datetime, last_pulled_from_trac datetime, stage text, status text, component text, type text, severity text, version text, resolution text, summary text, description text, owner text, reporter text, keywords text, easy boolean, has_patch boolean, needs_better_patch boolean, needs_tests boolean, needs_docs boolean, ui_ux boolean );