• Stars
    star
    164
  • Rank 230,032 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Cookiecutter template for Wagtail CMS using Zurb Foundation 6

Wagtail Cookiecutter Foundation

Updates https://travis-ci.org/chrisdev/wagtail-cookiecutter-foundation.svg?branch=master

A cookiecutter template for Wagtail CMS was built using Zurb Foundation front-end framework. A demo of a default project generated from this cookiecutter is available at https://wagtail.chrisdev.com.

Read the Docs: http://wagtail-cookiecutter-foundation.readthedocs.org/en/latest/

Features

A Django project with Wagtail CMS pre-installed with support for all the Zurb Foundation components.

  • Supports Django 2.0
  • Renders Django projects with 100% starting test coverage
  • Built using Zurb Foundation
  • 12-Factor based settings via django-environ
  • Optimised development and production settings
  • Built with Let's Encrypt
  • Comes with a number of Custom Page models & templates such as Blog, Photo Gallery, Events and much more) to kickstart your site
  • Uses Grunt for image compression
  • Livereloading via python-livereload
  • Ansible for provisioning to and deployment to services like Digital Ocean and Linode
  • Works with Python 3.6.x

These projects come with a number of useful pages and a prebuilt content structure that will save you a tonne of work. Did I say that it automatically sets up SSL for your site using Letsencrypt!

Getting Started

Here is how we create a new Django project quickly while letting cookiecutter to do all the work.

To get started we assume the following dependencies are installed on your development enviroment

pip
virtualenv/pyvenv/virtualenvwrapper
PostgreSQL

Get Cookiecutter

$ pip install cookiecutter

Now run it against this repo:

$ cookiecutter https://github.com/chrisdev/wagtail-cookiecutter-foundation.git

You'll be prompted for some values. Provide them as illustrated in the video below.

http://img.youtube.com/vi/n6judH8PTwY/sddefault.jpg

A full featured Wagtail project will be generated for you. Enter the project

$ cd wagtail_project/

Create a git repo and push it there:

$ git init
$ git add .
$ git commit -m "first awesome commit"
$ git remote add origin [email protected]:cclarke/my_site.git
$ git push -u origin master

To create your project's virtual environment, install all pip dependencies, create the development database, run migrations and load initial data to database, install front-end dependencies and finally start the development server for you run

make develop_env

You can access your site at http://localhost:8000. The Admin back-end is available at http://localhost:8000/admin/.The default Admin username is admin and The default Admin password is admin123.

Up and Running - Provisioning and Deployment

Once you've created your project you can use the bundled make commands to to easily deploy and provision your site on platforms like Linode and Digital Ocean. We also support platforms like PythonAnywhere and Aldryn Cloud. The video below shows the process for a DigitalOcean droplet running Ubuntu 16.04.

http://img.youtube.com/vi/mSffkWuCkgQ/sddefault.jpg

We're assuming that you've already created a DO droplet and you've added the project owner's public SSH keys to the droplet. Due to the fact the DO Ubuntu 16.04 droplets don't come with the necessary Python dependencies to support serverside Ansible, the first thing we need to run is:

$ make pre_task

Next we run

$ make deploy_user

This creates a deployment user on the Droplet. The playbook will pause so you can copy your SSH public key to your projects keystore directory. At the end of this task (play), the deployment user is created and the public keys are downloaded to the keystore. You must add them to the Bitbucket or GitHub VCS repo that your project. We support both private and public repos here.

At this point, you're ready to provision, secure your server and deploy your code to the droplet. However, you may wish to pause and make changes to your project's 12 Factor settings which are stored in file called env.example. The secrets have been automagically generated using Sys random but you may want to use your own values. Once you are satisfied run

$ make provision

This will:

  • Install all the required Linux packages and libraries on the server.
  • Setup basic security on the using UFW Firewall and fail2ban.
  • Install and configure PostgresSQL.
  • Install and configure Nginx for SSL serving using Letsencrypt
  • Install and configure Redis and ElasticSearch.
  • Clone the project’s VCS repository, setup a virtual environment and install all Python dependencies
  • Setup Gunicorn and Supervisor
  • Configure and install a Celery worker process

Once the the playbook in done, you can check out your site at https://production_host_name. The Admin back-end is available at http://production_host_name/admin/. The Django SuperUser name and password are to be found in your project's ansible/host_vars/production_host_name:

Our Documentation provides deatiled instructions for deploying on PythonAnywhere and Aldryn Cloud.

Contributing

Contributions are always welcome to improve this project. If you think you've found a bug or are interested in contributing fork this project and send the pull request. After review, your pull request will be merged. We are always happy to receive pull requests. If you identify any issue, please raise it in the issues section.

More Repositories

1

django-pandas

Tools for working with pandas in your Django projects
Python
798
star
2

django-wagtail-feeds

Adds support for RSS and JSON Feeds to your Wagtail CMS Projects
Python
59
star
3

pinax-theme-foundation

pinax theme based on Foundation by zurb
JavaScript
33
star
4

django-flatpages-x

Some basic extensions for django.contrib.flatpages to allow for features such as meta tags and images
Python
30
star
5

django-pandas-examples

Some iPython/Jupyter Notebooks that Illustrate the use of django-pandas
Jupyter Notebook
13
star
6

pdftables

forked from the scraperwiki pdftables (0.0.4) project which was removed Github
Python
13
star
7

foundation-project-zero

A Django project template based on foundation
Python
10
star
8

django-foundation-formtags

Template tags for woking with Zurb Foundation Forms in your Django projects
Python
9
star
9

foundation-project-account

Django starter project based on ZURB Foundation that incorporates account features from django-user-accounts
Python
7
star
10

foundation-design-patterns

Responsive design & usage patterns for pinax-theme-foundations
Python
6
star
11

django-flatpages-filer

Integrate filer with your flat pages
Python
6
star
12

django-myfaq

An independent fork of an old version of django-faq by Kevin Fricovsky that we use in some of our projects.
Python
3
star
13

python-markdown-flex-video

Responsive Video Extension for Python-Markdown
Python
3
star
14

pelican-transcend-foundation

A theme based on Zurb Foundation 5 that doesn't look like it one of the Zurb sample templates
HTML
3
star
15

Photo-Gallery-Foundation

A sample photo gallery using ZURB's Foundation
JavaScript
1
star
16

barbados_stockex_scraper

A PDF scraper for the Barbados Stock Exchange
Python
1
star
17

cuisine-linode

Give you the ability to create, bootstrap, manage and perform administrative tasks on Linode instances.
1
star