Skip to content

Instantly share code, notes, and snippets.

View evildmp's full-sized avatar

Daniele Procida evildmp

  • Canonical
  • Cardiff, Wales
View GitHub Profile
Environment:
Request Method: GET
Request URL: https://pycon-africa-stage.us.aldryn.io/admin/cms/page/add-plugin/?placeholder_id=46&plugin_type=IconPlugin&cms_path=/stashed-placeholders/&plugin_language=en
Django Version: 1.11.20
Python Version: 3.6.3
Installed Applications:
['aldryn_addons',
Environment:
Request Method: GET
Request URL: https://pycon-africa-stage.us.aldryn.io/admin/cms/page/add-plugin/?placeholder_id=46&plugin_type=IconPlugin&cms_path=/stashed-placeholders/&plugin_language=en
Django Version: 1.11.20
Python Version: 3.6.3
Installed Applications:
['aldryn_addons',
rabbitmq:
image: rabbitmq:3.5-management
hostname: rabbitmq
ports:
- "15672:15672"
expose:
- "15672"
environment:
RABBITMQ_ERLANG_COOKIE: <use the secret cookie here>
➜ cgjunghaus git:(develop) ✗ docker-compose build web
Building web
Step 1/10 : FROM divio/base:4.11-py3.6-slim-stretch
---> 6fe7e49a6702
Step 2/10 : ENV NGINX_CONF_PATH=/
---> Using cache
---> 9a2df5645206
Step 3/10 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales gcc
---> Running in 37a7aa910c14
Ign:1 http://deb.debian.org/debian stretch InRelease
celerybeat:
build: "."
command: "aldryn-celery beat"
env_file: .env-local
links:
- "db:postgres"
- "rabbitmq:rabbitmq"
volumes:
- ".:/app:rw"
- "./ data:/data:rw"
---
celerybeat:
build: "."
command: "aldryn-celery beat"
env_file: .env-local
links:
- "db:postgres"
- "rabbitmq:rabbitmq"
volumes:
- ".:/app:rw"
@evildmp
evildmp / gist:b32d7f3b8038c4e2ee8cd28d28809a91
Created November 22, 2018 14:55
Delete all pages in site(s)
from cms.models import Page
pages = (
Page
.objects
.filter(node__site_id__in=[28, 15], node__depth=1) # Important! Make sure the site_id values are correct...
.select_related('node')
.distinct()
.order_by('node__path')
)
total = pages.count()
# -------------- models.py --------------
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext as _
from django.db import models
from django.db.models.signals import post_save
@evildmp
evildmp / readme.rst
Last active September 5, 2016 18:26 — forked from FinalAngel/readme.rst
;
; BIND data file for apple-juice.co.uk
;
$ttl 38400
apple-juice.co.uk. IN SOA ns1.thel33t.net. postmaster.thel33t.net. (
2010090402
3600
3600
604800
38400 )