Hey David, I wrote that blog post, so hopefully I can help! Here are some thoughts:
Are there two copies of field_experiments right now? The error message seems to imply that you have my_proj/my_proj/field_experiments/models.py and my_proj/field_experiments.' How is field_experiements referenced in your INSTALLED_APPS? You're layout looks right and is similar to what I did in the blog post, in that case moving theme out of the project app. As long as it isn't in the inner my_proj you shouldn't have an issue. Did you update your manage.py or are you using the same one you've had all along? For reference I think this is the old manage.py, https://github.com/stephenmcd/mezzanine/blob/3a336635ff24de2d451a5f0bf88a3da365f23ffd/mezzanine/project_template/manage.py, and the new one is https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/manage.py What is currently in my_proj/my_proj? On Wed, Aug 5, 2015 at 5:28 PM, David Hoese <[email protected]> wrote: > I'm fairly new to Mezzanine and Django and I'm having trouble with moving > my old layout to the new layout. I'm following this blog post that was > linked to here earlier, > http://bitofpixels.com/blog/upgrading-to-mezzanine-4/. I usually have all > my python code in python packages so I originally had my mezzanine project > in a python package that I could install...even if it was from a git clone. > > My old layout: > > my_proj_pkg_dir > setup.py > my_proj > __init__.py > settings.py > field_experiments # custom django app > urls.py > wsgi.py > manage.py > ... > > My new layout that I'm trying to do: > > my_proj_pkg_dir > setup.py > my_proj > __init__.py > my_proj # mezz project app > field_experiments # custom django app > manage.py > ... > > From what I understand django now loads things from the "project app" > instead of from the directory so since I have the "my_proj" package I made > it conflicts with the "my_proj" project application. So I get errors when > it accesses the models like: > > RuntimeError: Conflicting 'experiment' models in application > 'field_experiments': <class 'my_proj.field_experiments.models.Experiment'> > and <class 'field_experiments.models.Experiment'>. > > So I think my options are to either move the field_experiments app outside > of the project dir and make it its own package or stop making/installing > the my_proj package. If someone could provide me with some guidance it > would be much appreciated. Thanks in advance. > > -- > 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. > -- 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.
