Re: [Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-09-05 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+--
 Reporter:  melinath|Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  1.7-beta-1
 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 Andrew Godwin ):

 In [changeset:"c5578ba9fa052a814c27fe0069f98ed994751634"]:
 {{{
 #!CommitTicketReference repository=""
 revision="c5578ba9fa052a814c27fe0069f98ed994751634"
 [1.7.x] Fixed #22411: Throw a more helpful error if contenttypes doesn't
 exist.

 Conflicts:
 django/contrib/contenttypes/models.py
 }}}

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


Re: [Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-09-05 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+--
 Reporter:  melinath|Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  1.7-beta-1
 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
+--
Changes (by Andrew Godwin ):

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


Comment:

 In [changeset:"7a259008a76c5bcd6c1e5ba3a45d17a6184c4242"]:
 {{{
 #!CommitTicketReference repository=""
 revision="7a259008a76c5bcd6c1e5ba3a45d17a6184c4242"
 Fixed #22411: Throw a more helpful error if contenttypes doesn't exist.
 }}}

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


Re: [Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-06-15 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+--
 Reporter:  melinath|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7-beta-1
 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 timo):

 It still appears an issue, but I wonder if we should just document this or
 throw a more helpful error message?

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


Re: [Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-05-03 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+--
 Reporter:  melinath|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7-beta-1
 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 melinath):

 This *should* be resolved by #22485, but I can't test myself due to the
 introduction of #22563.

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


Re: [Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-05-01 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+--
 Reporter:  melinath|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7-beta-1
 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 timo):

 * cc: timo (added)


Comment:

 I don't think adding a dependency on `contenttypes` would be wise since
 the app should be optional and if we added that then if
 `django.contrib.contenttypes` isn't in `INSTALLED_APPS`, you'd get an
 error when migrating: `ValueError: Dependency on unknown app
 contenttypes`. This raises a more general issue that unlike the
 `post_syncdb` signal, when `post_migrate` is fired there's no guarantee
 that the tables for all other apps will exist. I'm not sure if there's an
 existing method to check whether or not a model's table has been created.

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


Re: [Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-04-29 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+--
 Reporter:  melinath|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7-beta-1
 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 melinath):

 One option would be to always have a dependency on contenttypes in initial
 migrations:

 {{{
 dependencies = [
 ('contenttypes', '__first__'),
 ]
 }}}

 Untested, but I think it would work.

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


Re: [Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-04-28 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+--
 Reporter:  melinath|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7-beta-1
 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 timo):

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


Re: [Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-04-09 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+--
 Reporter:  melinath|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.7-beta-1
 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 melinath):

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


Comment:

 I would lean towards number 2 (Only trying to create if contenttypes has
 already been migrated) because explicit is better than implicit.

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


[Django] #22411: Migrations attempt to create content types without first running contenttypes sync/migrations

2014-04-09 Thread Django
#22411: Migrations attempt to create content types without first running
contenttypes sync/migrations
+
 Reporter:  melinath|  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Migrations  |Version:  1.7-beta-1
 Severity:  Normal  |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+
 If I am (for some reason) just migrating a single app on a fresh database,
 Django will try to create contenttypes for the app's models. But since it
 hasn't actually synced the contenttypes app yet, the creation fails. While
 this doesn't seem to affect the actual state of the migrations, it is
 startling and confusing, and seems unnecessary. I'm not sure which would
 be better:

 1. Always migrating contenttypes before trying to create.
 2. Only trying to create if contenttypes has already been migrated.

 {{{
 $ ./manage.py migrate 
 Operations to perform:
   Apply all migrations: 
 Running migrations:
   
 Traceback (most recent call last):
   File "./manage.py", line 10, in 
 execute_from_command_line(sys.argv)
   File ".../django/django/core/management/__init__.py", line 427, in
 execute_from_command_line
 utility.execute()
   File ".../django/django/core/management/__init__.py", line 419, in
 execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File ".../django/django/core/management/base.py", line 288, in
 run_from_argv
 self.execute(*args, **options.__dict__)
   File ".../django/django/core/management/base.py", line 337, in execute
 output = self.handle(*args, **options)
   File ".../django/django/core/management/commands/migrate.py", line 149,
 in handle
 emit_post_migrate_signal(created_models, self.verbosity,
 self.interactive, connection.alias)
   File ".../django/django/core/management/sql.py", line 246, in
 emit_post_migrate_signal
 using=db)
   File ".../django/django/dispatch/dispatcher.py", line 198, in send
 response = receiver(signal=self, sender=sender, **named)
   File ".../django/django/contrib/auth/management/__init__.py", line 85,
 in create_permissions
 ctype = ContentType.objects.db_manager(using).get_for_model(klass)
   File ".../django/django/contrib/contenttypes/models.py", line 49, in
 get_for_model
 defaults={'name': smart_text(opts.verbose_name_raw)},
   File ".../django/django/db/models/manager.py", line 92, in
 manager_method
 return getattr(self.get_queryset(), name)(*args, **kwargs)
   File ".../django/django/db/models/query.py", line 417, in get_or_create
 return self.get(**lookup), False
   File ".../django/django/db/models/query.py", line 346, in get
 num = len(clone)
   File ".../django/django/db/models/query.py", line 122, in __len__
 self._fetch_all()
   File ".../django/django/db/models/query.py", line 961, in _fetch_all
 self._result_cache = list(self.iterator())
   File ".../django/django/db/models/query.py", line 265, in iterator
 for row in compiler.results_iter():
   File ".../django/django/db/models/sql/compiler.py", line 694, in
 results_iter
 for rows in self.execute_sql(MULTI):
   File ".../django/django/db/models/sql/compiler.py", line 780, in
 execute_sql
 cursor.execute(sql, params)
   File ".../django/django/db/backends/utils.py", line 77, in execute
 return super(CursorDebugWrapper, self).execute(sql, params)
   File ".../django/django/db/backends/utils.py", line 61, in execute
 return self.cursor.execute(sql, params)
   File ".../django/django/db/utils.py", line 94, in __exit__
 six.reraise(dj_exc_type, dj_exc_value, traceback)
   File ".../django/django/db/backends/utils.py", line 61, in execute
 return self.cursor.execute(sql, params)
   File ".../django/django/db/backends/sqlite3/base.py", line 479, in
 execute
 return Database.Cursor.execute(self, query, params)
 django.db.utils.OperationalError: no such table: django_content_type
 }}}

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