Re: [Django] #28773: manage.py makemessages throws syntax error due to incorrectly generated django.pot

2017-11-09 Thread Django
#28773: manage.py makemessages throws syntax error due to incorrectly generated
django.pot
-+-
 Reporter:  Hendy Irawan |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.11
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:  gettext, | Triage Stage:
  makemessages, Windows  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Hendy Irawan):

 Okay, I'm trying to create a sample project, but now I run into this:
 (https://github.com/pypa/pip/issues/4076, https://github.com/gsnedders
 /python-webencodings/pull/9)

 {{{
 xgettext: .\venv\Lib\site-packages\pip\_vendor\webencodings\__init__.py:1:
 Unknown encoding "utf8". Proceeding with ASCII instead.
 xgettext: Non-ASCII string at .\venv\Lib\site-
 packages\pip\_vendor\webencodings\__init__.py:64.
   Please specify the source encoding through --from-code or
 through a comment
   as specified in http://www.python.org/peps/pep-0263.html.
 }}}

 What's the official way to resolve this 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/065.fdb5130dd2c881100cbb12d88d7e1ea0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28777: Clarify the docs for admin's @register's arguments

2017-11-09 Thread Django
#28777: Clarify the docs for admin's @register's arguments
-+-
 Reporter:  Matt Swan|Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  1.11
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  register decorator   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"3c8c3ff637e2c0c325e5638d2c56ae1938f0885d" 3c8c3ff6]:
 {{{
 #!CommitTicketReference repository=""
 revision="3c8c3ff637e2c0c325e5638d2c56ae1938f0885d"
 [2.0.x] Fixed #28777 -- Clarified the docs for admin.register's args.

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


Re: [Django] #28777: Clarify the docs for admin's @register's arguments

2017-11-09 Thread Django
#28777: Clarify the docs for admin's @register's arguments
-+-
 Reporter:  Matt Swan|Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  1.11
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  register decorator   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by GitHub ):

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


Comment:

 In [changeset:"abaf0ab4a444977dc8ac07b9b63256814c352245" abaf0ab4]:
 {{{
 #!CommitTicketReference repository=""
 revision="abaf0ab4a444977dc8ac07b9b63256814c352245"
 Fixed #28777 -- Clarified the docs for admin.register's args.
 }}}

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


Re: [Django] #27339: Adding an AutoField prompts for a default which creates a broken migration

2017-11-09 Thread Django
#27339: Adding an AutoField prompts for a default which creates a broken 
migration
--+
 Reporter:  Tim Graham|Owner:  nobody
 Type:  Cleanup/optimization  |   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
--+

Comment (by Akshay Raj Gollahalli):

 In Django 2.0b1 when trying to migrate without the default value, the CLI
 asks to enter a default value.

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


Re: [Django] #28780: Allow customizing PasswordResetConfirmView's INTERNAL_RESET_URL_TOKEN

2017-11-09 Thread Django
#28780: Allow customizing PasswordResetConfirmView's INTERNAL_RESET_URL_TOKEN
--+
 Reporter:  Meiyer|Owner:  Tim G.
 Type:  New feature   |   Status:  assigned
Component:  contrib.auth  |  Version:  1.11
 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:  1
--+

Comment (by Tim G.):

 PR is ready!
 https://github.com/django/django/pull/9337

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


Re: [Django] #28781: QuerySet.union()/intersection()/difference() doesn't work with QuerySet.values().

2017-11-09 Thread Django
#28781: QuerySet.union()/intersection()/difference() doesn't work with
QuerySet.values().
-+-
 Reporter:  Amir Aziiev  |Owner:  felixxm
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/9340 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/065.be807956fecb218a791d5b5a70d151cd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28754: validate_ipv46_address validator allows IP addresses to begin with a first octet of zero

2017-11-09 Thread Django
#28754: validate_ipv46_address validator allows IP addresses to begin with a 
first
octet of zero
-+-
 Reporter:  frankston|Owner:  Tim G.
 Type:  Bug  |   Status:  assigned
Component:  Core (Other) |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  IP, regular  | Triage Stage:
  expression |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Tim Graham):

 * has_patch:  1 => 0
 * stage:  Unreviewed => Someday/Maybe


Comment:

 As suggested on the pull request, we should check if cpython would fix
 this issue as Django uses `ipaddress.IPv4Address` for validation. If so, I
 don't think we need to patch Django just to fix this issue for older
 versions of Python.

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


Re: [Django] #27710: foreign key _id optimisation leads to incorrect descriptor value

2017-11-09 Thread Django
#27710: foreign key _id optimisation leads to incorrect descriptor value
-+-
 Reporter:  Will Hardy   |Owner:  Paulo
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 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 Tim Graham ):

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


Comment:

 In [changeset:"ee49306176a2d2f1751cb890bd607d42c7c09196" ee493061]:
 {{{
 #!CommitTicketReference repository=""
 revision="ee49306176a2d2f1751cb890bd607d42c7c09196"
 Fixed #27710 -- Made Model.save() invalidate cached, stale relations after
 a primary key assignment.
 }}}

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


Re: [Django] #28528: Allow combining SearchVectors with different configs

2017-11-09 Thread Django
#28528: Allow combining SearchVectors with different configs
-+-
 Reporter:  M1ha Shvn|Owner:  (none)
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  contrib.postgres |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  SearchQueries| Triage Stage:  Accepted
  PostgreSQL FullTextSearch  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Paolo Melchiorre):

 * cc: Paolo Melchiorre (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/065.9f66949e3fdc72e2f1823a8ff3afe267%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28785: Tracking migrations

2017-11-09 Thread Django
#28785: Tracking migrations
---+--
 Reporter:  Ramez Kabbani  |Owner:  Sonu kumar
 Type:  New feature|   Status:  assigned
Component:  Migrations |  Version:  1.11
 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 Sonu kumar):

 * status:  new => assigned
 * owner:  nobody => Sonu kumar


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


Re: [Django] #28787: QuerySet.update() fails on MySQL if a subquery references the base table

2017-11-09 Thread Django
#28787: QuerySet.update() fails on MySQL if a subquery references the base table
-+-
 Reporter:  Paulo|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 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 Sonu kumar):

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


Comment:

 This doesn't look to be a bug in Django. This is a more of MySQL query
 parser bug.

 Query generated by Django ORM


 {{{
 UPDATE `CoreApp_room` SET `name` = 'suite'
 WHERE `CoreApp_room`.`house_id` IN
 ( SELECT U0.`id` FROM `CoreApp_house` U0
INNER JOIN `CoreApp_room` U1
   ON (U0.`id` = U1.`house_id`)
   WHERE U1.`name` LIKE '%suite%'
 )
 }}}

 As we can the query generated by Django is totally valid but MySQL server
 has raise error

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


Re: [Django] #28789: Django won't update sqlite_master table using migrations.AlterModelTable, which causes loaddata to fail.

2017-11-09 Thread Django
#28789: Django won't update sqlite_master table using 
migrations.AlterModelTable,
which causes loaddata to fail.
-+-
 Reporter:  Rafael Pires |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  migrations, sqlite3  | 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):

 * component:  Database layer (models, ORM) => Migrations


Comment:

 I don't see an obvious place where Django is at fault. Can you provide a
 sample project that reproduces this problem?

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


Re: [Django] #28777: Clarify the docs for admin's @register's arguments

2017-11-09 Thread Django
#28777: Clarify the docs for admin's @register's arguments
-+-
 Reporter:  Matt Swan|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  register decorator   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Bjorn Kristinsson):

 * stage:  Accepted => Ready for checkin


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


Re: [Django] #28789: Django won't update sqlite_master table using migrations.AlterModelTable, which causes loaddata to fail.

2017-11-09 Thread Django
#28789: Django won't update sqlite_master table using 
migrations.AlterModelTable,
which causes loaddata to fail.
-+-
 Reporter:  Rafael Pires |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations, sqlite3  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Rafael Pires:

Old description:

> I created a migration to rename a model table:
>

> {{{
> class Migration(migrations.Migration):
>
> dependencies = [
> ('assessment', '0105_previous_migration'),
> ]
>
> operations = [
> migrations.AlterModelTable(name='MyModel',
> table='myapp_newmymodel')
> ]
>
> }}}
>
> I can run this migration just fine, the table gets renamed and the
> project runs fine when I access it through my browser (with SQLite3 and
> MySQL).
>
> The problem is that: then I run "./manage.py test" the test fails to load
> the fixtures in the SQLite3 database:
>

> {{{
> ./manage.py test assessment.tests.test_models
> Creating test database for alias 'default'...
> System check identified no issues (0 silenced).
> E
> ==
> ERROR: setUpClass (assessment.tests.test_models.ModelsTestCase)
> --
> Traceback (most recent call last):
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/test/testcases.py", line 1036, in setUpClass
> 'database': db_name,
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/core/management/__init__.py", line 131, in call_command
> return command.execute(*args, **defaults)
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/core/management/base.py", line 330, in execute
> output = self.handle(*args, **options)
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/core/management/commands/loaddata.py", line 69, in handle
> self.loaddata(fixture_labels)
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/core/management/commands/loaddata.py", line 115, in
> loaddata
> connection.check_constraints(table_names=table_names)
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/db/backends/sqlite3/base.py", line 286, in
> check_constraints
> column_name, referenced_column_name,
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/db/backends/utils.py", line 65, in execute
> return self.cursor.execute(sql, params)
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/db/utils.py", line 94, in __exit__
> six.reraise(dj_exc_type, dj_exc_value, traceback)
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/db/backends/utils.py", line 63, in execute
> return self.cursor.execute(sql)
>   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
> packages/django/db/backends/sqlite3/base.py", line 326, in execute
> return Database.Cursor.execute(self, query)
> OperationalError: Problem installing fixtures: no such table:
> myapp_mymodel
> }}}
>
> *This table id is used by other tables as Foreign Key.*
>
> I looked into the code and it seems that the
> **migrations.AlterModelTable** is not updating the sqlite_master table,
> so other tables that references my new table with a Foreign Key are still
> pointing to myapp_mymodel instead of myapp_newmymodel. This happens
> during **check_constraints** execution, the sqlite3 backend gets the key
> columns using **get_key_columns** function, that reads the "CREATE TABLE"
> query in sqlite_master, but since the sqlite_master table wasn't updated
> correctly, the process fails.
>
> Just to be sure I ran "ALTER TABLE myapp_mymodel RENAME TO
> myapp_newmymodel" directly on the database and the sqlite_master table is
> updated correctly.
>
> Database: SQLite3
> Django version: 1.11.5

New description:

 I created a migration to rename a model table:


 {{{
 class Migration(migrations.Migration):

 dependencies = [
 ('assessment', '0105_previous_migration'),
 ]

 operations = [
 migrations.AlterModelTable(name='MyModel',
 table='myapp_newmymodel')
 ]

 }}}

 I can run this migration just fine, the table get

[Django] #28789: Django won't update sqlite_master table using migrations.AlterModelTable, which causes loaddata to fail.

2017-11-09 Thread Django
#28789: Django won't update sqlite_master table using 
migrations.AlterModelTable,
which causes loaddata to fail.
-+-
   Reporter:  Rafael |  Owner:  nobody
  Pires  |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  1.11
  layer (models, ORM)|
   Severity:  Normal |   Keywords:  migrations, sqlite3
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I created a migration to rename a model table:


 {{{
 class Migration(migrations.Migration):

 dependencies = [
 ('assessment', '0105_previous_migration'),
 ]

 operations = [
 migrations.AlterModelTable(name='MyModel',
 table='myapp_newmymodel')
 ]

 }}}

 I can run this migration just fine, the table gets renamed and the project
 runs fine when I access it through my browser (with SQLite3 and MySQL).

 The problem is that: then I run "./manage.py test" the test fails to load
 the fixtures in the SQLite3 database:


 {{{
 ./manage.py test assessment.tests.test_models
 Creating test database for alias 'default'...
 System check identified no issues (0 silenced).
 E
 ==
 ERROR: setUpClass (assessment.tests.test_models.ModelsTestCase)
 --
 Traceback (most recent call last):
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/test/testcases.py", line 1036, in setUpClass
 'database': db_name,
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 131, in call_command
 return command.execute(*args, **defaults)
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/core/management/base.py", line 330, in execute
 output = self.handle(*args, **options)
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/core/management/commands/loaddata.py", line 69, in handle
 self.loaddata(fixture_labels)
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/core/management/commands/loaddata.py", line 115, in
 loaddata
 connection.check_constraints(table_names=table_names)
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/db/backends/sqlite3/base.py", line 286, in
 check_constraints
 column_name, referenced_column_name,
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/db/backends/utils.py", line 65, in execute
 return self.cursor.execute(sql, params)
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/db/utils.py", line 94, in __exit__
 six.reraise(dj_exc_type, dj_exc_value, traceback)
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/db/backends/utils.py", line 63, in execute
 return self.cursor.execute(sql)
   File "/home/user/virtualenv/myproject/local/lib/python2.7/site-
 packages/django/db/backends/sqlite3/base.py", line 326, in execute
 return Database.Cursor.execute(self, query)
 OperationalError: Problem installing fixtures: no such table:
 myapp_mymodel
 }}}

 *This table id is used by other tables as Foreign Key.*

 I looked into the code and it seems that the
 **migrations.AlterModelTable** is not updating the sqlite_master table, so
 other tables that references my new table with a Foreign Key are still
 pointing to myapp_mymodel instead of myapp_newmymodel. This happens during
 **check_constraints** execution, the sqlite3 backend gets the key columns
 using **get_key_columns** function, that reads the "CREATE TABLE" query in
 sqlite_master, but since the sqlite_master table wasn't updated correctly,
 the process fails.

 Just to be sure I ran "ALTER TABLE myapp_mymodel RENAME TO
 myapp_newmymodel" directly on the database and the sqlite_master table is
 updated correctly.

 Database: SQLite3
 Django version: 1.11.5

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

Re: [Django] #28198: Model attributes shouldn't override deferred fields

2017-11-09 Thread Django
#28198: Model attributes shouldn't override deferred fields
-+-
 Reporter:  Ryan Hiebert |Owner:
 |  Denis.Tarykin
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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 Denis.Tarykin):

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


Re: [Django] #28780: Allow customizing PasswordResetConfirmView's INTERNAL_RESET_URL_TOKEN

2017-11-09 Thread Django
#28780: Allow customizing PasswordResetConfirmView's INTERNAL_RESET_URL_TOKEN
--+
 Reporter:  Meiyer|Owner:  Tim G.
 Type:  New feature   |   Status:  assigned
Component:  contrib.auth  |  Version:  1.11
 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:  1
--+

Comment (by Meiyer):

 I think the configuration that will allow the easiest customization is a
 class attribute such as:
 {{{
 class PasswordResetConfirmView(PasswordContextMixin, FormView):
 reset_token_placeholder = INTERNAL_RESET_URL_TOKEN
 }}}
 Then it can be used in urls.py with
 {{{
 url('',
 PasswordResetConfirmView.as_view(reset_token_placeholder='wachtwoord-
 aanduiding'),
 name='password_reset_confirm')
 }}}
 Because of the format limitations on the  parameter (two
 alphanumeric strings separated by a hyphen), it will be useful to add
 instructions to the documentation so that developers do not accidentally
 break their password reset functionality.

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