2,718 rows where "changetime" is on date 2011-09-28

View and edit SQL

Suggested facets: stage, status, type, severity, version, resolution, easy, has_patch, needs_better_patch, needs_tests, needs_docs, ui_ux, created (date), last_pulled_from_trac (date)

changetime (date)

  • 2011-09-28 · 2,718
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
285 2005-08-06 19:22:14 2011-09-28 16:12:16 2019-06-24 00:18:17.945239 Accepted closed HTTP handling defect normal 1.0-beta worksforme WSGIRequest should set request.path to full uri path Following the instructions at http://wiki.dreamhost.com/index.php/Django, I got Django running under FastCGI. But the login form points to the wrong URL: instead of pointing to http://django.example.com/django-admin.fcgi/admin/, it points to http://django.example.com/admin/. The reason is found in {{{django/core/handlers/wsgi.py}}}, where the {{{WSGIRequest}}} class's {{{__init__()}}} sets {{{self.path}}} equal to {{{environ['PATH_INFO']}}}. The {{{request.path}}} value eventually makes its way to the login template, which uses "{{{app_path}}}" as the form submission URL. In a CGI environment (including FastCGI), {{{PATH_INFO}}} contains the path referenced *after* the script name (here, "{{{/admin/}}}"). {{{SCRIPT_NAME}}} contains the path to the script (here, "{{{/django-admin.fcgi}}}". To construct a proper self-referential URL, you need to concatenate {{{SCRIPT_NAME}}} and {{{PATH_INFO}}} to obtain, in this case, "{{{/django-admin.fcgi/admin/}}}". mtredinnick rmunn@pobox.com   0 1 0 0 0 0
342 2005-08-17 10:19:26 2011-09-28 16:12:23 2019-06-24 00:18:54.749009 Accepted closed contrib.admin enhancement normal newforms-admin fixed Add a way for fields to be displayed in the admin without being editable When editable=False option is used then that field isn't showed in the form. But it should be an option for show a field without can to editing it. brosner Bless djangocon 0 1 1 1 0 0
399 2005-08-22 21:49:01 2011-09-28 16:12:23 2019-06-24 00:19:31.534040 Accepted closed Database layer (models, ORM) enhancement normal master fixed Bigint field object needed The existing IntegerField is not adequate for generating schemas that require a "bigint" field. Either IntegerField needs to take a size/length parameter or a new Field type is necessary. permon jmadson@techie.com sprintsept14, bigint 0 1 0 0 0 0
458 2005-09-04 07:20:40 2011-09-28 16:12:21 2019-06-24 00:20:09.450849 Unreviewed closed contrib.admin defect normal 1.1-beta wontfix "View on site" doesn't link to model's get_absoulte_url() method "View on site" button doesn't link to model's get_absolute_url() method, but shows something like '/r/12/1/'. It could be observed on the generic Users model. adrian igor@jahber.org   0 0 0 0 0 0
528 2005-09-19 16:29:25 2011-09-28 16:12:16 2019-06-24 00:20:54.038509 Accepted closed Documentation defect trivial master fixed Add a documentation generator that creates a PDF or HTML files locally It would be nice to have doc generation script for making pdf or static html at local computer after each svn update. Harkins anonymous doc-refactor 0 1 0 0 0 0
661 2005-10-20 16:32:29 2011-09-28 11:37:11 2019-06-24 00:22:19.009192 Unreviewed closed Core (Other) enhancement normal   wontfix New function: batch save of objects would make for more efficient processing Currently new records are saved one at the time using save(). In most cases this is sufficient though a batch save method would allow for more efficient database access when appropriate. An example: An app allows the upload of a file which is parsed into many records. Currently each record would have to be looped over and save()d. A function which took the list of records and did One Big Insert would make the operation more efficient. adrian Lllama   0 0 0 0 1 0
689 2005-10-25 01:11:58 2011-09-28 16:12:20 2019-06-24 00:22:36.741293 Accepted closed Core (Other) enhancement normal master fixed Honor Web server provided authentication I would like to see a 2nd mod_python handler. one which takes the REMOTE_USER parameter passed to it and for it to use that as the user-id so that I can hook my app into the default intranet security system we use over here. here is the patch to the original to make that the case. NOTE: it creates a user-record if none exist for the user. {{{ Helios:/src/django_newadmin/django/core/handlers ianh$ diff modpython_apacheauth.py modpython.py 102,103c102 < #user_id = self.session[users.SESSION_KEY] < user_id = self._req.user --- > user_id = self.session[users.SESSION_KEY] 106,117c105,106 < try: < self._user = users.get_object(username__exact=user_id) < except (users.UserDoesNotExist): < from django.models.auth import User < import md5 < import datetime < password_md5 = md5.new('fake').hexdigest() < now = datetime.datetime.now() < self._user = User(None, user_id,'','', user_id+'@cnet.com',password_md5,False,True,False,now,now) < self._user.save() < #except (AttributeError, KeyError, ValueError, users.UserDoesNotExist): < except (AttributeError, KeyError, ValueError): --- > self._user = users.get_object(pk=user_id) > except (AttributeError, KeyError, ValueError, users.UserDoesNotExist): 120d108 < }}} gwilson Ian@holsman.net   0 1 0 0 0 0
730 2005-11-04 20:44:11 2011-09-28 16:12:16 2019-06-24 00:23:03.056995 Accepted closed Core (Other) enhancement normal   fixed more explicit middlware ordering In a [http://groups.google.com/group/django-developers/browse_frm/thread/2865c3f1e8780bf6/1123d4c87d0aff75#1123d4c87d0aff75 django-developer discussion] the problem of middlware ordering came up. I think a solution might be to have an optional way to give an explicit middleware ordering for the response phase. This could be done in a way so that if the user doesn't give an explicit ordering, the system automatically uses the reversed middleware list - that's the behaviour we have now. But if the users defines a setting for middlewar response order, the system could check that the content is identical in content, but can be different in order. That way people can give explicit order and response handling would be much more explicit and understandable. andrewbadr hugo   0 1 1 1 1 0
749 2005-11-07 13:18:12 2011-09-28 16:12:16 2019-06-24 00:23:15.040970 Design decision needed closed Core (Other) defect normal   duplicate Middleware should work as a 'stack' or allow custom orderings This ticket is the summary/result of a discussion on django-developers, especially near the end of this thread: http://groups.google.com/group/django-developers/browse_thread/thread/2865c3f1e8780bf6/999616351a520e67?lnk=arm#999616351a520e67 The current behaviour of a set of middleware is that they are used in the order in which they are listed for process_request and process_view, and in reverse order for process_exception and process_response. If one middleware returns an HttpResponse in process_request, then the remaining ones in the list are skipped as far as process_request is concerned, but they all still contribute to process_response. Instead, they should be skipped. The current behaviour makes the CacheMiddleware buggy. Consider this stack {{{ MIDDLEWARE_CLASSES = ( "django.middleware.cache.CacheMiddleware", "somemodule.SomePostProcessingMiddleware", "django.middleware.session.SessionMiddleware", ) }}} The first time a page is accessed, it will go through all middleware both 'down' (process_request) and 'up' (process_response), and the page is cached ''after'' it has been post-processed by SomePostProcessingMiddleware. The second time we have a cache hit, and the CacheMiddleware returns the response. However, that response still goes through all the process_response middleware, so SomePostProcessingMiddleware is applied twice, which is bad. In theory this could be bad for any of the middleware (adding headers twice etc), it just depends what they do. If CacheMiddleware returns a response, the ones beneath it should be skipped for process_response. There are alternative fixes, including: 1) allow different ordering for request and response middleware to specified 2) change the CacheMiddleware so that it creates a deep copy of the cached response, attaches it to the request object, and then in process_response ignores the passed in response object, and returns the one it stashed earlier. 3) split CacheMiddleware into two, to allow different ordering I think… nobody L.Plant.98@cantab.net   0 0 0 0 0 0
957 2005-11-28 15:53:36 2011-09-28 16:12:17 2019-06-24 00:25:27.651702 Accepted closed contrib.admin defect normal newforms-admin fixed A SlugField with prepopulate_from does not work for stacked or tabular edit_inline objects. I noticed this over the weekend and haven't had a chance to look at it much further. Here's an example: {{{ class InlineObject(meta.Model): name = meta.CharField(maxlength=200, core=True) slug = meta.SlugField(prepopulate_from=(("name"),), core=True) otherobj = meta.ForeignKey(Otherobj, edit_inline=meta.STACKED, num_in_admin=2) }}} In the admin for {{{Otherobj}}} the javascript slugification does not work for the {{{InlineObject}}}s. xian matt nfa-someday 0 0 0 0 0 0
1157 2006-01-03 10:36:43 2011-09-28 16:12:16 2019-06-24 00:27:33.778940 Accepted closed Documentation defect major   fixed i18n rely on xgettext which does not exists on win32 i18n cannot be used in win32 because make-messages.py rely on xgettext application which does not exist on win32. There is also no links to binary version and compiling it source on win32 is very cumbersome. hugo hipertracker@gmail.com   0 1 0 0 0 0
1180 2006-01-06 19:16:01 2011-09-28 16:12:17 2019-06-24 00:27:48.394434 Accepted closed contrib.sessions defect normal master fixed Django session key generation flawed {{{ session_key = md5.new(str(random.randint(0, sys.maxint - 1)) + SECRET_KEY).hexdigest() }}} this is used throughout django and it often generates duplicate keys, today i spent 5 hours trying to find out what was causing my site to break and it was this (since I used this algorithm in another context without checking if a session with given key already exists). i propose the following: {{{ session_key = md5.new( str(random.randint(0, sys.maxint - 1)) + "#" + str(random.randint(0, sys.maxint - 1)) + "#" + str(time.time()) + "#").hexdigest() }}} secret_key is pretty useless regards mtredinnick wojtek@brandlay.com   0 1 0 1 0 0
1390 2006-02-23 11:18:02 2011-09-28 16:12:17 2019-06-24 00:30:02.510678 Ready for checkin closed contrib.admin defect normal master fixed Add app name to title and navigation-bar in admin interface I've got a suggestion/feature request which I'll explain by providing an example: An app named 'book' with the models 'books' and 'categories' and an app named 'magazine' with the models 'magazines' and 'categories'. When I use the admin interface and I add or change a category for 'book' then the only way to know you are in the 'book' app is by looking at the URL. The title of the page tells me 'Add category' and the navigation bar tells me 'Home > Categories', which is exactly the same for magazine categories. I think it would be more user friendly if you can see (by just looking at the page) in which app you are. Maybe a title like 'Add category (books)' or 'Add book category' and the navigation bar with 'Home > Categories (book)' or 'Home > Book categories'. The navigation bar could even show 'Home > Book > Categories', that introduces a new admin view which shows all models for one app. By the way I'm using the trunk version. I'm new to Django so I can't provide you with a patch to add my suggestion (yet!). juliae rfroger[at]estrate[dot]nl nfa-someday 0 1 1 0 0 0
1625 2006-04-12 11:39:25 2011-09-28 16:12:16 2019-06-24 00:32:31.656670 Accepted closed Validators defect major newforms-admin wontfix unique_for_* don't work with auto_now* fields Because auto_add fields don't show up in forms {{{unique_for_*}}} stuff don't work. {{{manipulator_validator_unique_for_date}}} search '''form''' data for values so it can't find any value for this type of fields. nobody nesh <nesh [at] studioquattro [dot] co [dot] yu> nfa-blocker 0 0 0 0 0 0
1829 2006-05-10 08:51:51 2011-09-28 16:12:16 2019-06-24 00:34:42.210964 Ready for checkin closed contrib.comments defect normal   wontfix [patch] Move comments app URLconf to django.contrib.comments.urls This way it will be more consistent with new shorten admin URLconf path after MR and have, well, shorten and nicer look. nobody Alex Dedul sprintsept14 0 1 0 0 0 0
1834 2006-05-10 18:23:04 2011-09-28 16:12:23 2019-06-24 00:34:45.559685 Ready for checkin closed Documentation enhancement normal master fixed Admin templatetags should have docstrings for admin documentation The admin templatetags currently have very little in the way of docstrings, which means that they don't provide any useful information in the admin documentation view; these should be fleshed out. Rupe ubernostrum   0 1 0 0 0 0
2145 2006-06-13 11:32:32 2011-09-28 16:12:17 2019-06-24 00:38:03.861413 Accepted closed contrib.admin defect normal master fixed list_filter not available if model contains OneToOneField If a model is related to via a OneToOneField (even if it's not used in the admin list), the list_filter block doesn't appear on the admin list page. The offending code appears to be in django.contrib.admin.views.main {{{ 571 def get_filters(self, request): 572 filter_specs = [] 573 if self.lookup_opts.admin.list_filter and not self.opts.one_to_one_field: 574 filter_fields = [self.lookup_opts.get_field(field_name) \ 575 for field_name in self.lookup_opts.admin.list_filter] }}} Commenting out "and not self.opts.one_to_one_field" in line 573 reinstates the functionality and appears to have no ill effects. I don't know what it is supposed to be testing for, though, so don't know if it breaks something somewhere else. nobody danielr OneToOneField ModelInheritance MultiTableInheritance editable parent_link 0 1 1 0 0 0
2228 2006-06-24 07:05:29 2011-09-28 16:12:16 2019-06-24 00:38:56.975029 Design decision needed closed contrib.comments enhancement normal   wontfix [patch] Add e-mail and URL to free comments Replaces #2184 due to comment spam. This patch adds the ability for comments to accept a person's e-mail address and/or URL, optionally. This is a feature found in most comment systems and would be very useful in Django. The current patch doesn't validate e-mail addresses or URLs, because I'm not too sure where I should do that. adrian Tyson Tate <tyson@fallingbullets.com>     1 0 0 0  
2335 2006-07-12 21:21:45 2011-09-28 16:12:17 2019-06-24 00:40:05.201389 Accepted closed Database layer (models, ORM) defect normal master fixed In some cases MySQLdb returns array.array which causes an error in a2b_base64() settings.py {{{ INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'mysite.polls', 'django.contrib.admin' ) }}} urls.py {{{ urlpatterns = patterns('', # Example: # (r'^mysite/', include('mysite.apps.foo.urls.foo')), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), ) }}} db synced, server restarted, got admin area login form at /admin/ local url logged in as superuser, got error: {{{ TypeError at /admin/ a2b_base64() argument 1 must be string or read-only character buffer, not array.array Request Method: GET Request URL: Exception Type: TypeError Exception Value: a2b_base64() argument 1 must be string or read-only character buffer, not array.array Exception Location: c:\python24\lib\base64.py in decodestring, line 319 }}} nobody alexander.pugachev@gmail.com a2b_base64() 0 0 1 0 0 0
2367 2006-07-17 19:01:10 2011-09-28 16:12:27 2019-06-24 00:40:25.277838 Accepted closed Generic views enhancement normal master fixed [patch] pagination for date based generic views Date based views do not have pagination. This patch adds pagination to the archive_day, archive_week, archive_month generic views. archive_index does not require pagination because of the num_latest argument. nobody andrewg@weblinc.com   0 1 1 1 0 0
2612 2006-08-28 23:12:56 2011-09-28 16:12:17 2019-06-24 00:43:01.728506 Accepted closed contrib.admin defect minor master fixed Fix admin formatting when help_text used with multiple fields on the same line If you have a case where you have set multiple fields to appear on the same line in the admin interface, the current version produces a line break when help_text is present, due to it being in a <p> element. To fix it in a half-assed sort of way, I wrapped the entire field in a <div style="float: left">. The diff is should below: {{{ Index: django/contrib/admin/templates/admin/field_line.html =================================================================== --- django/contrib/admin/templates/admin/field_line.html (revision 3669) +++ django/contrib/admin/templates/admin/field_line.html (working copy) @@ -2,9 +2,11 @@ <div class="{{ class_names }}" > {% for bound_field in bound_fields %}{{ bound_field.html_error_list }}{% endfor %} {% for bound_field in bound_fields %} + <div style="float: left;"> {% if bound_field.has_label_first %}{% field_label bound_field %}{% endif %} {% field_widget bound_field %} {% if not bound_field.has_label_first %}{% field_label bound_field %}{% endif %} {% if bound_field.field.help_text %}<p class="help">{{ bound_field.field.help_text }}</p>{% endif %} + </div> {% endfor %} </div> }}} Ultimately you want a class which does this, which means changing the admin stylesheet, so you probably don't want to use this patch exactly. The patch does not appear to affect the default case of stacked fields, as the the field line itself is wrapped in another <div>. xian Andy Dustman <farcepest@gmail.com> nfa-someday 0 1 1 1 0 0
2698 2006-09-11 14:50:07 2011-09-28 16:12:21 2019-06-24 00:43:57.385714 Accepted closed Database layer (models, ORM) defect normal master fixed Custom default managers interfere with delete operations In our model, we have a Story class, with a boolean 'deleted' attribute. We defined a custom default manager to return all of the stories that are not deleted, so that most of the code on the site will not have to deal with filtering out the deleted stories (there's another custom manager called with_deleted for those code paths that need to see the deleted stories as well). The problem comes up when deleting a user. The deletion code iterates the user's stories to delete them, but uses the default manager, so stories with deleted=1 are not found. So (ironically) any stories marked with the 'deleted' field are not actually deleted when the user is removed. This prevents the user from being deleted, because the story table still has a foreign key reference to the user table, and MySQL prevents the user record from being deleted. The docs for custom managers say: "it's generally a good idea for the first Manager to be relatively unfiltered". But it seems that any filtering in the default manager will interfere with cascading deletes. If the default manager does any filtering at all, then deleting an object may fail because its related objects will not all be deleted, and the database's referential integrity will prevent the deletion. When looking for related obejcts to delete, you have to always get all of them. No filtering allowed. mtredinnick anonymous   0 0 0 0 0 0
3091 2006-12-04 00:41:32 2011-09-28 16:12:16 2019-06-24 00:48:11.593589 Ready for checkin closed contrib.comments enhancement normal master fixed [patch] Views in django.contrib.comments should allow 'extra_context' and 'context_processors' arguments The current django.contrib.comments view code does not allow passing in additional context. This patch adds extra_context and context_processors parameters to the django.contrib.comments views. I had the need to pass additional context for my templates into the comments "generic" views, and wanted to be able to pass the context in the same way I can for the other generic views. This patch to comments.py allows this. With this patch, comments work the same way as other generic views. For example, to pass additional context in you may do: {{{ urlpatterns = patterns('', (r'^comments/', include('django.contrib.comments.urls.comments'), {'extra_context': {'extra': 123}}), ) }}} __hawkeye__ eric@intellovations.com comments, freecomment, context, extra_context, sprintsept14 0 1 0 0 0 0
3094 2006-12-05 22:06:57 2011-09-28 16:12:27 2019-06-24 00:48:13.622326 Accepted closed Database layer (models, ORM) enhancement normal master fixed XMLField not being validated. I disliked the fact that Django calls an external program to do XML-validation. So I wrote a validation-class that uses lxml (which is a wrapper for libxml2) for validation. This class uses the error-messages found in the original class (so all messages get translated), but could support more verbose messages, as lxml tells you more details, but then the included translations would not work anymore. This class can be used as some kind of drop-in replacement. Perhaps it can be included in the official release. Drawback: You need to write RelaxNG-files, libxml2 does not support RelaxNG-Compact (AFAIK). So perhaps it's best to let the user decide which one to use. PaulM goliath.mailinglist@gmx.de relaxng validator 0 1 0 0 0 0
3119 2006-12-09 05:47:52 2011-09-28 16:12:16 2019-06-24 00:48:29.406714 Design decision needed closed Database layer (models, ORM) defect normal master duplicate Problem for the up-loading of non-ASCII character file name. When the file name composed only of non-ASCII character is passed to FileField and ImageField, the file name is mostly lost. And the character number limitation of the column is exceeded by 100 times or less. {{{ Ex. ééééé.txt -> .txt ààààà.txt -> _.txt àéàéé.txt -> __.txt }}} leahculver makoto tsuyuki <mtsuyuki@gmail.com> fs-rf-docs 0 1 0 0 0 0
3121 2006-12-09 21:55:38 2011-09-28 16:12:17 2019-06-24 00:48:30.723059 Accepted closed Database layer (models, ORM) defect normal master fixed RelatedManager.get_or_create() does not work Given the following models: {{{ class Poll(models.Model): question = models.CharField(maxlength=200) pub_date = models.DateTimeField('date published') class Choice(models.Model): poll = models.ForeignKey(Poll) choice = models.CharField(maxlength=200) votes = models.IntegerField() }}} you can do: {{{ >>> what, created = Poll.objects.get_or_create(question='What?', pub_date='2006-12-09') >>> django = what.choice_set.create(choice='Django', votes=100) >>> python, created = Choice.objects.get_or_create(poll=what, choice='Python', votes=200) }}} But for some reason this doesn't work: {{{ >>> php, created = what.choice_set.get_or_create(choice='PHP', votes=1) }}} but gives the following error and traceback: {{{ <class 'sqlite3.IntegrityError'> Traceback (most recent call last) django/db/models/manager.py in get_or_create(self, **kwargs) 68 69 def get_or_create(self, **kwargs): ---> 70 return self.get_query_set().get_or_create(**kwargs) 71 72 def create(self, **kwargs): django/db/models/query.py in get_or_create(self, **kwargs) 238 params.update(defaults) 239 obj = self.model(**params) --> 240 obj.save() 241 return obj, True 242 django/db/models/base.py in save(self) 202 cursor.execute("INSERT INTO %s (%s) VALUES (%s)" % \ 203 (backend.quote_name(self._meta.db_table), ','.join(field_names), --> 204 ','.join(placeholders)), db_values) 205 else: 206 # Create a new record with defaults for everything. django/db/backends/util.py in execute(self, sql, params) 10 start = time() 11 try: ---> 12 return self.cursor.execute(sql, params) 13 finally: 14 stop = time() django/db/backends/sqlite3/base.py in execute(self, query, params) 90 def execute(self, query, params=())… gwilson akaihola   0 1 0 0 0 0
3203 2006-12-29 04:40:15 2011-09-28 16:12:17 2019-06-24 00:49:23.061771 Ready for checkin closed Tools defect normal   fixed [patch] bdist_wininst does not place package data files correctly From changeset [3906], setup.py uses 'data_files' option for setup() to specify package data files (message catalogs, templates, etc). This breaks bdist_wininst behaviour to place those datafiles onto C:Python2X/django instead of C:/Python2X/Lib/site-packages/django. The attached patch includes a small hack to fix this. kmtracey ymasuda <whosaysni@gmail.com>   0 1 0 0 0 0
3349 2007-01-22 20:08:02 2011-09-28 16:12:27 2019-06-24 00:50:55.259503 Accepted closed Template system     master fixed If an ImportError occurs within some loaders a rather confusing exception is raised. The problem is, when Django attempts to load a custom tag library (in source:django/trunk/django/template/__init__.py, in the {{{get_library()}}} function), it ''traps'' all {{{ImportError}}}'s, regardless of where they are ''thrown'' from: {{{ try: mod = __import__(module_name, {}, {}, ['']) except ImportError, e: raise InvalidTemplateLibrary, "Could not load template library from %s, %s" % (module_name, e) }}} An example... If I have a "view" like so: {{{ def my_view(request): return render_to_response('my.tpl', {}) }}} ...And a corresponding template: {{{ {% load tag_lib %} <h1>my template</h1> ... }}} ...Now, here's the tag library {{{tag_lib}}}: {{{ import notthere ... }}} ...Invoking our view, now, will yield a not-very-easy-to-understand (unless you already know the problem) error message: {{{ TemplateSyntaxError at /my_view 'tag_lib' is not a valid tag library: Could not load template library from django.templatetags.tag_lib, No module named notthere Request Method: GET Request URL: http://localhost:8000/my_view Exception Type: TemplateSyntaxError Exception Value: 'tag_lib' is not a valid tag library: Could not load template library from django.templatetags.tag_lib, No module named notthere Exception Location: /usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/template/defaulttags.py in load, line 692 }}} You may need to look closely to notice that the root of the problem was that our tag library tried to load a module {{{notthere}}}; the problem ''was not'' that we tried to load a non-existant tag library. This is essentially the same message that you will get when trying to load a tag library that is completely non-existant - i.e., if our template were: {{{ {% load not_tag_lib %} <h1>my template</h1> ... }}} We would now see the error message: {{{ TemplateSyntaxError at /my_view 'not_tag_lib' is not a valid tag library: Could not load template library from django.templatetags.not_tag_lib, No module named n… nobody Chris Wagner <cw264701@ohiou.edu>   0 1 0 1 0 0
3393 2007-01-29 19:36:47 2011-09-28 16:12:17 2019-06-24 00:51:23.101459 Accepted closed Contrib apps     master fixed login view assumes 'set_test_cookie' has been called Currently, `django.contrib.auth.views.login` instantiates `AuthenticationForm` by passing it the request, which is optional; when this happens, `AuthenticationForm` will fail on valid logins unless `set_test_cookie` has been called previously. The `login` view itself does this, but this prevents easy reusability -- it's a fairly common use case to want to display a login box on each page for non-authenticated users, which means that each view in use must call `set_test_cookie` to ensure that the POST to `login` won't fail. A simple solution to this would be to stop passing the request to `AuthenticationForm`. Perhaps a more flexible solution would be for `login` to begin taking a keyword argument to determine whether it should pass the request or not (and hence, whether `set_test_cookie` will be required or not) jacob ubernostrum auth login set_test_cookie 0 1 1 0 0 0
3400 2007-01-30 05:59:29 2011-09-28 16:12:27 2019-06-24 00:51:27.523334 Accepted closed contrib.admin     newforms-admin fixed Support for lookup separator with list_filter admin option This patch adds support for using the lookup separator in the list_filter option, for example: {{{ class Town(models.Model): name = models.CharField() class House(models.Model): town = models.ForeignKey(Town) class Room(models.Model): house = models.ForeignKey(House) class Booking(models.Model): room = models.ForeignKey(Room, raw_id_admin=True) class Admin: list_filter = ('room__house__town',) }}} Will add a filter "For town:" that spans multiple foreign keys. DrMeers nick@intv.com.au edc nfa-someday list_filter FilterSpec nfa-changelist ep2008 0 1 0 0 0 0
3460 2007-02-08 20:33:59 2011-09-28 16:12:20 2019-06-24 00:52:05.443714 Accepted closed Database layer (models, ORM)     master fixed Allow configuration of postgresql_psycopg2 isolation level Postgresql only has two transaction isolation levels: read committed and serializable. READ COMMITTED is the default and the one django expects to use. psycopg2 however defines three isolation levels: autocommit, read committed, and serializable. The difference between autocommit and read committed is that read committed in psycopg2 puts all statements inside a BEGIN/END block (or BEGIN/ROLLBACK or BEGIN/COMMIT). Inside the BEGIN it also executes SET TRANSACTION ISOLATION LEVEL READ COMMITTED (which is redundant as this isolation level is the default). Django currently uses psycopg2's read committed isolation level, and this leads to every query (almost) being surrounded by spurious BEGIN/END. In a heavily loaded system, this consumes a massive amount of the total database time. Django should be using the autocommit isolation level, which does not have this overhead. Anywhere explicit transaction blocks are needed they can be used. The attached patch switches the backend to the autocommit isolation level. I have tested this patch on our production system and it makes a noticeable speed improvement. NOTE: Django's ORM does an existence test followed by and UPDATE or INSERT when save() is called. The read committed isolation level does not protect against this failing even within a transaction block, and therefor this change should have no side effects on Django code. mtredinnick Jack Moffitt <metajack@gmail.com>   0 1 0 0 0 0
3469 2007-02-09 22:55:47 2011-09-28 16:12:23 2019-06-24 00:52:11.128518 Ready for checkin closed Documentation     master fixed Django.utils is not documented There are a lot of useful utilities and datastructures in django.utils, but the lack of good user documentation limits the extent to which these utilities are used. For example, `DotExpandedDict` is a useful but undocumented data structure. It can be very helpful for complex form parsing and it'd be good to mention somewhere in documentation. Rupe SmileyChris   0 1 1 0 0 0
3546 2007-02-21 23:46:40 2011-09-28 16:12:16 2019-06-24 00:52:59.566723 Design decision needed closed contrib.comments     master invalid Add timestamp and user for edits to Comment/FreeComment in contrib.comments In benchmarking Django's contrib.comments implementation against other frameworks that offer site-wide comments, there are subtle variations in the model used to represent the actual comments. Django's comments provide for some valuable extensions, but seem to be missing something that many other implementations have: fields for the user that last edited a comment and the time at which that edit was made. This actually seems a bit odd since care was taken with ModeratorDeletion to provide for a record of '''removal''' of given comment. However, cases when a moderator would prefer to edit the comment instead of marking it deleted. Proposal is to add the eqivalent of '''edit_date''' and '''edit_user''' to the comments implementation. This seems to be a common pattern in models offering similar functionality. adrian byteflood@yahoo.com comments, moderation, contrib, edit 0 0 0 0 0 0
3567 2007-02-24 20:47:49 2011-09-28 16:12:16 2019-06-24 00:53:12.679726 Accepted closed contrib.admin     master fixed Many to One Relationship w/ just ImageField() The following code does not act as expected in the admin. {{{ class Property(models.Model): address = models.CharField(maxlength=100) price = models.IntegerField(blank=True) ... def __str__(self): return self.address class Admin: pass class Image(models.Model): propertyid = models.ForeignKey(Property, edit_inline=models.STACKED, num_in_admin=5) image = models.ImageField(upload_to='properties/images', core=True) }}} If you add a couple images the first time it's fine. If you go back and edit the Property and add another image it deletes all the other images. I found that if I add another field to the Image class it seems to work correctly. '' Gulopine sheats@gmail.com fs-rf-fixed 0 0 0 0 0 0
3594 2007-02-27 12:37:39 2011-09-28 16:12:23 2019-06-24 00:53:29.630508 Accepted closed Internationalization     master fixed Translation problem in javascript I have changed default language code in settings file to my own language. If I change language with "/i18n/setlang/" url everything works fine except javascript translation. Javascript translation problem exist only with english language. If i try to change language to english all javascript words is translated to default language (what is specified in settings file). jezdez karsu   0 1 0 0 0 0
3621 2007-03-01 17:56:45 2011-09-28 16:12:16 2019-06-24 00:53:46.616218 Accepted closed Database layer (models, ORM)     master fixed FileField in admin broken with sqlite3 Using the sqlite3 backend: If FileField has unique=True set, you cannot add a file due to an InterfaceError: Error binding parameter 0 - probably unsupported type. If you drop the unique=True flag, you are able to insert a object, but not change it; the admin interface gives: Enter a valid filename. The traceback when unique=True: {{{ Traceback (most recent call last): File "/Users/jimmy/UNIX/src/django-devel/django/core/handlers/base.py" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File "/Users/jimmy/UNIX/src/django-devel/django/contrib/admin/views/decorators.py" in _checklogin 55. return view_func(request, *args, **kwargs) File "/Users/jimmy/UNIX/src/django-devel/django/views/decorators/cache.py" in _wrapped_view_func 39. response = view_func(request, *args, **kwargs) File "/Users/jimmy/UNIX/src/django-devel/django/contrib/admin/views/main.py" in add_stage 250. errors = manipulator.get_validation_errors(new_data) File "/Users/jimmy/UNIX/src/django-devel/django/db/models/fields/__init__.py" in manipulator_validator_unique 37. old_obj = self.manager.get(**{lookup_type: field_data}) File "/Users/jimmy/UNIX/src/django-devel/django/db/models/manager.py" in get 73. return self.get_query_set().get(*args, **kwargs) File "/Users/jimmy/UNIX/src/django-devel/django/db/models/query.py" in get 248. obj_list = list(clone) File "/Users/jimmy/UNIX/src/django-devel/django/db/models/query.py" in __iter__ 108. return iter(self._get_data()) File "/Users/jimmy/UNIX/src/django-devel/django/db/models/query.py" in _get_data 468. self._result_cache = list(self.iterator()) File "/Users/jimmy/UNIX/src/django-devel/django/db/models/query.py" in iterator 181. cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) File "/Users/jimmy/UNIX/src/django-devel/django/db/backends/util.py" in execute 12. return self.cursor.execute(sql, params) File "/Users/jimmy/UNIX/src/django-devel/django/db/backends/sqlite3/… Gulopine jimmy@example.com sqlite3 FileField unique admin, fs-rf-fixed 0 0 0 0 0 0
3639 2007-03-02 23:08:19 2011-09-28 16:12:16 2019-06-24 00:53:58.282292 Ready for checkin closed Generic views     master fixed use newforms in generic create_update view in order to make newforms available to the generic create_update view (as it is [http://www.djangobook.com/en/beta/chapter09/#cn320 planned], i suppose), i modified the create_update.py to make use of newforms. i have not found any discussion on this, which will definitely have to take place, but as of already using it myself, i hope it can be useful for others and maybe be the base for the final change. existing templates will probably still work but might break. i'm not sure what the {{{new_data = request.POST.copy()}}} (2x) was exactly intended to prevent, so i left them in place; maybe they are not necessary any more.   webograph <webograph@eml.cc> newforms 0 1 0 0 0 0
3750 2007-03-16 20:47:10 2011-09-28 16:12:17 2019-06-24 00:55:07.843474 Accepted closed contrib.admin     newforms-admin wontfix CSS Bug in the Admin interface [http://666kb.com/i/amol3ga2vx1rkj79b.png Here] is a screenshot where the databasefield description is behind the input field. IMHO it's just a small change in the CSS file... xian rafaelw@gmx.net nfa-someday 0 1 0 0 0 0
3777 2007-03-21 16:35:35 2011-09-28 06:17:31 2019-06-24 00:55:24.691734 Accepted closed contrib.admin New feature Normal master duplicate Persistent change_list filtering in admin Attached is a patch which allows the list_filters on the change_list pages of the admin to be persistent (as described in e.g. [http://groups.google.com/group/django-users/browse_thread/thread/3931c387ea39b82f/2ba4f2f6ca064a61?lnk=gst&rnum=4&hl=en#2ba4f2f6ca064a61 this thread] on django-users). Basically, it does this: * Saves the elements of the query string in the session each time the change_list is viewed. * Looks for a special GET variable, and if found, restores the items last saved from the query string. * Add the special GET variable to links and redirects from the change_form, so that when saving an object, the user is redirected back to the filtered list s/he was last viewing. I'm not entirely sure this is the best way to solve this issue; something more transparent (i.e. without a magic GET variable) might be better, in which case the change_list filter links would have to explicitly unfilter themselves, rather than simply removing the query variable. The patch admittedly also adds a setdefault method to request.session; the rest of the patch could trivially be adapted to not having this method available, of course.. I've found it useful on many occasions, though, and it seems to fit the "use session as dictionary" idea. If folks find the patch useful, I can resubmit with documentation and/or without request.session.setdefault. nobody matt <matt.barry@dotwell.org> filter session 0 1 1 1 1 1
3828 2007-03-26 21:09:33 2011-09-28 16:12:16 2019-06-24 00:55:56.630496 Accepted closed Template system     master fixed request.path leads to confusion/errors inside templates and may open XSS attacks django.core.context_processors.request puts the request into the context of templates. As request offers dictionary-access to the provides data (combination of GET and POST) request.XXX is not unambiguous. You can override {{ request.path }} by adding '?path=...' to your URL for example. Other attributes (GET, POST, ..., method, get_full_path or is_secure) can be overwritten the same way, of course. This has many problems attached: * security: request.path is not escaped everywhere, because it is pre-filtered by url-config request.is_secure might be used to display forms only when using a secure connection (WLAN-setting?) * errors when using GET, POST, ...: suddenly no dictionary there * confusion: different behavior As request.REQUEST exists the dictionary-access to request could be removed, I think. But to keep API stable I attached a patch that wrapps the request inside templates and will only allow access to the attributes. nobody David Danier <goliath.mailinglist@gmx.de> request template 0 1 0 0 0 0
4046 2007-04-14 19:11:58 2011-09-28 16:12:17 2019-06-24 00:58:13.356679 Fixed on a branch closed Forms     master fixed ForeignKey's formfield does not respect limit_choices_to {{{ForeignKey}}}'s {{{formfield()}}} function, which returns the {{{Field}}} for a {{{newforms.Form}}} created by {{{form_for_model}}} or {{{form_for_instance}}}, does not filter the options by limit_choices_to. i've attached a patch to fix that. (i'd like to do a bit of advertising here for bug #2445 or #1891, whose target group should be roughly the same as for this bug) lukeplant webograph <webograph@eml.cc>   0 1 0 1 0 0
4183 2007-04-28 23:26:09 2011-09-28 16:12:17 2019-06-24 00:59:39.833146 Accepted closed contrib.admin     newforms-admin invalid [newforms-admin] missing from-clause If your primary-key is a foreign-key you got the missing from-clause error. nobody anonymous nfa-someday nfa-changelist 0 0 0 0 0 0
4189 2007-04-30 19:02:45 2011-09-28 16:12:16 2019-06-24 00:59:43.610273 Ready for checkin closed contrib.comments     0.96 fixed Fix for COMMENTS_BANNED_USERS_GROUP exploding the ORM when using the templatetag. Using Django comments with COMMENTS_BANNED_USERS_GROUP drops you into the following branch: {{{ if not self.free and settings.COMMENTS_BANNED_USERS_GROUP: kwargs['select'] = {'is_hidden': 'user_id IN (SELECT user_id FROM auth_user_groups WHERE group_id = %s)' % settings.COMMENTS_BANNED_USERS_GROUP} comment_list = get_list_function(**kwargs).order_by(self.ordering + 'submit_date').select_related() }}} Which in turn shoves the kwarg 'select' into a filter function, thus making the ORM puke violently. A patch is attached: {{{ comment_list = get_list_function(**kwargs).order_by(self.ordering + 'submit_date').select_related() if not self.free and settings.COMMENTS_BANNED_USERS_GROUP: comment_list = comment_list.extra(select={'is_hidden': 'user_id IN (SELECT user_id FROM auth_user_groups WHERE group_id = %s)' % settings.COMMENTS_BANNED_USERS_GROUP}) }}} Also, the Comment/FreeComment models' get_absolute_url() methods can cause a site to fail loudly if an object is erased and latest comments are still referred to. An example is a "latest comments" rail showing comments on different objects. If one of the objects is removed the following code will cause a rendering error, instead of failing silently. (get_content_object returns None and then get_absolute_url explodes) {{{ def get_absolute_url(self): return self.get_content_object().get_absolute_url() + "#c" + str(self.id) }}} This is a problem because non-developers (template creators and/or admin users) can bring a site to a halt using comments (I believe Django prefers templates to fail silently instead of loudly when they can), I recommend a safe/harmless change such as this: {{{ def get_absolute_url(self): try: return self.get_content_object().get_absolute_url() + "#c" + str(self.id) except AttributeError: return "" }}} adrian Brett Hoerner <bretthoerner@bretthoerner.com> comments, COMMENTS_BANNED_USERS_GROUP 0 1 0 0 0 0
4305 2007-05-15 21:25:58 2011-09-28 16:12:17 2019-06-24 01:00:57.885387 Accepted closed contrib.admin     newforms-admin duplicate [Patch] duplicated settings in the admin site seem to cause confusion from the tutorial, if you duplicate settings fields = ( (None, {'fields': ('pub_date', 'question',)}), ('Date information', {'fields': ('pub_date',)}), ) Then set only one of the 'duplicated' fields, it responds with an error that they must all be filled in. Odd, but I suppose when you have dupliated fields the error is really yours, anyway, and I'm not sure what it really should do, in that case. julien rogerpack2005@gmail.com nfa-someday 0 1 0 0 0 0
4377 2007-05-24 10:44:37 2011-09-28 16:12:23 2019-06-24 01:01:43.811203 Ready for checkin closed Translations     master fixed Spelling errors in database error description There is a spelling error and a somewhat ugly wording in the error message about a mismatching database. Patch provided. {{{ --- django/conf/locale/de/LC_MESSAGES/django.po.original Thu May 24 12:25:14 2007 +++ django/conf/locale/de/LC_MESSAGES/django.po Thu May 24 12:27:33 2007 @@ -481,8 +481,8 @@ "database tables have been created, and make sure the database is readable by " "the appropriate user." msgstr "" -"Etwas stimmt nicht mit der Datenbankkonfiguration. Bitte sicherstellen, das " -"die richtigen Datenbanktabellen angelegt wurden und bitte sicherstellen, das " +"Etwas stimmt nicht mit der Datenbankkonfiguration. Bitte sicherstellen, dass " +"die richtigen Datenbanktabellen angelegt wurden und " "die Datenbank vom verwendeten Datenbankbenutzer auch lesbar ist." #: contrib/admin/templates/admin/login.html:17 }}} mtredinnick Frank tegtmeyer <fte@fte.to>   0 0 1 0 0 0
4389 2007-05-26 01:19:33 2011-09-28 16:12:17 2019-06-24 01:01:51.660417 Accepted closed Internationalization     master fixed BIDI language detection not smart enough one of my projects, I'm using a LANGUAGE_CODE of 'ar-kw' (Arabic-Kuwait). We already have an Arabic translation (ar) and it is being appropriately used. The problem is that my language code is not being detected as a right to left language. It has to be exactly 'ar' or it will not be detected. Maybe we can bring some of the smartness of gettext into detecting the direction of text too? There is a function in gettext called _expand_lang. It takes the locale as a single argument and returns a list of possible names for this locale, so that ar_KW will return a list containing ar_KW, ar and other locales. jezdez Ahmad Alhashemi bidi rtl sprintdec01 0 1 0 0 0 0
4412 2007-05-29 05:17:50 2011-09-28 16:12:16 2019-06-24 01:02:06.473525 Accepted closed Forms     master fixed Allow Select and SelectMultiple widgets to render HTML optgroups from nested choices structures if the label of a choices iterable is a list or tuple, treat that option as an option group with the value as the label. this shouldn't break any backwards compatibility and negates the need for a separate SelectGrouped widget (which has been previously rejected). SmileyChris mrmachine newforms select widget nested choices optgroup   1 0 0 0  
4562 2007-06-14 16:27:29 2011-09-28 16:12:17 2019-06-24 01:03:42.832179 Accepted closed contrib.admin     master wontfix unique_together uses 'iexact' instead of 'exact' The unique_together flag promises unique entries in a database. However the manipulator deploys case insensitive checks with "iexact" instead of "exact". The attached patch enforces the correct uniqueness check with "exact". jacob calvin@debian.org   0 1 1 0 1 0
4604 2007-06-17 19:55:46 2011-09-28 16:12:23 2019-06-24 01:04:10.193446 Accepted closed Contrib apps Uncategorized Normal master fixed session-based messages Right now, in order to pass a message to the next view, you can use "User.message_set.create('Your whatever has been saved successfully!')" That works for logged-in users, but doesn't help users who aren't logged in and it's probably more complicated than it needs to be. By contrast, we could store messages in the user's session. Every user (logged in or not) has a session that uniquely identifies them. By creating a request processor and middleware, we can make this process work for all users. With the attached patch, you can put the FlashMiddleware into the middleware tuple and the Flash context processor into the tuple for context processors and then simply do: "request.flash = 'Your whatever has been saved successfully!' Since it runs off of the session data rather than the user data, it works without someone having to have logged in. This is very useful in many contexts. Also, I don't think we gain anything by storing it in the DB with a FK to User. Having it in the session just makes it nicely encapsulated to the browsing person. **Flash is what Rails calls this functionality, but if someone wants to rename it to 'message', that's fine by me. request.message = 'Apple' might be easier for people to understand. tobias Sean Patrick Hogan <sp.hogan@gmail.com>   0 1 1 0 0 0
4624 2007-06-19 16:56:41 2011-09-28 16:12:17 2019-06-24 01:04:22.882113 Accepted closed Translations     master fixed Persian translation I have started from end of file! It's about 25% complete. mtredinnick reza@zeerak.ir persian fa 0 1 0 0 0 0
4667 2007-06-23 16:59:03 2011-09-28 16:12:16 2019-06-24 01:04:50.250101 Accepted closed contrib.admin     master fixed [newforms-admin] add edit_inline support for generic relations I have a model that looks like (working example) {{{ from django.db import models from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType class Dependency( models.Model ): target_ct = models.ForeignKey( ContentType, related_name='dependency_for_set' ) target_id = models.IntegerField() target = generic.GenericForeignKey( 'target_ct', 'target_id' ) source_ct = models.ForeignKey( ContentType, related_name='dependent_on_set' ) source_id = models.IntegerField() source = generic.GenericForeignKey( 'source_ct', 'source_id' ) }}} and I want to be able to edit it inline with other models, but the current implementations only support edit_inline for foreign key relations. With the attached patch I can do something like this: {{{ from django.contrib import admin class SomeModel( models.Model ): text = models.TextField() class SomeModelOptions( admin.ModelAdmin ): inlines = [ admin.TabularInline( Dependency, name='source_ct:source_id', formset=generic.GenericInlineFormset ), ] admin.site.register( SomeModel , SomeModelOptions ) }}} The patch is very rough, but working (tested adding and editing). I have some questions for the authors (I will post it to django-dev): * InlineFormset.rel_name is not really applicable in this case, what would be best to use as a prefix (the value in tha patch - {{{'aaa'}}} is far from ideal ;) ) * I moved some of the functionality to FormSet (add_fk), to allow for custom binding between objects and use {{{content_type_field:object_id_field}}} as the foreign key name to pass that information. I feel that its not the most elegant solution, could anybody help me out here with some ideas? btw. Great work, Joseph Kocherhans, your implementation of edit_inline really made this easy for me, thanks. brosner Honza Král <Honza.Kral@gmail.com> nfa-someday edit_inline generic content_type sprintsept14 ep2008 0 1 1 0 0 0
4695 2007-06-26 10:24:33 2011-09-28 16:12:23 2019-06-24 01:05:08.359785 Accepted closed Internationalization     master fixed xgettext skips some translation strings in javascript files For a simple Javascript source file like this: {{{ // ' gettext("foo"); // ' gettext("bar"); }}} results of make-messages.py run will exclude the "foo" string. Apparently this is related to the presence of apostrophes in the preceding comment. I am using gettext 0.14.4 under win32. I suspect this might be some quirk in relation to xgettext being called with Perl in the language parameter. ramiro voy@voy.cz   0 1 0 0 0 0
4824 2007-07-10 08:03:17 2011-09-28 16:12:27 2019-06-24 01:06:31.093372 Accepted closed Core (Other)     master wontfix Enforce a check for duplicate named url patterns The current naming url pattern don't check the duplication naming. As it said in documentatioin, {{{ Note When you name your URL patterns, make sure you use names that are unlikely to clash with any other application’s choice of names. If you call your URL pattern comment, and another application does the same thing, there’s no guarantee which URL will be inserted into your template when you use this name. Putting a prefix on your URL names, perhaps derived from the application name, will decrease the chances of collision. We recommend something like myapp-comment instead of comment. }}} I think it's quite easy to check the duplication naming url pattern in the construction stage and should be. nobody Favo <favo@exoweb.net> sprintsept14 0 1 0 0 0 0
4860 2007-07-13 04:25:42 2011-09-28 16:12:17 2019-06-24 01:06:54.123892 Ready for checkin closed Forms     master fixed Labels missing for tags in newforms widgets The CheckboxSelectMultiple and RadioInput widgets in newforms add a <label> tag around their multiple-choice options, but don't specify a for="". This apparently causes problems with IE6/7. jacob russellm newforms html validation 0 1 0 0 0 0
4878 2007-07-14 17:33:46 2011-09-28 16:12:23 2019-06-24 01:07:06.641632 Accepted closed Documentation     master wontfix docs: install on win needs help http://www.djangoproject.com/documentation/install/ 'install on win' not very good: it would help to link to http://code.djangoproject.com/wiki/WindowsInstall So that as we help people on irc, we can collect notes on what things need to be addressed. like: install python, add python to PATH, install subversion, dl django, add d-admin.py to path... stuff that would be handy if it was on a wiki so that it doesn't require this levl of trac item. nickefford Carl Karsten <carl@personnelware.com> sprintsept14 0 1 1 0 0 0
4948 2007-07-21 13:03:15 2011-09-28 16:12:16 2019-06-24 01:07:51.493004 Accepted closed Core (Other)     master fixed Saving FileField files is not thread-safe Picking the filename in [http://code.djangoproject.com/browser/django/trunk/django/db/models/base.py#L368 django.db.modes.Model._save_FIELD_file] is not thread-safe. There is an obvious racing condition if one thread will have found a non-existing filename and then a second thread will search for a non-existing name based on the same filename before the first thread starts to write the file. Because this function is probably most often called from the admin UI and the newforms frameworks doesn't support file upload yet, it isn't critical. Still, this kind of problems can cause difficult to debug problems. rcoup anonymous fs-rf-docs 0 0 1 0 0 0
5096 2007-08-06 06:09:23 2011-09-28 16:12:21 2019-06-24 01:09:27.538396 Accepted closed Documentation     master fixed Doc: Model ref mentions sql-based initial data, should use fixtures In 0.96 release notes, there is a mention that fixtures should be used for initial data and custom sql for view, procedures, etc. However the model reference docs show an example using custom sql files and don't mention fixtures at all. For consistency the models ref should describe fixtures and distinguish between the use of fixtures & custom sql files. jacob oggie rob <oz.robharvey@gmail.com> sprint-pycon08 0 1 0 0 0 0
5216 2007-08-20 23:01:34 2011-09-28 16:12:17 2019-06-24 01:10:45.726654 Accepted closed Forms     master fixed Lazy Translation label_tag in new forms A call to {{field.label_tag}} in a newforms template returns <django.utils.functional.__proxy__ object at 0x941fe6c> I don't know if this is the right way to handle it, but converting contents to unicode works. anonymous anonymous   0 1 0 1 0 0
5270 2007-08-27 05:45:27 2011-09-28 16:12:17 2019-06-24 01:11:24.034722 Ready for checkin closed Template system     master fixed Template tags won't accept an empty string as an argument There currently appears to be no easy to pass an empty string to a template tag. {% url admin "" %} results in a TemplateSyntaxError. Some template tags (notable reverse URL lookups for the root of a newforms-admin instance) require an empty string to be passed in. jdunck stephen empty string tplrf-fixed 0 1 0 0 0 0
5361 2007-09-08 02:46:05 2011-09-28 16:12:16 2019-06-24 01:12:31.484020 Ready for checkin closed Database layer (models, ORM)     master fixed Support pluggable backends for FileField In order to provide the ability to store files in alternate, even remote, filesystems, `FileField` should support a backend protocol and allow individual `FileField` instances to specify a backend to store files. Gulopine Marty Alchin <gulopine@gamemusic.org> fs-rf-fixed 0 1 0 0 0 0
5374 2007-09-10 00:48:03 2011-09-28 16:12:16 2019-06-24 01:12:40.108689 Accepted closed Core (Other)     newforms-admin fixed We need a validator for ModelAdmin classes {{{get_validation_errors}}} needs to be updated to deal with {{{ModelAdmin}}} classes instead of the old inline {{{Admin}}} classes. It may be desirable for {{{ModelAdmin}}} to know how to validate itself (and by 'validate' I basically mean catching invalid attribute names). brosner jkocherhans nfa-blocker 0 1 1 1 1 0
5385 2007-09-10 14:49:56 2011-09-28 16:12:17 2019-06-24 01:12:47.250835 Ready for checkin closed contrib.admin     newforms-admin fixed [newforms-admin] - inconsistency in admin date fields from javascript Usual format for dates in admin is 2007-09-02. But javascript code uses format 2007-9-2. I thing it is inconsistent and it should be fixed. Attached patch solves it. xian Petr Marhoun <petr.marhoun@gmail.com> nfa-someday admin, javascript 0 1 0 0 0 0
5416 2007-09-13 15:19:38 2011-09-28 16:12:27 2019-06-24 01:13:07.815044 Accepted closed Testing framework     master fixed Add assertNumQueries() to testing framework The Django testing framework should provide {{{assertNumQueries()}}}, which would assert that a given action executed a given number of database queries. This should work at the view level ("view X uses 3 queries total") or the individual statement level ("model method X uses only 1 query"). This might have to be implemented as two methods -- a "start counting" method and a "stop counting" method: {{{ #!python def test_something(self): self.startCountingQueries() do_something_that_should_only_use_two_queries() self.assertNumQueries(2) }}} In this example, {{{startCountingQueries()}}} would reset the counter to 0, and every query would be tallied from that point on. {{{assertNumQueries()}}} would simply assert the query count was the given number. Note that this depends on #5415, which provides signals for every SQL query. Alex adrian feature_request 0 1 1 0 0 0
5420 2007-09-13 15:54:09 2011-09-28 16:12:20 2019-06-24 01:13:10.295018 Accepted closed Database layer (models, ORM)     master fixed Allow database API users to specify the fields to exclude in a SELECT statement This one will help people use their databases more efficiently. The Django ORM should allow users to specify a list of field names to *exclude* from a {{{QuerySet}}}. If a user attempts to access one of those excluded fields on the resulting model instance, the field will be loaded lazily via a separate query. This is useful when you know you absolutely will not need to use a particular field in your template, so there's no point in SELECTing that data. This saves memory, and it saves on bandwidth between the database server and the Web server. Example: {{{ #!python class Person(models.Model): name = models.CharField(maxlength=32) age = models.IntegerField() hometown = models.CharField(maxlength=32) is_cool = models.BooleanField() # My instinct is to call this hide(), but I'm sure there's a better name for it. >>> p = Person.objects.hide('hometown', 'is_cool').get(name='John Lennon') >>> p.id 3 >>> p.name u'John Lennon' # Does a query to get "hometown", because it was hidden from the QuerySet. # 'SELECT hometown FROM person WHERE id=3;' >>> p.hometown u'Liverpool' # Does a query to get "is_cool", because it was hidden from the QuerySet. # 'SELECT is_cool FROM person WHERE id=3;' >>> p.is_cool True }}} In the case of lazily loaded fields, the lazy loading *only* applies to the particular field. E.g., when I accessed {{{p.hometown}}} in the above example, it did *not* also lazily load the rest of the hidden fields ("is_cool"). We should also provide the inverse of {{{hide()}}} -- perhaps called {{{expose()}}}? -- which would take a list of field names to *include* rather than *exclude*. This would be an opt-in instead of an opt-out. mtredinnick adrian qs-rf 0 1 1 0 1 0
5461 2007-09-14 16:43:38 2011-09-28 16:12:16 2019-06-24 01:13:38.806667 Accepted closed Database layer (models, ORM)     master fixed Give database backends a "creation" attribute instead of using get_creation_module() Each database backend's {{{DatabaseWrapper}}} class should have a {{{creation}}} property that returns a subclass of {{{django.db.backends.creation.BaseCreation}}}, which contains all the information about how to create tables with the particular backend. {{{BaseCreation}}} is like {{{BaseDatabaseOperations}}} in {{{django/db/backends/__init__.py}}}, except it deals only with logic related to creation. This was implemented in http://code.djangoproject.com/attachment/ticket/5106/backend-refactoring-v2-correct-bitrot.patch , but that patch is no longer valid, as some of it has been checked in already. brantley adrian db-be-api 0 1 1 1 0 0
5463 2007-09-14 16:57:37 2011-09-28 16:12:16 2019-06-24 01:13:40.060599 Accepted closed Internationalization     master fixed make-messages.py process only .html (not .tpl etc) there should be in settings ie:[[BR]] I18N_TEMPLATES_EXTENSIONS = ('.html','.tpl')[[BR]] and default ('.html') for backward compatibility jezdez beer <antiwin@seznam.cz>   0 1 0 0 0 0
5485 2007-09-15 03:03:53 2011-09-28 16:12:16 2019-06-24 01:13:54.366872 Accepted closed Database layer (models, ORM)     master wontfix Changing repetitive uploaded files from underscores to numbers Currently The filefield adds an underscore if you upload to a file that already exists. This leads to files like file_________.txt This is annoying. The patch sets the system to create files file.txt, file_2.txt ..... file_99.txt etc. nobody emperorcezar fs-rf-docs 0 1 0 1 0 0
5490 2007-09-15 11:22:55 2011-09-28 16:12:16 2019-06-24 01:13:58.906485 Ready for checkin closed contrib.admin     newforms-admin fixed newforms-admin: Admin pages insufficiently escape special characters in primary keys links This is the same issue as reported in #5041, but tested and patched in the newforms-admin. To reproduce:[[BR]] - create a model with a string as primary key[[BR]] - create a record with name ": / # ? ; @ & = + $ , " < > %"[[BR]] In the admin ui you can now find the following problems:[[BR]] 1) link from the 'change list' to the 'change form' doesn't work[[BR]] 2) the link displayed in the 'recent actions' doesn't work[[BR]] 3) the links displayed on the 'delete confirmation' page doesn't work[[BR]] brosner jdetaeye nfa-blocker, ep2008 0 1 0 0 0 0
5494 2007-09-15 16:36:09 2011-09-28 16:12:27 2019-06-24 01:14:01.562544 Accepted closed Internationalization     master fixed javascript_catalog generic view only search catalogs in application/locale and not in project/locale In [http://www.djangoproject.com/documentation/i18n/#message-files i18n docs] said that message files are searched in (fragment copied from {{{i18n.txt}}}): {{{ * The root ``django`` directory (not a Subversion checkout, but the one that is linked-to via ``$PYTHONPATH`` or is located somewhere on that path). * The root directory of your Django project. * The root directory of your Django app. }}} But it doesn't work for javascript catalogs. If you have a project named {{{ blogproj }}} and an aplication named {{{ blog }}}, you cannot put javascript catalogs in {{{ blogproj/locale }}}. This {{{ urls.py }}} doesn't work: {{{ #!python js_info_dict = { 'domain': 'djangojs', 'packages': ('blogproj',), } urlpatterns = patterns('', (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), }}} But if you have message files in {{{ blogproject/blog/locale }}}, it works with this {{{ urls.py }}}: {{{ #!python js_info_dict = { 'domain': 'djangojs', 'packages': ('blogproj.blog',), } urlpatterns = patterns('', (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), }}} ramiro anonymous javascript i18n 0 1 0 0 1 0
5522 2007-09-17 12:21:30 2011-09-28 16:12:16 2019-06-24 01:14:19.576076 Ready for checkin closed Core (Other)     master fixed Move commands daily_cleanup, make-messages and compile-messages to django.core.management.commands Since having a fairly solid, pluggable {{{django-admin}}} command I prepared a patch which moves the heavy lifting to django.core.management and is fully backwards compatible with the standalone tools daily_cleanup.py, make-messages.py, compile-messages.py and unique-messages.py in {{{django/bin}}}. This introduces four new commands: {{{ messagesmake, messagescompile, messagesunique, cleanup }}} where the latter is the new name for daily_cleanup.py. Docs included. jezdez jezdez i18n session 0 1 1 0 0 0
5537 2007-09-18 22:48:55 2011-09-28 16:12:27 2019-06-24 01:14:29.267057 Ready for checkin closed Documentation     master fixed Remove Reverse Lookups on ForeignKeys/ManyToMany There should be way to remove the addition of a property on models for doing reverse lookups. Say I have a minor table, that holds statistical information, and it has rows per user. I will never use myuser.statistical_table.all(), so it makes sense to have a way to tell it to not append that object to the instances. nobody dcramer   0 0 0 0 0 0
5563 2007-09-21 08:01:59 2011-09-28 16:12:21 2019-06-24 01:14:45.994683 Design decision needed closed Core (Serialization)     master fixed BooleanField should raise an error if null=True django.db.models.fields.BooleanField.to_python raises an error on "None" input, but this is valid if null=True for the field. SamBull shaunc <shaun@cuttshome.net>   0 1 0 0 0 0
5591 2007-09-24 20:00:09 2011-09-28 16:12:17 2019-06-24 01:15:04.107344 Ready for checkin closed Documentation     master fixed i18n documentation: Incorrect statement about template variables in {% trans %} The documentation at: http://www.djangoproject.com/documentation/i18n/#in-template-code states: {{{It’s not possible to use template variables in {% trans %} — only constant strings, in single or double quotes, are allowed.}}} However, it works for me (django.templatetags.i18n.TranslateNode.render() includes a call to resolve_variable). nobody elsdoerfer@gmail.com   0 1 0 0 0 0
5605 2007-09-26 07:51:32 2011-09-28 16:12:23 2019-06-24 01:15:13.258808 Accepted closed Contrib apps     master fixed Username email address part is case sensitive I've discovered that create_user from User model manager (auth contrib module) lowercases newly created user's email address. The RFC document says, that only domain part of email address is case insensitive, so I think that lowercasing the username part is a bug. See RFC 821 and RFC 1035. Please correct it, by lowercasing only domain name part of email address. Leo m.gajda@paranoja.pl auth email lowerase easy-pickings 0 1 0 0 0 0
5612 2007-09-26 21:07:47 2011-09-28 16:12:27 2019-06-24 01:15:17.867580 Ready for checkin closed Core (Other)     master fixed Signals for login / logout A small patch that adds signals for login / logout events. The signal passes on the request. I use it to clean up session-data. SmileyChris pterk   0 1 0 0 0 0
5628 2007-09-27 19:28:58 2011-09-28 16:12:16 2019-06-24 01:15:28.043812 Accepted closed contrib.admin     newforms-admin fixed [newforms-admin] - when an inline formset has errors, no message is displayed at the top of the form If an inline formset has any validation errors then the error message ```Please correct the errors below.``` won't be displayed at the top of the form. jkocherhans brosner nfa-blocker 0 1 0 0 0 0
5631 2007-09-28 08:48:22 2011-09-28 16:12:17 2019-06-24 01:15:29.926457 Accepted closed contrib.admin       fixed newforms-admin: 'classes': 'collapse' does not work (in one case)   nobody anonymous newforms-admin collapse admin 0 1 0 0 0 0
5655 2007-10-02 01:20:29 2011-09-28 16:12:16 2019-06-24 01:15:45.493397 Accepted closed Database layer (models, ORM)     master fixed FileField's _save_FIELD_file method evaluates the directory once for creating the directory, then again for creating the file I'm sure there's a more succinct way to say that... Anyway, the directory should only be calculated '''once''', to avoid potentially creating one time-based upload directory the then attempting to upload to a different directory. Gulopine SmileyChris fs-rf-fixed 0 1 0 0 0 0
5672 2007-10-03 14:02:54 2011-09-28 16:12:27 2019-06-24 01:15:56.618899 Ready for checkin closed Internationalization     master fixed i18n minor problem (comma list items separator can't be translated) in django.utils.text.get_text_list() The string ', ' is not translatable in the source code. ([http://code.djangoproject.com/browser/django/trunk/django/utils/text.py#L142 django/utils/text.py:142]) In some countries arabic comma (،) is used: [http://unicode.org/charts/PDF/U0600.pdf Unicode 0600 block], Arabic comma is 060C. nobody remohammadi   0 1 0 0 0 0
5775 2007-10-18 12:21:36 2011-09-28 16:12:17 2019-06-24 01:17:03.501458 Ready for checkin closed contrib.admin     newforms-admin duplicate staff_member_required decorator loses query parameters To reproduce the problem: 1. Open a new browser window 2. Enter a admin url that uses a query parameter. A good example is the url for displaying a filtered or sorted list of objects: {{{/admin/yourapp/yourmodel/?yourfield__exact=12}}} 3. Since you're not authenticated yet, the login page is shown. 4. After a successfull login, you will be redirected to the page: {{{/admin/yourapp/yourmodel/}}} The query parameter is lost along the way...[[BR]] Keeping the query parameters is handy when e.g. the user wants to bookmark such a filtered or sorted list. The fix is pretty simple: The problem is the use of the request.path field, rather than the request.get_full_path method.[[BR]] The change affects affects both the normal admin as well as the new-forms admin branch, and the same patch applies. nobody jdetaeye admin staff_member_required sprintdec01 nfa-someday 0 1 0 0 0 0
5780 2007-10-19 13:38:29 2011-09-28 16:12:16 2019-06-24 01:17:06.735316 Accepted closed contrib.admin     newforms-admin fixed pass the created/updated object to formsets in edit_inline for validation When validating {{{InlineFormset}}} it is essential that you have access to the created/updated object. I created a patch that handles exactly that - it creates the object (without saving it) and passes it to the {{{FormSet}}}. brosner Honza_Kral ep2008 0 1 0 0 0 0
5786 2007-10-20 13:58:25 2011-09-28 16:12:23 2019-06-24 01:17:10.543835 Accepted closed contrib.auth     1.1 fixed Relax character restrictions on auth usernames We have to use the auth module with legacy data and need to support more characters. Additionally the regexp there disallows german umlauts. There should be a way to configure the validator used for the username without monkeypatching. nobody Armin Ronacher username, character, restriction 0 1 0 0 0 0
5801 2007-10-23 11:55:08 2011-09-28 16:12:16 2019-06-24 01:17:20.261162 Accepted closed Contrib apps     1.0-alpha fixed GET parameters are ignored in redirect when user requests URL with GET parameters which needs login How to reproduce the error: * as anonymous user, request a page with GET parameters that needs login, e.g. <site>/admin/?test=1 * login page is displayed * provide valid credentials and confirm * now you are logged in, but redirected to the URL without GET parameters erny erevilla@yaco.es autentication login redirect staff_member_required 0 1 0 0 0 0
5825 2007-10-27 16:58:30 2011-09-28 16:12:21 2019-06-24 01:17:35.611079 Unreviewed closed Core (Management commands)     master fixed Customized actions for manage.py not working Custom actions can be added, as described http://www.djangoproject.com/documentation/django-admin/#customized-actions Following the instructions I am getting the error message: unknown command To reproduce you can also copy the contents of the folder tests\modeltests\user_commands\management in an application subdirectory of your project.[[BR]] The regression test for user_commands passes: it seems to use a different sys.path than when you run manage.py from the commandline... Digging a bit deeper in the source file {{{django\core\management\__init__.py}}} :[[BR]] - The function imp.find_module in the method find_management_module is using sys.path to locate the management modules. The parent directory of your project is normally not on the path, so looking for an application package "project_name.app_name" doesn't find a module. Manage.py only has the project directory itself on the path.[[BR]] - The find_commands method in the same source file is using a pretty hack-ish way to discover commands: it looks for files ending in .py. This misses compiled code with extensions as .pyo and .pyc and also doesn't work for source files packaged in a zip file (as produced by eg py2exe). The correct api is to use pkgutil.iter_modules (unfortunately only available in python 2.5)[[BR]] (I'm willing to look at a patch for the issues, but need some guidance: For the first issue, I am a bit puzzled by the append and popping of the sys.path in the setup_environ method in the same file. For the second issue, it requires more changes and thinking to do it properly across different versions: is it worth the effort?) nobody jdetaeye@frepple.com custom actions manage.py 0 0 0 0 0 0
5900 2007-11-08 16:35:02 2011-09-28 16:12:17 2019-06-24 01:18:24.123398 Unreviewed closed Translations     master fixed update for i18n zh_TW django.po file the po file is against trunk 6658 nobody terryh <terryh.tp@gmail.com>   0 0 0 0 0 0
5937 2007-11-14 11:15:47 2011-09-28 16:12:17 2019-06-24 01:18:48.199700 Accepted closed Contrib apps     master fixed Generic Relations backward lookups generate invalid SQL Given the following model is would seem that the Generic Relations' GenericRelatedObjectManager generates invalid SQL, as the doctest in the following snippet proves: {{{ from django.db import models from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType #============================================================================== class Alert(models.Model): """ Alerts for all kinds of widgets # create a blue widget and add an alert >>> blue = BlueWidget.objects.create(name='Blue 1') >>> alert = Alert(name='alert 1') >>> alert.object = blue >>> alert.save() # create a red widget and add an alert >>> red = RedWidget.objects.create(name='Red 1') >>> alert = Alert(name='alert 2') >>> alert.object = red >>> alert.save() # create a red widget with no alert >>> red = RedWidget.objects.create(name='Red 2') # create a blue widget and add an alert >>> blue = BlueWidget.objects.create(name='Blue 2') >>> alert = Alert(name='alert 3') >>> alert.object = blue >>> alert.save() # get a list of red widgets with alerts - there should be only 1 >>> reds = RedWidget.objects.filter(alerts__name__contains='alert').distinct() >>> reds [<RedWidget: RedWidget Red 1>] # this currently yields: [<RedWidget: RedWidget Red 1>, <RedWidget: RedWidget Red 2>] """ created = models.DateTimeField(auto_now_add=True) name = models.CharField(maxlength=128) content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() object = GenericForeignKey('content_type', 'object_id') #-------------------------------------------------------------------------- def __str__(self): return '%s alert for %s widget' % (self.name, self.object) #============================================================================== class … mtredinnick max generic relation, qs-rf 0 1 0 0 0 0
5943 2007-11-14 22:42:38 2011-09-28 16:12:16 2019-06-24 01:18:52.116438 Accepted closed Core (Management commands)     master fixed django-admin.py should work like manage.py if --setting option is provided Right now, app-provided commands aren't included, startproject is still available, and startapp uses the current directory rather than the project directory. The attached patch makes django-admin.py command --settings=blah work just like manage.py invoked on the same project.   toddobryan   0 1 0 0 1 0
5957 2007-11-15 21:34:03 2011-09-28 16:12:17 2019-06-24 01:19:01.666640 Ready for checkin closed Forms     master fixed unchecked BooleanField does not raise ValidationError even if it is required I'm afraid that required=True doesn't quite work on newforms' [http://www.djangoproject.com/documentation/newforms/#booleanfield BooleanField]. According to the docs, it should trigger an error in case the field is unchecked, but it doesn't. I suspect the reason is that [http://code.djangoproject.com/changeset/6563 changeset 6563] altered return value of CheckboxInput from None to False in unchecked cases, but "required" check of the BooleanField still relies on default "None_to_ValidationError" method of its parent class. == trunk rev 6678 == {{{ >>> import django.newforms as forms >>> class MyForm(forms.Form): ... bfield = forms.BooleanField(required=True) ... >>> f = MyForm({}) >>> f.is_valid() True }}} == trunk rev 6562 == {{{ >>> import django.newforms as forms >>> class MyForm(forms.Form): ... bfield = forms.BooleanField(required=True) ... >>> f = MyForm({}) >>> f.is_valid() Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/django/newforms/forms.py", line 106, in is_valid return self.is_bound and not bool(self.errors) File "/usr/lib/python2.4/site-packages/django/newforms/forms.py", line 97, in _get_errors self.full_clean() File "/usr/lib/python2.4/site-packages/django/newforms/forms.py", line 192, in full_clean value = field.clean(value) File "/usr/lib/python2.4/site-packages/django/newforms/fields.py", line 454, in clean super(BooleanField, self).clean(value) File "/usr/lib/python2.4/site-packages/django/newforms/fields.py", line 93, in clean raise ValidationError(ugettext(u'This field is required.')) File "/usr/lib/python2.4/site-packages/django/utils/translation/__init__.py", line 62, in ugettext return real_ugettext(message) File "/usr/lib/python2.4/site-packages/django/utils/translation/__init__.py", line 32, in delayed_loader if settings.USE_I18N: File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 28, in __getattr__ self._import_settings… Alex che@inkvizice.org   0 1 0 0 0 0
5966 2007-11-17 11:40:16 2011-09-28 16:12:16 2019-06-24 01:19:07.351028 Design decision needed closed Core (Other)     master wontfix FileField doesn't clean up directory after deletion If a !FileField file is being deleted it doesn't clean up a empty directory that might occur after deletion. This is only a issue if you use a dynamic path based on date. If this is the case then you could create a lot of empty directories and/or nested empty directories. Example code: {{{ class MetaFile(models.Model): file = models.FileField(_("File"), max_length=255, upload_to='meta/%y/%m') }}} nobody Michiel_1981 fs-rf-docs 0 0 0 0 0 0
6002 2007-11-21 05:03:09 2011-09-28 16:12:16 2019-06-24 01:19:30.532417 Accepted closed contrib.admin     master fixed Better saving in newforms-admin ModelAdmin There are two very long methods in django.contrib.admin.options.!ModelAdmin - save_add and save_change. They do three different things - they save objects, they log what happened and they redirect. So I propose to divide them. Method add_view would call save_add for saving, log_add for logging and redirect_after_save for redirection. Method change_view would call save_change for saving, log_change for logging and redirect_after_save for redirection. Methods save_add and save_change would be useful for complex saving which depends on forms and inline formsets together. (It solves #4507.) Methods log_add and log_change could be used for example for something as !AuditModelAdmin or !NoLogAdmin. Method redirect_after_save would be something as render_change_form - technical code common for adding and changing, which is not interesting very much. I feel that now redirection is quite broken, it does not check permissions correctly. My patch fixes it too. jacob Petr Marhoun <petr.marhoun@gmail.com>   0 1 1 0 0 0
6003 2007-11-21 05:18:58 2011-09-28 16:12:16 2019-06-24 01:19:31.259348 Accepted closed contrib.admin     newforms-admin fixed Registration for newforms admin Some points to registration for newforms admin: * One project can have many application, one application can be part of many projects. * One project can have several admins. * One application can be used in several admins from one project. * One application can be registered in one project and not registered in another project. * One application can be used with default !ModelAdmin in one project but with unknown customatization in another project. * Explicit is better than implicit, magic is evil. I would like to propose new conventions. There would be new files admin.py in some applications with method register. Example: {{{ #!python from django.contrib import admin from django.contrib.sites import models class SiteAdmin(admin.ModelAdmin): list_display = ('domain', 'name') search_fields = ('domain', 'name') def register(site): site.register(models.Site, SiteAdmin) }}} There would be admin.py in each project. Example: {{{ #!python from django.contrib import admin # Import admins from your or contrib applications. from django.contrib.auth import admin as auth_admin from django.contrib.sites import admin as sites_admin # Register admins from your or contrib applications. admin_site = admin.AdminSite() auth_admin.register(admin_site) sites_admin.register(admin_site) }}} And it would be called from urls.py. Example: {{{ #!python from django.conf.urls.defaults import * import admin urlpatterns = patterns('', ('^admin/(.*)', admin.admin_site.root), ) }}} I say "is" but I mean "convention is". nobody Petr Marhoun <petr.marhoun@gmail.com> nfa-blocker 0 1 0 0 0 0
6004 2007-11-21 05:41:08 2011-09-28 16:12:16 2019-06-24 01:19:31.996415 Ready for checkin closed contrib.admin     newforms-admin fixed Useless code in newforms admin There is too much not used code in newforms admin. It is quite difficult to understand django.contrib.admin if there are many obsolete things. I don't feel it is useful as documentation - there are too many changes and almost everything is ported now. For example: * urls.py - replaced by sites.!ModelAdmin.root and options.!ModelAdmin.call * templates.widget - replaced by widgets.py * almost everything in templatetags.admin_modify and views.main.!AdminBoundField - replaced by widgets.py and wrappers from options * views.main.model_admin_view and views.main.index - moved to sites.!ModelAdmin nobody Petr Marhoun <petr.marhoun@gmail.com> nfa-blocker 0 1 0 0 0 0
6009 2007-11-21 17:52:01 2011-09-28 16:12:16 2019-06-24 01:19:35.120431 Ready for checkin closed Internationalization     master fixed UnicodeDecodeError when uploading file with non-english filename. Upload a file using newforms I will get a UploadedFile object which contains filename and content for uploaded file. If I upload a file with english file name ('abcd.jpg'), everything is right. But if not (for example: ''''中文.jpg'''', when I assign the UploadedFile object's filename to ImageField or FileField in a model and save it, I will get a UnicodeDecodeError. This is because the '''django.http.parse_file_upload will treat filename as 'str' object not 'unicode' object.''' I must do this manually to avoid this bug: '''filename = uploadedFileObj.filename.decode('utf8')''' After that, UnicodeDecodeError will not happen again, but the FileField's value in database will be '.jpg'. OH! terrible! That is because the django.utils.text.get_valid_filename do this: '''re.sub(r'[^-A-Za-z0-9_.]', '', s)''' '''This will be good in english file name, but not in other languages. After the re.sub, '中文.jpg' => u'\u4e2d\u6587.jpg' will be u'.jpg'.''' For me, this is very serious problem. At this time, I can fix that by doing decode('utf8') and override get_valid_filename manually. But I hope this bug will be fixed by django officially. Thanks for your effort. :) leahculver bear330 files, unicode, FileBackend fs-rf 0 1 0 0 0 0
6039 2007-11-27 19:54:24 2011-09-28 16:12:23 2019-06-24 01:19:54.381948 Accepted closed Documentation     master fixed ATOM feed example is bogus The example code at the end of the syndication_feeds documentation page has a couple of problems that I discovered while trying to get the feed validator to accept my ATOM 1.0 feed: The encoding "utf8" is invalid; it should be "utf-8". An author name must be specified, either for the feed itself or for each entry - the author_name parameter. The feed document must have a self link; this is set using the feed_url parameter when constructing the feed object. I'm attaching the example code, modified with the above suggestions. Note that I added a few line breaks in the output of the script, to prevent exceedingly long lines. stugots ion.morega@gmail.com   0 1 0 0 0 0
6064 2007-11-30 21:16:02 2011-09-28 16:12:21 2019-06-24 01:20:10.596123 Accepted closed Database layer (models, ORM) Uncategorized Normal master fixed Allow database connection initialization commands There's sometimes a need to pass specific SQL that'll get executed at the beginning of every database connection (for just one example see #1051). This could be in the form of a setting, a signal, or perhaps some other mechanism. floguy jacob   0 1 0 0 0 0
6101 2007-12-02 16:02:30 2011-09-28 16:12:17 2019-06-24 01:20:34.363725 Accepted closed contrib.admin     newforms-admin fixed Seeing &quot;, etc. in admin list of related object to be deleted I'm seeing &quot;, etc. in the admin list of related objects to be deleted, when the related objects are edited inline and therefore do not have an associated link: {{{ Are you sure you want to delete the puzzles "NYT Sat 2007-11-17"? All of the following related items will be deleted: * Puzzles: NYT Sat 2007-11-17 o Clues: CAMPHOROIL: Liniment ingredient o Clues: MITA: Certain copier o Clues: UNITARIANS: Presidents Adams, Fillmore and Taft o Clues: APIN: &quot;... on the head of ____?&quot; }}} It looks like there's a missing mark_safe around where these items are created (after the object representation has been escaped) on line 57 here: http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/admin/util.py#L57 I think it should be: nh(deleted_objects, current_depth, [mark_safe(u'%s: %s' % (force_unicode(capfirst(related.opts.verbose_name)), escape(sub_obj))), []]) Making this change gets rid of the &quot;s I see in my list of related items to be deleted -- they display as quotes. Hmm, I just noticed a few lines up (line 41) in the code for the !OneToOne case that there seems to be a missing escape around sub_obj: http://code.djangoproject.com/browser/django/branches/newforms-admin/django/contrib/admin/util.py#L41 Shouldn't that also be: nh(deleted_objects, current_depth, [mark_safe(u'%s: %s' % (force_unicode(capfirst(related.opts.verbose_name)), escape(sub_obj))), []]) ? anonymous Karen Tracey <kmtracey@gmail.com> autoescape nfa-someday 0 0 0 0 0 0
6183 2007-12-11 16:33:57 2011-09-28 16:12:27 2019-06-24 01:21:27.444393 Ready for checkin closed contrib.admin     1.2 fixed [patch] Support help_text with ManyToMany field widgets Currently the help_text for ManyToMany fields is not showed in the admin if you use the nifty filter interfaces. It is removed while generating the widget in SelectFilter2.js. The attached patch fixes that by putting the help texts in a place where they don't interfere with the markup of the select filter widget. Only tested in firefox. I don't have any other browser at hand atm. acdha Steven Armstrong <sa@c-area.ch> sprintSep2010 0 1 0 0 0 0
6191 2007-12-12 05:37:38 2011-09-28 16:12:23 2019-06-24 01:21:32.421673 Accepted closed contrib.admin     master fixed Admin delete view doesn't show all items in some circumstances The admin delete view, which lists all of the objects to be deleted, sometimes doesn't include all of the objects that actually end up getting deleted. This is quite concerning when you delete an object and later realise that a whole stack of other objects were also deleted that you were not expecting :-) The situation that caused this to happen was when there was more than one related field to the same model (e.g. with different {{{related_name}}}s). The code adds each related field's options to a list of "seen" opts and ignores and subsequent opts for the same model, which breaks if you have more than one field related to the same model. carljm nicklane   0 1 0 0 0 0
6209 2007-12-14 04:45:48 2011-09-28 16:12:17 2019-06-24 01:21:43.888955 Accepted closed contrib.formtools     master fixed FormPreview never passes security_hash validation when a BooleanField is set to False when you give a boolean field in Form preview, and you give the boolean field "False" value, Django will not commit correctly. First, if i press "preview" button, it will preview my form content correctly, but next i press "submit" button, Django give the boolean field "True" value unexpected, and stay at this page. Next, i press "submit" button again in this page(now the boolean field has "True" value), Django can commit correctly... this is my model {{{ class TestPreForm(models.Model): test = models.CharField(max_length=20, null=True, blank=True) is_test = models.BooleanField(default=False) }}} this my views {{{ class TestPreFormPreview(FormPreview): def done(self, request, cleaned_data): _test = cleaned_data['test'] _is_test = cleaned_data['is_test'] TestPreForm.objects.create(test = _test, is_test = _is_test) return render_to_response('preform/form_ok.html', {'test':_test, 'is_test':_is_test}) }}} this is my urls {{{ (r'^preform/preview/$', TestPreFormPreview(forms.models.form_for_model(TestPreForm))), }}} rokclimb15 yimogod@gmail.com preview form 0 1 1 1 0 0
6218 2007-12-17 03:58:52 2011-09-28 16:12:27 2019-06-24 01:21:49.771149 Accepted closed Core (Other)     master fixed Require trailing slash always on MEDIA_URL This is a follow-up patch to the resolution of ticket 6198. Right now, MEDIA_URL requires a trailing slash if it contains a suffix beyond the domain name, and otherwise the slash is optional. This is an artifact of using urljoin() to combine MEDIA_URL with the url suffix. (Urljoin() was implements relative urls in RFC1808, slightly different than gluing paths together.) The only real problem is that if you forget the trailing slash from MEDIA_URL, it fails in an odd way, by deleting the path after the last trailing slash. For instance, "http://localhost/dir" combined with "image1.png" will become "http://localhost/image1.png". This patch replaces the use of "urljoin(MEDIA_URL, suffix)" with "MEDIA_URL + suffix" and updates the documentation. Now it would fail as "http://localhost/dirimage1.png" which is easier to debug. cmheisel Michael Toomim <toomim@cs.washington.edu> easy-pickings 0 1 1 0 0 0

Next page

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE "tickets_full" (
        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