Solved!

On Wednesday, February 3, 2016 at 8:39:32 AM UTC+3, George M wrote:
>
> Hi all,
> I've used this link from Josh Cartmell to set up my add field portion in a 
> migration file https://gist.github.com/joshcartme/f8dc0f3a238024c52681
> I have tried running makemigrations but I get the same error as before 
> only with different results
>
> Traceback (most recent call last):
>   File "manage.py", line 14, in <module>
>     execute_from_command_line(sys.argv)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 354, in execute_from_command_line
>     utility.execute()
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 346, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
> line 394, in run_from_argv
>     self.execute(*args, **cmd_options)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
> line 445, in execute
>     output = self.handle(*args, **options)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/makemigrations.py",
>  
> line 98, in handle
>     loader.project_state(),
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", 
> line 353, in project_state
>     return self.graph.make_state(nodes=nodes, at_end=at_end, 
> real_apps=list(self.unmigrated_apps))
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/graph.py", 
> line 231, in make_state
>     project_state = self.nodes[node].mutate_state(project_state, 
> preserve=False)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/migration.py", 
> line 83, in mutate_state
>     operation.state_forwards(self.app_label, new_state)
>   File 
> "/home/mucheru/myprojects/general/mezzanine_env/akia2/onepage/migrations/0001__add_field_page_in_opd.py",
>  
> line 20, in state_forwards
>     super(AddExtraField, self).state_forwards(self.app_label or app_label, 
> state)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/operations/fields.py",
>  
> line 50, in state_forwards
>     state.models[app_label, self.model_name_lower].fields.append((
> self.name, field))
> KeyError: (u'pages', u'page')
>
> Initially the error was KeyError: (u'onepage', u'pages_page') but with 
> Josh's helper class it shows the above error.
> Is there anything am missing here? Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to