Go to file
Oliver Marks 9e11b3361e Merge pull request #106 from maidstone-hackspace/pyup-update-django-debug-toolbar-1.7-to-1.8
Update django-debug-toolbar to 1.8
2017-07-05 13:58:19 +01:00
compose reduce number of workers for stage to save the rams 2017-03-04 11:48:03 +00:00
config Initial version of home page rss.xml feed 2017-06-01 20:30:40 +01:00
docs Moved all files up one folder 2017-01-04 18:11:25 +00:00
mhackspace Fixes #133 Updated blurb on homepage, and amended the about page 2017-07-05 13:49:00 +01:00
requirements Merge pull request #106 from maidstone-hackspace/pyup-update-django-debug-toolbar-1.7-to-1.8 2017-07-05 13:58:19 +01:00
utility Moved all files up one folder 2017-01-04 18:11:25 +00:00
.drone.yml change order of command to save memory for stage 2017-04-12 09:01:41 +01:00
.gitignore Added some tests for subscription sign up, improved drone conf to cache pip packages 2017-02-19 10:50:17 +00:00
.travis.yml Added support for Circle CI tests (#16) 2017-01-26 09:03:03 +00:00
CONTRIBUTORS.txt Moved all files up one folder 2017-01-04 18:11:25 +00:00
COPYING Moved all files up one folder 2017-01-04 18:11:25 +00:00
LICENSE Moved all files up one folder 2017-01-04 18:11:25 +00:00
README.org Added render variations to the readme 2017-04-19 19:01:46 +01:00
circle.yml Updated circle config to be Python 3 2017-01-26 13:30:14 +00:00
dev.yml disable redis for now, add markdown tag for blog display 2017-02-28 09:03:01 +00:00
docker-compose.yml change order of command to save memory for stage 2017-04-12 09:01:41 +01:00
env.example Changes to fix gocardless payment issue needs a bit more work to fix domain used 2017-04-20 14:23:17 +01:00
live.yml take away redis dependancy 2017-02-28 09:16:33 +00:00
manage.py Moved all files up one folder 2017-01-04 18:11:25 +00:00
package.json sass now compiles, cleanup unused files, hooked in sign up form to post to gocardless 2017-02-08 20:32:42 +00:00
pytest.ini Moved all files up one folder 2017-01-04 18:11:25 +00:00
requirements.txt Added support for Circle CI tests (#16) 2017-01-26 09:03:03 +00:00
setup.cfg Moved all files up one folder 2017-01-04 18:11:25 +00:00
stage.yml Update intro to resolve #53 2017-03-06 08:37:56 +00:00

README.org

https://cdn.rawgit.com/maidstone-hackspace/administration/2ede7cb1/images/hackspace-banner.png

Maidstone Hackspace website

https://pyup.io/repos/github/maidstone-hackspace/maidstone-hackspace-website/shield.svg

Repository for the maidstone hackspace website, feel free to fork this site for your own Hackspace.

Requirements

Before getting started make sure you have git, docker and docker-compose installed on your machine. The simplest way to setup this site is to use docker-compose so please install that from this site https://docs.docker.com/engine/installation/ and make sure the quick start guide works https://docs.docker.com/machine/get-started/ then you can use the commands below to test and make changes.

Setup

Steps to get the site running for the first time

First clone the project

To get started checkout the project to your machine, with the command below.

git clone https://github.com/maidstone-hackspace/maidstone-hackspace-website.git

Build your containers to install the sites requirements

Once checked out build your containers locally you only need to do this when first start or if requirements change.

docker-compose -fdev.yml build

Start your new containers containing a database and django

docker-compose -fdev up

Test django is serving pages http://127.0.0.1:8180

Run migrations to setup the database

To run django commands just prefix them with docker-compose -f dev.yml run django

docker-compose -f dev.yml run --rm django python manage.py makemigrations
docker-compose -f dev.yml run --rm django python manage.py migrate

Create the admin user.

Once created you can login at http://127.0.0.1:8180/admin

docker-compose -f dev.yml run --rm django python manage.py createsuperuser

Generate dummy data

docker-compose -f dev.yml run --rm django python manage.py generate_test_data

Migrations / Managing default data

If you want to export some data you entered into the admin area you can use dumpdata and loaddata to export and import.

docker-compose -fdev.yml run --rm django python manage.py dumpdata feeds > mhackspace/feeds/fixtures/defaults.json
docker-compose -fdev.yml run --rm django python manage.py loaddata mhackspace/feeds/fixtures/defaults.json

Django Commands

docker-compose -fdev.yml run --rm django python manage.py list_subscriptions

Render image variations, if you change the images sizes this will be needed

docker-compose -fdev.yml run --rm django python manage.py rendervariations 'blog.Post.image' --replace