Changes between Initial Version and Version 1 of Ticket #32334, comment 2


Ignore:
Timestamp:
Jan 11, 2021, 8:49:32 AM (4 years ago)
Author:
Gerben Morsink

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32334, comment 2

    initial v1  
    1 I found the actual error:
     1I was using a custom migration like:
    22
    3 {{{ValueError: The field SomeOtherModel.new_model was declared with a lazy reference to 'some_app.new_model', but app 'some_app' doesn't provide model 'new_model'.}}}
     3{{{
     4TARGET_APP = 'auth'
    45
    5 I don't know why this actual error was hidden and the content_type.name error was shown, but the cause was some manual editing on a migrations file.
     6
     7class Migration(migrations.Migration):
     8
     9    def __init__(self, name, app_label):
     10        # overriding application operated upon
     11        super(Migration, self).__init__(name, TARGET_APP)
     12
     13    replaces = (
     14        (TARGET_APP, '0001_initial'),)
     15
     16    dependencies = [
     17        ('contenttypes', '0001_initial'),
     18    ]
     19}}}
     20
     21To migrate the Permission model and include permission names for other languages
     22When I replaced this with:
     23
     24{{{
     25TARGET_APP = 'auth'
     26
     27
     28class Migration(migrations.Migration):
     29
     30    def __init__(self, name, app_label):
     31        # overriding application operated upon
     32        super(Migration, self).__init__(name, TARGET_APP)
     33
     34    replaces = (
     35        (TARGET_APP, '0001_initial'),)
     36
     37    dependencies = [
     38        ('contenttypes', '0002_remove_content_type_name'),
     39    ]
     40}}}
     41
     42It worked again.
     43
     44
Back to Top