diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ac4f3d0 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,41 @@ +pipeline: + backend: + commands: + - python manage.py test + +#volumes: +# postgres_data_dev: {} +# postgres_backup_dev: {} + +services: + postgres: + build: ./compose/postgres +# volumes: +# - postgres_data_dev:/var/lib/postgresql/data +# - postgres_backup_dev:/backups + environment: + - POSTGRES_USER=mhackspace + +# django: +# build: +# context: . +# dockerfile: ./compose/django/Dockerfile-dev +# command: /start-dev.sh +# depends_on: +# - postgres +# environment: +# - POSTGRES_USER=mhackspace +# - USE_DOCKER=yes +# volumes: +# - .:/app +# ports: +# - "8180:8000" +# links: +# - postgres +# - mailhog + + mailhog: + image: mailhog/mailhog + ports: + - "8125:8025" + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..65426bc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +media/* diff --git a/README.org b/README.org index e1b3262..b9b8df3 100644 --- a/README.org +++ b/README.org @@ -40,3 +40,11 @@ docker-compose -f dev.yml run django python manage.py migrate #+BEGIN_SRC sh docker-compose -f dev.yml run django python manage.py createsuperuser #+END_SRC + + +** 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. + +#+BEGIN_SRC sh +docker-compose -fdev.yml run django python manage.py dumpdata feeds > mhackspace/feeds/fixtures/default.json +#+END_SRC diff --git a/config/settings/common.py b/config/settings/common.py index 519fb5d..778f21b 100644 --- a/config/settings/common.py +++ b/config/settings/common.py @@ -45,10 +45,10 @@ THIRD_PARTY_APPS = ( # Apps specific for this project go here. LOCAL_APPS = ( # custom users app + # Your stuff: custom apps go here 'mhackspace.users.apps.UsersConfig', 'mhackspace.feeds', 'mhackspace.contact', - # Your stuff: custom apps go here ) # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps diff --git a/config/urls.py b/config/urls.py index f9ae71c..5012886 100644 --- a/config/urls.py +++ b/config/urls.py @@ -17,6 +17,7 @@ urlpatterns = [ url(r'^contact/$', contact, name='contact'), + # need to be logged in for these urls # Django Admin, use {% url 'admin:index' %} url(settings.ADMIN_URL, admin.site.urls), diff --git a/dev.yml b/dev.yml index c7a5e5f..70c28d5 100644 --- a/dev.yml +++ b/dev.yml @@ -34,5 +34,5 @@ services: mailhog: image: mailhog/mailhog ports: - - "8025:8125" + - "8125:8025" diff --git a/mhackspace/static/images/hackspace.png b/mhackspace/static/images/hackspace.png new file mode 100755 index 0000000..33e2ec6 Binary files /dev/null and b/mhackspace/static/images/hackspace.png differ diff --git a/mhackspace/templates/base.html b/mhackspace/templates/base.html index 9eabaf6..f5e41c3 100644 --- a/mhackspace/templates/base.html +++ b/mhackspace/templates/base.html @@ -28,6 +28,9 @@
+