Mezzanine Workflow

Posted by: Ken Bolton 4 years, 1 month ago

UPDATE December 8, 2014: I now believe the `runserver` is an anti-pattern. All development should be on a VM.

This is the basic Mezzanine workflow to get projects completed rapidly. Written in response to a question posted to mezzanine-users, this is a companion to the article on Mezzanine deployment process.

Start with the django runserver and get a site running at http://localhost:8000/. I see a lot of people asking for help with their server who do not have a local version running. Never trust a developer who does everything on production!

Be sure to `pip install django-debug-toolbar`, because it will help you grow your understanding of what Django and Mezzanine are doing "behind the scenes". Of particular interest is the "Templates" tools. It shows the order of the template inheritance as well as the template context, e.g. the value of "page".

Build out your site's information architecture at http://localhost:8000/admin/. Put in your "About Us" page and your forms, etc. Advanced users can use the same type of database they expect to use in production (more postgres, mom, please) and dump the data out for uploading to production.

At this point, you will have what I affectionately call a "functional wireframe" of the site. Everything works, though it probably does not look how you want it to look. This is a good time to begin working on the design. (Why? Designers often – no offense – miss crucial parts of the site. On a recent project, the design had to be redone because they forgot to include a way to login, which was prominent in the functional wireframe.)

The advantage of using bootstrap is that the DOM classes and IDs are consistent across all bootstrap-based sites. Thus, all bootstrap CSS is fairly similar. The form CSS declarations in bootstrap is totally unrelated to the mezzanine.forms app. The best way to get going is to "Customize" your bootstrap at http://twitter.github.com/bootstrap/customize.html.

Now, and only now, would I begin to muck about with the templates. Using the debug toolbar, figure out which template you want to modify and copy it from Mezzanine to your project's spanking-new `templates` directory. Iterate on this until you get through all of the pages of your site.

Current rating: 4