Re: [Django] #13901: File.chunks fails to read the entire file for some file-like objects

2010-07-06 Thread Django
#13901: File.chunks fails to read the entire file for some file-like objects
---+
  Reporter:  ikelly| Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 That is indeed what I was thinking of.

-- 
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-upda...@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] #13901: File.chunks fails to read the entire file for some file-like objects

2010-07-06 Thread Django
#13901: File.chunks fails to read the entire file for some file-like objects
---+
  Reporter:  ikelly| Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 #13756 is very similar (may be the dupe Alex was thinking of)...same issue
 but different bit of code.

-- 
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-upda...@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] #12991: Django 1.2 should have optional support for unittest2

2010-07-06 Thread Django
#12991: Django 1.2 should have optional support for unittest2
+---
  Reporter:  ericholscher   | Owner:  PaulM
Status:  assigned   | Milestone:   
 Component:  Testing framework  |   Version:   
Resolution: |  Keywords:   
 Stage:  Accepted   | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by PaulM):

 Just an update to note that this patch passes for python 2.4, 2.5, and 2.6
 on my systems with sqlite3 and postgres 8.4 and 8.3 (when #13821 is
 patched).

-- 
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-upda...@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] #13901: File.chunks fails to read the entire file for some file-like objects

2010-07-06 Thread Django
#13901: File.chunks fails to read the entire file for some file-like objects
---+
  Reporter:  ikelly| Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ikelly):

 You're at least right about the first part.  That's what I get for once
 again writing a small patch without testing it.  I've uploaded a corrected
 patch.

-- 
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-upda...@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] #13901: File.chunks fails to read the entire file for some file-like objects

2010-07-06 Thread Django
#13901: File.chunks fails to read the entire file for some file-like objects
---+
  Reporter:  ikelly| Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 This patch doesn't look right, it should be {{{ len(chunk }}}, not
 chunk_size.  Also I'm pretty sure this is a dupe.

-- 
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-upda...@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] #9632: File.chunks contains potentially expensive size operation

2010-07-06 Thread Django
#9632: File.chunks contains potentially expensive size operation
-+--
  Reporter:  psagers | Owner:  nobody
Status:  new | Milestone:
 Component:  File uploads/storage|   Version:  1.0   
Resolution:  |  Keywords:  file  
 Stage:  Design decision needed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by ikelly):

 See also #13901.

-- 
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-upda...@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] #13901: File.chunks fails to read the entire file for some file-like objects

2010-07-06 Thread Django
#13901: File.chunks fails to read the entire file for some file-like objects
--+-
 Reporter:  ikelly|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  File uploads/storage  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 The File.chunks method gets the size of the file and then decrements a
 counter by the chunk size for each read until it reaches 0.  The problem
 is that the read method is not guaranteed to return the full amount
 requested, and so the amount read may be less than the chunk size,
 resulting in the counter being decremented erroneously.  I ran into this
 bug while using a file-like object that wraps a java.io.InputStream
 object, whose read method returns as soon as data is available.

 This patch is one possible solution, although it still has the problem
 that it will result in a busy-loop if the read method is entirely non-
 blocking.  It also potentially yields non-terminal chunks smaller than the
 chunk size, which may not be desirable.

 See also #9632, which may affect the implementation here if it is
 accepted.

-- 
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-upda...@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] #12991: Django 1.2 should have optional support for unittest2

2010-07-06 Thread Django
#12991: Django 1.2 should have optional support for unittest2
+---
  Reporter:  ericholscher   | Owner:  PaulM
Status:  assigned   | Milestone:   
 Component:  Testing framework  |   Version:   
Resolution: |  Keywords:   
 Stage:  Accepted   | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by PaulM):

  * owner:  nobody => PaulM
  * status:  new => assigned
  * has_patch:  0 => 1

Comment:

 Attached a patch which bundles unittest2 as discussed in -dev and with the
 core devs.

-- 
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-upda...@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] r13428 - in django/branches/soc2010/test-refactor: . django/contrib/admin/media/css django/contrib/admin/templates/admin django/contrib/gis/gdal django/middleware docs/faq docs/intro docs/

2010-07-06 Thread noreply
Author: PaulM
Date: 2010-07-06 18:31:50 -0500 (Tue, 06 Jul 2010)
New Revision: 13428

Modified:
   django/branches/soc2010/test-refactor/
   django/branches/soc2010/test-refactor/django/contrib/admin/media/css/base.css
   
django/branches/soc2010/test-refactor/django/contrib/admin/templates/admin/base.html
   django/branches/soc2010/test-refactor/django/contrib/gis/gdal/libgdal.py
   django/branches/soc2010/test-refactor/django/middleware/csrf.py
   django/branches/soc2010/test-refactor/docs/faq/install.txt
   django/branches/soc2010/test-refactor/docs/intro/install.txt
   
django/branches/soc2010/test-refactor/docs/ref/contrib/gis/create_template_postgis-1.4.sh
   django/branches/soc2010/test-refactor/docs/ref/contrib/gis/install.txt
   django/branches/soc2010/test-refactor/docs/ref/validators.txt
   django/branches/soc2010/test-refactor/docs/topics/auth.txt
   django/branches/soc2010/test-refactor/docs/topics/db/optimization.txt
   django/branches/soc2010/test-refactor/docs/topics/install.txt
   django/branches/soc2010/test-refactor/docs/topics/serialization.txt
   
django/branches/soc2010/test-refactor/tests/regressiontests/m2m_through_regress/tests.py
Log:
[soc2010/test-refactor] Merged up to trunk.



Property changes on: django/branches/soc2010/test-refactor
___
Name: svnmerge-integrated
   - /django/branches/newforms-admin:1-4314 /django/trunk:1-13390
   + /django/branches/newforms-admin:1-4314 /django/trunk:1-13427

Modified: 
django/branches/soc2010/test-refactor/django/contrib/admin/media/css/base.css
===
--- 
django/branches/soc2010/test-refactor/django/contrib/admin/media/css/base.css   
2010-07-06 23:27:34 UTC (rev 13427)
+++ 
django/branches/soc2010/test-refactor/django/contrib/admin/media/css/base.css   
2010-07-06 23:31:50 UTC (rev 13428)
@@ -445,6 +445,14 @@
 background: #ffc url(../img/admin/icon_success.gif) 5px .3em no-repeat;
 }
 
+ul.messagelist li.warning{
+background-image: url(../img/admin/icon_alert.gif);
+}
+
+ul.messagelist li.error{
+background-image: url(../img/admin/icon_error.gif);
+}
+
 .errornote {
 font-size: 12px !important;
 display: block;

Modified: 
django/branches/soc2010/test-refactor/django/contrib/admin/templates/admin/base.html
===
--- 
django/branches/soc2010/test-refactor/django/contrib/admin/templates/admin/base.html
2010-07-06 23:27:34 UTC (rev 13427)
+++ 
django/branches/soc2010/test-refactor/django/contrib/admin/templates/admin/base.html
2010-07-06 23:31:50 UTC (rev 13428)
@@ -56,7 +56,9 @@
 {% endif %}
 
 {% if messages %}
-{% for message in messages %}{{ message 
}}{% endfor %}
+{% for message in messages %}
+  {{ 
message }}
+   {% endfor %}
 {% endif %}
 
 

Modified: 
django/branches/soc2010/test-refactor/django/contrib/gis/gdal/libgdal.py
===
--- django/branches/soc2010/test-refactor/django/contrib/gis/gdal/libgdal.py
2010-07-06 23:27:34 UTC (rev 13427)
+++ django/branches/soc2010/test-refactor/django/contrib/gis/gdal/libgdal.py
2010-07-06 23:31:50 UTC (rev 13428)
@@ -14,10 +14,10 @@
 lib_names = None
 elif os.name == 'nt':
 # Windows NT shared library
-lib_names = ['gdal16', 'gdal15']
+lib_names = ['gdal17', 'gdal16', 'gdal15']
 elif os.name == 'posix':
 # *NIX library names.
-lib_names = ['gdal', 'GDAL', 'gdal1.6.0', 'gdal1.5.0', 'gdal1.4.0']
+lib_names = ['gdal', 'GDAL', 'gdal1.7.0', 'gdal1.6.0', 'gdal1.5.0', 
'gdal1.4.0']
 else:
 raise OGRException('Unsupported OS "%s"' % os.name)
 

Modified: django/branches/soc2010/test-refactor/django/middleware/csrf.py
===
--- django/branches/soc2010/test-refactor/django/middleware/csrf.py 
2010-07-06 23:27:34 UTC (rev 13427)
+++ django/branches/soc2010/test-refactor/django/middleware/csrf.py 
2010-07-06 23:31:50 UTC (rev 13428)
@@ -126,13 +126,27 @@
 return accept()
 
 if request.is_secure():
-# Strict referer checking for HTTPS
+# Suppose user visits http://example.com/
+# An active network attacker,(man-in-the-middle, MITM) sends a
+# POST form which targets https://example.com/detonate-bomb/ 
and
+# submits it via javascript.
+#
+# The attacker will need to provide a CSRF cookie and token, 
but
+# that is no problem for a MITM and the session independent
+# nonce we are using. So the MITM can circumvent the CSRF
+# protection. This is true for any HTTP connection, but anyone
+# using HTTPS expects better!  For this reason, for
+# http

[Changeset] r13427 - django/branches/soc2010/test-refactor/django/test

2010-07-06 Thread noreply
Author: PaulM
Date: 2010-07-06 18:27:34 -0500 (Tue, 06 Jul 2010)
New Revision: 13427

Modified:
   django/branches/soc2010/test-refactor/django/test/utils.py
Log:
[soc2010/test-refactor] Fixed @skipIfDBEngine to be more explicit


Modified: django/branches/soc2010/test-refactor/django/test/utils.py
===
--- django/branches/soc2010/test-refactor/django/test/utils.py  2010-07-05 
17:22:29 UTC (rev 13426)
+++ django/branches/soc2010/test-refactor/django/test/utils.py  2010-07-06 
23:27:34 UTC (rev 13427)
@@ -88,5 +88,7 @@
 """
 if not reason:
 reason = "not supported on this database"
-return skipIf(settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] in engine,
-  reason)
+settings_engine = settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE']
+if isinstance(engine, basestring):
+return skipIf(settings_engine == engine, reason)
+return skipIf(settings_engine in engine, reason)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] #13872: "AttributeError: 'module' object has no attribute 'day_abbr'" when using Admin to add instance of model with DateField, TimeField, or DateTimeField

2010-07-06 Thread Django
#13872: "AttributeError: 'module' object has no attribute 'day_abbr'" when using
Admin to add instance of model with DateField, TimeField, or DateTimeField
---+
  Reporter:  Lexo  | Owner:  nobody 
 
Status:  closed| Milestone: 
 
 Component:  django.contrib.admin  |   Version:  1.2
 
Resolution:  worksforme|  Keywords:  attributeerror 
module day_abbr strptime datefield datetime datetimefield timefield admin
 Stage:  Unreviewed| Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by Lexo):

 I found the original source of the problem - I had Google's gdata API
 installed, which includes a "calendar".

-- 
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-upda...@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] #13632: lack of builtin range checking of id fields

2010-07-06 Thread Django
#13632: lack of builtin range checking of id fields
---+
  Reporter:  anonymous | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by gregmuellegger):

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

Comment:

 The problem with this is that the ID passed into a generic view doesn't
 need to be an integer. It's also reasonable that a Model has a non-integer
 primary key. So the key from the URL ''must'' be passed to the queryset
 without any type checks - we don't know the type!

 You can still avoid this issue without writing custom code that checks the
 value before passing it into the generic view: Write the url-regexs in
 such a way that they force a valid type. For example:

 {{{
 url(r^/service/docserver/papers/(?P\d{1,6})/
 }}}

 This will throw a 404 for all IDs bigger than 1 000 000.


 So this is generally a '''"wont fix"''' from me.

-- 
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-upda...@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] #12978: Support in syndication framework for CSS stylesheet links

2010-07-06 Thread Django
#12978: Support in syndication framework for CSS stylesheet links
+---
  Reporter:  intrepidweb| Owner:  yuval_a   
 
Status:  new| Milestone:  1.3   
 
 Component:  RSS framework  |   Version:  1.1   
 
Resolution: |  Keywords:  syndication css 
stylesheets
 Stage:  Someday/Maybe  | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  0  |  
+---
Changes (by yuval_a):

  * stage:  Unreviewed => Someday/Maybe

-- 
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-upda...@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] #13900: New admin feature: Delete and replace with existing ocject

2010-07-06 Thread Django
#13900: New admin feature: Delete and replace with existing ocject
---+
  Reporter:  riccardodivirgilio| Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:  admin, delete_view
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by gregmuellegger):

  * keywords:  => admin, delete_view
  * version:  1.2 => SVN
  * component:  Uncategorized => django.contrib.admin

Comment:

 Hi riccardo,

 thank you for your idea - personally I find this interesting and useful.
 But after all its a change that needs discussion before someone invests
 too much time for a feature that isn't going to be integrated. So you
 might want to kick of a discussion in the django-developers mailing list.
 Go to http://groups.google.com/group/django-developers and explain to the
 audience what you want todo and if they agree on its usefullness.

 Gregor

-- 
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-upda...@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] #12975: Docs for contrib.admindocs?

2010-07-06 Thread Django
#12975: Docs for contrib.admindocs?
+---
  Reporter:  jabapyth   | Owner:  nobody  
Status:  new| Milestone:  
 Component:  Documentation  |   Version:  1.1 
Resolution: |  Keywords:  docs, admindocs, api
 Stage:  Accepted   | Has_patch:  0   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Comment (by whiteinge):

 Here are two documentation patches.
 ([http://github.com/whiteinge/django/commits/admindocs Or GitHub for those
 inclined.])

 The first isn't all that related to this ticket, but since I was writing
 about reStructuredText the inconsistent references in the existing docs
 tickled my OCD.

 The second is the actual admindocs documentation patch. I moved the
 existing reference to admindocs in `templates.txt` to it's own document
 and added some stuff. I also reworded a few things in that existing
 section that were inaccurate.

-- 
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-upda...@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] #13900: New admin feature: Delete and replace with existing ocject

2010-07-06 Thread Django
#13900: New admin feature: Delete and replace with existing ocject
--+-
   Reporter:  riccardodivirgilio  |Owner:  nobody
 Status:  new |Milestone:
  Component:  Uncategorized   |  Version:  1.2   
   Keywords:  |Stage:  Unreviewed
  Has_patch:  0   |   Needs_docs:  0 
Needs_tests:  0   |   Needs_better_patch:  0 
--+-
 i would like to edit django.contrib.admin.options.ModelAdmin.delete_view
 and add a helpful feature.

 Instead of deleting all the nested objects, the delete_view could handle 3
 options:

 1. delete all the related objects (current option)[[BR]]
 2. where the foreign key to the current instance is nullable, null or
 delete[[BR]]
 3. replace all the related objects with an other model instance (we can
 make a user choose it with a forms.ModelChoiceField)[[BR]]

 i really would like to contribute to this feature, because i need to do
 this in my admin site, but i'm new, so please help me :)

 bye bye

 about me:
 i'm riccardo di virgilio, i have programmed sprint24.com with django. i
 have learn a lot of things and i think i'm ready to contribute.

-- 
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-upda...@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] #13899: Geolocation Support for GeoDjango admin

2010-07-06 Thread Django
#13899: Geolocation Support for GeoDjango admin
-+--
 Reporter:  taylanpince  |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  GIS  | Version:  1.2   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  1|  
-+--
 This adds geolocation support to GeoDjango admin maps, using the W3C
 Geolocation Standrad and as a fallback, Google Gears. Tested under Firefox
 3.2, Chrome 5 and Safari 5.

 Patch works fine with the default settings, but it might fail if there is
 a custom projection applied. I am not confident enough with OpenLayers to
 make the script more aware of the map's current settings.

 More information on this here: http://taylanpince.com/blog/posts/adding-
 geolocation-support-to-geodjango-admin/

-- 
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-upda...@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] #13871: contrib.admin:list_editable - ForeignKey performance is O(m*n)

2010-07-06 Thread Django
#13871: contrib.admin:list_editable - ForeignKey performance is O(m*n)
---+
  Reporter:  chadc | Owner:  nobody 
   
Status:  new   | Milestone: 
   
 Component:  django.contrib.admin  |   Version:  1.2
   
Resolution:|  Keywords:  list_editable, 
admin, ForeignKey, admin efficiency
 Stage:  Unreviewed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by chadc):

 Hmm. I had just intended to use CachedSelect as a temporary measure -- for
 my own purposes -- until the actual problem is addressed. I included it
 for the sake of anyone else who might be interested in a temporary fix. As
 I mentioned above, Jeremy seemed to indicate that there is some larger
 issue here of which I am not fully aware. I hope that someone with more
 knowledge of the problem might be willing to take a look.

 In any case:

 1. How could you implement additional filtering? I simply use
 formfield_overrides = {models.ForeignKey:{'widget':CachedSelect()}} on any
 AdminForm with an editable ForeignKey. I have no idea how any additional
 filtering could be implemented, so please let me know. Also, would it use
 the same naming convention?

 2. The cache is invalidated when it hits name == 'form-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-upda...@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] #13826: Impossible to create indexes on PostGIS fields

2010-07-06 Thread Django
#13826: Impossible to create indexes on PostGIS fields
-+--
  Reporter:  aneil   | Owner:  jbronn
Status:  assigned| Milestone:
 Component:  GIS |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  1   |  
-+--
Changes (by jbronn):

  * owner:  nobody => jbronn
  * needs_better_patch:  0 => 1
  * status:  new => assigned

Comment:

 I agree this is a problem, but I'm -1 at the patch in it's current form,
 as I'm not sure it's the correct approach.  Apologies for the vague
 feedback, but this is probably a bigger issue that'll need some django-dev
 discussion time.

-- 
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-upda...@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] #13826: Impossible to create indexes on PostGIS fields

2010-07-06 Thread Django
#13826: Impossible to create indexes on PostGIS fields
-+--
  Reporter:  aneil   | Owner:  nobody
Status:  new | Milestone:
 Component:  GIS |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by jbronn):

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

Old description:

> I've included a patch which addresses the request below.  This adds a
> signal, final_post_syncdb which enables adding sql commands after all
> custom sql and indexes and PostGIS columns are created.  The patch is
> with respect to django-trunk
>
> * * *
> Please add a "final_post_syncdb" signal.  See
> http://code.djangoproject.com/ticket/7561.
>
> It is currently not possible to add custom SQL which depends on GeoDjango
> fields.  This is because the custom sql appears before the commands which
> create the PostGIS column.
>
> For example, I'd like to create a multicolumn GiST index on Postgres:
>
> in myapp.models.py:
>
> {{{
> class Location(Model):
>counter = IntegerField()
>point = PointField()
> }}}
>
> in sql/location.sql:
> {{{
> CREATE INDEX idx_location_point_counter ON main_location USING
> GIST(point,counter);
> }}}
>
> results in the error:
> Failed to install custom SQL for main.Location model: column "point" does
> not exist
>
> (Note, that on Postgres, one needs to install contrib/btree_gist.sql to
> enable GiST indexes on integer fields)
>
> {{{./manage.py sqlall main }}} yields:
> {{{
> CREATE TABLE "main_location" (
> "id" serial NOT NULL PRIMARY KEY,
> "counter" integer
> )
> ;
> CREATE INDEX idx_location_point_counter ON main_location USING
> GIST(point,counter);
> SELECT AddGeometryColumn('main_location', 'point', 4326, 'POINT', 2);
> }}}
> The problem is in the last two lines: the sql refers to the point column
> before it's created.
>
> Unfortunately, the post_syncdb signal is no help either, since this is
> also sent before the PostGIS commands are generated.

New description:

 I've included a patch which addresses the request below.  This adds a
 signal, final_post_syncdb which enables adding sql commands after all
 custom sql and indexes and PostGIS columns are created.  The patch is with
 respect to django-trunk

 * * *
 Please add a "final_post_syncdb" signal.  See #7561.

 It is currently not possible to add custom SQL which depends on GeoDjango
 fields.  This is because the custom sql appears before the commands which
 create the PostGIS column.

 For example, I'd like to create a multicolumn GiST index on Postgres:

 in myapp.models.py:

 {{{
 class Location(Model):
counter = IntegerField()
point = PointField()
 }}}

 in sql/location.sql:
 {{{
 CREATE INDEX idx_location_point_counter ON main_location USING
 GIST(point,counter);
 }}}

 results in the error:
 Failed to install custom SQL for main.Location model: column "point" does
 not exist

 (Note, that on Postgres, one needs to install contrib/btree_gist.sql to
 enable GiST indexes on integer fields)

 {{{./manage.py sqlall main }}} yields:
 {{{
 CREATE TABLE "main_location" (
 "id" serial NOT NULL PRIMARY KEY,
 "counter" integer
 )
 ;
 CREATE INDEX idx_location_point_counter ON main_location USING
 GIST(point,counter);
 SELECT AddGeometryColumn('main_location', 'point', 4326, 'POINT', 2);
 }}}
 The problem is in the last two lines: the sql refers to the point column
 before it's created.

 Unfortunately, the post_syncdb signal is no help either, since this is
 also sent before the PostGIS commands are generated.

-- 
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-upda...@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] #13868: Inability to create superuser during syncdb when using GIS fields in AUTH_PROFILE_MODULE

2010-07-06 Thread Django
#13868: Inability to create superuser during syncdb when using GIS fields in
AUTH_PROFILE_MODULE
-+--
  Reporter:  jskitz  | Owner:  jbronn
Status:  closed  | Milestone:
 Component:  GIS |   Version:  1.2   
Resolution:  duplicate   |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by jbronn):

  * status:  assigned => closed
  * resolution:  => duplicate

Comment:

 Actually, this ticket is a duplicate of #13826 because it's the same root
 issue.

-- 
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-upda...@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] #13868: Inability to create superuser during syncdb when using GIS fields in AUTH_PROFILE_MODULE

2010-07-06 Thread Django
#13868: Inability to create superuser during syncdb when using GIS fields in
AUTH_PROFILE_MODULE
-+--
  Reporter:  jskitz  | Owner:  jbronn
Status:  assigned| Milestone:
 Component:  GIS |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by jbronn):

 See also #7561.

-- 
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-upda...@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] #13868: Inability to create superuser during syncdb when using GIS fields in AUTH_PROFILE_MODULE

2010-07-06 Thread Django
#13868: Inability to create superuser during syncdb when using GIS fields in
AUTH_PROFILE_MODULE
-+--
  Reporter:  jskitz  | Owner:  jbronn
Status:  assigned| Milestone:
 Component:  GIS |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by jbronn):

  * owner:  nobody => jbronn
  * status:  new => assigned

Comment:

 I'll accept the ticket for now, but I'm not sure if there will be a patch
 acceptable for this edge-case scenario that has an easy work-around (run
 `syncdb` first, and create the superuser afterwards):
 {{{
 $ ./manage.py syncdb --noinput
 $ ./manage.py createsuperuser
 }}}

 From my brief review, the only way to fix this would be to change when the
 `post_syncdb` is emitted, as it is done before the index creation SQL
 (which is now where the `AddGeometryColumn` SQL is actually generated).
 The side-effects of this 'fix' could be far-reaching have many backwards-
 incompatible consequences, so for now I would recommend the workaround
 given above.

-- 
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-upda...@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] #13898: Printing in China

2010-07-06 Thread Django
#13898: Printing in China
---+
 Reporter:  Printing in China  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Shenzhen Taijie Packaging Printing Factory, are located in Shenzhen,
 China. We have more than 10 years experiences in Packaging [http://www
 .china-printing.org/ Printing in

 China]; Our factory plant covers 3600 square meters and fixed asset is 18
 million RMB, the factory was founded in Jan 5, 1990 and put into operation
 in Feb28 , 1990 and we

 provide best service , with the development we introduced advanced
 equipments and technology , the business scope is also widened from design
 before printing ,professional

 printing to further process and our advantageous printing products
 including children books printing, packaging boxes printing, calendars,
 mock-up cards, etc., We've becoming

 one of the largest and most professional printing and packing group on
 large scale in China and operate internationally.

-- 
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-upda...@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] #13883: SelectBox.js with grouping (optgroup elements)

2010-07-06 Thread Django
#13883: SelectBox.js with grouping (optgroup elements)
---+
  Reporter:  SardarNL  | Owner:  nobody 
   
Status:  new   | Milestone: 
   
 Component:  django.contrib.admin  |   Version:  1.2
   
Resolution:|  Keywords:  admin, SelectBox, 
optgroup
 Stage:  Unreviewed| Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by SardarNL):

  * needs_better_patch:  => 0
  * component:  Contrib apps => django.contrib.admin
  * 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-upda...@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] #11350: Support "local flavor" for Israel

2010-07-06 Thread Django
#11350: Support "local flavor" for Israel
-+--
  Reporter:  yuval_a | Owner:  yuval_a  
  
Status:  reopened| Milestone:  1.3  
  
 Component:  django.contrib.localflavor  |   Version:  SVN  
  
Resolution:  |  Keywords:  local flavor 
israel
 Stage:  Accepted| Has_patch:  1
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  0   |  
-+--
Changes (by yuval_a):

  * needs_better_patch:  1 => 0
  * has_patch:  0 => 1
  * needs_docs:  1 => 0
  * milestone:  => 1.3

-- 
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-upda...@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] #12978: Support in syndication framework for CSS stylesheet links

2010-07-06 Thread Django
#12978: Support in syndication framework for CSS stylesheet links
+---
  Reporter:  intrepidweb| Owner:  yuval_a   
 
Status:  new| Milestone:  1.3   
 
 Component:  RSS framework  |   Version:  1.1   
 
Resolution: |  Keywords:  syndication css 
stylesheets
 Stage:  Unreviewed | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  0  |  
+---
Changes (by yuval_a):

  * needs_docs:  1 => 0
  * needs_tests:  1 => 0
  * stage:  Someday/Maybe => Unreviewed

-- 
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-upda...@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] #13897: There should be tests for object_list's pagination

2010-07-06 Thread Django
#13897: There should be tests for object_list's pagination
---+
 Reporter:  julien |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Generic views  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 As discussed on the dev-list (http://groups.google.com/group/django-
 developers/browse_thread/thread/629df2bddea57b7d) there currently are no
 tests for the object_list generic view's pagination functionality. The
 paginator is tested but only on its own.
 There should be tests for it as it's probably used in many Django
 websites.

-- 
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-upda...@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] #13896: Change language to dynamic attribute in syndication feed generator

2010-07-06 Thread Django
#13896: Change language to dynamic attribute in syndication feed generator
---+
 Reporter:  jedie  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  RSS framework  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 In my project, the language is dynamic and not hardcoded in settings. IMHO
 there is no way to change the language in syndication feed generator
 without a hack.

 Change language to dynamic attribute in syndication feed generator:
 {{{
 #!diff
 Index: django/contrib/syndication/views.py
 ===
 --- django/contrib/syndication/views.py (revision 13426)
 +++ django/contrib/syndication/views.py (working copy)
 @@ -104,7 +104,7 @@
  subtitle = self.__get_dynamic_attr('subtitle', obj),
  link = link,
  description = self.__get_dynamic_attr('description', obj),
 -language = settings.LANGUAGE_CODE.decode(),
 +language=self.__get_dynamic_attr('language', obj,
 settings.LANGUAGE_CODE.decode()),
  feed_url = add_domain(current_site.domain,
  self.__get_dynamic_attr('feed_url', obj) or
 request.path),
  author_name = self.__get_dynamic_attr('author_name', obj),
 }}}

-- 
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-upda...@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.