Re: [Django] #10645: Meta unique_together values cannot be Unicode strings

2009-04-11 Thread Django
#10645: Meta unique_together values cannot be Unicode strings
---+
  Reporter:  ramen | Owner:  nobody
Status:  closed| Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * status:  new => closed
  * resolution:  => 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10645: Meta unique_together values cannot be Unicode strings

2009-04-11 Thread Django
#10645: Meta unique_together values cannot be Unicode strings
---+
  Reporter:  ramen | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 Fixed in r10510.

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



Re: [Django] #10645: Meta unique_together values cannot be Unicode strings

2009-04-02 Thread Django
#10645: Meta unique_together values cannot be Unicode strings
---+
  Reporter:  ramen | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * stage:  Unreviewed => Accepted
  * milestone:  => 1.1

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



Re: [Django] #10645: Meta unique_together values cannot be Unicode strings

2009-03-31 Thread Django
#10645: Meta unique_together values cannot be Unicode strings
---+
  Reporter:  ramen | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramen):

 Two other admin configuration seettings where Unicode strings can't be
 used:
   - search_fields
   - dictionary keys for fieldsets

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



Re: [Django] #10645: Meta unique_together values cannot be Unicode strings

2009-03-27 Thread Django
#10645: Meta unique_together values cannot be Unicode strings
---+
  Reporter:  ramen | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ingenieroariel):

 When working on dynamic django models for OGR Datasource got biten by
 that. I had a dictionary of field names, field values that were in unicode
 after they came from the GeoDjango GDAL interface.

 I ended up doing the string casting for the field names.

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



Re: [Django] #10645: Meta unique_together values cannot be Unicode strings

2009-03-27 Thread Django
#10645: Meta unique_together values cannot be Unicode strings
---+
  Reporter:  ramen | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramen):

 The Django 0.96 to 1.0 porting guide at
 http://docs.djangoproject.com/en/dev/releases/1.0-porting-guide/ says the
 following:

 Change string literals ('foo') into Unicode literals (u'foo'). Django now
 uses Unicode strings throughout.

 I have changed all of my string literals to Unicode literals. If there are
 some string literals that I should not change, it would be helpful if
 these were documented.

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



Re: [Django] #10645: Meta unique_together values cannot be Unicode strings

2009-03-27 Thread Django
#10645: Meta unique_together values cannot be Unicode strings
---+
  Reporter:  ramen | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 Is there an actual usecase for providing unicode strings, or is this a
 case of "dr it hurts when I do that"?

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



[Django] #10645: Meta unique_together values cannot be Unicode strings

2009-03-27 Thread Django
#10645: Meta unique_together values cannot be Unicode strings
--+-
 Reporter:  ramen |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 I had code like this in my Meta class for a Model:
 {{{
 unique_together = [(u'family', u'term')]
 }}}
 When I tried to save a record using the Admin, I got the following error:
 {{{
 Traceback:
 File "/var/lib/python-support/python2.5/django/core/handlers/base.py" in
 get_response
   86. response = callback(request, *callback_args,
 **callback_kwargs)
 File "/var/lib/python-support/python2.5/django/contrib/admin/sites.py" in
 root
   157. return self.model_page(request, *url.split('/', 2))
 File "/var/lib/python-support/python2.5/django/views/decorators/cache.py"
 in _wrapped_view_func
   44. response = view_func(request, *args, **kwargs)
 File "/var/lib/python-support/python2.5/django/contrib/admin/sites.py" in
 model_page
   176. return admin_obj(request, rest_of_url)
 File "/var/lib/python-support/python2.5/django/contrib/admin/options.py"
 in __call__
   197. return self.change_view(request, unquote(url))
 File "/var/lib/python-support/python2.5/django/db/transaction.py" in
 _commit_on_success
   238. res = func(*args, **kw)
 File "/var/lib/python-support/python2.5/django/contrib/admin/options.py"
 in change_view
   568. if form.is_valid():
 File "/var/lib/python-support/python2.5/django/forms/forms.py" in is_valid
   120. return self.is_bound and not bool(self.errors)
 File "/var/lib/python-support/python2.5/django/forms/forms.py" in
 _get_errors
   111. self.full_clean()
 File "/var/lib/python-support/python2.5/django/forms/forms.py" in
 full_clean
   241. self.cleaned_data = self.clean()
 File "/var/lib/python-support/python2.5/django/forms/models.py" in clean
   223. self.validate_unique()
 File "/var/lib/python-support/python2.5/django/forms/models.py" in
 validate_unique
   263. qs =
 self.instance.__class__._default_manager.filter(**lookup_kwargs)

 Exception Type: TypeError at /admin/data/familyterm/17/
 Exception Value: filter() keywords must be strings
 }}}
 Changing to:
 {{{
 unique_together = [('family', 'term')]
 }}}
 resolved the issue.

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