Re: [Django] #12373: Add keepdb option to test command

2009-12-13 Thread Django
#12373: Add keepdb option to test command
+---
  Reporter:  phuihock   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution:  wontfix|  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by phuihock):

 Would you be kind enough to point me to the right direction where the test
 database is flushed at the start of each test?

 AFAIK, the only time the test db is flushed is when all tests are run, in
 django.test.simple.run_tests(). I commented
 {{{os.remove(test_database_name)}}} from
 django/db/backends/sqlite3/creation.py and ran the unit tests (manage.py
 test auth sites sessions). All test data are retained in the test db.

 I reckon that test data should be setup in a way that is independent of
 the previous tests. I find it useful to inspect the test db as part of the
 debug process when test cases fail.

-- 
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] #12374: QuerySet .iterator() loads everything into memory anyway

2009-12-13 Thread Django
#12374: QuerySet .iterator() loads everything into memory anyway
---+
  Reporter:  Nick Welch   | Owner:  nobody 
 
Status:  closed| Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  1.1
 
Resolution:  worksforme|  Keywords:  orm, 
cache, iterator
 Stage:  Unreviewed| Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by Nick Welch ):

 Argh, maybe it is psycopg2.

 http://www.velocityreviews.com/forums/t649192-psycopg2-and-large-
 queries.html

-- 
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] #12374: QuerySet .iterator() loads everything into memory anyway

2009-12-13 Thread Django
#12374: QuerySet .iterator() loads everything into memory anyway
---+
  Reporter:  Nick Welch   | Owner:  nobody 
 
Status:  closed| Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  1.1
 
Resolution:  worksforme|  Keywords:  orm, 
cache, iterator
 Stage:  Unreviewed| Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 The author there identifies the issue as being the mysql query cache (in
 mysqldb I imagine).  There's nothing we can do about that, when you use
 .iterator() django doesn't cache the data.

-- 
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] #12374: QuerySet .iterator() loads everything into memory anyway

2009-12-13 Thread Django
#12374: QuerySet .iterator() loads everything into memory anyway
--+-
 Reporter:  Nick Welch   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1   
 Keywords:  orm, cache, iterator  |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Iterating through the result of .iterator() still causes a huge spike in
 memory consumption.  In contrast, loading only one record with [:1] does
 not.

 Others have run into this problem:

 http://stackoverflow.com/questions/1443279/django-iterate-over-a-query-
 set-without-cache

 Notice his follow-up comment to the suggestion of using .iterator():

 "Its still chewing through a ton of RAM when I use your call. :("

 This has been my experience as well.

-- 
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] #12373: Add keepdb option to test command

2009-12-13 Thread Django
#12373: Add keepdb option to test command
+---
  Reporter:  phuihock   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution:  wontfix|  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 I'm going to mark this wontfix, because it wont work anywhere near to how
 you probably expect it to work:

  1) If you have N tests, you won't be able to get any useful information
 from the state of the database for tests 1 to N-1. The test database is
 flushed at the start of each test, so preserving the test database at the
 end of the test run will only show you the state of the database at the
 end of the very last test.
  2) If you're using a Django test case, you won't even be able to get
 useful database state information out of the very last test, either. The
 teardown for a Django test case does a transaction rollback, so at the end
 of the test run, the database is empty.

 So, --keepdb would only be useful for the very last test, if and only if
 that test is a doctest, raw unit test, or TransactionTestCase. Given how
 difficult it is to explain the limited cases where this option actually
 will do something useful, I'm not especially inclined to include it in
 trunk.

-- 
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] #12373: Add keepdb option to test command

2009-12-13 Thread Django
#12373: Add keepdb option to test command
---+
 Reporter:  phuihock   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Testing framework  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 Allow user to keep the test database after running all the test cases for
 later inspection.

-- 
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] #6799: Update to truncate words methods to make them more callable

2009-12-13 Thread Django
#6799: Update to truncate words methods to make them more callable
+---
  Reporter:  bret   | Owner:  adamfast
Status:  assigned   | Milestone:  1.2 
 Component:  Contrib apps   |   Version:  SVN 
Resolution: |  Keywords:  
 Stage:  Ready for checkin  | Has_patch:  1   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * stage:  Accepted => 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-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] #6432: select_related() should also follow ManyToMany fields

2009-12-13 Thread Django
#6432: select_related() should also follow ManyToMany fields
-+--
  Reporter:  Bastian Kleineidam   | Owner:  
nobody
Status:  closed  | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  
SVN   
Resolution:  wontfix |  Keywords:  
m2m queryset-refactor perf
 Stage:  Someday/Maybe   | Has_patch:  
0 
Needs_docs:  0   |   Needs_tests:  
0 
Needs_better_patch:  0   |  
-+--
Changes (by jdunck):

  * keywords:  m2m queryset-refactor => m2m queryset-refactor perf

-- 
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] #11753: Q objects using callables won't combine in 2.4

2009-12-13 Thread Django
#11753: Q objects using callables won't combine in 2.4
---+
  Reporter:  alexr | Owner:   
Status:  new   | Milestone:   
 Component:  Database layer (models, ORM)  |   Version:  1.1  
Resolution:|  Keywords:  Q, mq
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by jdunck):

  * keywords:  Q => Q, mq

Comment:

 Attached patch from Alex Robbins, thanks.

-- 
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] #12372: passing ip to django.contrib.auth.views.password_reset email template

2009-12-13 Thread Django
#12372: passing ip to django.contrib.auth.views.password_reset email template
+---
 Reporter:  lashni  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Authentication  | Version:  SVN   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 It's pretty much a standard that all password reset verification emails
 contain the IP address of the person requesting the reset but I couldn't
 find a simple way to pass request to the email template used with
 ''django.contrib.auth.views.password_reset''.

 urls.py:
 {{{
 urlpatterns = patterns('django.contrib.auth',
 (r'^reset/$', 'views.password_reset', {
 'template_name': 'users/reset/form.html',
 'email_template_name': 'users/reset/email.html',
 'post_reset_redirect': 'done/',
 }),
 )
 }}}

 Enabling ''django.core.context_processors.request'' in my settings let me
 reference request within form.html but not within the email.html template.
 I raised the issue in [http://groups.google.com/group/django-
 users/browse_thread/thread/1a1645db49fdd1c7?hl=en. this thread] on django-
 users and Daniel Roseman pointed out that the email sending and creation
 is done in the save method of the !PasswordResetForm and request does not
 get passed.

 A patch is attached which successfully allowed me to reference
 ''request.META.REMOTE_ADDR'' in the email template but at the moment I'm
 fairly clueless when it comes to the django internals so I'd appreciate
 advice.

-- 
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] #12367: Test suite raises deprecation warning for URLConf using admin.site.root.

2009-12-13 Thread Django
#12367: Test suite raises deprecation warning for URLConf using admin.site.root.
+---
  Reporter:  jcd| Owner:  jcd
Status:  new| Milestone:  1.2
 Component:  Testing framework  |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Accepted   | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by Travis Cline ):

  * needs_better_patch:  => 0
  * has_patch:  0 => 1
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Attached a patch that updates the urlconfs, not sure if there's value in
 testing .root

-- 
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] #6799: Update to truncate words methods to make them more callable

2009-12-13 Thread Django
#6799: Update to truncate words methods to make them more callable
---+
  Reporter:  bret  | Owner:  adamfast
Status:  assigned  | Milestone:  1.2 
 Component:  Contrib apps  |   Version:  SVN 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by Travis Cline ):

  * needs_better_patch:  1 => 0

Comment:

 Added Chris' suggestion, moved to unittest.

-- 
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] #9407: The testModerationQueueContents test case does not work on databases without a microsecond precision datetime data type

2009-12-13 Thread Django
#9407: The testModerationQueueContents test case does not work on databases
without a microsecond precision datetime data type
---+
  Reporter:  egenix_viktor | Owner:  nobody 

Status:  closed| Milestone:  1.2

 Component:  Database layer (models, ORM)  |   Version:  1.0

Resolution:  invalid   |  Keywords:  MSSQL 
microsecond datetime ordering
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by Travis Cline ):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 The offending test was removed in r11639. Marking as invalid

-- 
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] #7235: filtering on an EmptyQuerySet raises an Exception

2009-12-13 Thread Django
#7235: filtering on an EmptyQuerySet raises an Exception
---+
  Reporter:  anonymous | Owner:  aljosa 
 
Status:  new   | Milestone:  1.2
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  
qsrf-cleanup query,emptyqueryset
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  1  
 
Needs_better_patch:  0 |  
---+
Changes (by Travis Cline ):

  * 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-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] #12105: Admin querystring __isnull=False filter doesn't work

2009-12-13 Thread Django
#12105: Admin querystring __isnull=False filter doesn't work
---+
  Reporter:  marcob| Owner:  mikepenn 
Status:  new   | Milestone:  1.2  
 Component:  django.contrib.admin  |   Version:  1.1  
Resolution:|  Keywords:  isnull filter
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by Travis Cline ):

  * needs_better_patch:  1 => 0
  * needs_tests:  1 => 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] #12233: Redirect logged in user

2009-12-13 Thread Django
#12233: Redirect logged in user
+---
  Reporter:  dmathieu   | Owner:  nobody  
Status:  new| Milestone:  
 Component:  Authentication |   Version:  1.1 
Resolution: |  Keywords:  authentication,login
 Stage:  Ready for checkin  | Has_patch:  1   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Comment (by nieproszenieja):

 I agree with dmathieu - authenticated user shouldn't be able to see the
 login form. But in opposite to the given patch, I think that redirection
 should be mandatory (and as simple as possible, while this is the default
 authentication system) - in default case, user should be redirected to
 LOGIN_REDIRECT_URL (or if not set, to accounts/profile).

 ===
 Implementation:

 if request.user.is_authenticated():
   return HttpResponseRedirect(LOGIN_REDIRECT_URL)

 + in the documentation one simple information - If authenticated user
 tries to access to the login view, it will be redirected to
 LOGIN_REDIRECT_URL.

 I think it will be enough for a default authentication system.
 ==

 P.S. What is the status of the patch? Will it be included in next
 releases?

-- 
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] #12224: psycopg2 raises "can't adapt" when use gettext extensions on model meta permissions field.

2009-12-13 Thread Django
#12224: psycopg2 raises "can't adapt" when use gettext extensions on model meta
permissions field.
---+
  Reporter:  chronos   | Owner:  chronos

Status:  new   | Milestone:  1.2

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  psycopg2, 
permissions, i18n, gettext, "can't adapt", syncdb
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

Needs_better_patch:  0 |  
---+
Comment (by chronos):

 I little doubt about this ticket ( I not have more time to work on ).
 This 'fix' save string in unicode in database, that's ok, but we need a
 change on interfaces that show this string from DB (contrib.auth views for
 admin for now) to show translated strings (by ugettext) or a real fix
 using a new 'data type' in psycopg2 backend.

 Some of two options can be considered? Which could be the guidelines?

-- 
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] #9589: development server stops on SyntaxError or other Exceptions

2009-12-13 Thread Django
#9589: development server stops on SyntaxError or other Exceptions
+---
  Reporter:  eibaan | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  django-admin.py runserver  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Design decision needed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Glenn):

  * status:  closed => reopened
  * version:  1.0 => 1.1
  * resolution:  wontfix =>

Comment:

 No response in over a month, and my inquiry on django-dev was ignored, so
 I'm reopening this.  The reason for closing it made no sense.  If you
 reclose it, please do those of us who have spent time fixing this the
 courtesy of giving a meaningful explanation, and not just pointing to a
 reason that's six months irrelevant which multiple other people have long
 since corrected.

-- 
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] #12339: ContentType update could cascade deletes to generic foreign keys, causing data loss

2009-12-13 Thread Django
#12339: ContentType update could cascade deletes to generic foreign keys, 
causing
data loss
---+
  Reporter:  kcarnold  | Owner:  nobody 
 
Status:  reopened  | Milestone: 
 
 Component:  Contrib apps  |   Version:  1.1
 
Resolution:|  Keywords:  contenttype, delete, 
cascade
 Stage:  Unreviewed| Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by kcarnold):

 As far as I'm concerned, removing the "delete" line (keeping the verbose
 note about stale content types) fixes this bug. The rest of this comment
 is just about the extra next step, which is to restore convenience in the
 cases where the previous behavior was desirable--though it might be better
 to just wait until migrations are merged to do that.

 If there were a way to tell that a {{{.delete()}}} would cascade before
 you do it, like the admin does (race conditions aside), a confirmation
 message might be: "{{{The model named %s (ContentType id %d) was removed,
 but other objects refer to it. Do you want to delete those objects also?
 [y/N] }}}" And of course there should be an option to proceed non-
 interactively, which would just report the stale {{{ContentType}}} ids
 without deleting them.

 Do any tests delete models? If not, a confirmation shouldn't disrupt
 tests.

 btw, the code in question was added in [6287].

-- 
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] #12224: psycopg2 raises "can't adapt" when use gettext extensions on model meta permissions field.

2009-12-13 Thread Django
#12224: psycopg2 raises "can't adapt" when use gettext extensions on model meta
permissions field.
---+
  Reporter:  chronos   | Owner:  chronos

Status:  new   | Milestone:  1.2

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  psycopg2, 
permissions, i18n, gettext, "can't adapt", syncdb
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

Needs_better_patch:  0 |  
---+
Changes (by cscortes):

  * needs_better_patch:  1 => 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] #6298: Include sample settings file(s) to run django unit tests i.e. make running unit tests easier

2009-12-13 Thread Django
#6298: Include sample settings file(s) to run django unit tests i.e. make 
running
unit tests easier
-+--
  Reporter:  cur...@oddpost.com  | Owner:  kmtracey
Status:  new | Milestone:  1.2 
 Component:  Testing framework   |   Version:  SVN 
Resolution:  |  Keywords:  
 Stage:  Accepted| Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by tobias):

  * owner:  tobias => kmtracey
  * status:  assigned => new

Comment:

 Here's a much smaller patch w/corresponding doc changes.  Hopefully this
 is a good compromise b/t the original intent of this ticket (make it
 easier to test w/sqlite) and Jacob & Alex's wishes to do this entirely in
 documentation.

-- 
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] #4976: The contrib.humanize templatetags fail when given None.

2009-12-13 Thread Django
#4976: The contrib.humanize templatetags fail when given None.
---+
  Reporter:  anonymous | Owner:  alexr
Status:  new   | Milestone:   
 Component:  Contrib apps  |   Version:  SVN  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * owner:  nobody => alexr

-- 
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] #10786: Missing Documentation for new BooleanField limitation

2009-12-13 Thread Django
#10786: Missing Documentation for new BooleanField limitation
-+--
  Reporter:  robingreen  | Owner:  sbj3
Status:  new | Milestone:  
 Component:  Core framework  |   Version:  1.0 
Resolution:  |  Keywords:  
 Stage:  Accepted| Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by sbj3):

  * owner:  nobody => sbj3
  * needs_docs:  1 => 0
  * has_patch:  0 => 1
  * status:  reopened => new

-- 
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] #10878: Comments moderation.py docstring error

2009-12-13 Thread Django
#10878: Comments moderation.py docstring error
--+-
  Reporter:  lucalenardi  | Owner:  ubernostrum
Status:  assigned | Milestone:  1.2
 Component:  django.contrib.comments  |   Version:  1.1-beta-1 
Resolution:   |  Keywords: 
 Stage:  Accepted | Has_patch:  1  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Changes (by Travis Cline ):

  * has_patch:  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-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] #9475: add(), create(), etc. should be supported by intermedite ManyToMany model with extra attributes if extra fields can be calculated

2009-12-13 Thread Django
#9475: add(), create(), etc. should be supported by intermedite ManyToMany model
with extra attributes if extra fields can be calculated
---+
  Reporter:  o...@gezgin.com   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Comment (by Travis Cline ):

 Attached is an alternate approach. Will also attach a similar approach but
 with an attempt to fall back to a reasonable default.

-- 
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] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2009-12-13 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by glassresistor):

  * owner:  glassresistor => nobody
  * needs_better_patch:  0 => 1
  * has_patch:  0 => 1
  * needs_tests:  0 => 1
  * needs_docs:  0 => 1

Comment:

 To fix this problem I had to create a new BaseCommand extension so that
 unlike AppCommand CrossAppCommand looks at all of the models in the
 project so the table references across multiple apps will have sane
 outputs which can be piped into an sql database.

-- 
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] #10828: deleting all forms within a formset is not possible

2009-12-13 Thread Django
#10828: deleting all forms within a formset is not possible
---+
  Reporter:  patrickk  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Forms |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by copelco):

  * needs_docs:  0 => 1
  * has_patch:  0 => 1

Comment:

 Some changes may still be required, like docs, but I'll put this up for
 review to see if it's at least going in the right direction.

-- 
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] r11859 - in django/branches/releases/1.1.X: . django/contrib/localflavor/us tests/regressiontests tests/regressiontests/localflavor

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 16:08:03 -0600 (Sun, 13 Dec 2009)
New Revision: 11859

Added:
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/__init__.py
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/forms.py
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/models.py
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/tests.py
Removed:
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/__init__.py
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/forms.py
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/models.py
   django/branches/releases/1.1.X/tests/regressiontests/localflavor/tests.py
Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/AUTHORS
   django/branches/releases/1.1.X/django/contrib/localflavor/us/models.py
Log:
[1.1.X] Fixed #10969: Made US State field a CharField, fixing a few oddities in 
its behavior. Thanks Paul McLanahan.

r11847 from trunk.




Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11808,11815,11817,11822,11826,11833,11835,11837,11839,11841,11844
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11808,11815,11817,11822,11826,11833,11835,11837,11839,11841,11844,11857

Modified: django/branches/releases/1.1.X/AUTHORS
===
--- django/branches/releases/1.1.X/AUTHORS  2009-12-13 22:00:26 UTC (rev 
11858)
+++ django/branches/releases/1.1.X/AUTHORS  2009-12-13 22:08:03 UTC (rev 
11859)
@@ -300,6 +300,7 @@
 Jason McBrayer 
 Kevin McConnell 
 mccutc...@gmail.com
+Paul McLanahan 
 Christian Metts
 michael.mce...@gmail.com
 mic...@plovarna.cz

Modified: django/branches/releases/1.1.X/django/contrib/localflavor/us/models.py
===
--- django/branches/releases/1.1.X/django/contrib/localflavor/us/models.py  
2009-12-13 22:00:26 UTC (rev 11858)
+++ django/branches/releases/1.1.X/django/contrib/localflavor/us/models.py  
2009-12-13 22:08:03 UTC (rev 11859)
@@ -1,23 +1,14 @@
 from django.conf import settings
-from django.db.models.fields import Field
-
-class USStateField(Field): 
+from django.db.models.fields import Field, CharField
+from django.contrib.localflavor.us.us_states import STATE_CHOICES
+  
+class USStateField(CharField):
 """U.S. state (two uppercase letters)"""
-def get_internal_type(self): 
-return "USStateField" 
-
-def db_type(self):
-if settings.DATABASE_ENGINE == 'oracle':
-return 'CHAR(2)'
-else:
-return 'varchar(2)'
-
-def formfield(self, **kwargs): 
-from django.contrib.localflavor.us.forms import USStateSelect 
-defaults = {'widget': USStateSelect} 
-defaults.update(kwargs) 
-return super(USStateField, self).formfield(**defaults)
-
+def __init__(self, *args, **kwargs):
+kwargs['choices'] = STATE_CHOICES
+kwargs['max_length'] = 2
+super(USStateField, self).__init__(*args, **kwargs)
+  
 class PhoneNumberField(Field):
 """Phone number"""
 def get_internal_type(self):

Copied: django/branches/releases/1.1.X/tests/regressiontests/localflavor (from 
rev 11857, django/trunk/tests/regressiontests/localflavor)

Deleted: 
django/branches/releases/1.1.X/tests/regressiontests/localflavor/__init__.py
===

Copied: 
django/branches/releases/1.1.X/tests/regressiontests/localflavor/__init__.py 
(from rev 11857, django/trunk/tests/regressiontests/localflavor/__init__.py)
===

Deleted: 
django/branches/releases/1.1.X/tests/regressiontests/localflavor/forms.py
===
--- django/trunk/tests/regressiontests/localflavor/forms.py 2009-12-13 
21:56:18 UTC (rev 11857)
+++ django/branches/releases/1.1.X/tests/regressiontests/localflavor/forms.py   
2009-12-13 22:08:03 UTC (rev 11859)
@@ -1,14 +0,0 @@
-from d

[Changeset] r11857 - in django/trunk: . django/contrib/localflavor/us tests/regressiontests tests/regressiontests/localflavor

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 15:56:18 -0600 (Sun, 13 Dec 2009)
New Revision: 11857

Added:
   django/trunk/tests/regressiontests/localflavor/
   django/trunk/tests/regressiontests/localflavor/__init__.py
   django/trunk/tests/regressiontests/localflavor/forms.py
   django/trunk/tests/regressiontests/localflavor/models.py
   django/trunk/tests/regressiontests/localflavor/tests.py
Modified:
   django/trunk/AUTHORS
   django/trunk/django/contrib/localflavor/us/models.py
Log:
Fixed #10969: Made US State field a CharField, fixing a few oddities in its 
behavior.  Thanks Paul McLanahan.



Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2009-12-13 21:39:46 UTC (rev 11856)
+++ django/trunk/AUTHORS2009-12-13 21:56:18 UTC (rev 11857)
@@ -303,6 +303,7 @@
 Jason McBrayer 
 Kevin McConnell 
 mccutc...@gmail.com
+Paul McLanahan 
 Tobias McNulty 
 Christian Metts
 michael.mce...@gmail.com

Modified: django/trunk/django/contrib/localflavor/us/models.py
===
--- django/trunk/django/contrib/localflavor/us/models.py2009-12-13 
21:39:46 UTC (rev 11856)
+++ django/trunk/django/contrib/localflavor/us/models.py2009-12-13 
21:56:18 UTC (rev 11857)
@@ -1,23 +1,14 @@
 from django.conf import settings
-from django.db.models.fields import Field
-
-class USStateField(Field): 
+from django.db.models.fields import Field, CharField
+from django.contrib.localflavor.us.us_states import STATE_CHOICES
+  
+class USStateField(CharField):
 """U.S. state (two uppercase letters)"""
-def get_internal_type(self): 
-return "USStateField" 
-
-def db_type(self):
-if settings.DATABASE_ENGINE == 'oracle':
-return 'CHAR(2)'
-else:
-return 'varchar(2)'
-
-def formfield(self, **kwargs): 
-from django.contrib.localflavor.us.forms import USStateSelect 
-defaults = {'widget': USStateSelect} 
-defaults.update(kwargs) 
-return super(USStateField, self).formfield(**defaults)
-
+def __init__(self, *args, **kwargs):
+kwargs['choices'] = STATE_CHOICES
+kwargs['max_length'] = 2
+super(USStateField, self).__init__(*args, **kwargs)
+  
 class PhoneNumberField(Field):
 """Phone number"""
 def get_internal_type(self):

Added: django/trunk/tests/regressiontests/localflavor/__init__.py
===


Property changes on: django/trunk/tests/regressiontests/localflavor/__init__.py
___
Name: svn:eol-style
   + native

Added: django/trunk/tests/regressiontests/localflavor/forms.py
===
--- django/trunk/tests/regressiontests/localflavor/forms.py 
(rev 0)
+++ django/trunk/tests/regressiontests/localflavor/forms.py 2009-12-13 
21:56:18 UTC (rev 11857)
@@ -0,0 +1,14 @@
+from django.forms import ModelForm
+from models import Place
+
+class PlaceForm(ModelForm):
+"""docstring for PlaceForm"""
+class Meta:
+model = Place
+from django.forms import ModelForm
+from models import Place
+
+class PlaceForm(ModelForm):
+"""docstring for PlaceForm"""
+class Meta:
+model = Place


Property changes on: django/trunk/tests/regressiontests/localflavor/forms.py
___
Name: svn:eol-style
   + native

Added: django/trunk/tests/regressiontests/localflavor/models.py
===
--- django/trunk/tests/regressiontests/localflavor/models.py
(rev 0)
+++ django/trunk/tests/regressiontests/localflavor/models.py2009-12-13 
21:56:18 UTC (rev 11857)
@@ -0,0 +1,16 @@
+from django.db import models
+from django.contrib.localflavor.us.models import USStateField
+
+class Place(models.Model):
+state = USStateField(blank=True)
+state_req = USStateField()
+state_default = USStateField(default="CA", blank=True)
+name = models.CharField(max_length=20)
+from django.db import models
+from django.contrib.localflavor.us.models import USStateField
+
+class Place(models.Model):
+state = USStateField(blank=True)
+state_req = USStateField()
+state_default = USStateField(default="CA", blank=True)
+name = models.CharField(max_length=20)


Property changes on: django/trunk/tests/regressiontests/localflavor/models.py
___
Name: svn:eol-style
   + native

Added: django/trunk/tests/regressiontests/localflavor/tests.py
===
--- django/trunk/tests/regressiontests/localflavor/tests.py   

[Changeset] r11856 - in django/branches/soc2009/model-validation: django/db/models tests/modeltests/validation

2009-12-13 Thread noreply
Author: Honza_Kral
Date: 2009-12-13 15:39:46 -0600 (Sun, 13 Dec 2009)
New Revision: 11856

Modified:
   django/branches/soc2009/model-validation/django/db/models/base.py
   
django/branches/soc2009/model-validation/tests/modeltests/validation/test_unique.py
   django/branches/soc2009/model-validation/tests/modeltests/validation/tests.py
Log:
[soc2009/model-validation] Fixed #12132: unneccessary unique_check for primary 
key when not adding model

Modified: django/branches/soc2009/model-validation/django/db/models/base.py
===
--- django/branches/soc2009/model-validation/django/db/models/base.py   
2009-12-13 20:35:06 UTC (rev 11855)
+++ django/branches/soc2009/model-validation/django/db/models/base.py   
2009-12-13 21:39:46 UTC (rev 11856)
@@ -678,7 +678,11 @@
 f = self._meta.get_field(field_name)
 lookup_value = getattr(self, f.attname)
 if f.null and lookup_value is None:
+# no value, skip the lookup
 continue
+if f.primary_key and not getattr(self, '_adding', False):
+# no need to check for unique primary key when editting 
+continue
 lookup_kwargs[str(field_name)] = lookup_value
 
 # some fields were skipped, no reason to do the check

Modified: 
django/branches/soc2009/model-validation/tests/modeltests/validation/test_unique.py
===
--- 
django/branches/soc2009/model-validation/tests/modeltests/validation/test_unique.py
 2009-12-13 20:35:06 UTC (rev 11855)
+++ 
django/branches/soc2009/model-validation/tests/modeltests/validation/test_unique.py
 2009-12-13 21:39:46 UTC (rev 11856)
@@ -1,7 +1,10 @@
 import unittest
 
-from models import CustomPKModel, UniqueTogetherModel, UniqueFieldsModel, 
UniqueForDateModel
+from django.conf import settings
+from django.db import connection
 
+from models import CustomPKModel, UniqueTogetherModel, UniqueFieldsModel, 
UniqueForDateModel, ModelToValidate
+
 class GetUniqueCheckTests(unittest.TestCase):
 def test_unique_fields_get_collected(self):
 m = UniqueFieldsModel()
@@ -24,4 +27,26 @@
 )
 
 
+class PerformUniqueChecksTest(unittest.TestCase):
+def setUp(self):
+self._old_debug, settings.DEBUG = settings.DEBUG, True
+super(PerformUniqueChecksTest, self).setUp()
 
+def tearDown(self):
+settings.DEBUG = self._old_debug
+super(PerformUniqueChecksTest, self).tearDown()
+
+def test_primary_key_unique_check_performed_when_adding(self):
+"Check#12132"
+l = len(connection.queries)
+mtv = ModelToValidate(number=10, name='Some Name')
+setattr(mtv, '_adding', True)
+mtv.clean()
+self.assertEqual(l+1, len(connection.queries))
+
+def test_primary_key_unique_check_not_performed_when_not_adding(self):
+"Check#12132"
+l = len(connection.queries)
+mtv = ModelToValidate(number=10, name='Some Name')
+mtv.clean()
+self.assertEqual(l, len(connection.queries))

Modified: 
django/branches/soc2009/model-validation/tests/modeltests/validation/tests.py
===
--- 
django/branches/soc2009/model-validation/tests/modeltests/validation/tests.py   
2009-12-13 20:35:06 UTC (rev 11855)
+++ 
django/branches/soc2009/model-validation/tests/modeltests/validation/tests.py   
2009-12-13 21:39:46 UTC (rev 11856)
@@ -5,7 +5,7 @@
 from models import *
 
 from validators import TestModelsWithValidators
-from test_unique import GetUniqueCheckTests
+from test_unique import GetUniqueCheckTests, PerformUniqueChecksTest
 from test_custom_messages import CustomMessagesTest
 
 class BaseModelValidationTests(ValidationTestCase):

--

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] #12364: CTRL-C could be caught by the TestRunner to display any failures found so far

2009-12-13 Thread Django
#12364: CTRL-C could be caught by the TestRunner to display any failures found 
so
far
+---
  Reporter:  rpbarlow   | Owner:  kmtracey  
 
Status:  new| Milestone:  1.2   
 
 Component:  Testing framework  |   Version:  SVN   
 
Resolution: |  Keywords:  CTRL-C interrupt 
signal
 Stage:  Ready for checkin  | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  0  |  
+---
Changes (by rpbarlow):

  * version:  1.1 => SVN

-- 
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] #8426: Wrap help_text in "", like errors in "" in HTML output

2009-12-13 Thread Django
#8426: Wrap help_text in "", like errors in "" in HTML output
---+
  Reporter:  erikcw| Owner:  kmtracey 
Status:  new   | Milestone:  1.2  
 Component:  Forms |   Version:  SVN  
Resolution:|  Keywords:  help_text, as_p, as_ul, forms
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by rpbarlow):

  * owner:  rpbarlow => kmtracey
  * needs_better_patch:  1 => 0
  * status:  assigned => new

Comment:

 Hey Karen, this one's ready to go in!

-- 
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] #8426: Wrap help_text in "", like errors in "" in HTML output

2009-12-13 Thread Django
#8426: Wrap help_text in "", like errors in "" in HTML output
---+
  Reporter:  erikcw| Owner:  rpbarlow 
Status:  assigned  | Milestone:  1.2  
 Component:  Forms |   Version:  SVN  
Resolution:|  Keywords:  help_text, as_p, as_ul, forms
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  1 |  
---+
Changes (by rpbarlow):

  * needs_better_patch:  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-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] #8426: Wrap help_text in "", like errors in "" in HTML output

2009-12-13 Thread Django
#8426: Wrap help_text in "", like errors in "" in HTML output
---+
  Reporter:  erikcw| Owner:  rpbarlow 
Status:  assigned  | Milestone:  1.2  
 Component:  Forms |   Version:  SVN  
Resolution:|  Keywords:  help_text, as_p, as_ul, forms
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by rpbarlow):

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

-- 
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] #3569: extend Atom feed support for other fields

2009-12-13 Thread Django
#3569: extend Atom feed support for other fields
--+-
  Reporter:  jtau...@jtauber.com  | Owner:  kgrandis
Status:  assigned | Milestone:  1.2 
 Component:  RSS framework|   Version:  SVN 
Resolution:   |  Keywords:  
 Stage:  Accepted | Has_patch:  0   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Comment (by kgrandis):

 Adding some related tickets and branches to minimize stepping on others'
 feet.

 Related:
 http://github.com/bfirsh/syndication-view/ (slated for 1.2)
 http://code.djangoproject.com/ticket/3570

-- 
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] #6298: Include sample settings file(s) to run django unit tests i.e. make running unit tests easier

2009-12-13 Thread Django
#6298: Include sample settings file(s) to run django unit tests i.e. make 
running
unit tests easier
-+--
  Reporter:  cur...@oddpost.com  | Owner:  tobias
Status:  assigned| Milestone:  1.2   
 Component:  Testing framework   |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by tobias):

  * status:  new => assigned

-- 
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] #9310: 404 debug pages should show the name of the tried urlpattern if one exists.

2009-12-13 Thread Django
#9310: 404 debug pages should show the name of the tried urlpattern if one 
exists.
-+--
  Reporter:  floguy  | Owner:  tobias
Status:  assigned| Milestone:  1.2   
 Component:  Core framework  |   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  1   |  
-+--
Changes (by tobias):

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

Comment:

 looks like patch needs updating

-- 
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] #9519: QuerySet.delete() should operate with respect to previous query operations

2009-12-13 Thread Django
#9519: QuerySet.delete() should operate with respect to previous query 
operations
---+
  Reporter:  Tarken| Owner:  tobias 
   
Status:  assigned  | Milestone: 
   
 Component:  Database layer (models, ORM)  |   Version:  1.0
   
Resolution:|  Keywords:  database, 
queryset, delete
 Stage:  Design decision needed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by tobias):

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

-- 
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] #10969: django/contrib/localflavor/us/models.py update USStateField to act as a normal CharField with choices.

2009-12-13 Thread Django
#10969: django/contrib/localflavor/us/models.py update USStateField to act as a
normal CharField with choices.
-+--
  Reporter:  pmclanahan  | Owner:  kmtracey 
  
Status:  new | Milestone:   
  
 Component:  django.contrib.localflavor  |   Version:  SVN  
  
Resolution:  |  Keywords:  
usstatefield, charfield
 Stage:  Accepted| Has_patch:  1
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  0   |  
-+--
Comment (by kmtracey):

 So #4092 notes the same problem but takes a different approach on fixing,
 introducing a new type of Widget (!NullSelect), plus changing all(?)
 localflavor widgets to use this new type. The patch here just changes the
 field type for the US state field. Other localflavors don't need updating
 because they don't actually define fields, is that right?  I'm just
 wondering if there is a problem with all these other localflavor lists
 that still needs to be dealt with or if the fix here resolves both this
 ticket and #4092. While the patches on #4092 touch all these different
 localflavors the actual problem description only mentions US states as
 being a 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-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] #10828: deleting all forms within a formset is not possible

2009-12-13 Thread Django
#10828: deleting all forms within a formset is not possible
---+
  Reporter:  patrickk  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Forms |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by copelco):

 Due to #5524 similarities, I updated my patch to not delete
 form.cleaned_data if invalid, but rather only populate it with the valid
 fields.

-- 
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] #6298: Include sample settings file(s) to run django unit tests i.e. make running unit tests easier

2009-12-13 Thread Django
#6298: Include sample settings file(s) to run django unit tests i.e. make 
running
unit tests easier
-+--
  Reporter:  cur...@oddpost.com  | Owner:  tobias
Status:  new | Milestone:  1.2   
 Component:  Testing framework   |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by kmtracey):

  * owner:  kmtracey => tobias

Comment:

 Back to you for updates based on what all people were saying in IRC.

-- 
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] r11855 - django/trunk/django/core/cache/backends

2009-12-13 Thread noreply
Author: jacob
Date: 2009-12-13 14:35:06 -0600 (Sun, 13 Dec 2009)
New Revision: 11855

Modified:
   django/trunk/django/core/cache/backends/memcached.py
Log:
Fixed #10646: `cache.incr()` and `decr()` now fail consistantly under 
python-memcache and cmemcache.

Though it looks like this commit has no tests that's not so: this is tested for 
in `regressiontests/cache/tests.py` around like 183; these tests currently fail 
if ran against cmemcache.

Thanks, andrewfong.

Modified: django/trunk/django/core/cache/backends/memcached.py
===
--- django/trunk/django/core/cache/backends/memcached.py2009-12-13 
20:29:04 UTC (rev 11854)
+++ django/trunk/django/core/cache/backends/memcached.py2009-12-13 
20:35:06 UTC (rev 11855)
@@ -46,7 +46,28 @@
 self._cache.disconnect_all()
 
 def incr(self, key, delta=1):
-return self._cache.incr(key, delta)
+try:
+val = self._cache.incr(key, delta)
 
+# python-memcache responds to incr on non-existent keys by
+# raising a ValueError. Cmemcache returns None. In both
+# cases, we should raise a ValueError though.
+except ValueError:
+val = None
+if val is None:
+raise ValueError("Key '%s' not found" % key)
+
+return val
+
 def decr(self, key, delta=1):
-return self._cache.decr(key, delta)
+try:
+val = self._cache.decr(key, delta)
+
+# python-memcache responds to decr on non-existent keys by
+# raising a ValueError. Cmemcache returns None. In both
+# cases, we should raise a ValueError though.
+except ValueError:
+val = None
+if val is None:
+raise ValueError("Key '%s' not found" % key)
+return val

--

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] r11854 - in django/trunk: django/core docs/topics/http tests/regressiontests/urlpatterns_reverse

2009-12-13 Thread noreply
Author: jacob
Date: 2009-12-13 14:29:04 -0600 (Sun, 13 Dec 2009)
New Revision: 11854

Added:
   django/trunk/tests/regressiontests/urlpatterns_reverse/urls_error_handlers.py
   
django/trunk/tests/regressiontests/urlpatterns_reverse/urls_error_handlers_callables.py
Modified:
   django/trunk/django/core/urlresolvers.py
   django/trunk/docs/topics/http/urls.txt
   django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py
Log:
Fixed #10326: handler500 and handler404 may now be callables. Thanks, dcwatson, 
adurdin.

Modified: django/trunk/django/core/urlresolvers.py
===
--- django/trunk/django/core/urlresolvers.py2009-12-13 18:02:19 UTC (rev 
11853)
+++ django/trunk/django/core/urlresolvers.py2009-12-13 20:29:04 UTC (rev 
11854)
@@ -257,9 +257,8 @@
 
 def _resolve_special(self, view_type):
 callback = getattr(self.urlconf_module, 'handler%s' % view_type)
-mod_name, func_name = get_mod_func(callback)
 try:
-return getattr(import_module(mod_name), func_name), {}
+return get_callable(callback), {}
 except (ImportError, AttributeError), e:
 raise ViewDoesNotExist, "Tried %s. Error was: %s" % (callback, 
str(e))
 

Modified: django/trunk/docs/topics/http/urls.txt
===
--- django/trunk/docs/topics/http/urls.txt  2009-12-13 18:02:19 UTC (rev 
11853)
+++ django/trunk/docs/topics/http/urls.txt  2009-12-13 20:29:04 UTC (rev 
11854)
@@ -253,24 +253,30 @@
 
 .. data:: handler404
 
-A string representing the full Python import path to the view that should be
-called if none of the URL patterns match.
+A callable, or a string representing the full Python import path to the view
+that should be called if none of the URL patterns match.
 
 By default, this is ``'django.views.defaults.page_not_found'``. That default
 value should suffice.
 
+.. versionchanged:: 1.2
+Previous versions of Django only accepted strings representing import 
paths.
+
 handler500
 --
 
 .. data:: handler500
 
-A string representing the full Python import path to the view that should be
-called in case of server errors. Server errors happen when you have runtime
-errors in view code.
+A callable, or a string representing the full Python import path to the view
+that should be called in case of server errors. Server errors happen when you
+have runtime errors in view code.
 
 By default, this is ``'django.views.defaults.server_error'``. That default
 value should suffice.
 
+.. versionchanged:: 1.2
+Previous versions of Django only accepted strings representing import 
paths.
+
 include
 ---
 

Modified: django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py
===
--- django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py 
2009-12-13 18:02:19 UTC (rev 11853)
+++ django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py 
2009-12-13 20:29:04 UTC (rev 11854)
@@ -244,7 +244,6 @@
 self.assertEquals('/other1/inner/37/42/', 
reverse('nodefault:urlobject-view', args=[37,42], current_app='other-ns1'))
 self.assertEquals('/other1/inner/42/37/', 
reverse('nodefault:urlobject-view', kwargs={'arg1':42, 'arg2':37}, 
current_app='other-ns1'))
 
-
 class RequestURLconfTests(TestCase):
 def setUp(self):
 self.root_urlconf = settings.ROOT_URLCONF
@@ -276,3 +275,25 @@
 response = self.client.get('/second_test/')
 self.assertEqual(response.status_code, 200)
 self.assertEqual(response.content, 'outer:,inner:/second_test/')
+
+class ErrorHandlerResolutionTests(TestCase):
+"""Tests for handler404 and handler500"""
+
+def setUp(self):
+from django.core.urlresolvers import RegexURLResolver
+urlconf = 'regressiontests.urlpatterns_reverse.urls_error_handlers'
+urlconf_callables = 
'regressiontests.urlpatterns_reverse.urls_error_handlers_callables'
+self.resolver = RegexURLResolver(r'^$', urlconf)
+self.callable_resolver = RegexURLResolver(r'^$', urlconf_callables)
+
+def test_named_handlers(self):
+from views import empty_view
+handler = (empty_view, {})
+self.assertEqual(self.resolver.resolve404(), handler)
+self.assertEqual(self.resolver.resolve500(), handler)
+
+def test_callable_handers(self):
+from views import empty_view
+handler = (empty_view, {})
+self.assertEqual(self.callable_resolver.resolve404(), handler)
+self.assertEqual(self.callable_resolver.resolve500(), handler)

Added: 
django/trunk/tests/regressiontests/urlpatterns_reverse/urls_error_handlers.py
===
--- 
django/trunk/tests/regressiontests/urlpatterns_reverse/urls_error_handlers.py   
(rev 0)
+++ 
django/trunk/tes

Re: [Django] #9449: test runner repeatedly parsers fixtures

2009-12-13 Thread Django
#9449: test runner repeatedly parsers fixtures
+---
  Reporter:  trevor | Owner:  nobody
Status:  new| Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by ericholscher):

 Added another commit that fixes the aggregation tests depending on
 initial_data loading, which is already tested in the fixtures tests.

 This also makes these tests pass with this scheme:

 
http://github.com/ericholscher/django/commit/08b1f3e5f98529f4b9c46c911ee00cb07ff0bdbc

-- 
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] r11853 - djangoproject.com/djangodocs/templates/docs

2009-12-13 Thread noreply
Author: jacob
Date: 2009-12-13 12:02:19 -0600 (Sun, 13 Dec 2009)
New Revision: 11853

Modified:
   djangoproject.com/djangodocs/templates/docs/doc.html
Log:
[djangoproject.com] typo fix.

Modified: djangoproject.com/djangodocs/templates/docs/doc.html
===
--- djangoproject.com/djangodocs/templates/docs/doc.html2009-12-13 
18:01:40 UTC (rev 11852)
+++ djangoproject.com/djangodocs/templates/docs/doc.html2009-12-13 
18:02:19 UTC (rev 11853)
@@ -42,7 +42,7 @@
   {% ifequal version "dev" %}
 This document is for Django's SVN release, which can be
 significantly different from previous releases. Get old docs here:
-1.1
+1.1,
 1.0
   {% else %}
 This document describes Django {{ version }}. For development docs, 

--

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] r11852 - djangoproject.com/djangodocs/templates/docs

2009-12-13 Thread noreply
Author: jacob
Date: 2009-12-13 12:01:40 -0600 (Sun, 13 Dec 2009)
New Revision: 11852

Modified:
   djangoproject.com/djangodocs/templates/docs/doc.html
Log:
[djangoproject.com] add links to 1.0 and 1.1 to dev docs.

Modified: djangoproject.com/djangodocs/templates/docs/doc.html
===
--- djangoproject.com/djangodocs/templates/docs/doc.html2009-12-13 
17:48:32 UTC (rev 11851)
+++ djangoproject.com/djangodocs/templates/docs/doc.html2009-12-13 
18:01:40 UTC (rev 11852)
@@ -41,9 +41,9 @@
   
   {% ifequal version "dev" %}
 This document is for Django's SVN release, which can be
-significantly different from previous releases. Get old docs here: 
+significantly different from previous releases. Get old docs here:
 1.1
-  1.0
+1.0
   {% else %}
 This document describes Django {{ version }}. For development docs, 
 go here.

--

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] r11851 - djangoproject.com/djangodocs/templates/docs

2009-12-13 Thread noreply
Author: jacob
Date: 2009-12-13 11:48:32 -0600 (Sun, 13 Dec 2009)
New Revision: 11851

Modified:
   djangoproject.com/djangodocs/templates/docs/doc.html
Log:
[djangoproject.com] Updated the document template to point to both 1.0 and 1.1 
versions of docs.


Modified: djangoproject.com/djangodocs/templates/docs/doc.html
===
--- djangoproject.com/djangodocs/templates/docs/doc.html2009-12-13 
17:46:52 UTC (rev 11850)
+++ djangoproject.com/djangodocs/templates/docs/doc.html2009-12-13 
17:48:32 UTC (rev 11851)
@@ -42,9 +42,10 @@
   {% ifequal version "dev" %}
 This document is for Django's SVN release, which can be
 significantly different from previous releases. Get old docs here: 
-  Django 1.0
+1.1
+  1.0
   {% else %}
-This document describes Django version {{ version }}. For development 
documentation, 
+This document describes Django {{ version }}. For development docs, 
 go here.
   {% endifequal %}
   

--

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] r11850 - in django/trunk: django/forms tests/regressiontests/model_forms_regress

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 11:46:52 -0600 (Sun, 13 Dec 2009)
New Revision: 11850

Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/regressiontests/model_forms_regress/tests.py
Log:
Fixed #12215: Added len to ModelChoiceIterator.  Thanks Alex and Tobias.


Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2009-12-13 17:46:01 UTC (rev 11849)
+++ django/trunk/django/forms/models.py 2009-12-13 17:46:52 UTC (rev 11850)
@@ -910,6 +910,9 @@
 for obj in self.queryset.all():
 yield self.choice(obj)
 
+def __len__(self):
+return len(self.queryset)
+
 def choice(self, obj):
 if self.field.to_field_name:
 key = obj.serializable_value(self.field.to_field_name)

Modified: django/trunk/tests/regressiontests/model_forms_regress/tests.py
===
--- django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2009-12-13 17:46:01 UTC (rev 11849)
+++ django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2009-12-13 17:46:52 UTC (rev 11850)
@@ -100,4 +100,16 @@
 # It's enough that the form saves without error -- the custom save 
routine will
 # generate an AssertionError if it is called more than once during 
save.
 form = CFFForm(data = {'f': None})
-form.save()
\ No newline at end of file
+form.save()
+
+class ModelChoiceIteratorTests(TestCase):
+def test_len(self):
+class Form(forms.ModelForm):
+class Meta:
+model = Article
+fields = ["publications"]
+
+Publication.objects.create(title="Pravda",
+date_published=date(1991, 8, 22))
+f = Form()
+self.assertEqual(len(f.fields["publications"].choices), 1)

--

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] r11849 - djangoproject.com/djangodocs

2009-12-13 Thread noreply
Author: jacob
Date: 2009-12-13 11:46:01 -0600 (Sun, 13 Dec 2009)
New Revision: 11849

Modified:
   djangoproject.com/djangodocs/views.py
Log:
Make the default doc version be 1.1.


Modified: djangoproject.com/djangodocs/views.py
===
--- djangoproject.com/djangodocs/views.py   2009-12-13 17:32:16 UTC (rev 
11848)
+++ djangoproject.com/djangodocs/views.py   2009-12-13 17:46:01 UTC (rev 
11849)
@@ -12,7 +12,7 @@
 return HttpResponseRedirect(
 urlresolvers.reverse('document-index', kwargs={
 'lang': 'en',
-'version': 'dev',
+'version': '1.1',
 })
 )
 
@@ -20,7 +20,7 @@
 return HttpResponseRedirect(
 urlresolvers.reverse('document-index', kwargs={
 'lang': lang,
-'version': 'dev',
+'version': '1.1',
 })
 )
 

--

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] r11848 - django/trunk/docs/ref

2009-12-13 Thread noreply
Author: jacob
Date: 2009-12-13 11:32:16 -0600 (Sun, 13 Dec 2009)
New Revision: 11848

Modified:
   django/trunk/docs/ref/django-admin.txt
Log:
Fixed a reST error from [11843] and added a versionadded directive.

Modified: django/trunk/docs/ref/django-admin.txt
===
--- django/trunk/docs/ref/django-admin.txt  2009-12-13 17:20:36 UTC (rev 
11847)
+++ django/trunk/docs/ref/django-admin.txt  2009-12-13 17:32:16 UTC (rev 
11848)
@@ -697,8 +697,10 @@
 information.
 
 --failfast
-
+~~
 
+.. versionadded:: 1.2
+
 Use the ``--failfast`` option to stop running tests and report the failure 
 immediately after a test fails.
 

--

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] r11847 - django/trunk/django/contrib/messages/tests

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 11:20:36 -0600 (Sun, 13 Dec 2009)
New Revision: 11847

Modified:
   django/trunk/django/contrib/messages/tests/base.py
Log:
Fixed #12368: Fixed order-dependent messages test that was failing on 
MySQL/MyISAM.  Thanks Tobias.



Modified: django/trunk/django/contrib/messages/tests/base.py
===
--- django/trunk/django/contrib/messages/tests/base.py  2009-12-13 17:08:36 UTC 
(rev 11846)
+++ django/trunk/django/contrib/messages/tests/base.py  2009-12-13 17:20:36 UTC 
(rev 11847)
@@ -218,9 +218,9 @@
 response = self.client.post(add_url, data, follow=True)
 self.assertRedirects(response, show_url)
 self.assertTrue('messages' in response.context)
-self.assertEqual(list(response.context['messages']),
- data['messages'])
+context_messages = list(response.context['messages'])
 for msg in data['messages']:
+self.assertTrue(msg in context_messages)
 self.assertContains(response, msg)
 
 def test_middleware_disabled_anon_user(self):

--

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] #10828: deleting all forms within a formset is not possible

2009-12-13 Thread Django
#10828: deleting all forms within a formset is not possible
---+
  Reporter:  patrickk  | Owner:  copelco
Status:  new   | Milestone:  1.2
 Component:  Forms |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  1 |  
---+
Changes (by copelco):

  * needs_better_patch:  0 => 1
  * has_patch:  0 => 1

Comment:

 What do we want to have happen? Since we're already short circuiting
 formset.is_valid() to skip forms marked for deletion, we could go ahead
 and validate the form and set the cleaned_data attribute to allow
 iteration over formset.forms. I'll attach a patch, but I'm not sure it's
 the best solution.

-- 
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] #12285: Confusing error message when ModelForm does not have model set

2009-12-13 Thread Django
#12285: Confusing error message when ModelForm does not have model set
+---
  Reporter:  RaceCondition  | Owner:  nobody
Status:  new| Milestone:  1.2   
 Component:  Forms  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by tobias):

  * owner:  tobias => nobody
  * status:  assigned => new
  * stage:  Unreviewed => Accepted

Comment:

 Works as intended.  My personal preference is for unit tests, but that
 might just be me.  Also the exception could be made more specific
 (AttributeError?  ValueError?).

 Otherwise, this seems like a simple, intuitive fix to an obscure error.

-- 
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] r11846 - in django/trunk/tests/regressiontests: . test_runner

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 11:08:36 -0600 (Sun, 13 Dec 2009)
New Revision: 11846

Added:
   django/trunk/tests/regressiontests/test_runner/
   django/trunk/tests/regressiontests/test_runner/__init__.py
   django/trunk/tests/regressiontests/test_runner/models.py
   django/trunk/tests/regressiontests/test_runner/tests.py
Log:
Added tet runner tests mistakenly left out of r11843.  Refs #11613.


Added: django/trunk/tests/regressiontests/test_runner/__init__.py
===


Property changes on: django/trunk/tests/regressiontests/test_runner/__init__.py
___
Name: svn:eol-style
   + native

Added: django/trunk/tests/regressiontests/test_runner/models.py
===


Property changes on: django/trunk/tests/regressiontests/test_runner/models.py
___
Name: svn:eol-style
   + native

Added: django/trunk/tests/regressiontests/test_runner/tests.py
===
--- django/trunk/tests/regressiontests/test_runner/tests.py 
(rev 0)
+++ django/trunk/tests/regressiontests/test_runner/tests.py 2009-12-13 
17:08:36 UTC (rev 11846)
@@ -0,0 +1,29 @@
+"""
+Tests for django test runner
+"""
+import StringIO
+import unittest
+import django
+from django.test import TestCase, TransactionTestCase, simple 
+
+class DjangoTestRunnerTests(TestCase):
+
+def test_failfast(self):
+class MockTestOne(TransactionTestCase):
+def runTest(self):
+assert False
+class MockTestTwo(TransactionTestCase):
+def runTest(self):
+assert False
+
+suite = unittest.TestSuite([MockTestOne(), MockTestTwo()])
+mock_stream = StringIO.StringIO()
+dtr = simple.DjangoTestRunner(verbosity=0, failfast=False, 
stream=mock_stream)
+result = dtr.run(suite)
+self.assertEqual(2, result.testsRun)
+self.assertEqual(2, len(result.failures))
+
+dtr = simple.DjangoTestRunner(verbosity=0, failfast=True, 
stream=mock_stream)
+result = dtr.run(suite)
+self.assertEqual(1, result.testsRun)
+self.assertEqual(1, len(result.failures))


Property changes on: django/trunk/tests/regressiontests/test_runner/tests.py
___
Name: svn:eol-style
   + native

--

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] r11845 - in django/branches/releases/1.1.X: . django/contrib/localflavor/ca tests/regressiontests/forms/localflavor

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 11:05:17 -0600 (Sun, 13 Dec 2009)
New Revision: 11845

Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/django/contrib/localflavor/ca/forms.py
   django/branches/releases/1.1.X/tests/regressiontests/forms/localflavor/ca.py
Log:
[1.1.X] Fixed #12146: Corrected Canadian postal code validation. Thanks 
paulschreiber and Mark Lavin. 

r11844 from trunk.



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11808,11815,11817,11822,11826,11833,11835,11837,11839,11841
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11808,11815,11817,11822,11826,11833,11835,11837,11839,11841,11844

Modified: django/branches/releases/1.1.X/django/contrib/localflavor/ca/forms.py
===
--- django/branches/releases/1.1.X/django/contrib/localflavor/ca/forms.py   
2009-12-13 17:01:22 UTC (rev 11844)
+++ django/branches/releases/1.1.X/django/contrib/localflavor/ca/forms.py   
2009-12-13 17:05:17 UTC (rev 11845)
@@ -12,13 +12,20 @@
 sin_re = re.compile(r"^(\d{3})-(\d{3})-(\d{3})$")
 
 class CAPostalCodeField(RegexField):
-"""Canadian postal code field."""
+"""
+Canadian postal code field.
+
+Validates against known invalid characters: D, F, I, O, Q, U
+Additionally the first character cannot be Z or W.
+For more info see:
+http://www.canadapost.ca/tools/pg/manual/PGaddress-e.asp#1402170
+"""
 default_error_messages = {
 'invalid': _(u'Enter a postal code in the format XXX XXX.'),
 }
 
 def __init__(self, *args, **kwargs):
-super(CAPostalCodeField, 
self).__init__(r'^[ABCEGHJKLMNPRSTVXYZ]\d[A-Z] \d[A-Z]\d$',
+super(CAPostalCodeField, 
self).__init__(r'^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] 
\d[ABCEGHJKLMNPRSTVWXYZ]\d$',
 max_length=None, min_length=None, *args, **kwargs)
 
 class CAPhoneNumberField(Field):

Modified: 
django/branches/releases/1.1.X/tests/regressiontests/forms/localflavor/ca.py
===
--- 
django/branches/releases/1.1.X/tests/regressiontests/forms/localflavor/ca.py
2009-12-13 17:01:22 UTC (rev 11844)
+++ 
django/branches/releases/1.1.X/tests/regressiontests/forms/localflavor/ca.py
2009-12-13 17:05:17 UTC (rev 11845)
@@ -60,6 +60,50 @@
 u''
 >>> f.clean('')
 u''
+>>> f.clean('W2S 2H3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('T2W 2H7')
+u'T2W 2H7'
+>>> f.clean('T2S 2W7')
+u'T2S 2W7'
+>>> f.clean('Z2S 2H3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('T2Z 2H7')
+u'T2Z 2H7'
+>>> f.clean('T2S 2Z7')
+u'T2S 2Z7'
+>>> f.clean('F2S 2H3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('A2S 2D3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('A2I 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('A2I 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('A2Q 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('U2B 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('O2B 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
 
 # CAPhoneNumberField ##
 

--

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] #12285: Confusing error message when ModelForm does not have model set

2009-12-13 Thread Django
#12285: Confusing error message when ModelForm does not have model set
+---
  Reporter:  RaceCondition  | Owner:  tobias
Status:  assigned   | Milestone:  1.2   
 Component:  Forms  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by tobias):

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

Comment:

 reviewing 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.




[Changeset] r11844 - in django/trunk: django/contrib/localflavor/ca tests/regressiontests/forms/localflavor

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 11:01:22 -0600 (Sun, 13 Dec 2009)
New Revision: 11844

Modified:
   django/trunk/django/contrib/localflavor/ca/forms.py
   django/trunk/tests/regressiontests/forms/localflavor/ca.py
Log:
Fixed #12146: Corrected Canadian postal code validation.  Thanks paulschreiber 
and Mark Lavin.


Modified: django/trunk/django/contrib/localflavor/ca/forms.py
===
--- django/trunk/django/contrib/localflavor/ca/forms.py 2009-12-13 16:24:36 UTC 
(rev 11843)
+++ django/trunk/django/contrib/localflavor/ca/forms.py 2009-12-13 17:01:22 UTC 
(rev 11844)
@@ -12,13 +12,20 @@
 sin_re = re.compile(r"^(\d{3})-(\d{3})-(\d{3})$")
 
 class CAPostalCodeField(RegexField):
-"""Canadian postal code field."""
+"""
+Canadian postal code field.
+
+Validates against known invalid characters: D, F, I, O, Q, U
+Additionally the first character cannot be Z or W.
+For more info see:
+http://www.canadapost.ca/tools/pg/manual/PGaddress-e.asp#1402170
+"""
 default_error_messages = {
 'invalid': _(u'Enter a postal code in the format XXX XXX.'),
 }
 
 def __init__(self, *args, **kwargs):
-super(CAPostalCodeField, 
self).__init__(r'^[ABCEGHJKLMNPRSTVXYZ]\d[A-Z] \d[A-Z]\d$',
+super(CAPostalCodeField, 
self).__init__(r'^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] 
\d[ABCEGHJKLMNPRSTVWXYZ]\d$',
 max_length=None, min_length=None, *args, **kwargs)
 
 class CAPhoneNumberField(Field):

Modified: django/trunk/tests/regressiontests/forms/localflavor/ca.py
===
--- django/trunk/tests/regressiontests/forms/localflavor/ca.py  2009-12-13 
16:24:36 UTC (rev 11843)
+++ django/trunk/tests/regressiontests/forms/localflavor/ca.py  2009-12-13 
17:01:22 UTC (rev 11844)
@@ -60,6 +60,50 @@
 u''
 >>> f.clean('')
 u''
+>>> f.clean('W2S 2H3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('T2W 2H7')
+u'T2W 2H7'
+>>> f.clean('T2S 2W7')
+u'T2S 2W7'
+>>> f.clean('Z2S 2H3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('T2Z 2H7')
+u'T2Z 2H7'
+>>> f.clean('T2S 2Z7')
+u'T2S 2Z7'
+>>> f.clean('F2S 2H3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('A2S 2D3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('A2I 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('A2I 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('A2Q 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('U2B 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
+>>> f.clean('O2B 2R3')
+Traceback (most recent call last):
+...
+ValidationError: [u'Enter a postal code in the format XXX XXX.']
 
 # CAPhoneNumberField ##
 

--

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] #12371: django-admin.txt has a docutils warning for a title underline too short

2009-12-13 Thread Django
#12371: django-admin.txt has a docutils warning for a title underline too short
---+
 Reporter:  rpbarlow   |   Owner:  rpbarlow  
   Status:  new|   Milestone:  1.2   
Component:  Documentation  | Version:  SVN   
 Keywords:  failfast   |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 From ramiro:

 {{{
 it generates a docutils warning: /home/ramiro/django/trunk/docs/ref
 /django-admin.txt:700: (WARNING/2) Title underline too short.
 }}}

 This is in reference to the --failfast flag.

-- 
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] #12370: Test management command accepts a parameter extra_tests, which defaults to []

2009-12-13 Thread Django
#12370: Test management command accepts a parameter extra_tests, which defaults 
to
[]
--+-
 Reporter:  rpbarlow  |   Owner:  rpbarlow  
   Status:  new   |   Milestone:  1.2   
Component:  Testing framework | Version:  SVN   
 Keywords:  test extra_arguments  |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 This isn't a problem in practice, because only the Django runtests.py test
 suite uses it, and it only gets called once, but it is bad Python form and
 so should be fixed.

-- 
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] #12295: A formset with no forms does not call self.clean() when self.is_valid() is called.

2009-12-13 Thread Django
#12295: A formset with no forms does not call self.clean() when self.is_valid() 
is
called.
--+-
  Reporter:  tomevans222  | Owner:  nobody 
Status:  new  | Milestone: 
 Component:  Forms|   Version:  1.1
Resolution:   |  Keywords:  formset
 Stage:  Accepted | Has_patch:  1  
Needs_docs:  0|   Needs_tests:  1  
Needs_better_patch:  0|  
--+-
Changes (by jdunck):

  * needs_tests:  0 => 1
  * stage:  Unreviewed => Accepted

Comment:

 This patch still needs tests, no matter how trivial the test case might
 be.

-- 
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] r11843 - in django/trunk: django/core/management/commands django/test docs/ref tests

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 10:24:36 -0600 (Sun, 13 Dec 2009)
New Revision: 11843

Modified:
   django/trunk/django/core/management/commands/test.py
   django/trunk/django/test/simple.py
   django/trunk/docs/ref/django-admin.txt
   django/trunk/tests/runtests.py
Log:
Fixed #11613: Added a failfast option for test running.  Thanks jukvalim and 
Randy Barlow.


Modified: django/trunk/django/core/management/commands/test.py
===
--- django/trunk/django/core/management/commands/test.py2009-12-13 
15:19:21 UTC (rev 11842)
+++ django/trunk/django/core/management/commands/test.py2009-12-13 
16:24:36 UTC (rev 11843)
@@ -6,6 +6,8 @@
 option_list = BaseCommand.option_list + (
 make_option('--noinput', action='store_false', dest='interactive', 
default=True,
 help='Tells Django to NOT prompt the user for input of any kind.'),
+make_option('--failfast', action='store_true', dest='failfast', 
default=False,
+help='Tells Django to stop running the test suite after first 
failed test.')
 )
 help = 'Runs the test suite for the specified applications, or the entire 
site if no apps are specified.'
 args = '[appname ...]'
@@ -15,11 +17,18 @@
 def handle(self, *test_labels, **options):
 from django.conf import settings
 from django.test.utils import get_runner
-
+
 verbosity = int(options.get('verbosity', 1))
 interactive = options.get('interactive', True)
+failfast = options.get('failfast', False)
 test_runner = get_runner(settings)
 
-failures = test_runner(test_labels, verbosity=verbosity, 
interactive=interactive)
+# Some custom test runners won't accept the failfast flag, so let's 
make sure they accept it before passing it to them
+if 'failfast' in test_runner.func_code.co_varnames:
+failures = test_runner(test_labels, verbosity=verbosity, 
interactive=interactive, 
+   failfast=failfast)
+else:
+failures = test_runner(test_labels, verbosity=verbosity, 
interactive=interactive)
+
 if failures:
 sys.exit(failures)

Modified: django/trunk/django/test/simple.py
===
--- django/trunk/django/test/simple.py  2009-12-13 15:19:21 UTC (rev 11842)
+++ django/trunk/django/test/simple.py  2009-12-13 16:24:36 UTC (rev 11843)
@@ -10,6 +10,26 @@
 
 doctestOutputChecker = OutputChecker()
 
+class DjangoTestRunner(unittest.TextTestRunner):
+
+def __init__(self, verbosity=0, failfast=False, **kwargs):
+super(DjangoTestRunner, self).__init__(verbosity=verbosity, **kwargs)
+self.failfast = failfast
+
+def _makeResult(self):
+result = super(DjangoTestRunner, self)._makeResult()
+failfast = self.failfast
+
+def stoptest_override(func):
+def stoptest(test):
+if failfast and not result.wasSuccessful():
+result.stop()
+func(test)
+return stoptest
+
+setattr(result, 'stopTest', stoptest_override(result.stopTest))
+return result
+
 def get_tests(app_module):
 try:
 app_path = app_module.__name__.split('.')[:-1]
@@ -146,7 +166,7 @@
 bins[0].addTests(bins[i+1])
 return bins[0]
 
-def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
+def run_tests(test_labels, verbosity=1, interactive=True, failfast=False, 
extra_tests=[]):
 """
 Run the unit tests for all the test labels in the provided list.
 Labels must be of the form:
@@ -189,7 +209,7 @@
 old_name = settings.DATABASE_NAME
 from django.db import connection
 connection.creation.create_test_db(verbosity, autoclobber=not interactive)
-result = unittest.TextTestRunner(verbosity=verbosity).run(suite)
+result = DjangoTestRunner(verbosity=verbosity, 
failfast=failfast).run(suite)
 connection.creation.destroy_test_db(old_name, verbosity)
 
 teardown_test_environment()

Modified: django/trunk/docs/ref/django-admin.txt
===
--- django/trunk/docs/ref/django-admin.txt  2009-12-13 15:19:21 UTC (rev 
11842)
+++ django/trunk/docs/ref/django-admin.txt  2009-12-13 16:24:36 UTC (rev 
11843)
@@ -696,6 +696,12 @@
 Runs tests for all installed models. See :ref:`topics-testing` for more
 information.
 
+--failfast
+
+
+Use the ``--failfast`` option to stop running tests and report the failure 
+immediately after a test fails.
+
 testserver 
 
 

Modified: django/trunk/tests/runtests.py
===
--- django/trunk/tests/runtests.py  2009-12-13 15:19:21 UTC (rev 11842)
+++ django/trunk/tests/runtests.py  2009-12-13 16:24:36 UTC (rev

Re: [Django] #11535: GenericRelation query with OR creates incorrect SQL

2009-12-13 Thread Django
#11535: GenericRelation query with OR creates incorrect SQL
---+
  Reporter:  brianglass| Owner:  kmtracey
Status:  new   | Milestone:  1.2 
 Component:  Database layer (models, ORM)  |   Version:  SVN 
Resolution:|  Keywords:  
 Stage:  Ready for checkin | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by tobias):

 * cc: tobias (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-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] #12368: django.contrib.messages tests fail with mysql backend - ordering issues

2009-12-13 Thread Django
#12368: django.contrib.messages tests fail with mysql backend - ordering issues
+---
  Reporter:  tobias | Owner:  kmtracey
Status:  new| Milestone:  1.2 
 Component:  Contrib apps   |   Version:  SVN 
Resolution: |  Keywords:  messages
 Stage:  Ready for checkin  | Has_patch:  1   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by tobias):

  * owner:  tobias => kmtracey
  * status:  assigned => new

-- 
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] #11535: GenericRelation query with OR creates incorrect SQL

2009-12-13 Thread Django
#11535: GenericRelation query with OR creates incorrect SQL
---+
  Reporter:  brianglass| Owner:  kmtracey
Status:  new   | Milestone:  1.2 
 Component:  Database layer (models, ORM)  |   Version:  SVN 
Resolution:|  Keywords:  
 Stage:  Ready for checkin | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by tobias):

  * owner:  tobias => kmtracey
  * status:  assigned => new

-- 
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] #12215: ModelChoiceIterator doesn't define __len__

2009-12-13 Thread Django
#12215: ModelChoiceIterator doesn't define __len__
+---
  Reporter:  Alex   | Owner:  kmtracey
Status:  new| Milestone:  1.2 
 Component:  Forms  |   Version:  SVN 
Resolution: |  Keywords:  
 Stage:  Ready for checkin  | Has_patch:  1   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by tobias):

  * owner:  nobody => kmtracey

-- 
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] #11418: formset.cleaned_data raises AttributeError when is_valid is True

2009-12-13 Thread Django
#11418: formset.cleaned_data raises AttributeError when is_valid is True
---+
  Reporter:  adurdin   | Owner:  mlavin
Status:  assigned  | Milestone:
 Component:  Forms |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mlavin):

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

Comment:

 This formset does have a form in it and it is not valid.  The formset
 itself is bound but the form is not bound (and hence not valid).

 {{{
 >>> from django import forms
 >>> class ArticleForm(forms.Form):
 ... title = forms.CharField()
 ... pub_date = forms.DateField()
 ...
 >>> from django.forms.formsets import formset_factory
 >>> ArticleFormSet = formset_factory(ArticleForm)
 >>> formset = ArticleFormSet({})
 >>> formset.forms
 [<__main__.ArticleForm object at 0x94636cc>]
 >>> formset.forms[0].is_valid()
 False
 >>> formset.is_bound
 True
 >>> formset.forms[0].is_bound
 False
 }}}


 I think the problem is in the BaseFormSet._construct_form:

 {{{
 def _construct_form(self, i, **kwargs):
 """
 Instantiates and returns the i-th form instance in a formset.
 """
 defaults = {'auto_id': self.auto_id, 'prefix': self.add_prefix(i)}
 if self.data or self.files:
 defaults['data'] = self.data
 defaults['files'] = self.files
 ...
 }}}

 {{{ if self.data or self.files: }}} should be {{{ if self.is_bound: }}}
 because the empty data dictionary is not being passed down to the forms.

-- 
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] #12215: ModelChoiceIterator doesn't define __len__

2009-12-13 Thread Django
#12215: ModelChoiceIterator doesn't define __len__
+---
  Reporter:  Alex   | Owner:  nobody
Status:  new| Milestone:  1.2   
 Component:  Forms  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by jdunck):

  * stage:  Accepted => 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-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] #12224: psycopg2 raises "can't adapt" when use gettext extensions on model meta permissions field.

2009-12-13 Thread Django
#12224: psycopg2 raises "can't adapt" when use gettext extensions on model meta
permissions field.
---+
  Reporter:  chronos   | Owner:  chronos

Status:  new   | Milestone:  1.2

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  psycopg2, 
permissions, i18n, gettext, "can't adapt", syncdb
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

Needs_better_patch:  1 |  
---+
Changes (by jdunck):

  * needs_better_patch:  0 => 1
  * needs_tests:  0 => 1
  * stage:  Unreviewed => 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] #12250: process_view middleware prevents process_exception handling

2009-12-13 Thread Django
#12250: process_view middleware prevents process_exception handling
-+--
  Reporter:  manfre  | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  SVN   
Resolution:  |  Keywords:  middleware
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  1   |  
-+--
Comment (by jdunck):

 This really needs tests.  It's a critical piece of code and there are lots
 of exception paths around there.

-- 
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] #12250: process_view middleware prevents process_exception handling

2009-12-13 Thread Django
#12250: process_view middleware prevents process_exception handling
-+--
  Reporter:  manfre  | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  SVN   
Resolution:  |  Keywords:  middleware
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  1   |  
-+--
Changes (by jdunck):

  * keywords:  => middleware
  * owner:  jdunck => nobody
  * status:  assigned => new

-- 
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] #12250: process_view middleware prevents process_exception handling

2009-12-13 Thread Django
#12250: process_view middleware prevents process_exception handling
-+--
  Reporter:  manfre  | Owner:  jdunck
Status:  assigned| Milestone:
 Component:  Core framework  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  1   |  
-+--
Changes (by jdunck):

  * status:  new => assigned
  * needs_better_patch:  => 1
  * needs_tests:  => 1
  * owner:  nobody => jdunck
  * needs_docs:  => 0
  * stage:  Unreviewed => 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] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2009-12-13 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  
glassresistor
Status:  new   | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords: 
  
 Stage:  Accepted  | Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Comment (by glassresistor):

 After looked through the logs from a postgres 8.4 database I found that
 the actual queries used to create the 3 tables above through syncdb does
 not include the alter statement but instead is just a part of the create
 statement.  Syncdb seems to check the full project space while sql,
 sqlall, sqlreset, since they take in apps as arguments loop through the
 listed apps and inside that, loops through models internal to the apps
 themselves.  I propose that sqls behaviour be changed such that the models
 list get concatenated such that sql would in the case of sql app2 spit out
 -- The following references should be added but depend on non-existent
 tables:
 but sql app1 app2 would spit out Create table statements without
 mentioning an alter which doesn't get done.

 {{{
 618-2009-12-13 10:27:27 EST LOG:  statement: CREATE TABLE "app1_a" (
 619-"id" serial NOT NULL PRIMARY KEY,
 620-"article_body" text NOT NULL
 621-)
 622-;
 623-2009-12-13 10:27:27 EST LOG:  statement: CREATE TABLE "app1_c" (
 624-"id" serial NOT NULL PRIMARY KEY,
 625-"key_id" integer NOT NULL REFERENCES "app1_a" ("id")
 DEFERRABLE INITIALLY DEFERRED
 626-)
 627-;
 628:2009-12-13 10:27:27 EST LOG:  statement: CREATE TABLE "app2_b" (
 629-"id" serial NOT NULL PRIMARY KEY,
 630-"a_id" integer NOT NULL REFERENCES "app1_a" ("id") DEFERRABLE
 INITIALLY DEFERRED
 631-)
 632-;
 }}}

-- 
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] #12369: cStringIO portability

2009-12-13 Thread Django
#12369: cStringIO portability
---+
 Reporter:  rubic  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.1   
 Keywords:  cStringIO portability  |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 In reference to: http://docs.djangoproject.com/en/dev/howto/outputting-
 pdf/

 cStringIO is a great way to speed up complex reportlab pdfs.  For
 portability in environments that don't have cStringIO, I would encourage
 django coders to use this idiom:

 {{{
 try:
 from cStringIO import StringIO
 except ImportError:
 from StringIO import StringIO

 }}}

-- 
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] #1201: query string parsing problem

2009-12-13 Thread Django
#1201: query string parsing problem
-+--
  Reporter:  Eric Moritz | Owner:  adurdin
Status:  closed  | Milestone: 
 Component:  Core framework  |   Version: 
Resolution:  wontfix |  Keywords: 
 Stage:  Accepted| Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by jacob):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 Django 1.2 won't support 2.3 any more, and those still on 1.1/2.3 should
 be upgrading to the latest 2.3 (2.3.7) anyway.

-- 
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] #1035: Link to popup for adding related objects should respect user's permissions

2009-12-13 Thread Django
#1035: Link to popup for adding related objects should respect user's 
permissions
--+-
  Reporter:  Esaj   | Owner:  
SmileyChris 
Status:  assigned | Milestone:  

 Component:  django.contrib.admin |   Version:  SVN 

Resolution:   |  Keywords:  
sprint200912
 Stage:  Ready for checkin| Has_patch:  1   

Needs_docs:  0|   Needs_tests:  0   

Needs_better_patch:  0|  
--+-
Changes (by jdunck):

  * keywords:  => sprint200912
  * stage:  Accepted => 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-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] r11842 - in django/branches/releases/1.1.X: . docs/howto

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 09:19:21 -0600 (Sun, 13 Dec 2009)
New Revision: 11842

Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/docs/howto/custom-model-fields.txt
Log:
[1.1.X] Apply doc addition that somehow was left out of r11834. Refs #7977. 

r11841 from trunk.



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11808,11815,11817,11822,11826,11833,11835,11837,11839
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11808,11815,11817,11822,11826,11833,11835,11837,11839,11841

Modified: django/branches/releases/1.1.X/docs/howto/custom-model-fields.txt
===
--- django/branches/releases/1.1.X/docs/howto/custom-model-fields.txt   
2009-12-13 15:16:48 UTC (rev 11841)
+++ django/branches/releases/1.1.X/docs/howto/custom-model-fields.txt   
2009-12-13 15:19:21 UTC (rev 11842)
@@ -39,6 +39,8 @@
 something like this::
 
 class Hand(object):
+"""A hand of cards (bridge style)"""
+
 def __init__(self, north, east, south, west):
 # Input parameters are lists of cards ('Ah', '9s', etc)
 self.north = north
@@ -163,6 +165,8 @@
 from django.db import models
 
 class HandField(models.Field):
+"""A hand of cards (bridge style)"""
+
 def __init__(self, *args, **kwargs):
 kwargs['max_length'] = 104
 super(HandField, self).__init__(*args, **kwargs)
@@ -244,6 +248,8 @@
 For example::
 
 class HandField(models.Field):
+"""A hand of cards (bridge style)"""
+
 __metaclass__ = models.SubfieldBase
 
 def __init__(self, *args, **kwargs):
@@ -252,6 +258,21 @@
 This ensures that the :meth:`to_python` method, documented below, will always 
be
 called when the attribute is initialized.
 
+
+Documenting your Custom Field
+-
+
+As always, you should document your field type, so users will know what it is.
+The best way to do this is to simply provide a docstring for it.  This will 
+automatically be picked up by ``django.contrib.admindocs``, if you have it
+installed, and the first line of it will show up as the field type in the 
+documentation for any model that uses your field.  In the above examples, it 
+will show up as 'A hand of cards (bridge style)'.  Note that if you provide a 
+more verbose docstring, only the first line will show up in 
+``django.contrib.admindocs``.  The full docstring will, of course, still be
+available through ``pydoc`` or the interactive interpreter's ``help()`` 
+function.
+
 Useful methods
 --
 

--

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] r11841 - django/trunk/docs/howto

2009-12-13 Thread noreply
Author: kmtracey
Date: 2009-12-13 09:16:48 -0600 (Sun, 13 Dec 2009)
New Revision: 11841

Modified:
   django/trunk/docs/howto/custom-model-fields.txt
Log:
Apply doc addition that somehow was left out of r11833.  Refs #7977.


Modified: django/trunk/docs/howto/custom-model-fields.txt
===
--- django/trunk/docs/howto/custom-model-fields.txt 2009-12-12 22:08:27 UTC 
(rev 11840)
+++ django/trunk/docs/howto/custom-model-fields.txt 2009-12-13 15:16:48 UTC 
(rev 11841)
@@ -39,6 +39,8 @@
 something like this::
 
 class Hand(object):
+"""A hand of cards (bridge style)"""
+
 def __init__(self, north, east, south, west):
 # Input parameters are lists of cards ('Ah', '9s', etc)
 self.north = north
@@ -163,6 +165,8 @@
 from django.db import models
 
 class HandField(models.Field):
+"""A hand of cards (bridge style)"""
+
 def __init__(self, *args, **kwargs):
 kwargs['max_length'] = 104
 super(HandField, self).__init__(*args, **kwargs)
@@ -244,6 +248,8 @@
 For example::
 
 class HandField(models.Field):
+"""A hand of cards (bridge style)"""
+
 __metaclass__ = models.SubfieldBase
 
 def __init__(self, *args, **kwargs):
@@ -252,6 +258,21 @@
 This ensures that the :meth:`to_python` method, documented below, will always 
be
 called when the attribute is initialized.
 
+
+Documenting your Custom Field
+-
+
+As always, you should document your field type, so users will know what it is.
+The best way to do this is to simply provide a docstring for it.  This will 
+automatically be picked up by ``django.contrib.admindocs``, if you have it
+installed, and the first line of it will show up as the field type in the 
+documentation for any model that uses your field.  In the above examples, it 
+will show up as 'A hand of cards (bridge style)'.  Note that if you provide a 
+more verbose docstring, only the first line will show up in 
+``django.contrib.admindocs``.  The full docstring will, of course, still be
+available through ``pydoc`` or the interactive interpreter's ``help()`` 
+function.
+
 Useful methods
 --
 

--

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] #10828: deleting all forms within a formset is not possible

2009-12-13 Thread Django
#10828: deleting all forms within a formset is not possible
---+
  Reporter:  patrickk  | Owner:  copelco
Status:  new   | Milestone:  1.2
 Component:  Forms |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by copelco):

  * owner:  nobody => copelco

-- 
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] #11791: Incorrect HTML Code rendered in list_editable enabled changelists

2009-12-13 Thread Django
#11791: Incorrect HTML Code rendered in list_editable enabled changelists
--+-
  Reporter:  pa...@fragstore.net  | Owner:  kmtracey
 
Status:  new  | Milestone:  
 
 Component:  Contrib apps |   Version:  1.1 
 
Resolution:   |  Keywords:  list_editable, 
admin_list.py, items_for_result, opera
 Stage:  Unreviewed   | Has_patch:  0   
 
Needs_docs:  0|   Needs_tests:  0   
 
Needs_better_patch:  0|  
--+-
Changes (by mlavin):

  * owner:  mlavin => kmtracey
  * status:  assigned => new

-- 
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] #1061: Start week day on calendar

2009-12-13 Thread Django
#1061: Start week day on calendar
+---
  Reporter:  antoni.a...@gmail.com  | Owner:  jezdez
Status:  new| Milestone:
 Component:  Internationalization   |   Version:  SVN   
Resolution: |  Keywords:  i18n-fixed
 Stage:  Fixed on a branch  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by jezdez):

  * owner:  garcia_marc => jezdez

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