On Tue, Dec 16, 2014 at 9:26 AM, vikraw <[email protected]> wrote: > > So to make my things work I commented out the > > - python syncdb and makemigrate commands in the fabfile > > - do manual local development database backup/dump > > - copy the dump to production server > > - restore the database using pg_restore command as stated above on prod. > server > > - "fab deploy" on development machine to make any other changes available > to prod. server >
Read this SO question and its answers <https://stackoverflow.com/questions/13089163/how-to-fix-a-database-error-and-ghost-migration-error-in-django> regarding ghost migrations. I think --delete-ghost-migrations might be the flag you can run manually to clear up the problem. It is not clear what state your local database is in. I suggest that unless you have done a lot of work to the local database, you recreate it manually in production. It might have taken less time, depending on the depth of your content. - so i deleted the /static entry in gitignore file on development machine > > - ran collectstatic on development machine > > - git add, commit > > - fab deploy > Spend some time reading the static files deployment documentation <https://docs.djangoproject.com/en/dev/howto/static-files/deployment/> to get your head around how this works. The Fabric script "just works" for me when deploying to AWS. Make sure your settings.STATIC_URL and settings.STATIC_ROOT make sense. It is working for me right now, but I am not sure, if it is the right > approach to get my static media displayed as well as syncing database? > I think they are unrelated. Do further `fab deploy`s work as expected? Does the site/app behave as expected? Those are the points that really matter. > Any inputs on my setup. My situation right now: > > - started learning web development 3 months back > Good! Keep going. > - laptop development & production server > Run a VM on your laptop rather than the runserver. > - no Staging environment > Run a staging VM on your laptop. Run `fab all` on it daily. -ken -- 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.
