In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):
- Add
ptvsd
to your requirements.txt file
ptvsd == 4.3.2
- To your
launch.json
, add this:
from django import template | |
from wagtail.wagtailimages.models import SourceImageIOError | |
from wagtail.wagtailimages.templatetags.wagtailimages_tags import ImageNode | |
register = template.Library() | |
@register.tag(name="responsiveimage") | |
def responsiveimage(parser, token): | |
bits = token.split_contents()[1:] |
-- ------------------------------- | |
-- Watcher for changes of init.lua | |
-- ------------------------------- | |
function reloadConfig(files) | |
doReload = false | |
for _,file in pairs(files) do | |
if file:sub(-4) == ".lua" then | |
doReload = true | |
end | |
end |
FROM alpine | |
RUN apk add --update --no-cache nodejs | |
RUN npm i -g yarn | |
ADD package.json yarn.lock /tmp/ | |
ADD .yarn-cache.tgz / | |
RUN cd /tmp && yarn | |
RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules |
# use zsh & make pbcopy/paste work | |
set-option -g default-terminal /bin/zsh | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
bind w new-window -c "#{pane_current_path}" | |
# It's 2016 | |
set -g default-terminal "screen-256color" | |
# set the command escape time to 0 | |
set -s escape-time 0 |
<template> | |
<div id="app"> | |
<p> | |
Pending: {{ $store.state.getInfoPending }} | |
</p> | |
<p> | |
{{ $store.state.getInfoData }} | |
</p> | |
</div> | |
</template> |
#!/bin/bash | |
# | |
# NOTE: specify the absolutepath to the directory to use when | |
# loading a plugin. '~' expansion is supported. | |
# | |
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins | |
# |
""" | |
Configuration example for ``ptpython``. | |
Copy this file to ~/.ptpython/config.py | |
""" | |
from __future__ import unicode_literals | |
from prompt_toolkit.filters import ViInsertMode | |
from prompt_toolkit.key_binding.input_processor import KeyPress | |
from prompt_toolkit.keys import Keys | |
from pygments.token import Token |
from django import forms | |
from django.contrib import admin | |
from django.template.response import TemplateResponse | |
class RegularCreationAdminForm(forms.ModelForm): | |
class Meta: | |
model = ReactivationCoupon | |
fields = [ |
from django.contrib.staticfiles.storage import ManifestStaticFilesStorage | |
class ManifestStaticFilesStorageWithSourceMaps(ManifestStaticFilesStorage): | |
""" | |
Adds js and css source map support for ManifestStaticFilesStorage. | |
""" | |
patterns = ( | |
("*.css", ( |