Re: [Django] #23501: remove/add fields programatically in modelform fails in admin

2014-09-16 Thread Django
#23501: remove/add fields programatically in modelform fails in admin
---+--
 Reporter:  hadisunyoto|Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.7
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by hadisunyoto):

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


Old description:

> model:
> {{{
> class Thickness(models.Model):
> value = models.DecimalField(primary_key=True, max_digits=7,
> decimal_places=2)
> is_active = models.BooleanField()
> }}}
> model form:
> {{{
> class ThicknessForm(forms.ModelForm):
> def __init__(self, *args, **kwargs):
> super(ThicknessForm, self).__init__(*args, **kwargs)
> instance = getattr(self, 'instance', None)
>
> # edit
> if instance and instance.pk:
> del self.fields['value']
> else:
> del self.fields['is_active']
>
> class Meta:
> model = Thickness
> fields = '__all__'
> }}}
>
> admin:
> {{{
> class ThicknessAdmin(admin.ModelAdmin):
> list_display = ('value', 'is_active')
> form = ThicknessForm
>
> admin.site.register(Thickness, ThicknessAdmin)
> }}}
>
> refresh page, go to admin->Thickness, create one:
>
> KeyError at /admin/thicknesses/thickness/add/
> "Key 'is_active' not found in 'ThicknessForm'"
> ...
>
> Error during template rendering
>
> In template D:\env\lib\site-
> packages\django\contrib\admin\templates\admin\includes\fieldset.html,
> error at line 7
>
> The highlighted line is number 7
>
> 6{% for line in fieldset %}
> 7
> 8{% if line.fields|length_is:'1' %}{{ line.errors }}{% endif
> %}
>
> go to admin->Thickness again, modify one (without using model form):
> KeyError at /admin/thicknesses/thickness/0.55/
> "Key 'value' not found in 'ThicknessForm'"
> ...
>
> same error as above
>
> Without admin, model form works as expected, it remove is_active when
> create, and it remove value when edit

New description:

 model:
 {{{
 class Thickness(models.Model):
 value = models.DecimalField(primary_key=True, max_digits=7,
 decimal_places=2)
 is_active = models.BooleanField()
 }}}
 model form:
 {{{
 class ThicknessForm(forms.ModelForm):
 def __init__(self, *args, **kwargs):
 super(ThicknessForm, self).__init__(*args, **kwargs)
 instance = getattr(self, 'instance', None)

 # edit
 if instance and instance.pk:
 del self.fields['value']
 else:
 del self.fields['is_active']

 class Meta:
 model = Thickness
 fields = '__all__'
 }}}

 admin:
 {{{
 class ThicknessAdmin(admin.ModelAdmin):
 list_display = ('value', 'is_active')
 form = ThicknessForm

 admin.site.register(Thickness, ThicknessAdmin)
 }}}

 refresh page, go to admin->Thickness, create one:

 KeyError at /admin/thicknesses/thickness/add/
 "Key 'is_active' not found in 'ThicknessForm'"
 ...

 Error during template rendering

 In template D:\env\lib\site-
 packages\django\contrib\admin\templates\admin\includes\fieldset.html,
 error at line 7

 The highlighted line is number 7

 6{% for line in fieldset %}
 7
 8{% if line.fields|length_is:'1' %}{{ line.errors }}{% endif
 %}

 go to admin->Thickness again, modify one (created previously without using
 model form):
 KeyError at /admin/thicknesses/thickness/0.55/
 "Key 'value' not found in 'ThicknessForm'"
 ...

 same error as above

 Without admin, model form works as expected, it remove is_active when
 create, and it remove value when edit

--

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.10cbfb928ae43f6f0350aa532902f87c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23501: remove/add fields programatically in modelform fails in admin

2014-09-16 Thread Django
#23501: remove/add fields programatically in modelform fails in admin
---+
 Reporter:  hadisunyoto|  Owner:  nobody
 Type:  Bug| Status:  new
Component:  contrib.admin  |Version:  1.7
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 model:
 {{{
 class Thickness(models.Model):
 value = models.DecimalField(primary_key=True, max_digits=7,
 decimal_places=2)
 is_active = models.BooleanField()
 }}}
 model form:
 {{{
 class ThicknessForm(forms.ModelForm):
 def __init__(self, *args, **kwargs):
 super(ThicknessForm, self).__init__(*args, **kwargs)
 instance = getattr(self, 'instance', None)

 # edit
 if instance and instance.pk:
 del self.fields['value']
 else:
 del self.fields['is_active']

 class Meta:
 model = Thickness
 fields = '__all__'
 }}}

 admin:
 {{{
 class ThicknessAdmin(admin.ModelAdmin):
 list_display = ('value', 'is_active')
 form = ThicknessForm

 admin.site.register(Thickness, ThicknessAdmin)
 }}}

 refresh page, go to admin->Thickness, create one:

 KeyError at /admin/thicknesses/thickness/add/
 "Key 'is_active' not found in 'ThicknessForm'"
 ...

 Error during template rendering

 In template D:\env\lib\site-
 packages\django\contrib\admin\templates\admin\includes\fieldset.html,
 error at line 7

 The highlighted line is number 7

 6{% for line in fieldset %}
 7
 8{% if line.fields|length_is:'1' %}{{ line.errors }}{% endif
 %}

 go to admin->Thickness again, modify one (without using model form):
 KeyError at /admin/thicknesses/thickness/0.55/
 "Key 'value' not found in 'ThicknessForm'"
 ...

 same error as above

 Without admin, model form works as expected, it remove is_active when
 create, and it remove value when edit

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.fd1b0d315fa9ff9aa3e0529dc43ac1cc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23500: Allow get_object_or_404 to accept select_related and prefetch_related

2014-09-16 Thread Django
#23500: Allow get_object_or_404 to accept select_related and prefetch_related
-+-
 Reporter:  chhabrakadabra   |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Utilities|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  get_object_or_404|  worksforme
  select_related prefetch_related| Triage Stage:
Has patch:  0|  Unreviewed
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by carljm):

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


Comment:

 The first argument to {{{get_object_or_404}}} can be a model or manager or
 query set; therefore it supports all query set methods.

 {{{
 get_object_or_404(MyModel.objects.select_related(), pk=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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.81714aa602c105544626738ff8b58f0f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23500: Allow get_object_or_404 to accept select_related and prefetch_related

2014-09-16 Thread Django
#23500: Allow get_object_or_404 to accept select_related and prefetch_related
-+-
 Reporter:   |  Owner:  nobody
  chhabrakadabra | Status:  new
 Type:  New  |Version:  master
  feature|   Keywords:  get_object_or_404 select_related
Component:   |  prefetch_related
  Utilities  |  Has patch:  0
 Severity:  Normal   |  UI/UX:  0
 Triage Stage:   |
  Unreviewed |
Easy pickings:  0|
-+-
 get_object_or_404 is a nice helper, but it doesn't support select_related
 and prefetch_related. At my company, we've had to implement that
 ourselves, but it would be great if Django had support for those to begin
 with.

 I will totally be willing to create the patch myself, but I want to figure
 out whether there is support for this improvement. Please let me know if
 you approve of this change.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/057.29d935c089543cc2ea908d5071592d08%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23499: Error in built-in template tag "now" documentation

2014-09-16 Thread Django
#23499: Error in built-in template tag "now" documentation
---+--
 Reporter:  JDougherty |Owner:  JDougherty
 Type:  Bug|   Status:  assigned
Component:  Documentation  |  Version:  1.7
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--

Comment (by JDougherty):

 Pull request created:
 https://github.com/django/django/pull/3228


 Thank you for the help, bmispelon.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.3457ab2843213e3266c2f096aa673ba4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23499: Error in built-in template tag "now" documentation

2014-09-16 Thread Django
#23499: Error in built-in template tag "now" documentation
---+--
 Reporter:  JDougherty |Owner:  JDougherty
 Type:  Bug|   Status:  assigned
Component:  Documentation  |  Version:  1.7
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--

Comment (by bmispelon):

 Personally i don't think the modified version is too wordy so you can go
 ahead and create the pull request.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.554212418c867464f4b6162c6797378e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23499: Error in built-in template tag "now" documentation

2014-09-16 Thread Django
#23499: Error in built-in template tag "now" documentation
---+--
 Reporter:  JDougherty |Owner:  JDougherty
 Type:  Bug|   Status:  assigned
Component:  Documentation  |  Version:  1.7
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by JDougherty):

 * has_patch:  0 => 1


Comment:

 Fix is available in the `ticket_23499` branch of my repo on github:
 https://github.com/JDougherty/django/tree/ticket_23499

 However, I feel that since there are now two backslash-escaped characters
 in the example, the description is a bit wordy.

 I can either leave as is, attempt to rephrase, or try to come up with a
 different example where only one backslash would be required.

 Should I hold off on the pull request? Please advise, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.5850253618b80bd140ba65d98553abd3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23499: Error in built-in template tag "now" documentation

2014-09-16 Thread Django
#23499: Error in built-in template tag "now" documentation
---+--
 Reporter:  JDougherty |Owner:  JDougherty
 Type:  Bug|   Status:  assigned
Component:  Documentation  |  Version:  1.7
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by bmispelon):

 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 Hi,

 You're absolutely correct. It seems this was overlooked when the `o`
 format was added in a6b6c6e17129379fa1f9ffce1ed7eaaa5d6f1127.

 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.f14145827e96a8e30fd9b6ad839e7992%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23499: Error in built-in template tag "now" documentation

2014-09-16 Thread Django
#23499: Error in built-in template tag "now" documentation
---+--
 Reporter:  JDougherty |Owner:  JDougherty
 Type:  Uncategorized  |   Status:  assigned
Component:  Documentation  |  Version:  1.7
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by JDougherty):

 * owner:  nobody => JDougherty
 * needs_better_patch:   => 0
 * status:  new => assigned
 * 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.fdf9e2f8a48c02aa40736edd11cd6974%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23499: Error in built-in template tag "now" documentation

2014-09-16 Thread Django
#23499: Error in built-in template tag "now" documentation
---+
 Reporter:  JDougherty |  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Documentation  |Version:  1.7
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  1  |  UI/UX:  0
---+
 The [documentation for the built-in `now` template
 tag](https://docs.djangoproject.com/en/dev/ref/templates/builtins/) says
 the following:


 Note that you can backslash-escape a format string if you want to use
 the “raw” value. In this example, “f” is backslash-escaped, because
 otherwise “f” is a format string that displays the time. '''The “o”
 doesn’t need to be escaped, because it’s not a format character:'''

 {{{
 It is the {% now "jS o\f F" %}
 }}}

 Emphasis mine. This is incorrect. Per the [`date` tag
 
documentation](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std
 :templatefilter-date), the "o" is a format character. I have verified that
 "o" does require a backslash when using `now` template tag in testing.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.e3eeeacda0cea09139c3ed4d18c1661c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23498: V1.7 migration doesn't properly rebuild the through table from 3rd party library

2014-09-16 Thread Django
#23498: V1.7 migration doesn't properly rebuild the through table from 3rd party
library
---+--
 Reporter:  variable   |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Migrations |  Version:  1.7
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by variable):

 Yes a foreignkey would work but it reverse the dependencies of
 applications, eg. http://stackoverflow.com/questions/25635408/django-one-
 to-many-field-without-reversing-dependency
 and http://blog.amir.rachum.com/blog/2013/06/15/a-case-for-a-onetomany-
 relationship-in-django/

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.973a374c0fd017b2ad21758d0739a42c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23498: V1.7 migration doesn't properly rebuild the through table from 3rd party library

2014-09-16 Thread Django
#23498: V1.7 migration doesn't properly rebuild the through table from 3rd party
library
---+--
 Reporter:  variable   |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Migrations |  Version:  1.7
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by timgraham):

 I am not sure how it would work, but for Django to try to introspect
 indexes and remove any it doesn't expect seems dangerous. The field looks
 like somewhat of a hack. If possible, I would recommend using a
 `ForeignKey` instead.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.608255c938fe586e268e295f6c85e071%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23498: V1.7 migration doesn't properly rebuild the through table from 3rd party library

2014-09-16 Thread Django
#23498: V1.7 migration doesn't properly rebuild the through table from 3rd party
library
---+--
 Reporter:  variable   |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Migrations |  Version:  1.7
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by variable):

 I thought it would be nice for the builtin migration to remove any
 unnecessary constraints that are not used by the built in ManyToManyField.
 Curious how would django-onetomany field address this one?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.e61f5c660987ed4d1641d91027fd4863%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23366: Workaround for `ValueError: Dependency on app with no migrations` in #22848 may need attention

2014-09-16 Thread Django
#23366: Workaround for `ValueError: Dependency on app with no migrations` in 
#22848
may need attention
+---
 Reporter:  stevejalim  |Owner:  sharifmamun
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  1.7-rc-3
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+---
Changes (by sharifmamun):

 * owner:  nobody => sharifmamun
 * 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.956ccaa49c944c65642a367b7363dedc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23498: V1.7 migration doesn't properly rebuild the through table from 3rd party library

2014-09-16 Thread Django
#23498: V1.7 migration doesn't properly rebuild the through table from 3rd party
library
---+--
 Reporter:  variable   |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Migrations |  Version:  1.7
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by timgraham):

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


Comment:

 I believe this needs to be addressed in `django-onetomany` as that is what
 provides the custom field with the extra constraint. Please reopen with
 more details if you don't think that's the case.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.8b0901f29a7cc30d55575abd5b3ecd1f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23498: V1.7 migration doesn't properly rebuild the through table from 3rd party library

2014-09-16 Thread Django
#23498: V1.7 migration doesn't properly rebuild the through table from 3rd party
library
---+
 Reporter:  variable   |  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Migrations |Version:  1.7
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 This is not necessarily a bug but would be great to have this working:

 I recently installed https://github.com/adsworth/django-onetomany which
 adds an unique constraint in the through table, UNIQUE KEY
 `referenceitem_id` (`referenceitem_id`), see below:


 {{{
 | accounts_transaction_references | CREATE TABLE
 `accounts_transaction_references` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `transaction_id` int(11) NOT NULL,
   `referenceitem_id` int(11) NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `referenceitem_id` (`referenceitem_id`),
   KEY `accounts_transaction_references_f847de52` (`transaction_id`),
   KEY `accounts_transaction_references_11805749` (`referenceitem_id`),
   CONSTRAINT
 `a_referenceitem_id_179ed3a0a0b94838_fk_accounts_referenceitem_id` FOREIGN
 KEY (`referenceitem_id`) REFERENCES `accounts_referenceitem` (`id`),
   CONSTRAINT
 `accou_transaction_id_7dafd9eb9684568c_fk_accounts_transaction_id` FOREIGN
 KEY (`transaction_id`) REFERENCES `accounts_transaction` (`id`)
 ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1 |
 }}}

 Then I reverted to the standard ManyToManyField, ran the migration, but
 the unique constrain didn't get removed.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.d6ce6537050e8e419dce4fcbb78cf739%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py

2014-09-16 Thread Django
#23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py
--+
 Reporter:  diek  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.7
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by timgraham):

 Proposed patch is attached above. I'm not against clarification, just the
 idea that we should include the entire file every time a change is made.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.50dc78c2005ae5f9f4911c88b8c85ddf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py

2014-09-16 Thread Django
#23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py
--+
 Reporter:  diek  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.7
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by diek):

 Tim,
 I respectfully disagree. Just because something has been in place for a
 period of time does not make it correct. You are looking at this from a
 perspective of someone who knows exactly what to do, this tutorial is for
 someone who has never used Django before. We are not talking about a file
 80 or more lines where it would be difficult to see the addition of the
 index method. And the user is going to easily see that thier existing file
 views.py differs. And again that is part of problem, it does not say to
 add it, there is no direction about what to do period. In some cases up to
 that point in the tutorial all the contents of a file are replaced, so in
 this case because there was no explanation it just looks like that is it a
 complete file. A new user should not have to guess, it should be explicit
 in the spirit of Python. And I have to say, what I am asking for, and
 aaugustin suggested as well, is far from radical. I am not asking for a
 complete change of the page, just clarification to help. As written it is
 not clear.

 derrick

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.dbee3c72e34e3ae820ce8fc962a2397d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23496: Model not detected as installed if custom model path is used

2014-09-16 Thread Django
#23496: Model not detected as installed if custom model path is used
-+-
 Reporter:  yscumc   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

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


Comment:

 Can you test on Django 1.7? Application loading has been refactored and
 the `re.sub` logic no longer exists. We won't be fixing the issue on 1.6
 as that branch is only receiving security fixes, so if there is no issue
 on 1.7, we can close this ticket. 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.08ed28da6c696f60ca0619897bec8d49%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py

2014-09-16 Thread Django
#23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py
--+
 Reporter:  diek  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.7
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by timgraham):

 I don't think including all the previous code is a good idea. It will make
 it more difficult to see the new code that's being added and encourage
 users to simply copy and paste. The current version has worked for 8 years
 or so, so I don't think we need radical changes.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.d2181994a37fff21ac87c89fc49cc89b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23495: ImportError silenced

2014-09-16 Thread Django
#23495: ImportError silenced
-+-
 Reporter:  papaloizouc  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Core (Other) |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  exceptions, import,  |  Needs documentation:  0
  conf, settings |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by aaugustin):

 This seems to date back to r105 (don't miss r106).

 The error message was improved a bit in [9a524e3c].

 I think Jacob won't mind if we drop the try/except.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.d7bd271af6ac6ad077d026d8784ae983%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23465: Inheritance destroying data in original model

2014-09-16 Thread Django
#23465: Inheritance destroying data in original model
-+-
 Reporter:  leandropls   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by leandropls:

Old description:

> I've created the following model:
>
> school/models.py:
> {{{#!python
> from django.contrib.auth.models import User
> (...)
> class Parent(User):
> contract = models.ForeignKey(Contract)
> user = models.OneToOneField(User, parent_link = True, related_name =
> 'school_parent')
> }}}
>
> Now I'm trying to "promote" a regular django user into a school parent:
>
> {{{#!python
> >>> from django.contrib.auth.models import User
> >>> from school.models import Parent, Contract
> >>> u = User(username = 'myuser')
> >>> u.save()
> >>> User.objects.all()
> []
> >>> c = Contract.objects.get(pk = 1)
> >>> p = Parent(user = u, contract = c)
> >>> p.save()
> >>> User.objects.all()
> []
> >>>
> }}}
>
> Apparently, in "Parent" creation, the user "myuser" is being destroyed.
> Django docs show[1] that you can "attach" one model to other via
> OneToOneField the way I'm doing. It also says that multi-table
> inheritance automatically creates a OneToOneField[2]. But as I inherit
> from User and set its OneToOneField to an existing instance of the user,
> the specified existing instance gets destroyed. The expected result was
> that django simply made the association.

New description:

 I've created the following model:

 school/models.py:
 {{{#!python
 from django.contrib.auth.models import User
 (...)
 class Parent(User):
 contract = models.ForeignKey(Contract)
 user = models.OneToOneField(User, parent_link = True, related_name =
 'school_parent')
 }}}

 Now I'm trying to "promote" a regular django user into a school parent:

 {{{#!python
 >>> from django.contrib.auth.models import User
 >>> from school.models import Parent, Contract
 >>> u = User(username = 'myuser')
 >>> u.save()
 >>> User.objects.all()
 []
 >>> c = Contract.objects.get(pk = 1)
 >>> p = Parent(user = u, contract = c)
 >>> p.save()
 >>> User.objects.all()
 []
 >>>
 }}}

 Apparently, in "Parent" creation, the user "myuser" is being destroyed.
 Django docs show that you can "attach" one model to other via
 OneToOneField the way I'm doing. It also says that multi-table inheritance
 automatically creates a OneToOneField. But as I inherit from User and set
 its OneToOneField to an existing instance of the user, the specified
 existing instance gets destroyed. The expected result was that django
 simply made the association.

--

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.2c1eeb7304941b180b1b9ff01bf049e9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23495: ImportError silenced

2014-09-16 Thread Django
#23495: ImportError silenced
-+-
 Reporter:  papaloizouc  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Core (Other) |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  exceptions, import,  |  Needs documentation:  0
  conf, settings |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by carljm):

 If we just print and then `raise`, the printed tip would likely be driven
 right off the screen by the stacktrace and never seen.

 Frankly I don't see that particular tip as providing much value over the
 original `ImportError` itself.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.dd88591a4d433013ff4e53a18270b99a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23497: Admin System Checks do not run for custom AdminSite sites

2014-09-16 Thread Django
#23497: Admin System Checks do not run for custom AdminSite sites
-+-
 Reporter:  amosson  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (System |  Version:  1.7
  checks)|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by amosson):

 Sure.  Here you go

 https://github.com/django/django/pull/3227

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.6e2a4195fff1123420593a36c4c2a57d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23497: Admin System Checks do not run for custom AdminSite sites

2014-09-16 Thread Django
#23497: Admin System Checks do not run for custom AdminSite sites
-+-
 Reporter:  amosson  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (System |  Version:  1.7
  checks)|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by charettes):

 Could you submit a PR against Django's master instead? It makes reviewing
 easier.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ee99b7cd6b92e4bfbabcf2ff70acde88%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23497: Admin System Checks do not run for custom AdminSite sites

2014-09-16 Thread Django
#23497: Admin System Checks do not run for custom AdminSite sites
-+-
 Reporter:  amosson  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (System |  Version:  1.7
  checks)|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by amosson):

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


Comment:

 Patch at https://github.com/amosson/django/tree/ticket_23497

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ecdeed37b65cf9e8316436ce456793fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23497: Admin System Checks do not run for custom AdminSite sites

2014-09-16 Thread Django
#23497: Admin System Checks do not run for custom AdminSite sites
--+
 Reporter:  amosson   |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Core (System checks)  |Version:  1.7
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 The admin section of the System checks only runs for ModelAdmin subclasses
 that are registered with the main AdminSite (admin.site.register(...))

 To replicate place something similar to the following in a urls.py file


 {{{
 books/admin.py
 from django.contrib import admin

 class BookAdmin(admin.ModelAdmin):
 list_display = 'a field'  # intentional error

 - urls.py
 from django.admin.sites import AdminSite
 from books.models import Book
 from books.admin import BookAdmin

 custom_site = AdminSite()
 custom_site.register(Book, BookAdmin)

 > python manage.py check
 Expect to see an error here (specifically that list display must be a list
 of a tuple)
 }}}

 In actuality, this runs fine.

 One potential fix for this problem would be to create a module level
 variable in django.contrib.admin.sites (or directly in
 django.contrib.admin), run the checks on register (this is already being
 done but the result of the checks are being ignored), and store the
 results in the module level variable.

 Patch with this approach is attached

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.97a9a3f1eaa875983c1fe70146943c52%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23496: Model not detected as installed if custom model path is used

2014-09-16 Thread Django
#23496: Model not detected as installed if custom model path is used
--+
 Reporter:  yscumc|  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.6
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 I have a model at this python path: `my_path.my_app.models.common.User`

 In `my_path/my_app/models/__init__.py`, there's an import line like this:


 {{{
 from .common import User
 }}}

 In `settings.py`, I have
 {{{
 INSTALLED_APPS = {
 # ...
 'my_path.my_app',
 # ...
 }
 # ...
 AUTH_USER_MODEL = 'my_app.User'
 }}}
 This seems to work for almost all cases and the model is accessible as
 `my_path.my_app.models.User`

 However, '''South''' breaks on creating the initial migration with the
 following message:

 {{{
 CommandError: One or more models did not validate:
 auth.user: Model has been swapped out for 'my_app.User' which has not been
 installed or is abstract.
 }}}

 Upon further debugging and loading up the shell, I realized that Django
 reports the model as not installed:

 {{{
 >>> from my_path.my_app.models import User
 >>> User._meta.installed
 False
 }}}

 In `django/db/models/options.py` line 80, I see this line:

 {{{
 self.installed = re.sub('\.models$', '', cls.__module__) in
 settings.INSTALLED_APPS
 }}}

 And testing this in the shell:

 {{{
 >>> User.__module__
 'my_path.my_app.models.common'
 >>> import re
 >>> re.sub('\.models$', '', 'my_path.my_app.models.common')
 'my_path.my_app.models.common'
 >>>
 }}}

 The following regex seems to work in my case, but a more robust method of
 detection should probably be used in case the actual model exists in a
 totally different python path.

 {{{
 >>> re.sub('\.models($|\..*)', '', 'my_path.my_app.models.common')
 'my_path.my_app'
 }}}

 (Currently using 1.6.7, but I noticed this problem back in Django 1.5 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.c92920ab52a708ed330f47910e988ccc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py

2014-09-16 Thread Django
#23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py
--+
 Reporter:  diek  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.7
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by diek):

 That would help, but I think including the whole file would really help.
 In my opinion tut 3 is definitely a step up in complexity from tut 2, and
 clarity is key. In the end it is only adding a few more lines of html to
 the source, and that would make it perfectly clear.

 Thank you for your response, and again great job on helping out the
 overall Django project aaugustin. :)

 derrick

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.408577ea0d6b4a97bf8d1b1078e5023a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[django/django] a0dfef: Moved some people to "past team members".

2014-09-16 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/django/django
  Commit: a0dfef02df258d530c9d2d235a4a0bbd76e13d16
  
https://github.com/django/django/commit/a0dfef02df258d530c9d2d235a4a0bbd76e13d16
  Author: Tim Graham 
  Date:   2014-09-16 (Tue, 16 Sep 2014)

  Changed paths:
M docs/internals/team.txt

  Log Message:
  ---
  Moved some people to "past team members".


-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/54186fa4d541e_2f23fe718b432c06803b%40hookshot-fe1-cp1-prd.iad.github.net.mail.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23495: ImportError silenced

2014-09-16 Thread Django
#23495: ImportError silenced
-+-
 Reporter:  papaloizouc  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.6
Component:  Core (Other) |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  exceptions, import,  |  Needs documentation:  0
  conf, settings |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * component:  Uncategorized => Core (Other)
 * needs_tests:   => 0
 * easy:  1 => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 Good intentions that do more harm than good. This happens often in Django!

 How could be preserve the tip without destroying the stack trace? Just
 print it and then `raise`?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.02c3788d9a2135c4e91e1b42c7d2653d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23495: ImportError silenced

2014-09-16 Thread Django
#23495: ImportError silenced
--+
 Reporter:|  Owner:  nobody
  papaloizouc | Status:  new
 Type:|Version:  1.6
  Uncategorized   |   Keywords:  exceptions, import, conf, settings
Component:|  Has patch:  0
  Uncategorized   |  UI/UX:  0
 Severity:  Normal|
 Triage Stage:|
  Unreviewed  |
Easy pickings:  1 |
--+
 Hi sometimes i get import errors silenced by {{{django/conf/__init__.py}}}
 source code link
 
[https://github.com/django/django/blob/885ff6845e54511022677c1f28b84ddd4f2165dd/django/conf/__init__.py#L94]

 I comment out the {{{except ImportError as e:}}} in order to get a proper
 stacktrace on where my code crashed.

 So for example models.py imports from util.py that actually does not exist
 i get error {{{ImportError: Could not import settings
 'sharehoods.settings' (Is it on sys.path? Is there an import error in the
 settings file?): No module named util}}}. Because this is not clear what
 happened in the source code, i uncomment the exception catch in the source
 code and then i get the real stacktrace where the import error happened in
 my code so i know how to fix it. I'm not sure why the exception is
 silenced and re-raised but i personally always have it commented out on my
 pc so i thought i should mention.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.1e955d1e38c1fec08f275863aa2077ec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23494: Makemigrations fails with python3

2014-09-16 Thread Django
#23494: Makemigrations fails with python3
+--
 Reporter:  rumpelsepp  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  1.7
 Severity:  Normal  |   Resolution:  duplicate
 Keywords:  python3 | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by timgraham):

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


Comment:

 Duplicate of #23455

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.de2e90f976351b897ba32da54b518ccc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23474: Schema migrations can inadvertently destroy data

2014-09-16 Thread Django
#23474: Schema migrations can inadvertently destroy data
-+
 Reporter:  Naddiseo |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by carljm):

 I think akaariai's idea of requiring more explicit intent to rollback
 migrations is worth consideration, but entirely apart from that it still
 seems to me that the previous behaviour was bad and this PR made it
 better.

 In #23410 I see that Andrew stated that the previous behavior was
 intentional, to wit: "the contract is that backwards migrations roll back
 to just after the application of the named migration, and all its
 dependencies are unapplied."

 I don't see any clear reasoning provided there as to _why_ that contract
 is more desirable than the alternatives. Based on the following paragraph,
 it _seems_ that the reasoning is that a "graph node specification" such as
 "appname 0001" should always precisely specify a single state, regardless
 of whether you are rolling backwards or forwards to that state.

 I don't find that convincing. Although I see the purity argument, I think
 that in practice a much more useful (and intuitive, and less likely to
 result in data loss) contract is that "migrate appname 0001" will ensure
 that appname-0001 is applied and appname-0002 is not applied, and will
 otherwise apply or unapply as few migrations as possible.

 I also don't see a backwards-compatibility issue with switching to that
 contract in 1.7.1. This is code that runs interactively and tells you
 exactly what it is doing as it is doing it.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f66d8825738d6fe3603e1fbb90797703%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23065: Migration Error when removing unique constraint

2014-09-16 Thread Django
#23065: Migration Error when removing unique constraint
-+
 Reporter:  anonymous|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by timgraham):

 * severity:  Normal => Release blocker
 * needs_tests:  0 => 1


Comment:

 Regression tests are also required.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.2363aa58511a6ae25b863f1c9a70cdb1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23065: Migration Error when removing unique constraint

2014-09-16 Thread Django
#23065: Migration Error when removing unique constraint
+
 Reporter:  anonymous   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7
 Severity:  Normal  |   Resolution:
 Keywords:  migrations  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by sir-sigurd):

 * version:  1.7-rc-1 => 1.7


--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.3f197c163e28b143108beab7ebfb4d97%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23494: Makemigrations fails with python3

2014-09-16 Thread Django
#23494: Makemigrations fails with python3
+-
 Reporter:  rumpelsepp  |  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Migrations  |Version:  1.7
 Severity:  Normal  |   Keywords:  python3
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+-
 Hi,
 makemigrations very often fails under python3 with the following
 traceback:

 {{{
 $ python manage.py makemigrations
 Traceback (most recent call last):
   File "manage.py", line 10, in 
 execute_from_command_line(sys.argv)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/core/management/__init__.py", line 385, in
 execute_from_command_line
 utility.execute()
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/core/management/__init__.py", line 377, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/core/management/base.py", line 288, in run_from_argv
 self.execute(*args, **options.__dict__)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/core/management/base.py", line 338, in execute
 output = self.handle(*args, **options)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/core/management/commands/makemigrations.py", line 111, in
 handle
 convert_apps=app_labels or None,
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/db/migrations/autodetector.py", line 40, in changes
 changes = self._detect_changes(convert_apps, graph)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/db/migrations/autodetector.py", line 107, in
 _detect_changes
 self.old_apps = self.from_state.render(ignore_swappable=True)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/db/migrations/state.py", line 67, in render
 model.render(self.apps)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/db/migrations/state.py", line 311, in render
 body,
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/db/models/base.py", line 171, in __new__
 new_class.add_to_class(obj_name, obj)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/db/models/base.py", line 300, in add_to_class
 value.contribute_to_class(cls, name)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/db/models/fields/related.py", line 1572, in
 contribute_to_class
 super(ForeignObject, self).contribute_to_class(cls, name,
 virtual_only=virtual_only)
   File "/home/stefan/.virtualenvs/python3/lib/python3.4/site-
 packages/django/db/models/fields/related.py", line 264, in
 contribute_to_class
 'app_label': cls._meta.app_label.lower()
 TypeError: unsupported operand type(s) for %: 'bytes' and 'dict'
 }}}

 Using python2 instead fixes the problem. I use Django 1.7 from pip.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.ef9bc8d41be5944905929d548b89a63e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23065: Migration Error when removing unique constraint

2014-09-16 Thread Django
#23065: Migration Error when removing unique constraint
+
 Reporter:  anonymous   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7-rc-1
 Severity:  Normal  |   Resolution:
 Keywords:  migrations  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by sir-sigurd):

 * has_patch:  0 => 1


Comment:

 pull request is here: https://github.com/django/django/pull/3226

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.9c72ed1b1220909dde43356ec3a1b727%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23065: Migration Error when removing unique constraint

2014-09-16 Thread Django
#23065: Migration Error when removing unique constraint
+
 Reporter:  anonymous   |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7-rc-1
 Severity:  Normal  |   Resolution:
 Keywords:  migrations  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by sir-sigurd):

 * status:  closed => new
 * resolution:  worksforme =>
 * stage:  Unreviewed => Accepted


Comment:

 steps to reproduce postgres should be used as backend (maybe others, but
 not sqlite):

 * add `Auth` app with model as shown above
 * syncdb using django 1.6
 * upgrade to django 1.7
 * makemigrations Auth
 * migrate --fake
 * remove any unique constraint
 * makemigrations Auth
 * migrate

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.85489981a3376a6470c7f772eacea5a8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23493: Defining bilateral lookup transformations

2014-09-16 Thread Django
#23493: Defining bilateral lookup transformations
-+-
 Reporter:  tchaumeny|Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by akaariai):

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


Comment:

 I am going to mark this as accepted assuming the API is opt-in. We already
 have a precedence of doing this for lower lookup. We could actually remove
 the lower lookup from Django, and replace it with a bilateral transform.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f400153c81ed90b723db0e777f714413%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23493: Defining bilateral lookup transformations

2014-09-16 Thread Django
#23493: Defining bilateral lookup transformations
--+
 Reporter:  tchaumeny |  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  Database layer (models, ORM)  |Version:  master
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  1
Easy pickings:  0 |  UI/UX:  0
--+
 With the current `Transform` API, transformations are applied to the left-
 hand side of the lookup only.

 For instance, if you define some unaccent `Transform` performing the SQL
 operation `UNACCENT(...)`, the query below won't return an `Author` with
 first name Jérémie. Actually, it won't ever return anything.
 {{{
 Author.objects.filter(first_name__unaccent__iexact="Jérémie")
 }}}

 I think it would be great to be able to define custom transformations
 which would apply to both sides of the lookup. This would be particularly
 helpful when you want to perform some lookup insensitive to some SQL
 transformation (unaccent or other).

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.4b401b2b00155741f33bed3448f3464c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[django/django] 82a5ce: Fixed typo in docs/internals/roles.txt and added w...

2014-09-16 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/django/django
  Commit: 82a5ce801b1ed2a61016541b0fe3a40f5bfc89c2
  
https://github.com/django/django/commit/82a5ce801b1ed2a61016541b0fe3a40f5bfc89c2
  Author: Tim Graham 
  Date:   2014-09-16 (Tue, 16 Sep 2014)

  Changed paths:
M docs/internals/roles.txt
M docs/spelling_wordlist

  Log Message:
  ---
  Fixed typo in docs/internals/roles.txt and added words to spelling_wordlist.


-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/54182f853c14e_35a53fd7a89652c0935c5%40hookshot-fe4-cp1-prd.iad.github.net.mail.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23492: F objects are no longer deepcopy-able

2014-09-16 Thread Django
#23492: F objects are no longer deepcopy-able
-+-
 Reporter:  ris  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.7
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  F object expression  |  Needs documentation:  0
  deepcopy   |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  1|
-+-

Comment (by Tim Graham ):

 In [changeset:"3f6430d084097082ea02a8e49ce3e28c7b75582c"]:
 {{{
 #!CommitTicketReference repository=""
 revision="3f6430d084097082ea02a8e49ce3e28c7b75582c"
 [1.7.x] Added 1.7.1 release notes for refs #23492.

 Backport of 92a8213fdb from master
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.f98eff56ed952e0f79e4d3dfbb9b677c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[django/django] 3f6430: [1.7.x] Added 1.7.1 release notes for refs #23492.

2014-09-16 Thread GitHub
  Branch: refs/heads/stable/1.7.x
  Home:   https://github.com/django/django
  Commit: 3f6430d084097082ea02a8e49ce3e28c7b75582c
  
https://github.com/django/django/commit/3f6430d084097082ea02a8e49ce3e28c7b75582c
  Author: Tim Graham 
  Date:   2014-09-16 (Tue, 16 Sep 2014)

  Changed paths:
M docs/releases/1.7.1.txt

  Log Message:
  ---
  [1.7.x] Added 1.7.1 release notes for refs #23492.

Backport of 92a8213fdb from master


-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/54182dff5d22_14873fa6554d32b857169%40hookshot-fe3-cp1-prd.iad.github.net.mail.
For more options, visit https://groups.google.com/d/optout.


[django/django] 92a821: Added 1.7.1 release notes for refs #23492.

2014-09-16 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/django/django
  Commit: 92a8213fdbb6f7612847f3d803a9f91d0f9d6392
  
https://github.com/django/django/commit/92a8213fdbb6f7612847f3d803a9f91d0f9d6392
  Author: Tim Graham 
  Date:   2014-09-16 (Tue, 16 Sep 2014)

  Changed paths:
M docs/releases/1.7.1.txt

  Log Message:
  ---
  Added 1.7.1 release notes for refs #23492.


-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/54182deb32af1_3c0d3fad919312b88955f%40hookshot-fe4-cp1-prd.iad.github.net.mail.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23492: F objects are no longer deepcopy-able

2014-09-16 Thread Django
#23492: F objects are no longer deepcopy-able
-+-
 Reporter:  ris  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.7
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  F object expression  |  Needs documentation:  0
  deepcopy   |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  1|
-+-

Comment (by Tim Graham ):

 In [changeset:"92a8213fdbb6f7612847f3d803a9f91d0f9d6392"]:
 {{{
 #!CommitTicketReference repository=""
 revision="92a8213fdbb6f7612847f3d803a9f91d0f9d6392"
 Added 1.7.1 release notes for refs #23492.
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.357e069bf497d55da33063fbf90cc84c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[django/django] 04e7c7: [1.7.x] Fixed #23492 -- Restored F.__deepcopy__.

2014-09-16 Thread GitHub
  Branch: refs/heads/stable/1.7.x
  Home:   https://github.com/django/django
  Commit: 04e7c7d51f832407c49c3abb3413fbfbdb410f6f
  
https://github.com/django/django/commit/04e7c7d51f832407c49c3abb3413fbfbdb410f6f
  Author: Baptiste Mispelon 
  Date:   2014-09-16 (Tue, 16 Sep 2014)

  Changed paths:
M django/db/models/expressions.py
M tests/expressions/tests.py

  Log Message:
  ---
  [1.7.x] Fixed #23492 -- Restored F.__deepcopy__.

This reverts commit 3a66035107a640c4905f0a5f247a45f32dbe16d7.
A regression test was also added.

Backport of d63ac5b595694c44ed8a64d782a177d2f92125d9 from master.


-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/54180fe4acf86_8133fa7e84cf2a069680%40hookshot-fe1-cp1-prd.iad.github.net.mail.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23492: F objects are no longer deepcopy-able

2014-09-16 Thread Django
#23492: F objects are no longer deepcopy-able
-+-
 Reporter:  ris  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.7
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  F object expression  |  Needs documentation:  0
  deepcopy   |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  1|
-+-

Comment (by Baptiste Mispelon ):

 In [changeset:"04e7c7d51f832407c49c3abb3413fbfbdb410f6f"]:
 {{{
 #!CommitTicketReference repository=""
 revision="04e7c7d51f832407c49c3abb3413fbfbdb410f6f"
 [1.7.x] Fixed #23492 -- Restored F.__deepcopy__.

 This reverts commit 3a66035107a640c4905f0a5f247a45f32dbe16d7.
 A regression test was also added.

 Backport of d63ac5b595694c44ed8a64d782a177d2f92125d9 from master.
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.c6fe13b43b5f315d01e75b6bfb077c9a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[django/django] d63ac5: Fixed #23492 -- Restored F.__deepcopy__.

2014-09-16 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/django/django
  Commit: d63ac5b595694c44ed8a64d782a177d2f92125d9
  
https://github.com/django/django/commit/d63ac5b595694c44ed8a64d782a177d2f92125d9
  Author: Baptiste Mispelon 
  Date:   2014-09-16 (Tue, 16 Sep 2014)

  Changed paths:
M django/db/models/expressions.py
M tests/expressions/tests.py

  Log Message:
  ---
  Fixed #23492 -- Restored F.__deepcopy__.

This reverts commit 3a66035107a640c4905f0a5f247a45f32dbe16d7.
A regression test was also added.


-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/54180f19e2a82_78493fe6896952bc16671%40hookshot-fe1-cp1-prd.iad.github.net.mail.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23492: F objects are no longer deepcopy-able

2014-09-16 Thread Django
#23492: F objects are no longer deepcopy-able
-+-
 Reporter:  ris  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.7
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  F object expression  |  Needs documentation:  0
  deepcopy   |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  1|
-+-
Changes (by Baptiste Mispelon ):

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


Comment:

 In [changeset:"d63ac5b595694c44ed8a64d782a177d2f92125d9"]:
 {{{
 #!CommitTicketReference repository=""
 revision="d63ac5b595694c44ed8a64d782a177d2f92125d9"
 Fixed #23492 -- Restored F.__deepcopy__.

 This reverts commit 3a66035107a640c4905f0a5f247a45f32dbe16d7.
 A regression test was also 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.8cd61539285534be896b6b4fbf792615%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py

2014-09-16 Thread Django
#23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py
--+
 Reporter:  diek  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.7
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by aaugustin):

 The tutorial must be absolutely explicit. I don't think `# ...` suffices.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.9b1950ae78a398aa6cf4f9f9685942db%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23492: F objects are no longer deepcopy-able

2014-09-16 Thread Django
#23492: F objects are no longer deepcopy-able
-+-
 Reporter:  ris  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.7
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  F object expression  |  Needs documentation:  0
  deepcopy   |  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  1|
-+-
Changes (by bmispelon):

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


Comment:

 Hi,

 I can indeed reproduce your issue and bisecting it points to
 3a66035107a640c4905f0a5f247a45f32dbe16d7 as you suspected.

 We should probably add the method back but also add some tests to make
 sure we don't break that again.

 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.b0c889741b5d97ec892f22a97c3f5d78%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py

2014-09-16 Thread Django
#23491: Django Tutorial 1.7, Pt 3. Adding Index method to views.py
--+
 Reporter:  diek  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.7
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+
Changes (by bmispelon):

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


Comment:

 Hi,

 Thanks for your feedback. I agree with you that we could improve this bit
 to make it less confusing.

 How about simply adding a `# ...` comment at the end, like so:
 {{{
 from django.http import HttpResponse

 from polls.models import Question


 def index(request):
 latest_question_list = Question.objects.order_by('-pub_date')[:5]
 output = ', '.join([p.question_text for p in latest_question_list])
 return HttpResponse(output)

 # ...
 }}}

 Or is that not obvious enough?

 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.96d50e41a610c1dfa4a662e36ec1287f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23492: F objects are no longer deepcopy-able

2014-09-16 Thread Django
#23492: F objects are no longer deepcopy-able
-+-
 Reporter:  ris  |  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  Database layer   |Version:  1.7
  (models, ORM)  |   Keywords:  F object expression
 Severity:  Normal   |  deepcopy
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  1|  UI/UX:  0
-+-
 I suspect the culprit is commit 3a66035107a640c4905f0a5f247a45f32dbe16d7
 "Removed F.__deepcopy__()" because apparently "The method didn't change
 standard __deepcopy__ in any way.".

 Well, in 1.7.0:


 {{{
 >>> from django.db.models import F
 >>> from copy import deepcopy
 >>> f = F ( "something__some_field" )
 >>> f.name
 'something__some_field'
 >>> g = deepcopy ( f )
 >>> g.name
 AttributeError: 'F' object has no attribute 'name'
 }}}

 Paste back in the same __deepcopy__ method removed in
 3a66035107a640c4905f0a5f247a45f32dbe16d7, and:

 {{{
 >>> from django.db.models import F
 >>> from copy import deepcopy
 >>> f = F ( "something__some_field" )
 >>> f.name
 'something__some_field'
 >>> g = deepcopy ( f )
 >>> g.name
 'something__some_field'
 }}}

 Tadaa!

 Can we have it back please?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/046.1e93c54887c16d1e88d67ee49124fb58%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19463: Add UUID Field to core

2014-09-16 Thread Django
#19463: Add UUID Field to core
-+-
 Reporter:  guettli  |Owner:  mjtamlyn
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Marc Tamlyn ):

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


Comment:

 In [changeset:"ed7821231b7dbf34a6c8ca65be3b9bcbda4a0703"]:
 {{{
 #!CommitTicketReference repository=""
 revision="ed7821231b7dbf34a6c8ca65be3b9bcbda4a0703"
 Fixed #19463 -- Added UUIDField

 Uses native support in postgres, and char(32) on other backends.
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.987065490717a0862db99b1cb4733f76%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[django/django] ed7821: Fixed #19463 -- Added UUIDField

2014-09-16 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/django/django
  Commit: ed7821231b7dbf34a6c8ca65be3b9bcbda4a0703
  
https://github.com/django/django/commit/ed7821231b7dbf34a6c8ca65be3b9bcbda4a0703
  Author: Marc Tamlyn 
  Date:   2014-09-16 (Tue, 16 Sep 2014)

  Changed paths:
M django/db/backends/mysql/base.py
M django/db/backends/mysql/creation.py
M django/db/backends/oracle/base.py
M django/db/backends/oracle/creation.py
M django/db/backends/postgresql_psycopg2/base.py
M django/db/backends/postgresql_psycopg2/creation.py
M django/db/backends/sqlite3/base.py
M django/db/backends/sqlite3/creation.py
M django/db/models/fields/__init__.py
M django/forms/fields.py
M docs/ref/databases.txt
M docs/ref/forms/fields.txt
M docs/ref/models/fields.txt
M docs/releases/1.8.txt
M tests/forms_tests/tests/test_fields.py
M tests/model_fields/models.py
A tests/model_fields/test_uuid.py

  Log Message:
  ---
  Fixed #19463 -- Added UUIDField

Uses native support in postgres, and char(32) on other backends.


-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/5417fe09c6e5_107b3fddd56912a0461ef%40hookshot-fe3-cp1-prd.iad.github.net.mail.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23474: Schema migrations can inadvertently destroy data

2014-09-16 Thread Django
#23474: Schema migrations can inadvertently destroy data
-+
 Reporter:  Naddiseo |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by akaariai):

 I think the problem is that the user never asked for backwards migration.
 Having "./manage.py migrate a 0001" unapply dependencies is a dangerous
 API. Either add --backwards flag to migrate or at least ask the user if
 they want to unapply the dependent migrations.

 Also, I think --noinput should *not* assume that the user wants to unapply
 dependencies. Unapply should only happen if the user explicitly tells
 Django to do so. For this reason the --backwards flag seems better - it is
 much harder to unapply migrations accidently, and there is no problem for
 --noinput interpretation (what if the user wants to unapply dependencies,
 and wants to use --noinput?)

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.8f96e2b9ba14a85ebeb851833531b913%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.