Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-28 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Migrations|  Version:  master
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by charettes):

 * 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 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.9a45260bb4ee515c2765892877febdf2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-28 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Simon Charette ):

 In [changeset:"f951bb78cbf179f0fb70fe74ae0c218925fd7ede" f951bb78]:
 {{{
 #!CommitTicketReference repository=""
 revision="f951bb78cbf179f0fb70fe74ae0c218925fd7ede"
 Refs #26521 -- Adjusted CreateModel bases validation to account for
 mixins.

 Thanks Collin for the report.
 }}}

--
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.16215aa67115f51a33e9f2f12ef7f24a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-28 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by charettes):

 Will take care of this. I'm a bit surprised `CreateModel` is untested with
 mixins.

--
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.bee80f9cbce786ddd873f50b25ee9612%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-28 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by collinanderson):

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


Comment:

 I think this broke non-model base classes:

 {{{
   File
 "/home/collin/comcenter/../comcenter/category/migrations/0001_initial.py",
 line 9, in 
 class Migration(migrations.Migration):
   File
 "/home/collin/comcenter/../comcenter/category/migrations/0001_initial.py",
 line 35, in Migration
 bases=(models.Model, comcenter.product.models.WhiteBlackListMixin),
   File "/home/collin/comcenter/django/db/migrations/operations/models.py",
 line 62, in __init__
 for base in self.bases
   File "/home/collin/comcenter/django/db/migrations/operations/models.py",
 line 17, in _check_for_duplicates
 for val in objs:
   File "/home/collin/comcenter/django/db/migrations/operations/models.py",
 line 63, in 
 if base is not models.Model)
 AttributeError: type object 'WhiteBlackListMixin' has no attribute 'lower'
 }}}

--
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.2b6972ba1bd0cac6fe849137e24b85a4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-27 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Migrations|  Version:  master
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Simon Charette ):

 In [changeset:"a877a2f83da384944ad6530eb951bcd55dcd8605" a877a2f8]:
 {{{
 #!CommitTicketReference repository=""
 revision="a877a2f83da384944ad6530eb951bcd55dcd8605"
 Refs #26521 -- Added the duplicated value to CreateModel validation
 messages.

 Thanks Tim for the suggestion.
 }}}

--
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.eb14e1f9d66962242f5557bab06f44f2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-27 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Migrations|  Version:  master
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Simon Charette ):

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


Comment:

 In [changeset:"417e083e5521766e73419fb02cac88996ea3b9e7" 417e083e]:
 {{{
 #!CommitTicketReference repository=""
 revision="417e083e5521766e73419fb02cac88996ea3b9e7"
 Fixed #26521 -- Validated CreateModel bases, fields and managers for
 duplicates.
 }}}

--
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.2c7e0486d09005b99f53c6dbc7e65b7b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-21 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by MarkusH):

 * needs_better_patch:  0 => 1
 * version:  1.9 => 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/062.a1d6e8832eea15ed124e85a3b77d3e50%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-21 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  1.9
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by MarkusH):

 I don't know if we really need this check, but if we do that, the manager
 names need to be unique and so do the base classes.

--
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.79a2498f32677c8b315c27f179686476%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-21 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  1.9
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timgraham):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/6482 PR]

--
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.ef625d74f029153e1ff3bd8b4ac0500b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26521: CreateModel allows duplicate field names

2016-04-20 Thread Django
#26521: CreateModel allows duplicate field names
--+
 Reporter:  w0rp  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  1.9
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
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_docs:   => 0
 * type:  Uncategorized => Cleanup/optimization
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 Probably wouldn't hurt.

--
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.878e84eb55b0cb614a407e63da2975e1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #26521: CreateModel allows duplicate field names

2016-04-20 Thread Django
#26521: CreateModel allows duplicate field names
---+
 Reporter:  w0rp   |  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Migrations |Version:  1.9
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 I hit this bug while manually editing a migration file after squashing
 files. If you define the same field twice in a list of fields for
 CreateModel, then migrate will take the second field definition without
 reporting any errors.

 {{{#!python
 class Migration(migrations.Migration):
 operations = [
 migrations.CreateModel(
 name='Foo',
 fields=[
 ('id', models.AutoField(verbose_name='ID',
 serialize=False, auto_created=True, primary_key=True)),
 ('created', models.DateTimeField(auto_now_add=True,
 db_index=True)),
 # This one will be used.
 ('created', models.DateField(auto_now_add=True,
 db_index=True)),
 ],
 ),
 ]
 }}}

 I think the migration code should check for duplicate fields, and then
 report an error if you have mistakenly defined the same field twice for
 the fields array.

--
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/047.de9e697d492df317051b81420f6af80a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.