Re: [Django] #10427: Bound field needs an easy way to get form value

2009-05-09 Thread Django
#10427: Bound field needs an easy way to get form value
---+
  Reporter:  toxik | Owner:  nobody  
Status:  reopened  | Milestone:  
 Component:  Forms |   Version:  SVN 
Resolution:|  Keywords:  form field value
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by emes):

 * cc: mic...@salaban.info (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9751: project_directory calculated incorrectly when "settings" is a directory (breaks 'startapp')

2009-05-09 Thread Django
#9751: project_directory calculated incorrectly when "settings" is a directory
(breaks 'startapp')
+---
  Reporter:  lamby  | Owner:  gsong 
  
Status:  assigned   | Milestone:  1.1   
  
 Component:  django-admin.py|   Version:  1.0   
  
Resolution: |  Keywords:  
startapp,settings,module
 Stage:  Ready for checkin  | Has_patch:  1 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  0  |  
+---
Changes (by anonymous):

 * cc: robillard.etie...@gmail.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10971: Test client response.redirect_chain documentation example missing follow argument

2009-05-09 Thread Django
#10971: Test client response.redirect_chain documentation example missing follow
argument
+---
  Reporter:  yourcelf   | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by timo):

  * has_patch:  0 => 1
  * stage:  Unreviewed => Ready for checkin

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10841: Better 500 template for AJAX calls

2009-05-09 Thread Django
#10841: Better 500 template for AJAX calls
--+-
  Reporter:  Riz   | Owner:  nobody
Status:  new  | Milestone:
 Component:  Core framework   |   Version:  1.0   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by Michail Sychev ):

 Another point why JSON is bad idea - when you wrap string into JSON all
 non ascii characters get encoded, which makes it unreadable for normlal
 user.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11063: Suggested method of installation

2009-05-09 Thread Django
#11063: Suggested method of installation
-+--
 Reporter:  trodrigues   |   Owner:  nobody
   Status:  new  |   Milestone:  1.1   
Component:  Documentation| Version:  1.0   
 Keywords:  documentation, mod_python, mod_wsgi  |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 I'd like to suggest a change on the documentation which might be a source
 of confusion for some persons, and lead them the wrong way.

 On the main installation guide
 (http://docs.djangoproject.com/en/dev/topics/install/#topics-install) the
 suggested method of installation is mod_python. However, once we click the
 link on "See How to use Django with mod_python for information on how to
 configure mod_python once you have it installed.", we're taken to the
 mod_python howto
 (http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#howto-
 deployment-modpython) where we can see the following:

 "The mod_python module for Apache can be used to deploy Django to a
 production server, although it has been mostly superseded by the simpler
 mod_wsgi deployment option."

 And, on the mod_wsgi page
 (http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#howto-
 deployment-modwsgi):

 "Deploying Django with Apache and mod_wsgi is the recommended way to get
 Django into production."

 Why aren't people led to the mod_wsgi page on the first place when
 accessing the main installation guide ?

 Also, the main installation guide, takes people to a wiki page
 (http://code.djangoproject.com/wiki/ServerArrangements), when there are
 similar guides on the main documentation (at least for mod_wsgi and
 mod_python, I haven't checked others).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10947: Queryset "__in" documentation missing list() call

2009-05-09 Thread Django
#10947: Queryset "__in" documentation missing list() call
+---
  Reporter:  julianb| Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by timo):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 As far as I can tell it is correct as is: values_list returns a list so
 calling list() on it would be redundant.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10946: Documentation for autoescape seems to be wrong

2009-05-09 Thread Django
#10946: Documentation for autoescape seems to be wrong
+---
  Reporter:  finngruwier| Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by timo):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Where do you see it documented like this?

 I found [http://docs.djangoproject.com/en/dev/topics/templates/#for-
 template-blocks this example] which is correct.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10061: incorrect logout link in admin

2009-05-09 Thread Django
#10061: incorrect logout link in admin
---+
  Reporter:  lashni| Owner:  mtredinnick
Status:  new   | Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  1 |   Needs_tests:  1  
Needs_better_patch:  1 |  
---+
Changes (by arikon):

 * cc: arikon (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8817: Accessing ImageField's dimensions doesn't close file

2009-05-09 Thread Django
#8817: Accessing ImageField's dimensions doesn't close file
---+
  Reporter:  tripediac | Owner:  mitsuhiko
Status:  closed| Milestone:  1.1  
 Component:  File uploads/storage  |   Version:  SVN  
Resolution:  fixed |  Keywords:   
 Stage:  Ready for checkin | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by mitsuhiko):

 I personally think the problem should better be solved by replacing the
 custom `NamedTemporaryFile` with the standard one from the `tempfile`
 module.  I can't really see what the one in django is used for.  The
 docstring says this:

 {{{
 The temp module provides a NamedTemporaryFile that can be re-opened on any
 platform. Most platforms use the standard Python tempfile.TemporaryFile
 class,
 but MS Windows users are given a custom class.

 This is needed because in Windows NT, the default implementation of
 NamedTemporaryFile uses the O_TEMPORARY flag, and thus cannot be reopened
 [1].

 1: http://mail.python.org/pipermail/python-list/2005-December/359474.html
 }}}

 The point of the temporary file is that it disappears if `close()` is
 called.  Why is there code doing something like `open(f.name, 'r')` on a
 temporary file in django?  Maybe that could be refactored that it does not
 open the file a second time.  If not it would probably make sense to open
 the file using the windows API and by passing all `FILE_SHARE_` flags to
 it and the `FILE_ATTRIBUTE_TEMPORARY` and `FILE_FLAG_DELETE_ON_CLOSE`
 flags.  That should give a posix like behavior.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10841: Better 500 template for AJAX calls

2009-05-09 Thread Django
#10841: Better 500 template for AJAX calls
--+-
  Reporter:  Riz   | Owner:  nobody
Status:  new  | Milestone:
 Component:  Core framework   |   Version:  1.0   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by Glenn):

 * cc: gl...@zewt.org (added)

Comment:

 This issue is a frustration for everyone doing AJAX with Django.  I hope
 this gets fixed.

 I don't think errors should be returned as a broken-apart JSON string.  It
 would make testing with curl, etc. harder, and it doesn't seem useful for
 clients to try to figure out why the server crashed.

 I could see a case for wrapping the entire templated error into JSON, but
 I think it's simpler for the client to just assume that 500 errors return
 plaintext, and do something like:

 {{{
 new Ajax.Request("/ajax.json", {
 on500: function(resp) {
 $("error").update(resp.responseText.replace("\n", "")); }
 onSuccess: function(resp) { f(resp.responseJSON); }
 });
 }}}

 ... to display errors in the page, even when the normal response is JSON.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8817: Accessing ImageField's dimensions doesn't close file

2009-05-09 Thread Django
#8817: Accessing ImageField's dimensions doesn't close file
---+
  Reporter:  tripediac | Owner:  mitsuhiko
Status:  closed| Milestone:  1.1  
 Component:  File uploads/storage  |   Version:  SVN  
Resolution:  fixed |  Keywords:   
 Stage:  Ready for checkin | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by mitsuhiko):

 I'm looking into the test failure on windows right now.  I have a semi-
 finished patch for the temporary file that could fix that problem.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11055: ImageField uploads fail at r10717

2009-05-09 Thread Django
#11055: ImageField uploads fail at r10717
---+
  Reporter:  timo  | Owner:  mitsuhiko
Status:  new   | Milestone:  1.1  
 Component:  File uploads/storage  |   Version:  SVN  
Resolution:|  Keywords:   
 Stage:  Unreviewed| Has_patch:  1
Needs_docs:  0 |   Needs_tests:  1
Needs_better_patch:  0 |  
---+
Changes (by mitsuhiko):

  * has_patch:  0 => 1
  * needs_tests:  0 => 1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11055: ImageField uploads fail at r10717

2009-05-09 Thread Django
#11055: ImageField uploads fail at r10717
---+
  Reporter:  timo  | Owner:  mitsuhiko
Status:  new   | Milestone:  1.1  
 Component:  File uploads/storage  |   Version:  SVN  
Resolution:|  Keywords:   
 Stage:  Unreviewed| Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by mitsuhiko):

 Okay.  The best fix is attached as diff.  Previously the
 `InMemoryUploadedFile` did the rewinding, but for consistency with
 temporary file uploads I proposed adding the rewind to the upload finish
 handler.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #8817: Accessing ImageField's dimensions doesn't close file

2009-05-09 Thread Django
#8817: Accessing ImageField's dimensions doesn't close file
---+
  Reporter:  tripediac | Owner:  mitsuhiko
Status:  closed| Milestone:  1.1  
 Component:  File uploads/storage  |   Version:  SVN  
Resolution:  fixed |  Keywords:   
 Stage:  Ready for checkin | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 The fix for this should have fixed #11032 but for some reason it hasn't.
 Using trunk r10707 on Windows with PIL installed, running the file_storage
 tests fails due to mug being open, therefore the attempt to delete the
 temp directory fails.  Removing lines 36-43 of
 regressiontests/file_storage/models.py (the lines that access the
 dimensions) makes the test pass.  Apparently the dimensions are read from
 an already-open file but the access of them is causing the file to not be
 subsequently closed?  I don't understand what's going on here, and
 unfortunately I've run out of time to look at this for several hours, so
 I'll settle for leaving this pesky comment.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10741: Update GNU gettext on Windows note in i18n documentation

2009-05-09 Thread Django
#10741: Update GNU gettext on Windows note in i18n documentation
+---
  Reporter:  ramiro | Owner:  ramiro
Status:  new| Milestone:  1.1   
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

  * owner:  nobody => ramiro
  * milestone:  => 1.1

Comment:

 Moving to list of documentation tickets to be considered for 1.1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10981: Notes about using string for relationship target model name slightly unclear

2009-05-09 Thread Django
#10981: Notes about using string for relationship target model name slightly
unclear
+---
  Reporter:  ramiro | Owner:  ramiro
Status:  new| Milestone:  1.1   
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

  * owner:  nobody => ramiro
  * milestone:  => 1.1

Comment:

 Moving to list of documentation tickets to be considered for 1.1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10404: ImageField: height_field and width_field option sometimes doesn't work

2009-05-09 Thread Django
#10404: ImageField: height_field and width_field option sometimes doesn't work
---+
  Reporter:  Lehich| Owner:  mitsuhiko  
  
Status:  new   | Milestone:  1.1
  
 Component:  File uploads/storage  |   Version:  SVN
  
Resolution:|  Keywords:  ImageField, 
height_field, width_field
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Comment (by mitsuhiko):

 The actual fix for this is in
 http://github.com/mitsuhiko/django/tree/ticket-10404

 It fixes it by using a descriptor in the image field, rather than pre
 saving multiple times.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11062: Problem with django/forms/models.py

2009-05-09 Thread Django
#11062: Problem with django/forms/models.py
+---
 Reporter:  beaver  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Forms   | Version:  1.0   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 Hi!
 When I describe my own model field I can return value of any kind. In my
 own widget I can process that value
 But if I want to describe a field inherits from ManyToManyField I can't do
 this because of that code (forms.models.py):
 {{{
 if isinstance(f, ManyToManyField):
 if instance.pk is None:
 data[f.name] = []
 else:
 data[f.name] = [obj.pk for obj in
 f.value_from_object(instance)]
 else:
 data[f.name] = f.value_from_object(instance)
 }}}
 When I trying pass my own value (not sequence of models) this code
 prevents this.
 I offer to change method {{{ value_from_object }}} for ManyToManyField,
 that it returns not list of models but list of identifiers.
 And above-cited code changes to
 {{{
 data[f.name] = f.value_from_object(instance)
 }}}

 But I think it damages other parts of Django.

 Please solve this problem and send me an email.[[BR]]
 Sorry for my bad English.
 Kirill

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10843: django.contrib.markup.tests.Templates test_textile fails with python textile 2.1.3 and Django 1.0.2 final

2009-05-09 Thread Django
#10843: django.contrib.markup.tests.Templates test_textile fails with python
textile 2.1.3 and Django 1.0.2 final
+---
  Reporter:  ntoll  | Owner:  nobody 
Status:  new| Milestone: 
 Component:  Testing framework  |   Version: 
Resolution: |  Keywords:  Textile
 Stage:  Unreviewed | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  1  |  
+---
Changes (by kmtracey):

  * needs_better_patch:  0 => 1

Comment:

 Just adding a '\t' will cause the test to fail on older versions of
 textile (the test currently works for me, for example, with textile 2.0.10
 which is what is installed on my ubuntu machine, but would break if the
 test was expecting the extra '\t').  We don't want to just move the
 problem, we want to fix it.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11060: Malformed POST request cause TypeError in AdminSite.login()

2009-05-09 Thread Django
#11060: Malformed POST request cause TypeError in AdminSite.login()
---+
  Reporter:  vvd   | Owner:  nobody 
Status:  closed| Milestone: 
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:  duplicate |  Keywords:  admin login
 Stage:  Unreviewed| Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => duplicate
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 deuplicate of #11061

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11061: Malformed POST request cause TypeError in AdminSite.login()

2009-05-09 Thread Django
#11061: Malformed POST request cause TypeError in AdminSite.login()
--+-
 Reporter:  vvd   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:  admin login   |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 I found that any visitor can cause a !TypeError on Django site with
 enabled contrib.admin application. This can be done by sending malformed
 authentication POST request without username parameter but with
 LOGIN_FORM_KEY. This will cause following exception in !AdminSite.login()
 function:

 {{{
 Traceback (most recent call last):

  File "/usr/local/lib/python2.5/site-
 packages/django/core/handlers/base.py", line 86, in get_response
response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/local/lib/python2.5/site-
 packages/django/contrib/admin/sites.py", line 141, in root
return self.login(request)

  File "/usr/local/lib/python2.5/site-
 packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)

  File "/usr/local/lib/python2.5/site-
 packages/django/contrib/admin/sites.py", line 244, in login
if u'@' in username:

 TypeError: argument of type 'NoneType' is not iterable
 }}}

 Although there is no security threat with this error, it makes Django
 incompatible with !McAfee SECURE service. !McAfee performs a sort of
 stress testing by generating a lot of random requests with different URLs
 and form parameters which cause ~20 Django error messages to appear in
 mailbox each day.


 I've created tiny patch with fix and test. Affected versions: both trunk
 and 1.0.2

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11060: Malformed POST request cause TypeError in AdminSite.login()

2009-05-09 Thread Django
#11060: Malformed POST request cause TypeError in AdminSite.login()
--+-
 Reporter:  vvd   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:  admin login   |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 I found that any visitor can cause a !TypeError on Django site with
 enabled contrib.admin application. This can be done by sending malformed
 authentication POST request without username parameter but with
 LOGIN_FORM_KEY. This will cause following exception in !AdminSite.login()
 function:

 {{{
 Traceback (most recent call last):

  File "/usr/local/lib/python2.5/site-
 packages/django/core/handlers/base.py", line 86, in get_response
response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/local/lib/python2.5/site-
 packages/django/contrib/admin/sites.py", line 141, in root
return self.login(request)

  File "/usr/local/lib/python2.5/site-
 packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)

  File "/usr/local/lib/python2.5/site-
 packages/django/contrib/admin/sites.py", line 244, in login
if u'@' in username:

 TypeError: argument of type 'NoneType' is not iterable
 }}}

 Although there is no security threat with this error, it makes Django
 incompatible with !McAfee SECURE service. !McAfee performs a sort of
 stress testing by generating a lot of random requests with different URLs
 and form parameters which cause ~20 Django error messages to appear in
 mailbox each day.


 I've created tiny patch with fix and test.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Changeset] r10727 - django/trunk/docs/intro

2009-05-09 Thread noreply

Author: simon
Date: 2009-05-09 10:52:17 -0500 (Sat, 09 May 2009)
New Revision: 10727

Modified:
   django/trunk/docs/intro/tutorial03.txt
Log:
Added admin URLs back to the urls.py example in the tutorial - had a complaint 
from someone following the tutorial that they got to that step and the admin 
stopped working and they weren't sure why

Modified: django/trunk/docs/intro/tutorial03.txt
===
--- django/trunk/docs/intro/tutorial03.txt  2009-05-09 11:52:15 UTC (rev 
10726)
+++ django/trunk/docs/intro/tutorial03.txt  2009-05-09 15:52:17 UTC (rev 
10727)
@@ -87,6 +87,7 @@
 (r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'),
 (r'^polls/(?P\d+)/results/$', 'mysite.polls.views.results'),
 (r'^polls/(?P\d+)/vote/$', 'mysite.polls.views.vote'),
+(r'^admin/', include(admin.site.urls)),
 )
 
 This is worth a review. When somebody requests a page from your Web site -- 
say,


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11059: Doc <-> Functionallity [FormsAPI Dynamic initial values] difference

2009-05-09 Thread Django
#11059: Doc <-> Functionallity [FormsAPI Dynamic initial values] difference
-+--
  Reporter:  bencoder| Owner:  nobody 
Status:  new | Milestone: 
 Component:  Forms   |   Version:  1.0
Resolution:  |  Keywords:  dynamic initial
 Stage:  Unreviewed  | Has_patch:  0  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by bencoder):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 http://docs.djangoproject.com/en/1.0/ref/forms/api/#dynamic-initial-values

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11059: Doc <-> Functionallity [FormsAPI Dynamic initial values] difference

2009-05-09 Thread Django
#11059: Doc <-> Functionallity [FormsAPI Dynamic initial values] difference
-+--
 Reporter:  bencoder |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Forms| Version:  1.0   
 Keywords:  dynamic initial  |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Hi!

 {{{ These values are only displayed for unbound forms, and they're not
 used as fallback values if a particular value isn't provided. }}}

 That's wrong. ''!ModelForm.init''-Code loads the data from the DB-Record
 into a Dict and ''update''s that dict with the ''initial''-dict.

 So the '''initial''' values are '''always used''', not just for unbound
 Forms.

 thanks,
 bencoder

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11058: list_display_links doesn't allow callables not defined in the model

2009-05-09 Thread Django
#11058: list_display_links doesn't allow callables not defined in the model
---+
  Reporter:  dvine | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by dvine):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Oh, and while we are at it, I would have a feature request regarding
 list_display_links, that could be implented in the same go. Setting
 list_display_links to an empty tuple/list should not result in default
 behavior (choosing the first column). Instead there should be no automatic
 display links at all, so that one can handle them individually in the
 callables.
 Thanks a lot and keep up the absolutely amazing work you are doing with
 django.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11058: list_display_links doesn't allow callables not defined in the model

2009-05-09 Thread Django
#11058: list_display_links doesn't allow callables not defined in the model
--+-
 Reporter:  dvine |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 In a custom ModelAdmin class you can use class methods of this class as
 change_list fields via the list_display property. But if you wan't to use
 this callable as link with the ist_display_links property you get an error

 Example:
 {{{
 'CustomPortfolioAdmin.list_display_links[0]' refers to
 'change_list_status' that is neither a field, method or property of model
 'CustomPortfolio'.
 }}}

 There is a ticket that introduced the error message (#2578), but I think
 this is a new issue, that's why I open a new ticket.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11057: No actions in admin (actions=None) messes up layout.

2009-05-09 Thread Django
#11057: No actions in admin (actions=None) messes up layout.
--+-
 Reporter:  rvdrijst  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:  actions=None actions admin style  |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 When a changelist page on the admin has no actions to display and
 therefore no checkboxes to put in the first column of each row, the layout
 of the columns is mangled. This is because the styles in changelists.css
 use the first-child selector and set the width of that first column to
 1.5em. This is fine when it is indeed a checkbox column, but makes it
 rather difficult to fit in text of any reasonable size when it is not.

 The attached patch solves the problem by setting a special class attribute
 'action-checkbox-column' on the header for the action checkboxes and the
 width of 1.5em only applies to that class. There are also two simple
 tests.

 This bug arises because of an incomplete implementation of ticket #10595.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11055: ImageField uploads fail at r10717

2009-05-09 Thread Django
#11055: ImageField uploads fail at r10717
---+
  Reporter:  timo  | Owner:  mitsuhiko
Status:  new   | Milestone:  1.1  
 Component:  File uploads/storage  |   Version:  SVN  
Resolution:|  Keywords:   
 Stage:  Unreviewed| Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by mitsuhiko):

  * owner:  nobody => mitsuhiko
  * milestone:  => 1.1

Comment:

 I have a fix for that.  The behavior for rewinding slightly changed and i
 have to figure out how the old code was supposed to rewind.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9675: Docs about migrating from the old comment system: add note about urls.py

2009-05-09 Thread Django
#9675: Docs about migrating from the old comment system: add note about urls.py
+---
  Reporter:  automatthias   | Owner:  jacob
Status:  reopened   | Milestone:  1.1  
 Component:  Documentation  |   Version:  1.0  
Resolution: |  Keywords:   
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by automatthias):

 If I understand correctly, the issue reported is:

 "There is a bit of information that is not there in the docs, and it
 should be there."

 In other words, there is something to add to the
 [http://docs.djangoproject.com/en/dev/ref/contrib/comments/upgrade/
 migration documentation]. The bit to be added is (in quotes):

 """The entry from urls.py:
 {{{
 (r'^comments/', include('django.contrib.comments.urls.comments')),
 }}}
 Needs to be changed to:
 {{{
 (r'^comments/', include('django.contrib.comments.urls')),
 }}}
 """

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10992: Unable to re-save inlines with custom char primary key

2009-05-09 Thread Django
#10992: Unable to re-save inlines with custom char primary key
---+
  Reporter:  marcob| Owner:  zain   
  
Status:  assigned  | Milestone:  1.1
  
 Component:  django.contrib.admin  |   Version:  SVN
  
Resolution:|  Keywords:  inline custom 
primary key
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  1 |  
---+
Comment (by russellm):

 I committed (commented out) a slightly more robust version of the provided
 test case as a part of [10725]. If anyone gets around to looking at this
 before I do, the new patch just needs to uncomment the appropriate tests.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Changeset] r10726 - in django/branches/releases/1.0.X: django/contrib/admin tests/regressiontests/admin_views

2009-05-09 Thread noreply

Author: russellm
Date: 2009-05-09 06:52:15 -0500 (Sat, 09 May 2009)
New Revision: 10726

Modified:
   django/branches/releases/1.0.X/django/contrib/admin/helpers.py
   django/branches/releases/1.0.X/tests/regressiontests/admin_views/models.py
   django/branches/releases/1.0.X/tests/regressiontests/admin_views/tests.py
Log:
[1.0.X] Fixed #11042 -- Corrected admin inlines for inherited models. Thanks to 
jsmullyan for the report, and mir for helpful triage work. Patch includes 
regression test for #8093, and a commented out test for #10992.

Merge of r10725 from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/admin/helpers.py
===
--- django/branches/releases/1.0.X/django/contrib/admin/helpers.py  
2009-05-09 11:40:13 UTC (rev 10725)
+++ django/branches/releases/1.0.X/django/contrib/admin/helpers.py  
2009-05-09 11:52:15 UTC (rev 10726)
@@ -138,7 +138,13 @@
 yield InlineFieldset(self.formset, self.form, name, **options)
 
 def has_auto_field(self):
-return self.form._meta.model._meta.has_auto_field
+if self.form._meta.model._meta.has_auto_field:
+return True
+# Also search any parents for an auto field.
+for parent in self.form._meta.model._meta.get_parent_list():
+if parent._meta.has_auto_field:
+return True
+return False
 
 def field_count(self):
 # tabular.html uses this function for colspan value.

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/admin_views/models.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/admin_views/models.py  
2009-05-09 11:40:13 UTC (rev 10725)
+++ django/branches/releases/1.0.X/tests/regressiontests/admin_views/models.py  
2009-05-09 11:52:15 UTC (rev 10726)
@@ -255,7 +255,53 @@
 class RecommendationAdmin(admin.ModelAdmin):
 search_fields = ('titletranslation__text', 
'recommender__titletranslation__text',)
 
+class Collector(models.Model):
+name = models.CharField(max_length=100)
 
+class Widget(models.Model):
+owner = models.ForeignKey(Collector)
+name = models.CharField(max_length=100)
+
+class DooHickey(models.Model):
+code = models.CharField(max_length=10, primary_key=True)
+owner = models.ForeignKey(Collector)
+name = models.CharField(max_length=100)
+
+class Grommet(models.Model):
+code = models.AutoField(primary_key=True)
+owner = models.ForeignKey(Collector)
+name = models.CharField(max_length=100)
+
+class Whatsit(models.Model):
+index = models.IntegerField(primary_key=True)
+owner = models.ForeignKey(Collector)
+name = models.CharField(max_length=100)
+
+class Doodad(models.Model):
+name = models.CharField(max_length=100)
+
+class FancyDoodad(Doodad):
+owner = models.ForeignKey(Collector)
+expensive = models.BooleanField(default=True)
+
+class WidgetInline(admin.StackedInline):
+model = Widget
+
+class DooHickeyInline(admin.StackedInline):
+model = DooHickey
+
+class GrommetInline(admin.StackedInline):
+model = Grommet
+
+class WhatsitInline(admin.StackedInline):
+model = Whatsit
+
+class FancyDoodadInline(admin.StackedInline):
+model = FancyDoodad
+
+class CollectorAdmin(admin.ModelAdmin):
+inlines = [WidgetInline, DooHickeyInline, GrommetInline, WhatsitInline, 
FancyDoodadInline]
+
 admin.site.register(Article, ArticleAdmin)
 admin.site.register(CustomArticle, CustomArticleAdmin)
 admin.site.register(Section, save_as=True, inlines=[ArticleInline])
@@ -270,6 +316,7 @@
 admin.site.register(Picture, PictureAdmin)
 admin.site.register(Recommendation, RecommendationAdmin)
 admin.site.register(Recommender)
+admin.site.register(Collector, CollectorAdmin)
 
 # We intentionally register Promo and ChapterXtra1 but not Chapter nor 
ChapterXtra2.
 # That way we cover all four cases:

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/admin_views/tests.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/admin_views/tests.py   
2009-05-09 11:40:13 UTC (rev 10725)
+++ django/branches/releases/1.0.X/tests/regressiontests/admin_views/tests.py   
2009-05-09 11:52:15 UTC (rev 10726)
@@ -14,7 +14,8 @@
 # local test models
 from models import (Article, BarAccount, CustomArticle, EmptyModel,
 FooAccount, Gallery, ModelWithStringPrimaryKey,
-Persona, Picture, Section)
+Persona, Picture, Section,
+Collector, Widget, Grommet, DooHickey, FancyDoodad, 
Whatsit)
 
 try:
 set
@@ -994,3 +995,238 @@
 response = self.client.post('/test_admin/%s/admin_views/gallery/1/' % 
self.urlbit, post_data)
 self.failUnless(response._container[0].find("Currently:") > -1)
 
+
+class AdminInlineTests(TestCase):
+fixtures = ['admin-views-users.xml']

[Changeset] r10725 - in django/trunk: django/contrib/admin tests/regressiontests/admin_views

2009-05-09 Thread noreply

Author: russellm
Date: 2009-05-09 06:40:13 -0500 (Sat, 09 May 2009)
New Revision: 10725

Modified:
   django/trunk/django/contrib/admin/helpers.py
   django/trunk/tests/regressiontests/admin_views/models.py
   django/trunk/tests/regressiontests/admin_views/tests.py
Log:
Fixed #11042 -- Corrected admin inlines for inherited models. Thanks to 
jsmullyan for the report, and mir for helpful triage work. Patch includes 
regression test for #8093, and a commented out test for #10992.

Modified: django/trunk/django/contrib/admin/helpers.py
===
--- django/trunk/django/contrib/admin/helpers.py2009-05-09 05:31:19 UTC 
(rev 10724)
+++ django/trunk/django/contrib/admin/helpers.py2009-05-09 11:40:13 UTC 
(rev 10725)
@@ -146,7 +146,13 @@
 yield InlineFieldset(self.formset, self.form, name, **options)
 
 def has_auto_field(self):
-return self.form._meta.model._meta.has_auto_field
+if self.form._meta.model._meta.has_auto_field:
+return True
+# Also search any parents for an auto field.
+for parent in self.form._meta.model._meta.get_parent_list():
+if parent._meta.has_auto_field:
+return True
+return False
 
 def field_count(self):
 # tabular.html uses this function for colspan value.

Modified: django/trunk/tests/regressiontests/admin_views/models.py
===
--- django/trunk/tests/regressiontests/admin_views/models.py2009-05-09 
05:31:19 UTC (rev 10724)
+++ django/trunk/tests/regressiontests/admin_views/models.py2009-05-09 
11:40:13 UTC (rev 10725)
@@ -357,7 +357,53 @@
 class RecommendationAdmin(admin.ModelAdmin):
 search_fields = ('titletranslation__text', 
'recommender__titletranslation__text',)
 
+class Collector(models.Model):
+name = models.CharField(max_length=100)
 
+class Widget(models.Model):
+owner = models.ForeignKey(Collector)
+name = models.CharField(max_length=100)
+
+class DooHickey(models.Model):
+code = models.CharField(max_length=10, primary_key=True)
+owner = models.ForeignKey(Collector)
+name = models.CharField(max_length=100)
+
+class Grommet(models.Model):
+code = models.AutoField(primary_key=True)
+owner = models.ForeignKey(Collector)
+name = models.CharField(max_length=100)
+
+class Whatsit(models.Model):
+index = models.IntegerField(primary_key=True)
+owner = models.ForeignKey(Collector)
+name = models.CharField(max_length=100)
+
+class Doodad(models.Model):
+name = models.CharField(max_length=100)
+
+class FancyDoodad(Doodad):
+owner = models.ForeignKey(Collector)
+expensive = models.BooleanField(default=True)
+
+class WidgetInline(admin.StackedInline):
+model = Widget
+
+class DooHickeyInline(admin.StackedInline):
+model = DooHickey
+
+class GrommetInline(admin.StackedInline):
+model = Grommet
+
+class WhatsitInline(admin.StackedInline):
+model = Whatsit
+
+class FancyDoodadInline(admin.StackedInline):
+model = FancyDoodad
+
+class CollectorAdmin(admin.ModelAdmin):
+inlines = [WidgetInline, DooHickeyInline, GrommetInline, WhatsitInline, 
FancyDoodadInline]
+
 admin.site.register(Article, ArticleAdmin)
 admin.site.register(CustomArticle, CustomArticleAdmin)
 admin.site.register(Section, save_as=True, inlines=[ArticleInline])
@@ -379,6 +425,7 @@
 admin.site.register(Language, LanguageAdmin)
 admin.site.register(Recommendation, RecommendationAdmin)
 admin.site.register(Recommender)
+admin.site.register(Collector, CollectorAdmin)
 
 # We intentionally register Promo and ChapterXtra1 but not Chapter nor 
ChapterXtra2.
 # That way we cover all four cases:

Modified: django/trunk/tests/regressiontests/admin_views/tests.py
===
--- django/trunk/tests/regressiontests/admin_views/tests.py 2009-05-09 
05:31:19 UTC (rev 10724)
+++ django/trunk/tests/regressiontests/admin_views/tests.py 2009-05-09 
11:40:13 UTC (rev 10725)
@@ -16,7 +16,8 @@
 from models import (Article, BarAccount, CustomArticle, EmptyModel,
 ExternalSubscriber, FooAccount, Gallery,
 ModelWithStringPrimaryKey, Person, Persona, Picture,
-Podcast, Section, Subscriber, Vodcast, Language)
+Podcast, Section, Subscriber, Vodcast, Language,
+Collector, Widget, Grommet, DooHickey, FancyDoodad, 
Whatsit)
 
 try:
 set
@@ -236,20 +237,20 @@
 
 class SaveAsTests(TestCase):
 fixtures = ['admin-views-users.xml','admin-views-person.xml']
-
+
 def setUp(self):
 self.client.login(username='super', password='secret')
 
 def tearDown(self):
 self.client.logout()
-
+
 def test_save_as_duplication(self):
 """Ensure save as actually creates a new person"""
 post_data = {'_saveasnew':'', 

Re: [Django] #11055: ImageField uploads fail at r10717

2009-05-09 Thread Django
#11055: ImageField uploads fail at r10717
---+
  Reporter:  timo  | Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by anonymous):

 I get the same problem, might have to do with
 http://code.djangoproject.com/ticket/8817 - which is the fix I was
 updating for.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11055: ImageField uploads fail at r10717

2009-05-09 Thread Django
#11055: ImageField uploads fail at r10717
---+
  Reporter:  timo  | Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by chipx86):

 * cc: chipx86 (added)
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9751: project_directory calculated incorrectly when "settings" is a directory (breaks 'startapp')

2009-05-09 Thread Django
#9751: project_directory calculated incorrectly when "settings" is a directory
(breaks 'startapp')
+---
  Reporter:  lamby  | Owner:  gsong 
  
Status:  assigned   | Milestone:  1.1   
  
 Component:  django-admin.py|   Version:  1.0   
  
Resolution: |  Keywords:  
startapp,settings,module
 Stage:  Ready for checkin  | Has_patch:  1 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  0  |  
+---
Comment (by Alex):

 __import__ doesn't redo an imoprt if it's already in sys.modules.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10992: Unable to re-save inlines with custom char primary key

2009-05-09 Thread Django
#10992: Unable to re-save inlines with custom char primary key
---+
  Reporter:  marcob| Owner:  zain   
  
Status:  assigned  | Milestone:  1.1
  
 Component:  django.contrib.admin  |   Version:  SVN
  
Resolution:|  Keywords:  inline custom 
primary key
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  1 |  
---+
Changes (by russellm):

  * needs_better_patch:  0 => 1

Comment:

 General approach to this problem looks good, but two problems with the
 patch:
  1. It breaks the modeltests.model_formsets unit test suite.
  2. The patch removes the use of "existing_objects". This exists as an
 optimization - the call to get_queryset() means that all inline objects
 can be retrieved with a single SQL statement, whereas the patch changes
 this so that each inline object requires a independent SQL select.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---