Re: [Django] #14002: filesizeformat filter only supports up to GB

2010-08-13 Thread Django
#14002: filesizeformat filter only supports up to GB
+---
  Reporter:  atm| Owner:  atm
Status:  new| Milestone:  1.3
 Component:  Template system|   Version: 
Resolution: |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  1  
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * needs_better_patch:  1 => 0
  * stage:  Accepted => Ready for checkin
  * milestone:  => 1.3

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #14068: Fixture loading issue with multi database setting

2010-08-13 Thread Django
#14068: Fixture loading issue with multi database setting
+---
  Reporter:  linovia| Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by russellm):

 #14108 was a dupe, with a proposed patch.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #14108: update loaddata to load fixtures in multi db environment for testing

2010-08-13 Thread Django
#14108: update loaddata to load fixtures in multi db environment for testing
+---
  Reporter:  berto  | Owner:  nobody 
Status:  closed | Milestone: 
 Component:  Uncategorized  |   Version:  SVN
Resolution:  duplicate  |  Keywords:  fixtures loaddata tests
 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:  => duplicate
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Duplicate of #14068

-- 
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] r13576 - in django/branches/soc2010/app-loading: django/core tests/appcachetests tests/appcachetests/same_label/model_app

2010-08-13 Thread noreply
Author: arthurk
Date: 2010-08-13 19:52:33 -0500 (Fri, 13 Aug 2010)
New Revision: 13576

Modified:
   django/branches/soc2010/app-loading/django/core/apps.py
   django/branches/soc2010/app-loading/tests/appcachetests/runtests.py
   
django/branches/soc2010/app-loading/tests/appcachetests/same_label/model_app/models.py
Log:
[soc2010/app-loading] register models als unbound if the cache is not 
initialized

Modified: django/branches/soc2010/app-loading/django/core/apps.py
===
--- django/branches/soc2010/app-loading/django/core/apps.py 2010-08-12 
10:50:22 UTC (rev 13575)
+++ django/branches/soc2010/app-loading/django/core/apps.py 2010-08-14 
00:52:33 UTC (rev 13576)
@@ -46,7 +46,7 @@
 installed_apps = [],
 
 # Mapping of app_labels to a dictionary of model names to model code.
-app_models = SortedDict(),
+unbound_models = {},
 
 # -- Everything below here is only used when populating the cache --
 loaded = False,
@@ -79,7 +79,19 @@
 if not self.nesting_level:
 for app_name in self.postponed:
 self.load_app(app_name)
+# since the cache is still unseeded at this point
+# all models have been stored as unbound models
+# we need to assign the models to the app instances
+for app_name, models in self.unbound_models.iteritems():
+app_instance = self.find_app(app_name)
+if not app_instance:
+raise ImproperlyConfigured(
+'Could not find an app instance for "%s"'
+% app_label)
+for model in models.itervalues():
+app_instance.models.append(model)
 self.loaded = True
+self.unbound_models = {}
 finally:
 self.write_lock.release()
 
@@ -159,15 +171,6 @@
 if app.name == name:
 return app
 
-def create_app(self, name):
-"""create an app instance"""
-name = name.split('.')[-1]
-app = self.find_app(name)
-if not app:
-app = App(name)
-self.app_instances.append(app)
-return app
-
 def app_cache_ready(self):
 """
 Returns true if the model cache is fully populated.
@@ -259,25 +262,34 @@
 if seed_cache:
 self._populate()
 app = self.find_app(app_label)
-if app:
+if self.app_cache_ready() and not app:
+return
+if cache.app_cache_ready():
 for model in app.models:
 if model_name.lower() == model._meta.object_name.lower():
 return model
+else:
+return self.unbound_models.get(app_label, {}).get(
+model_name.lower())
 
 def register_models(self, app_label, *models):
 """
 Register a set of models as belonging to an app.
 """
 app_instance = self.find_app(app_label)
-if not app_instance:
-raise ImproperlyConfigured('Could not find App instance with label 
"%s". '
-   'Please check your INSTALLED_APPS 
setting'
-   % app_label)
+if self.app_cache_ready() and not app_instance:
+raise ImproperlyConfigured(
+'Could not find an app instance with the label "%s". '
+'Please check your INSTALLED_APPS setting' % app_label)
+
 for model in models:
-# Store as 'name: model' pair in a dictionary
-# in the models list of the App instance
 model_name = model._meta.object_name.lower()
-model_dict = self.app_models.setdefault(app_label, SortedDict())
+if self.app_cache_ready():
+model_dict = dict([(model._meta.object_name.lower(), model)
+for model in app_instance.models])
+else:
+model_dict = self.unbound_models.setdefault(app_label, {})
+
 if model_name in model_dict:
 # The same model may be imported via different paths (e.g.
 # appname.models and project.appname.models). We use the source
@@ -289,8 +301,10 @@
 # comparing.
 if os.path.splitext(fname1)[0] == os.path.splitext(fname2)[0]:
 continue
-model_dict[model_name] = model
-app_instance.models.append(model)
+if self.app_cache_ready():
+app_instance.models.append(model)
+else:
+model_dict[model_name] = model
 self._get_models_cache.clear()
 
 cache = AppCache()

Modified: django/branches/soc2010/app-loading/tests/appcachetests/runtests.py

[Django] #14108: update loaddata to load fixtures in multi db environment for testing

2010-08-13 Thread Django
#14108: update loaddata to load fixtures in multi db environment for testing
-+--
 Reporter:  berto|   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Uncategorized| Version:  SVN   
 Keywords:  fixtures loaddata tests  |   Stage:  Unreviewed
Has_patch:  1|  
-+--
 I'm using django in a legacy multi database environment, where there are
 three distinct databases: default, transactions, reports.  Note, these are
 unique databases, not mirrors of each other.  When writing tests I needed
 the ability to load test data into these distinct databases.

 The current multi_db fixture setup expects all databases to load a
 particular fixture.  This patch allows the TestCase setting
 "multi_db=True" to try loading a fixture into each database rather than
 failing when data does not insert into one of the databases.

 The patch is a bit incomplete.  I'm not sure how to go about raising an
 exception if a particular fixture does not insert data into any database.
 Any thoughts would be great.

-- 
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] #7722: EMail Message with CC - Carbon Copy

2010-08-13 Thread Django
#7722: EMail Message with CC - Carbon Copy
-+--
  Reporter:  roberto.digirolamo   | Owner:  
nobody
Status:  new | Milestone:   
 
 Component:  django.core.mail|   Version:  
SVN   
Resolution:  |  Keywords:   
 
 Stage:  Design decision needed  | Has_patch:  
1 
Needs_docs:  1   |   Needs_tests:  
1 
Needs_better_patch:  0   |  
-+--
Comment (by shacker):

 I'll add my voice to the chorus -- big time +1 from me.

 cc: is standard/basic fare in any mail-capable software, not something we
 should have to bend over backwards to implement in our systems.  And it's
 fine if the argument is at the end of the list. It just needs to be 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] #14107: Problem with non-null fieds using Oracle Backend

2010-08-13 Thread Django
#14107: Problem with non-null fieds using Oracle Backend
---+
  Reporter:  mdpetry   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by mdpetry):

 Sorry, I posted a sqlite script instead of postgresql script, here is the
 right scripts:

 PostgreSQL: http://dpaste.org/CrYw/

 SQLite http://dpaste.org/Ybf7/

 Replying to [ticket:14107 mdpetry]:
 > Hi,
 >
 > I have a problem with Oracle Backend when I generate the SQL script to
 build the database structure
 >
 > Some fields (I don't know why :P) didn't set the "NOT NULL" attribute on
 SQL scripts for Oracle Database, for PostgreSQL database work fine.  Even
 if I set the Blank and Null attributes to false in my models.py
 >
 >
 > Here is a snippet of my models.py: http://dpaste.org/ovwp/
 >
 > and here, the Oracle SQL Script: http://dpaste.org/fwnq/
 >
 > and PostgreSQL script: http://dpaste.org/kYEN/

-- 
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] #10427: Bound field needs an easy way to get form value

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

 * cc: m...@typethink.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #14107: Problem with non-null fieds using Oracle Backend

2010-08-13 Thread Django
#14107: Problem with non-null fieds using Oracle Backend
---+
  Reporter:  mdpetry   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mdpetry):

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

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #14107: Problem with non-null fieds using Oracle Backend

2010-08-13 Thread Django
#14107: Problem with non-null fieds using Oracle Backend
--+-
 Reporter:  mdpetry   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Hi,

 I have a problem with Oracle Backend when I generate the SQL script to
 build the database structure

 Some fields (I don't know why :P) didn't set the "NOT NULL" attribute on
 SQL scripts for Oracle Database, for PostgreSQL database work fine.  Even
 if I set the Blank and Null attributes to false in my models.py


 Here is a snippet of my models.py: http://dpaste.org/ovwp/

 and here, the Oracle SQL Script: http://dpaste.org/fwnq/

 and PostgreSQL script: http://dpaste.org/kYEN/

-- 
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] #9353: Django documentation bundles on download page

2010-08-13 Thread Django
#9353: Django documentation bundles on download page
-+--
  Reporter:  Tome   | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Documentation   |   Version:  SVN 
Resolution:  |  Keywords:  download
 Stage:  Design decision needed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by airstrike):

 * cc: loftar...@gmail.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #3777: Persistent change_list filtering in admin

2010-08-13 Thread Django
#3777: Persistent change_list filtering in admin
+---
  Reporter:  matt   | Owner:  nobody

Status:  closed | Milestone:

 Component:  django.contrib.admin   |   Version:  SVN   

Resolution:  worksforme |  Keywords:  filter 
session
 Stage:  Unreviewed | Has_patch:  1 

Needs_docs:  1  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Comment (by drho...@gmail.com):

 I modified the above middleware so that is doesn't break admin's related
 object popups.  This method tracks popup query strings separately from
 regular pages.  This way you can use filters inside the popup windows as
 well.  Hope it helps someone else.

 {{{
 from django import http

 # based on http://code.djangoproject.com/ticket/3777#comment:4
 class FilterPersistMiddleware(object):

 def process_request(self, request):

 if '/admin/' not in request.path:
 return None

 if not request.META.has_key('HTTP_REFERER'):
 return None

 popup = 'pop=1' in request.META['QUERY_STRING']
 path = request.path
 query_string = request.META['QUERY_STRING']
 session = request.session

 if session.get('redirected', False):#so that we dont loop once
 redirected
 del session['redirected']
 return None

 referrer = request.META['HTTP_REFERER'].split('?')[0]
 referrer = referrer[referrer.find('/admin'):len(referrer)]
 key = 'key'+path.replace('/','_')
 if popup:
 key = 'popup'+path.replace('/','_')

 if path == referrer: #We are in same page as before
 if query_string == '': #Filter is empty, delete it
 if session.get(key,False):
 del session[key]
 return None
 request.session[key] = query_string
 else: #We are are coming from another page, restore filter if
 available
 if session.get(key, False):
 query_string=request.session.get(key)
 redirect_to = path+'?'+query_string
 request.session['redirected'] = True
 return http.HttpResponseRedirect(redirect_to)
 return None
 }}}

-- 
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] #9353: Django documentation bundles on download page

2010-08-13 Thread Django
#9353: Django documentation bundles on download page
-+--
  Reporter:  Tome   | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Documentation   |   Version:  SVN 
Resolution:  |  Keywords:  download
 Stage:  Design decision needed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Comment (by airstrike):

 +1 on this. one should also consider that developing on windows makes it
 just _that_ much harder to have local html copies of the documentation. do
 we really need makefiles for the 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] #14077: Need an easy way to display model instance field names and values in templates

2010-08-13 Thread Django
#14077: Need an easy way to display model instance field names and values in
templates
-+--
  Reporter:  haroldb | Owner:  nobody
Status:  closed  | Milestone:  1.3   
 Component:  Forms   |   Version:  1.2   
Resolution:  duplicate   |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by akaariai):

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

Comment:

 Duplicate of #10427

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