[Django] #27917: ModelAdmin rejects NullBooleanField as a valid radio_fields item

2017-03-08 Thread Django
#27917: ModelAdmin rejects NullBooleanField as a valid radio_fields item
+
   Reporter:  Jerome Leclanche  |  Owner:  nobody
   Type:  Uncategorized | Status:  new
  Component:  Uncategorized |Version:  1.10
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 How to reproduce:

 - Create a model with a NullBooleanField "foo"
 - Create and register a corresponding ModelAdmin instance for the model
 - Add `radio_fields = {"foo": admin.HORIZONTAL}` to the model admin

 It will be rejected with a SystemCheckError:

 : (admin.E023) The value of
 'radio_fields' refers to 'foo', which is not an instance of ForeignKey,
 and does not have a 'choices' definition.

 This is very unintuitive. I'm unsure why even it *needs* a choices
 definition seeing as it has no problem rendering a  widget.

 Relevant links:

 - https://stackoverflow.com/questions/11990852/django-display-
 nullbooleanfield-as-radio-and-default-to-none
 - https://groups.google.com/forum/#!topic/django-users/HFU-ub1kDMw
 - https://code.djangoproject.com/ticket/23681

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


Re: [Django] #27913: Admin calendar failed

2017-03-08 Thread Django
#27913: Admin calendar failed
---+--
 Reporter:  Martín Peveri  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 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
---+--

Comment (by Martín Peveri):

 Yes, i am using https://github.com/fabiocaccamo/django-admin-interface.
 Django-admin-interface does not have the calendar.js file.

 In this line is the error:
 
https://github.com/django/django/blob/3c447b108ac70757001171f7a4791f493880bf5b/django/contrib/admin/static/admin/js/calendar.js#L106

 It happens to me in all browsers.

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


Re: [Django] #27908: Cannot use 'schema.table' with 'inspectdb'

2017-03-08 Thread Django
#27908: Cannot use 'schema.table' with 'inspectdb'
-+-
 Reporter:  Jaap Vermeulen   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  1.10
  commands)  |
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  inspectdb| Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


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


Re: [Django] #27915: Defining Index object in Meta.indexes in abstract class causes failure during migration of sub-classes

2017-03-08 Thread Django
#27915: Defining Index object in Meta.indexes in abstract class causes failure
during migration of sub-classes
-+-
 Reporter:  Tommy Beadle |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 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
-+-
Changes (by Tim Graham):

 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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.78d939cbcd79e27b13cb1b6d3ec2a54d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27910: Allow using an Enum class in model Field choices (was: Use Enum class in model choices)

2017-03-08 Thread Django
#27910: Allow using an Enum class in model Field choices
-+-
 Reporter:  Marcel Hellwig   |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  enum model choices   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


Comment:

 I agree with Simon's analysis. An automatic translation based on the enum
 value doesn't seem like a proper separate of concerns.

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


Re: [Django] #27916: versionchanged / versionadded annotation titles missing in downloadable docs

2017-03-08 Thread Django
#27916: versionchanged / versionadded annotation titles missing in downloadable
docs
---+
 Reporter:  Ulrich Petri   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  Version:  1.10
 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 Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 To clarify, the "downloadable docs" are at
 https://docs.djangoproject.com/m/docs/django-docs-dev-en.zip.

 The script to build them is at
 
https://github.com/django/djangoproject.com/blob/master/docs/management/commands/update_docs.py.
 I'm not sure if the problem is in that script or somewhere else.

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


Re: [Django] #27913: Admin calendar failed

2017-03-08 Thread Django
#27913: Admin calendar failed
---+--
 Reporter:  Martín Peveri  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 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
---+--

Comment (by Tim Graham):

 Could you please add more details? Are you using any third-party apps
 which may be causing the problem? Does it reproduce across all browsers?
 Can you provide a sample project that reproduces the problem? I don't see
 any errors in Firefox using the date picker at
 `/admin/polls/question/add/` in the Django tutorial.

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


Re: [Django] #27910: Use Enum class in model choices

2017-03-08 Thread Django
#27910: Use Enum class in model choices
-+-
 Reporter:  Marcel Hellwig   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  enum model choices   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Marcel Hellwig):

 Hmm.. your solution won't bring  any advantages over the current one, so..
 I don't like that concept. I think the first one was okay, but we will
 have Problems when you want to use translation or any non-variable-names.
 So.. should be discard this idea (although I really do like 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.5d40c8ceb4f2f4418ed03dccca882e03%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27910: Use Enum class in model choices

2017-03-08 Thread Django
#27910: Use Enum class in model choices
-+-
 Reporter:  Marcel Hellwig   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  enum model choices   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 > Or you could swap the positions.

 That would work for text based fields (`CharField`, `TextField`) but what
 about choices defined for a integer based field?

 I feel like ''choices'' are a different concept than enums and that while
 the later is useful for referring to choices values as constants, choices
 and label mapping should be defined independently.

 {{{#!python
 class StudentType(enum.Enum):
 Freshman = 'FR'
 Sophomore = 'SO'
 Junior = 'JR'
 Senior = 'SR'

 class Student(models.Model):
 type = models.CharField(choices=[
 (StudentType.Freshman, _('Freshman')),
 (StudentType.Sophomore, _('Sophomore')),
 (StudentType.Junior, _('Junior')),
 (StudentType.Senior, _('Senior')),
 ])
 }}}

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


Re: [Django] #27914: makemigrations produces incorrect path for subclasses of Field which are inner classes

2017-03-08 Thread Django
#27914: makemigrations produces incorrect path for subclasses of Field which are
inner classes
+
 Reporter:  Serge van den Boom  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  Migrations  |  Version:  master
 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 Simon Charette):

 * type:  Bug => New feature
 * version:  1.10 => master
 * component:  Database layer (models, ORM) => Migrations
 * stage:  Unreviewed => Accepted


Comment:

 This should be possible to do by relying on `__qualname__` (instead of
 `__name__`) now that master is Python 3 only.

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


[Django] #27916: versionchanged / versionadded annotation titles missing in downloadable docs

2017-03-08 Thread Django
#27916: versionchanged / versionadded annotation titles missing in downloadable
docs
-+
   Reporter:  Ulrich Petri   |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Documentation  |Version:  1.10
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 The downloadable docs don't contain the titles for the `versionchanged` /
 `versionadded` annotations. The html source contains the respective divs
 with optional content but the "New in Django ..." and "Changed in Django
 ..." title spans are missing.

 Example from the html version (`ref/settings.html#engine`):

 Online version:
 {{{
 
 Changed in Django 1.9:
 The django.db.backends.postgresql backend is named
 django.db.backends.postgresql_psycopg2 in older
 releases. For backwards compatibility, the old name still works in newer
 versions.
 
 }}}

 Downloadable version:
 {{{
 
 The django.db.backends.postgresql backend is named
 django.db.backends.postgresql_psycopg2 in older
 releases. For backwards compatibility, the old name still works in newer
 versions.
 
 }}}

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


[Django] #27915: Defining Index object in Meta.indexes in abstract class causes failure during migration of sub-classes

2017-03-08 Thread Django
#27915: Defining Index object in Meta.indexes in abstract class causes failure
during migration of sub-classes
-+-
   Reporter:  Tommy  |  Owner:  nobody
  Beadle |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  1.11
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 If I define an abstract model like this:

 {{{#!python
 class AbstractClass(models.Model):
 text = models.TextField()
 class Meta:
 abstract=True
 indexes = [
 models.indexes.Index(fields=['text']),
 ]
 }}}

 and then subclass it:

 {{{#!python
 class NewClass1(AbstractClass):
 pass

 class NewClass2(AbstractClass):
 pass
 }}}

 Then, when I make the migrations, an index with the same ID is created for
 the sub-classes:

 {{{
 (venv) $ ./manage.py makemigrations myapp
 Migrations for 'myapp':
   myapp/migrations/0001_initial.py
 - Create model NewClass1
 - Create model NewClass2
 - Create index myapp_abstr_text_5dfb11_idx on field(s) text of model
 newclass2
 - Create index myapp_abstr_text_5dfb11_idx on field(s) text of model
 newclass1
 }}}

 which then results in the following traceback when performing the
 migration:

 {{{
 (venv) $ ./manage.py migrate
 
 Traceback (most recent call last):
   File "./manage.py", line 22, in 
 execute_from_command_line(sys.argv)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 363, in
 execute_from_command_line
 utility.execute()
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 355, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/core/management/base.py", line 283, in run_from_argv
 self.execute(*args, **cmd_options)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/core/management/base.py", line 330, in execute
 output = self.handle(*args, **options)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/core/management/commands/migrate.py", line 204, in handle
 fake_initial=fake_initial,
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 115, in migrate
 state = self._migrate_all_forwards(state, plan, full_plan, fake=fake,
 fake_initial=fake_initial)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 145, in
 _migrate_all_forwards
 state = self.apply_migration(state, migration, fake=fake,
 fake_initial=fake_initial)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 244, in apply_migration
 state = migration.apply(state, schema_editor)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/migrations/migration.py", line 129, in apply
 operation.database_forwards(self.app_label, schema_editor, old_state,
 project_state)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/migrations/operations/models.py", line 785, in
 database_forwards
 schema_editor.add_index(model, self.index)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/backends/base/schema.py", line 330, in add_index
 self.execute(index.create_sql(model, self))
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/backends/base/schema.py", line 119, in execute
 cursor.execute(sql, params)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/backends/utils.py", line 80, in execute
 return super(CursorDebugWrapper, self).execute(sql, params)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/backends/utils.py", line 65, in execute
 return self.cursor.execute(sql, params)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/utils.py", line 94, in __exit__
 six.reraise(dj_exc_type, dj_exc_value, traceback)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/utils/six.py", line 685, in reraise
 raise value.with_traceback(tb)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/backends/utils.py", line 65, in execute
 return self.cursor.execute(sql, params)
   File "/home/tbeadle/venv/lib/python3.6/site-
 packages/django/db/backends/sqlite3/base.py", line 328, in execute
 return Database.Cursor.execute(self, query, params)
 django.db.utils.OperationalError: index myapp_abstr_tex

Re: [Django] #27910: Use Enum class in model choices

2017-03-08 Thread Django
#27910: Use Enum class in model choices
-+-
 Reporter:  Marcel Hellwig   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  enum model choices   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Marcel Hellwig):

 To be honest, I haven't though about this, because I don't translate them.
 Hmm.. Good question. Implicit translation?! :/ Decorator? That are not so
 good ideas.
 Or you could swap the positions, e.g. {{{ FR = _("Freshman") }}}, because
 you'll never translate the key which is stored in the DB, right?!

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


Re: [Django] #27914: makemigrations produces incorrect path for subclasses of Field which are inner classes

2017-03-08 Thread Django
#27914: makemigrations produces incorrect path for subclasses of Field which are
inner classes
-+-
 Reporter:  Serge van den Boom   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 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 Serge van den Boom):

 * type:  Uncategorized => Bug


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


[Django] #27914: makemigrations produces incorrect path for subclasses of Field which are inner classes

2017-03-08 Thread Django
#27914: makemigrations produces incorrect path for subclasses of Field which are
inner classes
-+-
   Reporter:  Serge van  |  Owner:  nobody
  den Boom   |
   Type: | Status:  new
  Uncategorized  |
  Component:  Database   |Version:  1.10
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 When you define a subclass from {{{django.db.models.Field}}} as an inner
 class of some other class, and use this field inside a
 {{{django.db.models.Model}}} class, then when you run {{{manage.py
 makemigrations}}}, a migrations file is created which refers to the inner
 class as if it were a top-level class of the module it is in.

 To reproduce, create the following as your model:
 {{{#!python
 class Outer(object):
 class Inner(models.CharField):
 pass

 class A(models.Model):
 field = Outer.Inner(max_length=20)
 }}}
 After running {{{manage.py makemigrations}}}, the generated migrations
 file contains the following:
 {{{#!python
 migrations.CreateModel(
 name='A',
 fields=[
 ('id', models.AutoField(auto_created=True, primary_key=True,
 serialize=False, verbose_name='ID')),
 ('field', test1.models.Inner(max_length=20)),
 ],
 ),
 }}}
 Note the {{{test1.models.Inner}}}, which should have been
 {{{test1.models.Outer.Inner}}}.

 The real life case involved an EnumField from django-enumfields, defined
 as an inner class of a Django Model class, similar to this:
 {{{#!python
 import enum
 from enumfields import Enum, EnumField

 class Thing(models.Model):
 @enum.unique
 class State(Enum):
 on = 'on'
 off = 'off'

 state = EnumField(enum=State)
 }}}
 This results in the following migrations code:
 {{{#!python
 migrations.CreateModel(
 name='Thing',
 fields=[
 ('id', models.AutoField(auto_created=True, primary_key=True,
 serialize=False, verbose_name='ID')),
 ('state', enumfields.fields.EnumField(enum=test1.models.State,
 max_length=10)),
 ],
 ),
 }}}
 This refers to {{{test1.models.State}}}, instead of to
 {{{test1.models.Thing.State}}}.

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


[Django] #27913: Admin calendar failed

2017-03-08 Thread Django
#27913: Admin calendar failed
-+
   Reporter:  Martín Peveri  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  contrib.admin  |Version:  1.10
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 When I select a date in the calendar, the javascript console will trigger
 the following error:

 Uncaught TypeError: callback is not a function at
 HTMLAnchorElement.onClick (calendar.js:106)

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


Re: [Django] #27911: Document UserAdmin when creating custom User model

2017-03-08 Thread Django
#27911: Document UserAdmin when creating custom User model
-+-
 Reporter:  David D Lowe |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  1.10
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"c7351eaa926805917cac64946df323483b1accf0" c7351ea]:
 {{{
 #!CommitTicketReference repository=""
 revision="c7351eaa926805917cac64946df323483b1accf0"
 [1.11.x] Fixed #27911 -- Doc'd how to register custom User with admin.

 Backport of 9269dec05efae5deb89912a5b9a98ae75acdfff9 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/063.38687935cdfce726fb7e702f46b946c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27911: Document UserAdmin when creating custom User model

2017-03-08 Thread Django
#27911: Document UserAdmin when creating custom User model
-+-
 Reporter:  David D Lowe |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  1.10
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"9269dec05efae5deb89912a5b9a98ae75acdfff9" 9269dec0]:
 {{{
 #!CommitTicketReference repository=""
 revision="9269dec05efae5deb89912a5b9a98ae75acdfff9"
 Fixed #27911 -- Doc'd how to register custom User with admin.
 }}}

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


Re: [Django] #27316: Multiple LiveServerTestCase subclasses cannot reuse the same port

2017-03-08 Thread Django
#27316: Multiple LiveServerTestCase subclasses cannot reuse the same port
---+
 Reporter:  Jeremy Bowman  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Testing framework  |  Version:  1.10
 Severity:  Normal |   Resolution:  fixed
 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 David Muller):

 Ah -- that makes sense now.  Thanks for your help, Jeremy.

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


Re: [Django] #27912: Open redirect on non-HTTP protocols: is_safe_url not validating properly

2017-03-08 Thread Django
#27912: Open redirect on non-HTTP protocols: is_safe_url not validating properly
---+--
 Reporter:  roks0n |Owner:  Tim Graham
 Type:  Bug|   Status:  assigned
Component:  HTTP handling  |  Version:  master
 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 Tim Graham):

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


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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.0b78d9a42e9e13252d2437b07eae6d79%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27910: Use Enum class in model choices

2017-03-08 Thread Django
#27910: Use Enum class in model choices
-+-
 Reporter:  Marcel Hellwig   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  enum model choices   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 Do you have a suggestion about how choices translations should be defined?

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


[Django] #27912: Open redirect on non-HTTP protocols: is_safe_url not validating properly

2017-03-08 Thread Django
#27912: Open redirect on non-HTTP protocols: is_safe_url not validating properly
-+
   Reporter:  roks0n |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  HTTP handling  |Version:  master
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 For this to work, you have to first convert IPv4 (208.118.235.20) into a
 decimal IP (3497454356).

 **GIVEN** I am given a link, e.g.
 https://example.com/admin/logout/?next=ftp:3497454356
 **WHEN** I click on the link (in this case, if I'm logged in)
 **THEN** I am redirected to ftp://208.118.235.20

 Above also works for https://example.com/admin/login/?next=ftp:3497454356


 {{{
 In [1]: from django.utils.http import is_safe_url

 In [2]: is_safe_url('http:9')
 Out[2]: False
 In [3]: is_safe_url('ftp:9')
 Out[3]: True
 In [4]: is_safe_url('ftp:9/test/')
 Out[4]: False

 In [5]: is_safe_url('ftp:99', host='example.com')
 Out[5]: True
 In [6]: is_safe_url('http:99', host='example.com')
 Out[6]: False
 In [7]: is_safe_url('https:99', host='example.com')
 Out[7]: True
 }}}

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


Re: [Django] #24365: inspectdb should generate PositiveIntegerFields for unsigned fields.

2017-03-08 Thread Django
#24365: inspectdb should generate PositiveIntegerFields for unsigned fields.
-+-
 Reporter:  Bharadwaj|Owner:  felixxm
  Srigiriraju|
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  inspectdb,   | Triage Stage:  Accepted
  unsigned, positiveintegerfield,|
  mysql  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"94d8bea212441ebfafcab10d245285581e701c54" 94d8bea2]:
 {{{
 #!CommitTicketReference repository=""
 revision="94d8bea212441ebfafcab10d245285581e701c54"
 Fixed #24365 -- Made inspectdb translate MySQL unsigned integer columns to
 positive integer fields.
 }}}

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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.c3d13e7c8b6bc02113a3ac7ce6e79224%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27911: Document UserAdmin when creating custom User model

2017-03-08 Thread Django
#27911: Document UserAdmin when creating custom User model
-+-
 Reporter:  David D Lowe |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David D Lowe):

 * has_patch:  0 => 1


Comment:

 A pull request fixing this has been created:
 https://github.com/django/django/pull/8157

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


[Django] #27911: Document UserAdmin when creating custom User model

2017-03-08 Thread Django
#27911: Document UserAdmin when creating custom User model
+
   Reporter:  David D Lowe  |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Documentation |Version:  1.10
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 The section entitled "Using a custom user model when starting a project",
 when followed, seems to cause the "Users" section of the admin site to
 disappear.

 https://docs.djangoproject.com/en/1.10/topics/auth/customizing/#using-a
 -custom-user-model-when-starting-a-project

 The simple fix to this is to register the custom User model with
 UserAdmin. This is not mentioned in the documentation.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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/048.1aa6f04b48ee770ab47223397c69bbac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27909: Use AUTH_USER_MODEL in startproject template (was: Use AUTH_USER_MODEL in quick-start template)

2017-03-08 Thread Django
#27909: Use AUTH_USER_MODEL in startproject template
-+-
 Reporter:  David D Lowe |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  1.10
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Someday/Maybe
 * component:  Uncategorized => Core (Management commands)


Comment:

 This was proposed in ticket:24370#comment:3, however, it should be
 discussed on the DevelopersMailingList to ensure there's consensus about
 it. Feel free to start a thread.

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


[Django] #27910: Use Enum class in model choices

2017-03-08 Thread Django
#27910: Use Enum class in model choices
-+-
   Reporter:  Marcel |  Owner:  nobody
  Hellwig|
   Type:  New| Status:  new
  feature|
  Component:  Database   |Version:  1.10
  layer (models, ORM)|
   Severity:  Normal |   Keywords:  enum model choices
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I will simply stick to your example here:
 https://docs.djangoproject.com/en/dev/ref/models/fields/#choices

 I want to limit the input to certain choices so I create a list/tuple of
 tuples/lists. Since Python 3.4 there is a class called
 [https://docs.python.org/3.5/library/enum.html Enum] and some nice
 decorators like [https://docs.python.org/3.5/library/enum.html#ensuring-
 unique-enumeration-values @unique].

 Currently, if you want to use this you have to do 1/2 dirty hacks,
 descriped in [http://blog.richard.do/index.php/2014/02/how-to-use-enums-
 for-django-field-choices/ this article], which I would prefer over the
 current solution.

 It would be nice to have native support for the Enum class, e.g. you can
 directly pass the class to choices (instead of using the class method
 choices() ), also when refering to an element in the enum just using
 {{{Student.Freshmann}}} instead of {{{Student.Freshmann.value}}}

 A simple example would be this:

 {{{
 from enum import Enum

 class Student(models.Model):
 class YearInSchoolChoices(Enum):
 Freshman = 'FR'
 Sophomore = 'SO'
 Junior = 'JR'
 Senior = 'SR'

 year_in_school = models.CharField(
 max_length=2,
 choices=YearInSchoolChoices,
 default=YearInSchoolChoices.Freshman,
 )

 def is_upperclass(self):
 return self.year_in_school in (self.YearInSchoolChoices.Junior,
 self.YearInSchoolChoices.Senior)

 }}}


 Also this could be adopted (if accepted) to any type of choices in django,
 e.g. [https://docs.djangoproject.com/en/1.10/ref/forms/fields/#choicefield
 Choicefield] etc.

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


Re: [Django] #27848: EmailMessage.attach_file() with .eml file crashes

2017-03-08 Thread Django
#27848: EmailMessage.attach_file() with .eml file crashes
-+-
 Reporter:  RAMAGE Sébastien |Owner:  Dariush
 |  Azimi
 Type:  Bug  |   Status:  assigned
Component:  Core (Mail)  |  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
-+-

Comment (by Tim Graham):

 To reproduce, apply the patch I provided and run that test from the Django
 test suite.

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


[Django] #27909: Use AUTH_USER_MODEL in quick-start template

2017-03-08 Thread Django
#27909: Use AUTH_USER_MODEL in quick-start template
-+
   Reporter:  David D Lowe   |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Uncategorized  |Version:  1.10
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 The documentation says:

 https://docs.djangoproject.com/en/1.10/topics/auth/customizing/#using-a
 -custom-user-model-when-starting-a-project

 > If you’re starting a new project, it’s highly recommended to set up a
 custom user model, even if the default User model is sufficient for you.
 This model behaves identically to the default user model, but you’ll be
 able to customize it in the future if the need arises:

 If you fail to remember to do this when you set up the project, the
 documentation warns of the difficulty of doing it later:

 > Changing AUTH_USER_MODEL after you’ve created database tables is
 significantly more difficult since it affects foreign keys and many-to-
 many relationships, for example.

 > This change can’t be done automatically and requires manually fixing
 your schema, moving your data from the old user table, and possibly
 manually reapplying some migrations. See #25313 for an outline of the
 steps.

 And it continues, explaining the other difficulties and caveats.

 Starting your project with AUTH_USER_MODEL set is highly recommended, and
 it is a difficult to switch to this method once a project has been
 created. So why doesn't the default template created by `django-admin
 startproject` give a value to `AUTH_USER_MODEL` by default?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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/048.8c858e78264411f3e0561e85e7c0a3e6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27848: EmailMessage.attach_file() with .eml file crashes

2017-03-08 Thread Django
#27848: EmailMessage.attach_file() with .eml file crashes
-+-
 Reporter:  RAMAGE Sébastien |Owner:  Dariush
 |  Azimi
 Type:  Bug  |   Status:  assigned
Component:  Core (Mail)  |  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
-+-

Comment (by Dariush):

 Hi Ramage,

 Trying to reproduce the error. Can you provide the steps to reproduce the
 error? I see the test case but that is all there is.

 Thanks
 Dariush

 Replying to [ticket:27848 RAMAGE Sébastien]:
 > .eml file could not be attached to EmailMessage using .attach_file()
 because it raise the following error :
 > initial_value must be str or None, not bytes
 >
 > maybe related to mimetype message/rfc822
 >
 > {{{
 > File "/usr/local/lib/python3.5/dist-
 packages/django/core/mail/message.py", line 292, in send return
 self.get_connection(fail_silently).send_messages([self])
 > File "/usr/local/lib/python3.5/dist-
 packages/django/core/mail/backends/smtp.py", line 107, in send_messages
 sent = self._send(message)
 > File "/usr/local/lib/python3.5/dist-
 packages/django/core/mail/backends/smtp.py", line 121, in _send message =
 email_message.message()
 > File "/usr/local/lib/python3.5/dist-
 packages/django/core/mail/message.py", line 256, in message msg =
 self._create_message(msg)
 > File "/usr/local/lib/python3.5/dist-
 packages/django/core/mail/message.py", line 344, in _create_message return
 self._create_attachments(msg)
 > File "/usr/local/lib/python3.5/dist-
 packages/django/core/mail/message.py", line 357, in _create_attachments
 msg.attach(self._create_attachment(*attachment))
 > File "/usr/local/lib/python3.5/dist-
 packages/django/core/mail/message.py", line 399, in _create_attachment
 attachment = self._create_mime_attachment(content, mimetype)
 > File "/usr/local/lib/python3.5/dist-
 packages/django/core/mail/message.py", line 380, in
 _create_mime_attachment content = message_from_string(content)
 > File "/usr/lib/python3.5/email/__init__.py", line 38, in
 message_from_string return Parser(*args, **kws).parsestr(s)
 > File "/usr/lib/python3.5/email/parser.py", line 68, in parsestr return
 self.parse(StringIO(text), headersonly=headersonly)
 > TypeError: initial_value must be str or None, not bytes
 > }}}

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


Re: [Django] #27624: Optimize ORM by using more immutable data structures

2017-03-08 Thread Django
#27624: Optimize ORM by using more immutable data structures
-+-
 Reporter:  Adam Chainz  |Owner:  Adam
 Type:   |  Chainz
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 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
-+-

Comment (by Tim Graham ):

 In [changeset:"af121b08e85f2afe9c15dd66cb73f5d99515a604" af121b0]:
 {{{
 #!CommitTicketReference repository=""
 revision="af121b08e85f2afe9c15dd66cb73f5d99515a604"
 Refs #27624 -- Made many attributes of Query immutable.
 }}}

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


Re: [Django] #27888: Add a button to clear all admin filters

2017-03-08 Thread Django
#27888: Add a button to clear all admin filters
-+-
 Reporter:  David Herring|Owner:  Md. Al-
 Type:   |  Amin
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  1.10
 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 Md. Al-Amin ):

 * has_patch:  0 => 1


Comment:

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

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


Re: [Django] #27888: Add a button to clear all admin filters

2017-03-08 Thread Django
#27888: Add a button to clear all admin filters
-+-
 Reporter:  David Herring|Owner:  Md. Al-
 Type:   |  Amin
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  1.10
 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 Md. Al-Amin ):

 * status:  new => assigned
 * owner:  nobody => Md. Al-Amin


Comment:

 I am going to work on this ticket.

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