tickets
42 rows where "changetime" is on date 2006-10-27
This data as json, CSV (advanced)
Suggested facets: component, type, severity, version, resolution
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
162 | 2005-07-22 17:57:21 | 2006-10-27 11:56:15 | 2022-03-06 03:19:54.815472 | Unreviewed | closed | contrib.admin | defect | minor | fixed | admin log accesses __repr__ too late (w/patch) | If a meta.Model class has a repr function like this: {{{ def __repr__(self): return "Object #%s" % (self.id,) }}} When the object is deleted through the administration interface, the user interface shows that: {{{The object "Object #None" was deleted successfully.}}} A similar message appears in the admin log. It would suggest that the object's representation should be cached before it is deleted for display in the UI and logs. This quick and simple patch fixes the problem: {{{ Index: django/views/admin/main.py =================================================================== --- django/views/admin/main.py (revision 293) +++ django/views/admin/main.py (working copy) @@ -1056,8 +1059,8 @@ if request.POST: # The user has already confirmed the deletion. if perms_needed: raise PermissionDenied + obj_repr = repr(obj) obj.delete() - obj_repr = repr(obj) log.log_action(request.user.id, opts.get_content_type_id(), object_id, obj_repr, log.DELETION) request.user.add_message('The %s "%s" was deleted successfully.' % (opts.verbose_name, obj_repr)) return HttpResponseRedirect("../../") }}} | adrian | mfenniak@pobox.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
207 | 2005-07-26 13:28:40 | 2006-10-27 13:56:20 | 2022-03-06 03:20:05.334350 | Unreviewed | closed | Template system | defect | normal | fixed | TimeFormat seconds function has unused second argument (w/ patch) | When using a time format with the 's' format string, which should be the time's seconds with leading zeros, the following error occurs: {{{ File "/usr/lib/python2.3/site-packages/django/core/defaultfilters.py", line 329, in time return time_format(value, arg) File "/usr/lib/python2.3/site-packages/django/utils/dateformat.py", line 317, in time_format return tf.format(format_string) File "/usr/lib/python2.3/site-packages/django/utils/dateformat.py", line 304, in format result += str(getattr(self, char)()) TypeError: s() takes exactly 2 arguments (1 given) }}} It seems that the TimeFormat's {{{s}}} function has an unnecessary and harmful second argument that is never used. This simple patch addresses the problem: {{{ Index: django/utils/dateformat.py =================================================================== --- django/utils/dateformat.py (revision 312) +++ django/utils/dateformat.py (working copy) @@ -293,7 +293,7 @@ return 'noon' return '%s %s' % (self.f(), self.a()) - def s(self, s): + def s(self): "Seconds; i.e. '00' to '59'" return '%02d' % self.time.second }}} | adrian | Mathieu Fenniak <mfenniak@pobox.com> | 0 | 0 | 0 | 0 | 0 | 0 | ||
268 | 2005-08-04 13:29:16 | 2006-10-27 19:58:53 | 2022-03-06 03:20:14.981187 | Unreviewed | closed | contrib.admin | enhancement | normal | fixed | Patch: new validator that validates one of many validators | Sometimes one needs to support different formats in a field and for each format there is already a validator. This validator would allow to just say that one of many validators is sufficient for correct data: {{{ class ANY: """ This validator tries all validators. If any one of them succeeds, the validator returns. If none of them succeeds, the given message is thrown as a validation error. The message is rather unspecific, so it's best to give a specific one on instantiation. always_test is propagated from the enclosed validators by setting it if any one of them contains a always_test attribute. """ def __init__(self, validator_list=[], error_message="This field should conform to one of several formats"): self.validator_list = validator_list self.error_message = error_message for v in validator_list: if hasattr(v, 'always_test'): self.always_test = True def __call__(self, field_data, all_data): for v in self.validator_list: try: v(field_data, all_data) return except validators.ValidationError, e: pass raise validators.ValidationError(self.error_message) }}} | adrian | hugo <gb@bofh.ms> | 0 | 0 | 0 | 0 | 0 | 0 | ||
271 | 2005-08-04 16:51:25 | 2006-10-27 15:09:16 | 2022-03-06 03:20:15.478860 | Unreviewed | closed | Documentation | defect | normal | fixed | "ManyToOneField" seen in Model Reference should read "ForeignKey" | Various references can be found to a non-existant "ManyToOneField" in the Model Reference describing the ManyToManyField. These should be replaced with "ForeignKey". | adrian | brantley (deadwisdom@gmail.com) | documentation ManyToOneField | 0 | 0 | 0 | 0 | 0 | 0 | |
280 | 2005-08-05 11:14:58 | 2006-10-27 13:57:35 | 2022-03-06 03:20:16.947218 | Unreviewed | closed | Core (Other) | enhancement | normal | fixed | add _pre_delete and _post_delete hooks | Currently one can define _pre_save and _post_save methods on a model, but no _*_delete methods. It's a useful feature missing, and trivial to implement. Just adding "if hasattr(self, '_pre_delete'): self._pre_delete()" (and the same for _post_delete) to method_delete() on django/core/meta/__init__.py and two paragraphs documenting them on docs/model-api.txt . | jacob | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
316 | 2005-08-14 07:42:00 | 2006-10-27 19:47:11 | 2022-03-06 03:20:23.243567 | Unreviewed | closed | contrib.admin | defect | major | fixed | Error while logging into Admin site since revision 487 | I have been using Django for more than a week now. I love it! And I am using the Admin site in the same way every day, by using: django-admin.py runserver --settings=MyDjango.settings.admin Yet, yesterday I got this error: -------------------------------- There's been an error: Traceback (most recent call last): File "/usr/lib64/python2.3/site-packages/django/core/handlers/base.py", line 59, in get_response response = middleware_method(request, callback, param_dict) File "/usr/lib64/python2.3/site-packages/django/middleware/admin.py", line 77, in process_view sessions.start_web_session(user.id, request, response) File "/usr/lib64/python2.3/site-packages/django/models/auth.py", line 227, in _module_start_web_session user.save() File "/usr/lib64/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/lib64/python2.3/site-packages/django/core/meta/__init__.py", line 735, in method_save db_values + [getattr(self, opts.pk.name)]) File "/usr/lib64/python2.3/site-packages/django/core/db/base.py", line 10, in execute result = self.cursor.execute(sql, params) File "/usr/lib64/python2.3/site-packages/MySQLdb/cursors.py", line 95, in execute return self._execute(query, args) File "/usr/lib64/python2.3/site-packages/MySQLdb/cursors.py", line 114, in _execute self.errorhandler(self, exc, value) File "/usr/lib64/python2.3/site-packages/MySQLdb/connections.py", line 33, in defaulterrorhandler raise errorclass, errorvalue Warning: Rows matched: 1 Changed: 1 Warnings: 1 ---------------------------------------------------- Do you have any clue how I can solve this issue? Thanks. | adrian | berry.groenendijk@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
424 | 2005-08-26 16:56:08 | 2006-10-27 10:34:34 | 2022-03-06 03:20:40.966348 | Unreviewed | closed | *.djangoproject.com | defect | trivial | fixed | Timeline page doesn't display link to RSS feed | two things I noticed that are broken: * anonymous sessions don't work anymore and so my username and address isn't stored * the RSS feed isn't linked from the timeline * the RSS feed is empty | jacob | hugo <gb@bofh.ms> | 0 | 0 | 0 | 0 | 0 | 0 | ||
448 | 2005-09-01 14:14:22 | 2006-10-27 12:36:23 | 2022-03-06 03:20:44.690789 | Unreviewed | closed | Documentation | defect | normal | fixed | formfield documentation uses IntegerField with choices, even though that doesn't work | The sample in the formfields documentation on custom manipulators uses a choices= parameter on an IntegerField. But choices= is only implemented by SelectField and variants thereof. | jacob | hugo <gb@bofh.ms> | 0 | 0 | 0 | 0 | 0 | 0 | ||
491 | 2005-09-12 06:24:29 | 2006-10-27 16:31:41 | 2022-03-06 03:20:51.507438 | Unreviewed | closed | Database layer (models, ORM) | defect | normal | fixed | Patch to allow non-user PostgreSQL connections. | I'm just using the user the application is running as for the database connection, so I use "dbname=whatever" as the psycopg connection string. The PostgreSQL backend requires "user=". The following patch fixes this. Index: core/db/backends/postgresql.py =================================================================== --- core/db/backends/postgresql.py (revision 632) +++ core/db/backends/postgresql.py (working copy) @@ -17,10 +17,12 @@ def cursor(self): from django.conf.settings import DATABASE_USER, DATABASE_NAME, DATABASE _HOST, DATABASE_PASSWORD, DEBUG, TIME_ZONE if self.connection is None: - if DATABASE_NAME == '' or DATABASE_USER == '': + if DATABASE_NAME == '': from django.core.exceptions import ImproperlyConfigured - raise ImproperlyConfigured, "You need to specify both DATABASE_ NAME and DATABASE_USER in your Django settings file." - conn_string = "user=%s dbname=%s" % (DATABASE_USER, DATABASE_NAME) + raise ImproperlyConfigured, "You need to specify the DATABASE_N AME in your Django settings file." + conn_string = "dbname=%s" % DATABASE_NAME + if DATABASE_USER: + conn_string = "user=%s %s" % ( DATABASE_USER, conn_string ) if DATABASE_PASSWORD: conn_string += " password=%s" % DATABASE_PASSWORD if DATABASE_HOST: | adrian | jafo@tummy.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
499 | 2005-09-13 15:48:37 | 2006-10-27 17:12:47 | 2022-03-06 03:20:52.960845 | Unreviewed | closed | Template system | major | new-admin | fixed | [patch] method_save() empty value fix | Hi, I've found a bug in django.core.meta in function method_save which would create SQL statementes with an empty value such as name='' when updating. Those queries would fail (postgresql and mysql). Here is a patch. It fixed my problem but I haven't tested it very thoroughly so typical discalimers apply :). Probably can be done better so feel free to improve. Great software, I'm so happy to have an excuse to improve my Python skills.... {{{ *** django/core/meta/__init__.py.orig 2005-09-13 17:34:54.591722120 +0200 --- django/core/meta/__init__.py 2005-09-13 17:31:55.037018584 +0200 *************** *** 782,787 **** --- 782,793 ---- # If it does already exist, do an UPDATE. if cursor.fetchone(): db_values = [f.get_db_prep_save(f.pre_save(getattr(self, f.column), False)) for f in non_pks] + while 1: + try: + idx = db_values.index('') + non_pks[idx:idx+1] = [] + db_values[idx:idx+1] = [] + except: break cursor.execute("UPDATE %s SET %s WHERE %s=%%s" % (opts.db_table, ','.join(['%s=%%s' % f.column for f in non_pks]), opts.pk.column), db_values + [pk_val]) else: }}} | adrian | alberto@toscat.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
515 | 2005-09-15 05:51:41 | 2006-10-27 11:28:01 | 2022-03-06 03:20:55.908398 | Unreviewed | closed | Core (Cache system) | defect | normal | fixed | [patch] additional set of cache backends | = New Backends = Three more backends are introduced: * '''locmem:''' - simple thread-safe in-memory cache. Good for small web sites. * Example: ''!locmem:///''. * '''file:''' - file-based multi-process/thread-safe cache. * Example: ''!file:///tmp/django.cache/lazutkin.com/'' - creates directory ''/tmp/django.cache/lazutkin.com'' and stores cached items as individual files. * '''sql:''' - sql-based multi-process/thread-safe cache. * Example: ''!sql://cache/'' --- uses table '''cache''' in current database to store cached items. All three backends accept arguments described in [http://www.djangoproject.com/documentation/cache/ Django's cache framework]. Examples: ''!sql://cache/?timeout=60'', ''!locmem:///?max_entries=10&cull_frequency=2''. Additionally '''simple:''' cache backend's bug is fixed. Notes: * All backends use '''pickle''' ('''cPickle''') as means to save the object. I decided against '''marshal''' or custom solutions. For now. * '''locmem:''' * Requires reader-writer lock, which is implemented in '''synch.py''' (attached). This file should be placed into '''django/utils''' directory. * Implements simplified (a-la '''simple:''') cache culling strategy, when each '''cull_frequency''' item is removed to make room. * '''file:''' * Implements simplified (a-la '''simple:''') cache culling strategy, when each '''cull_frequency''' item is removed to make room. * '''sql:''' * When it is time to cull cache, '''sql:''' removes expired items first, then removes oldest items by access time to satisfy '''cull_frequency'''. This strategy has a drawback: every time cached item is accessed, its access time filed is updated. * It can be speeded up with stored procedures. = Missing django-admin Support = The missing part is '''django-admin''' support for: * creation of cache table for '''sql:''' backend * creation of cache indices for '''sql:''' * cleaning up '''sql:''' and '''file:''' caches Pseudo model for cache table is: {{{ class Cache(m… | jacob | eugene@lazutkin.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
586 | 2005-10-03 16:00:36 | 2006-10-27 16:59:50 | 2022-03-06 03:21:08.413792 | Unreviewed | closed | contrib.admin | defect | normal | fixed | raw_id_admin should work with non-integer primary keys | {{{raw_id_admin}}} doesn't work with non-integer primary keys, but it should. See http://groups.google.com/group/django-users/browse_thread/thread/07cb1bda25cbbec2/1bee9ed15652f843 | adrian | adrian | 0 | 0 | 0 | 0 | 0 | 0 | ||
595 | 2005-10-06 15:41:22 | 2006-10-27 12:13:00 | 2022-03-06 03:21:09.895712 | Unreviewed | closed | Metasystem | defect | normal | fixed | Allow custom 'select' arguments sorted descending to work | Fix for descending custom 'select' ordering in get_list etc. This is a small fix ported from the new admin branch, so if the patch is wonky (hand hacked out of a larger diff to meta/__init__.py), give me a shout and I'll do it the hard way ;-) | adrian | robert@wittams.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
600 | 2005-10-09 18:58:39 | 2006-10-27 11:36:21 | 2022-03-06 03:21:10.681307 | Unreviewed | closed | Core (Other) | enhancement | normal | fixed | decorator_from_middleware currently doesn't handle process_view | When writing decorator_from_middleware, I only looked at the cache middleware and those only use process_request and process_response. This patch should add process_view support: {{{ Index: django/utils/decorators.py =================================================================== --- django/utils/decorators.py (revision 817) +++ django/utils/decorators.py (working copy) @@ -12,6 +12,10 @@ result = middleware.process_request(request) if result is not None: return result + if hasattr(middleware, 'process_view'): + result = middleware.process_view(request, view_func, **kwargs) + if result is not None: + return result response = view_func(request, *args, **kwargs) if hasattr(middleware, 'process_response'): result = middleware.process_response(request, response) }}} | adrian | hugo | 0 | 0 | 0 | 0 | 0 | 0 | ||
642 | 2005-10-18 09:58:16 | 2006-10-27 19:48:05 | 2022-03-06 03:21:17.924671 | Unreviewed | closed | Documentation | enhancement | normal | fixed | [patch] Docs: EmailField clarification | Index: /usr/local/django_src/docs/model-api.txt =================================================================== --- /usr/local/django_src/docs/model-api.txt (revision 897) +++ /usr/local/django_src/docs/model-api.txt (working copy) @@ -238,6 +238,7 @@ ``EmailField`` A ``CharField`` that checks that the value is a valid e-mail address. Currently, this is a loose test. + Does not accept maxlength. ``FileField`` A file-upload field. | jacob | Boffbowsh | 0 | 1 | 0 | 0 | 0 | 0 | ||
677 | 2005-10-21 23:04:21 | 2006-10-27 22:29:32 | 2022-03-06 03:21:23.929168 | Unreviewed | closed | Database layer (models, ORM) | defect | normal | fixed | [patch] sql_queries list not getting reset between requests | In debug mode, a log of sql queries are stored as a list in django.db.db.queries - this list isn't getting cleared between requests. The enclosed patch adds the necessary line of code to handlers/base.py in the get_response method (seemed the most logical place for it). | adrian | seancazzell@gmail.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
682 | 2005-10-22 23:31:08 | 2006-10-27 14:24:30 | 2022-03-06 03:21:24.687205 | Unreviewed | closed | Core (Other) | enhancement | normal | wontfix | Fully decoupled URLconf's for apps. | In part 3 of the tutorial you introduce a way to decouple the URLconfs. But unless I'm missing something there's still one thing left that is tied to the project, namely the prefix passed to the patterns() function. {{{ urlpatterns = patterns('myproject.apps.polls.views.polls', (r'^$', 'index'), (r'^(?P<poll_id>\d+)/$', 'detail'), (r'^(?P<poll_id>\d+)/results/$', 'results'), (r'^(?P<poll_id>\d+)/vote/$', 'vote'), ) }}} The attached patch eliminates the need to pass in the prefix and let's the patterns() function figure that out by itself. Pass '''None''' instead of the prefix to trigger the "figure-out-the-prefix-by-yourself" functionality. {{{ urlpatterns = patterns(None, ... ) }}} Hope that's usefull for someone. cheers | adrian | sa@c-area.ch | 0 | 0 | 0 | 0 | 0 | 0 | ||
700 | 2005-10-27 08:19:27 | 2006-10-27 16:14:40 | 2022-03-06 03:21:27.541287 | Unreviewed | closed | Core (Other) | defect | major | invalid | urlify.js and slugify use different character for spaces | When a model has a SlugField and prepopulate is turned on, the javascript from urlify.js in the admin interface will use underscores to replace spaces and the defafult template filter slugify will use hyphens. I suggest that the slugify in the template filters use underscores to be consistent with what happens with the admin interface. | adrian | Alastair Tse | 0 | 0 | 0 | 0 | 0 | 0 | ||
797 | 2005-11-14 23:57:38 | 2006-10-27 12:02:31 | 2022-03-06 03:21:41.017604 | Unreviewed | closed | contrib.admin | enhancement | normal | wontfix | Give Anonymous its own database entry so we can set permissions on it | As an alternative to #796, which prevents tracebacks when views attempt to check the permissions of AnonymousUser, it'd be nice if I could define a real anonymous user in auth.users so I could assign permissions to it. That'd also help a great deal in using rjwittams' admin template tags in user views. | adrian | garthk | 0 | 0 | 0 | 0 | 0 | 0 | ||
798 | 2005-11-15 03:52:50 | 2006-10-27 17:11:11 | 2022-03-06 03:21:41.138107 | Unreviewed | closed | Translations | task | trivial | 0.91 | fixed | Specifying username, email, and password on as arguments to "django-admin.py createsuperuser" | We're frequently rebuilding the entire Django database environment, and it's a pain to specify the username, email, and password to the createsuperuser command. This patch enable you to specify these on the command line so the process can be completely automated/ done in a batch script. Index: django/bin/django-admin.py =================================================================== --- django/bin/django-admin.py (revision 1235) +++ django/bin/django-admin.py (working copy) @@ -81,7 +81,7 @@ translation.activate('en-us') if action in ('createsuperuser', 'init', 'validate'): - ACTION_MAPPING[action]() + ACTION_MAPPING[action](*args[1:]) elif action == 'inspectdb': try: param = args[1] Index: django/core/management.py =================================================================== --- django/core/management.py (revision 1235) +++ django/core/management.py (working copy) @@ -480,39 +480,43 @@ startapp.help_doc = "Creates a Django app directory structure for the given app name in the current directory." startapp.args = "[appname]" -def createsuperuser(): +def createsuperuser(username=None, email=None, password=None): "Creates a superuser account." from django.core import validators from django.models.auth import users import getpass try: while 1: - username = raw_input('Username (only letters, digits and underscores): ') + if not username: username = raw_input('Username (only letters, digits and underscores): ') if not username.isalnum(): - sys.stderr.write("Error: That username is invalid.\n") - continue + sys.stderr.write("Error: That username is invalid\n") + username = None try: users.get_object(username__exact=username) except users.UserDoesNotExist: break else: - sys.stderr.write("Error… | adrian | bjorn@exoweb.net | 0 | 0 | 0 | 0 | 0 | 0 | |
799 | 2005-11-15 06:15:49 | 2006-10-27 11:53:50 | 2022-03-06 03:21:41.255683 | Unreviewed | closed | Core (Other) | defect | major | fixed | new error templates expose secret keys | there needs to be a way to NOT print out settings. in this case SECRET_KEY from the default project, but also CSRF_MIDDLEWARE_SECRET from other middleware. maybe variables with the word 'SECRET' in them get printed out as stars? remember.. this new error template is used by default, so a lot of newbie sites will be vunerable to having thier cookie hijacked. not a nice thing. marking as a 'major' as it has security implications. | adrian | Ian@holsman.net | 0 | 0 | 0 | 0 | 0 | 0 | ||
846 | 2005-11-20 02:04:32 | 2006-10-27 20:20:42 | 2022-03-06 03:21:48.523373 | Unreviewed | closed | Documentation | defect | normal | fixed | Syndication feed framework documentation references rss.Feed from the old framework | In the Feed class reference ExampleFeed subclasses rss.Feed which I guess is the old syndication framwork. Index: syndication_feeds.txt =================================================================== --- syndication_feeds.txt (revision 1290) +++ syndication_feeds.txt (working copy) @@ -328,7 +328,7 @@ This example illustrates all possible attributes and methods for a ``Feed`` class:: - class ExampleFeed(rss.Feed): + class ExampleFeed(Feed): # FEED TYPE -- Optional. This should be a class that subclasses # django.utils.feedgenerator.SyndicationFeed. This designates which | jacob | deric | 0 | 0 | 0 | 0 | 0 | 0 | ||
882 | 2005-11-23 11:05:21 | 2006-10-27 14:54:28 | 2022-03-06 03:21:54.287070 | Unreviewed | closed | Database layer (models, ORM) | defect | major | dev | fixed | "django-admin sqlclear" fails with sqlite3 | {{{ $ django-admin sqlclear test BEGIN; Traceback (most recent call last): File "/home/nisse/bin/django-admin", line 139, in ? main() File "/home/nisse/bin/django-admin", line 132, in main output = ACTION_MAPPING[action](mod) File "/home/nisse/opt/python-2.4.2/lib/python2.4/site-packages/django/core/management.py", line 190, in get_sql_delete db.db.close() File "/home/nisse/opt/python-2.4.2/lib/python2.4/site-packages/django/core/db/backends/sqlite3.py", line 55, in close self.connection.close() pysqlite2.dbapi2.OperationalError: Unable to close due to unfinalised statements }}} This is with the latest SVN django and pysqlite-2.0.5. According to http://lists.initd.org/pipermail/pysqlite/2005-August/000129.html the problem appears when you're closing your database connection without first closing your cursor. Thus, a simple fix is to add the line: {{{ cursor.close() }}} To the file management.py on the line before the one that triggers the exception (see traceback). This probably won't fix all the cases but it sure solves my problem. | adrian | ye7cakf02@sneakemail.com | sqlite3 unfinalised cursor close | 0 | 0 | 0 | 0 | 0 | 0 |
885 | 2005-11-23 19:59:32 | 2006-10-27 10:11:04 | 2022-03-06 03:21:54.750447 | Unreviewed | closed | Template system | defect | major | new-admin | fixed | new-admin: Template unit test "include03" fails | The template unit test "include03" fails for new-admin. (Clearly this has to do with the reworked template system.) | rjwittams | adrian | 0 | 0 | 0 | 0 | 0 | 0 | |
910 | 2005-11-25 19:47:39 | 2006-10-27 12:12:13 | 2022-03-06 03:21:58.168847 | Unreviewed | closed | Translations | enhancement | normal | fixed | update slovak (sk) translation | update slovak (sk) translation | hugo | vlado@labath.org | 0 | 0 | 0 | 0 | 0 | 0 | ||
922 | 2005-11-26 15:54:17 | 2006-10-27 11:13:35 | 2022-03-06 03:21:59.822929 | Unreviewed | closed | Translations | enhancement | normal | fixed | Update Simplified Chinese Translation | Update Simplified Chinese Translation | hugo | limodou@gmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
964 | 2005-11-30 09:38:40 | 2006-10-27 12:12:03 | 2022-03-06 03:22:06.172563 | Unreviewed | closed | Tools | defect | normal | fixed | python runtest.py doesn't run tests | {{{ paolo@lino:~/django_src/tests$ python runtests.py -v 2 Running tests with database 'postgresql' Creating test database The test database, django_test_db, already exists. Type 'yes' to delete it, or 'no' to cancel: yes Traceback (most recent call last): File "runtests.py", line 217, in ? t.run_tests() File "runtests.py", line 107, in run_tests cursor.execute("DROP DATABASE %s" % TEST_DATABASE_NAME) File "/usr/local/lib/python2.3/site-packages/django/core/db/base.py", line 10, in execute result = self.cursor.execute(sql, params) psycopg.ProgrammingError: ERROR: database "django_test_db" does not exist DROP DATABASE django_test_db }}} Initially it says that the test database already exist, then that does not exist, and this happens because cursor.execute("CREATE DATABASE %s" % TEST_DATABASE_NAME), surrounded by a try/except (the except is naked), raises an exception (psycopg.!ProgrammingError: ERROR: source database "template1" is being accessed by other users) that will remain hidden behind another kind of problem. I hope my considerations make sense. I don't know why this exception is raised, probably it is a problem in my setup (restarting postgres makes the testsuite run fine), but it would much better if the real source of the problem could at least emerge. Thanks | adrian | paolo <paolo@php3.it> | 0 | 0 | 0 | 0 | 0 | 0 | ||
967 | 2005-11-30 11:30:29 | 2006-10-27 11:32:52 | 2022-03-06 03:22:06.610890 | Unreviewed | closed | Database layer (models, ORM) | enhancement | minor | fixed | [patch] Safe quoting of table names | A discussion on [http://groups.google.com/group/django-users/browse_thread/thread/a0e67d2df7d344c0/35ce231d69cf0e9a#35ce231d69cf0e9a this thread of django-users] lead to the suggestion that the contents provided to the "tables" kwarg of a database query should be optionally quoted (as happens for the "select" kwarg), rather the being arbitrarily quoted. This would allow the use of subselect clauses in the "tables" kwarg. This patch moves the declaration of the 'safe quoting' function quote_only_if_word() a little earlier in its parent function, and uses the safe quoter on the contents of the tables clause. Existing usage of nominating a table name in the tables=[] list is unaffected, as table names will not have spaces, and will therefore continue to be quoted. | adrian | freakboy@iinet.net.au | tables database safe quote quoting | 0 | 1 | 0 | 0 | 0 | 0 | |
1177 | 2006-01-06 13:05:41 | 2006-10-27 10:15:26 | 2022-03-06 03:22:39.867059 | Unreviewed | closed | Core (Other) | defect | normal | magic-removal | fixed | [patch] Framework should export a version | Frameworks and Libraries should always export a version. Django doesn't currently export any kind of this, makeing it hardly possible to test which django version is running. | adrian | django@poelzi.org | 0 | 1 | 0 | 0 | 0 | 0 | |
1195 | 2006-01-09 04:57:03 | 2006-10-27 12:59:26 | 2022-03-06 03:22:42.612505 | Unreviewed | closed | Core (Other) | defect | normal | fixed | changeset 1872 broke auto_now_add in DateTimeFields | A simple test case: {{{ class Foo(meta.Model): name = meta.CharField(maxlength=16) date = meta.DateTimeField(auto_now_add=True) class META: admin = meta.Admin() }}} produces the following traceback {{{ AttributeError at /admin/date/foos/add/ 'NoneType' object has no attribute 'split' Request Method: POST Request URL: http://192.168.100.139:8001/admin/date/foos/add/ Exception Type: AttributeError Exception Value: 'NoneType' object has no attribute 'split' Exception Location: /home/mflanaga/src/django_src/django/core/formfields.py in html2python, line 764 }}} | adrian | mattimustang@hotmail.com | 0 | 0 | 0 | 0 | 0 | 0 | ||
1221 | 2006-01-13 20:44:59 | 2006-10-27 20:17:18 | 2022-03-06 03:22:46.711423 | Unreviewed | closed | Internationalization | defect | normal | fixed | Wrong const DEFAULT_ENCODING in utils/text.py, should be DEFAULT_CHARSET | I don't know where it is used but it's the only DEFAULT_ENCODING in the source and the file imports DEFAULT_CHARSET. So DEFAULT_ENCODING looks like a typo. Patch follows. | hugo | Maniac <Maniac@SoftwareManiacs.Org> | 0 | 0 | 0 | 0 | 0 | 0 | ||
1459 | 2006-03-03 04:34:27 | 2006-10-27 10:47:22 | 2022-03-06 03:23:24.361768 | Unreviewed | closed | Database layer (models, ORM) | defect | normal | magic-removal | fixed | [patch] [magic-removal] m2m problems with SQLite | I get three failing m2m-related tests on magic-removal [2475] using OSX 10.4.5, SQLite 3.1.3 and PySQLite 2.0.7: {{{ 'm2m_recursive' module: API test raised an exception ==================================================== Code: 'b.friends.add(a)' Line: 34 Exception: File "/Users/mcroydon/django/django_magic/tests/doctest.py", line 1243, in __run compileflags, 1) in test.globs File "<doctest m2m_recursive[14]>", line 1, in ? b.friends.add(a) File "/Users/mcroydon/django/django_magic/django/db/models/fields/related.py", line 365, in add target_col_name, instance._get_pk_val(), *objs) File "/Users/mcroydon/django/django_magic/django/db/models/fields/related.py", line 233, in _add_m2m_items [source_pk_val, obj_id]) File "/Users/mcroydon/django/django_magic/django/db/backends/util.py", line 11, in execute result = self.cursor.execute(sql, params) File "/Users/mcroydon/django/django_magic/django/db/backends/sqlite3/base.py", line 63, in execute return Database.Cursor.execute(self, query, params) OperationalError: columns from_person_id, to_person_id are not unique 'm2m_recursive' module: API test raised an exception ==================================================== Code: 'b.stalkers.add(a)' Line: 115 Exception: File "/Users/mcroydon/django/django_magic/tests/doctest.py", line 1243, in __run compileflags, 1) in test.globs File "<doctest m2m_recursive[35]>", line 1, in ? b.stalkers.add(a) File "/Users/mcroydon/django/django_magic/django/db/models/fields/related.py", line 307, in add target_col_name, instance._get_pk_val(), *objs) File "/Users/mcroydon/django/django_magic/django/db/models/fields/related.py", line 233, in _add_m2m_items [source_pk_val, obj_id]) File "/Users/mcroydon/django/django_magic/django/db/backends/util.py", line 11, in execute result = self.cursor.execute(sql, params) File "/Users/mcroydon/django/django_magic/django/db/backends/sqlite3/base.py", line 63, in execute return Database.Curs… | adrian | matt | 0 | 1 | 0 | 0 | 0 | 0 | |
1505 | 2006-03-16 21:12:14 | 2006-10-27 11:29:41 | 2022-03-06 03:23:31.320943 | Unreviewed | closed | contrib.admin | defect | normal | fixed | magick-removal: Link to nonexisting URL | In {{{ django/contrib/admin/views/main.py }}} fuction {{{ _get_deleted_objects // line 395 }}} generates this URL: {{{ ../../../../%s/%s/%s/change/ }}} on lines: 424 and 438. But the '''change''' part of the URL does not exist. | adrian | Alef | 0 | 0 | 0 | 0 | 0 | 0 | ||
1677 | 2006-04-25 07:53:07 | 2006-10-27 10:57:58 | 2022-03-06 03:23:58.885447 | Unreviewed | closed | Tools | defect | normal | magic-removal | fixed | [magic-removal] [patch] syncdb displays same '<Permission object>' for all created permissions | When using {{{manage.py syncdb}}}, created permissions are not shown properly: {{{ $ manage.py syncdb Creating table auth_message Creating table auth_group Creating table auth_user Creating table auth_permission Creating many-to-many tables for Group model Creating many-to-many tables for User model Creating table django_content_type Creating table django_session Creating table django_site You just installed Django's auth system, which means you don't have any superusers defined. Would you like to create one now? (yes/no): no Adding permission '<Permission object>' Adding permission '<Permission object>' Adding permission '<Permission object>' Adding permission '<Permission object>' Adding permission '<Permission object>' Adding permission '<Permission object>' Creating example.com Site object Adding permission '<Permission object>' Adding permission '<Permission object>' Adding permission '<Permission object>' }}} | adrian | akaihola | 0 | 1 | 0 | 0 | 0 | 0 | |
1686 | 2006-04-25 21:55:37 | 2006-10-27 11:52:58 | 2022-03-06 03:24:00.227441 | Unreviewed | closed | Core (Other) | defect | normal | magic-removal | duplicate | Relative model import should work within app directory | Assume a project with an application called 'weblog', whose models live in the directory weblog/models.py, and with a model class called 'Entry'. From within the top-level directory for the project, doing 'from weblog.models import Entry' works as expected. From within the 'weblog' directory, doing 'from models import Entry' '''should''' work, but instead produces this traceback: {{{ Traceback (most recent call last): File "<stdin>", line 1, in ? File "models.py", line 17, in ? class Category(models.Model): File "/Users/jbennett/dev/092/magic-removal/django/db/models/base.py", line 45, in __new__ new_class._meta.app_label = model_module.__name__.split('.')[-2] IndexError: list index out of range }}} It'd be nice if Django could handle this situation, as it makes app-specific URL configuration ever so much nicer (e.g., model imports to get QuerySets for generic views won't need the full path to the model, and hence won't be coupled to the project). | adrian | ubernostrum | 0 | 0 | 0 | 0 | 0 | 0 | |
2566 | 2006-08-19 05:50:07 | 2006-10-27 17:40:36 | 2022-03-06 03:26:23.812849 | Unreviewed | closed | contrib.admin | defect | normal | dev | fixed | Setting TEMPLATE_STRING_IF_INVALID = 'notempty' breaks admin user creation | If you set TEMPLATE_STRING_IF_INVALID to a non empty string for debugging purposes, then the admin user add will be broken. {{{ AttributeError at /apps/admin/auth/user/add/ 'str' object has no attribute 'field' Request Method: GET Request URL: http://localhost:8000/apps/admin/auth/user/add/ Exception Type: AttributeError Exception Value: 'str' object has no attribute 'field' Exception Location: C:\pycon-tech\django\contrib\admin\templatetags\admin_modify.py in render, line 161 Template error In template C:\pycon-tech\django\contrib\admin\templates\admin/change_form.html, error at line 55 Caught an exception while rendering: 'str' object has no attribute 'field' 45 {% block after_field_sets %}{% endblock %} 46 {% if change %} 47 {% if ordered_objects %} 48 <fieldset class="module"><h2>{% trans "Ordering" %}</h2> 49 <div class="form-row{% if form.order_.errors %} error{% endif %} "> 50 {% if form.order_.errors %}{{ form.order_.html_error_list }}{% endif %} 51 <p><label for="id_order_">{% trans "Order:" %}</label> {{ form.order_ }}</p> 52 </div></fieldset> 53 {% endif %} 54 {% endif %} 55 {% for related_object in inline_related_objects %}{% edit_inline related_object %}{% endfor %} 56 {% block after_related_objects %}{% endblock %} 57 {% submit_row %} 58 {% if add %} 59 <script type="text/javascript">document.getElementById("{{ first_form_field_id }}").focus();</script> 60 {% endif %} 61 {% if auto_populated_fields %} 62 <script type="text/javascript"> 63 {% auto_populated_field_script auto_populated_fields change %} 64 </script> 65 {% endif %} }}} {{{ Traceback (most recent call last): File "C:\pycon-tech\django\template\__init__.py" in render_node 706. result = node.render(context) File "C:\pycon-tech\django\template\defaulttags.py" in render 118. nodelist.append(node.render(context)) File "C:\pycon-tech\django\contrib\admin\templatetags\admin_modify.py" in render 161. if relation.field.rel.edit_inline == models.TABULAR: Attribut… | adrian | django@dougma.com | admin user add | 0 | 0 | 0 | 0 | 0 | 0 |
2652 | 2006-09-04 09:51:48 | 2006-10-27 19:52:01 | 2022-03-06 03:26:37.480368 | Unreviewed | closed | contrib.admin | defect | normal | fixed | [patch] [per-object-permissions] changing perms fails if another app has model called 'user' or 'group' | My application has a model called Group so editing row level perms fails because the ContentType lookup is not specific enough. Patch below fixes it. {{{ Index: django/contrib/admin/row_level_perm_manipulator.py =================================================================== --- django/contrib/admin/row_level_perm_manipulator.py (revision 3712) +++ django/contrib/admin/row_level_perm_manipulator.py (working copy) @@ -144,7 +144,7 @@ def returnObject(data): data = data.split('-') - ct = ContentType.objects.get(model__exact=data[0]) + ct = ContentType.objects.get(app_label='auth', model__exact=data[0]) obj = ct.get_object_for_this_type(pk=data[1]) return obj @@ -157,4 +157,4 @@ returnKey = staticmethod(returnKey) - \ No newline at end of file + }}} | clong | mattimustang@gmail.com | 0 | 1 | 0 | 0 | 0 | 0 | ||
2719 | 2006-09-13 15:17:01 | 2006-10-27 12:27:39 | 2022-03-06 03:26:48.231628 | Unreviewed | closed | contrib.admin | defect | normal | duplicate | styles for edit_inline broken, forms.css | when using edit_inline=models.STACKED, the admin-interface looks strange. with changing the following lines in forms.css it´s fine again: label.inline { margin-left:20px; } TO: label.inline { font-weight:normal !important; color:#666; font-size:12px; } .aligned label.inline { display:inline; float:none; } TO: .aligned label.inline { display:block; padding:0 1em 3px 0; float:left; width:8em; } | adrian | patrick@vonautomatisch.at | 0 | 0 | 0 | 0 | 0 | 0 | ||
2952 | 2006-10-23 18:22:15 | 2006-10-27 02:26:10 | 2022-03-06 03:27:24.175908 | Unreviewed | closed | Core (Other) | enhancement | normal | wontfix | Please show location of manage.py errors (& be consistant with max_...) | I'm working on a medium-sized data model, and am fixing initial typos like missing quotes or caps. The errors manage.py give me are surprisingly vague, since they don't tell me either line number or object: > manage.py validate Site.Q: name 'name' is not defined 1 error found. (The identifier 'name' is all over the model, where did I use it wrong?) > manage.py validate Site.Q: name 'question' is not defined 1 error found. (same as above... I'd like to know which object model is using 'question' wrong, or a line number...) > manage.py validate Site.Q: __init__() got an unexpected keyword argument 'max_length' 1 error found. (OK I can find max_length, but it irks me that django uses 'max_digits' with the underscore, but drops the underscore from 'maxlength!) | russellm | Yary | 0 | 0 | 0 | 0 | 0 | 0 | ||
2956 | 2006-10-24 01:00:03 | 2006-10-27 02:19:33 | 2022-03-06 03:27:24.735788 | Unreviewed | closed | Core (Management commands) | defect | normal | dev | fixed | [patch] "django-admin.py startproject" fails unnecessarily when permissions can't be set for the new project. | Running "django-admin.py startproject new_project_name" in an environment where permissions can't be set (a FAT32 partition mounted under Linux, in my case) results in an OSError. This doesn't need to happen if the user doesn't mind that permissions for the new project won't be set as django-admin.py wants to set them. | adrian | masonsimon+django@gmail.com | 0 | 1 | 0 | 0 | 0 | 0 | |
2958 | 2006-10-25 06:25:06 | 2006-10-27 02:03:15 | 2022-03-06 03:27:25.043083 | Unreviewed | closed | Documentation | enhancement | normal | fixed | Location vs Directory in apache configuration | This is a documentation enhancement. I installed everything properly for Django but mod_python just wouldnt respond properly. It turned out that the directory I was running in was outside the DocumentRoot directory structure (as I'm running several different websites), which according to the apache2 documentation means you should use the "Location" directive instead of "Directory". This is documented in the logical place but a mention somewhere in Django might help someone else from spending 2 days running down blind alley ways. If you are connected to the mod_python folks please pass it along. There were no clues there either. | jacob | anonymous | 0 | 0 | 0 | 0 | 0 | 0 | ||
2961 | 2006-10-27 01:16:53 | 2006-10-27 01:58:13 | 2022-03-06 03:27:25.429448 | Unreviewed | closed | Template system | defect | normal | dev | fixed | [patch] templatetag has no opencomment, closecomment. | see #648. | adrian | Jeong-Min Lee <falsetru@gmail.com> | 0 | 1 | 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 );