Package: bigmouth
django-bigmouthprovides aDjangointerface to thePelicanstatic blog
generator.IntroductionWhat?A Django app that provides a management command (run_pelican) that acts as
a thin facade over thePelicanblog generation process, together with various
templatetags to assist with custom template creation, and the ability to preview
the blog via the development server and Django flatpages.Why?You might usebigmouthrather thanPelicanitself if you have an existing
dynamic Django app to which you want to add a static blog while making use of
your app’s templating and static file setup, or if you simply prefer Django
templates to Jinja templates.Quickstart - running the example projectIt is assumed that everything that is required to run Python and Django is
installed on your system. We also assume a unix/BSD system, but a windows
setup shouldn’t be too dissimilar to what follows.SourceFirst get the source, for example:pip install bigmouth --download=.or the latest version:git clone ssh://git@github.com/devopsni/django-bigmouth.gitBuildoutIn the root directory of the files just downloaded, run thebootstrap.pyfile:python bootstrap.pyThis should create, among other things, a localbindirectory. Now you should
run thebin/buildoutscript, but if you are familiar with buildout you
might want to look at the buildout.cfg file and update as required. Theeggs-directorysettings is set to../eggs, ie. a sibling rather than a
child of the current directory.So now run:./bin/buildoutand this should initialize a local sandboxed environment. In particular,bigmouthdepends on the latestPelicanand this will have been cloned
from github to thedevelop-srcdirectory.If all went well, running:./bin/djangoshould print a list of available management commands and these should include
a command calledrun_pelican.DatabaseBefore you can create the example blog, you have to create a database and
configure the Django settings file appropriately. This is the standard Django
database setup step for which the Django docs provide all the info you need.
It’s the DATABASES parameter in thebigmouth_example/settings.pywhich need
to be changed to match the database you create.If you are using postgresql you could look at the includedpgresetscript.
This is a utlity shell script which will create a postgresql database and user.
For example:pushd bigmouth_example/etc/postgres
./pgreset
popdor, depending on your postgresql configuration:sudo -u postgres ./pgresetOn completion,pgresetwill print the required DATABASES setting which you
can then copy and paste to the settings file.Once the database is created and configured, run thesyncdbmanagement command:./bin/django syncdbNote, that a database isn’t strictly required if you pass--no-flatpagesas
a parameter to therun_pelicancommand (and you are not interested in previewing
the files via the development server), but a database is recommended and could well
become a requirement at some point.mkblogNow you are ready to create the example blog application and the easiest way is
to run themkblogutility which simply wraps the call to therun_pelicancommand:./mkblogand then view the blog by running:./bin/django runserverand visitinghttp://127.0.0.1:8000/.