Re: [Django] #27424: contenttype 0002_remove_content_type_name migration failure

2016-11-02 Thread Django
#27424: contenttype 0002_remove_content_type_name migration failure
-+-
 Reporter:  Juan Borda   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.8
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Simon Charette):

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


Comment:

 Hi Juan,

 Thanks for your report.

 From your provided traceback it looks like you are not using the latest
 minor version of Django 1.8 so it's kind of hard to figure out whether or
 not Django is at fault.

 From what I can see one of your database routers' `allow_migrate()` method
 have the incorrect signature. The
 [https://docs.djangoproject.com/en/1.8/releases/1.8/#signature-of-the-
 allow-migrate-router-method signature changed in Django 1.8] but
 
[https://github.com/django/django/blob/90c61538bae7b6e86b846fcd1ab7887d9cdb2cbf/django/db/utils.py#L335-L352
 there's code in place] to make sure the old signature works until Django
 1.10.

 Please try upgrading to the latest Django 1.8 release and re-open this
 ticket with details about the Python version you are using and the
 definition of your database routers the `DATABASE_ROUTERS` is pointing to.

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


Re: [Django] #27424: contenttype 0002_remove_content_type_name migration failure

2016-11-02 Thread Django
#27424: contenttype 0002_remove_content_type_name migration failure
-+-
 Reporter:  Juan Borda   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.8
  contrib.contenttypes   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Juan Borda):

 * Attachment "0002_remove_content_type_name.py" added.

 the newly generated migration file

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


[Django] #27424: contenttype 0002_remove_content_type_name migration failure

2016-11-02 Thread Django
#27424: contenttype 0002_remove_content_type_name migration failure
+
   Reporter:  Juan Borda|  Owner:  nobody
   Type:  Bug   | Status:  new
  Component:  contrib.contenttypes  |Version:  1.8
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  1
  UI/UX:  0 |
+
 django/contrib/contenttype/migrations/0002_remove_content_type_name.py

 In a project that uses django 1.8 we triend to run some tests and got
 failures when django tried to set up the databse from scratch.
 We then traced this problem to a problem applying migration
 0002_remove_content_type_name.py

 the somewhat cryptic stacktrace follows:


 {{{
   Rendering model states... DONE
   Applying contenttypes.0002_remove_content_type_name...Traceback (most
 recent call last):
   File "./manage.py", line 10, in 
 execute_from_command_line(sys.argv)
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/core/management/__init__.py", line 338, in
 execute_from_command_line
 utility.execute()
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/core/management/__init__.py", line 330, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/core/management/base.py", line 393, in run_from_argv
 self.execute(*args, **cmd_options)
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/core/management/base.py", line 444, in execute
 output = self.handle(*args, **options)
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/core/management/commands/migrate.py", line 221, in handle
 executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/db/migrations/executor.py", line 110, in migrate
 self.apply_migration(states[migration], migration, fake=fake,
 fake_initial=fake_initial)
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/db/migrations/executor.py", line 148, in apply_migration
 state = migration.apply(state, schema_editor)
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/db/migrations/migration.py", line 115, in apply
 operation.database_forwards(self.app_label, schema_editor, old_state,
 project_state)
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/db/migrations/operations/special.py", line 178, in
 database_forwards
 if router.allow_migrate(schema_editor.connection.alias, app_label,
 **self.hints):
   File "/home/juanborda/.virtualenvs/sabios/lib/python3.5/site-
 packages/django/db/utils.py", line 347, in allow_migrate
 allow = method(db, app_label, **hints)
 TypeError: allow_migrate() missing 1 required positional argument: 'model'
 }}}



 We overcame this by deleting the file and re-generating the migration.
 this freshly created migration now allows us to create virgin databases as
 well as setup the test environment.

 Atached is the new generated migration file that hopefull you can include
 in future packaged versions of 1.8 django or any others that might have
 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/050.72d9d593c39856163c1be0965d41e747%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.