Skip to content

littleweaver/littleweaverweb.com

Repository files navigation

Little Weaver's Wagtail-powered website.

Development

Prerequisites

The installation instructions below assume you have the following software on your machine:

Installation instructions

Clone the Git repository from https://github.com/littleweaver/littleweaverweb.com.git.

Make sure to cd littleweaverweb.com into the repo directory before following the next steps.

Python dependencies

If you are using virtualenv or virtualenvwrapper, create and activate an environment. E.g.,

mkvirtualenv lww                   # Using virtualenvwrapper.

Then install the requirements:

pip install -r requirements.txt

Node dependencies

Install node dependencies.

npm install -g postcss-cli autoprefixer

Database initialization

The first time you run, you'll need to run migrations and create a superuser:

python manage.py migrate           # Create/sync the database.
python manage.py createsuperuser   # Create an initial user.

base.py will use sqlite3 by default. You can use postgres with the DATABASE_URL environment variable.

createdb lww
DATABASE_URL=postgres:///lww python manage.py migrate

Get it running

If you are using virtualenv, ensure that you are on the appropriate virtual environment:

workon lww                         # Switch virtualenv.
python manage.py runserver         # Run the server!

Then, navigate to http://127.0.0.1:8000/ in your favorite web browser to view the site! Navigate to http://127.0.0.1:8000/admin/ to edit pages.