In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):
- Add
ptvsdto your requirements.txt file
ptvsd == 4.3.2
- To your
launch.json, add this:
| import React from 'react'; | |
| import { shallow } from 'enzyme'; | |
| import MyComponent from '../src/my-component'; | |
| const wrapper = shallow(<MyComponent/>); | |
| describe('(Component) MyComponent', () => { | |
| it('renders without exploding', () => { | |
| expect(wrapper).to.have.length(1); | |
| }); |
| // | |
| // Golden Ratio Typography | |
| // -------------------------------------------------- | |
| // Golden Ratio Math | |
| // | |
| // Let's do some math so we can build beautiful typography and vertical rhythm. | |
| // For any magic to happen, set the $ContentWidth variable on _variables.scss | |
| // to match your content box width (normally this is 640px, 740px, etc...). |
| /* Converts an object into a key/value par with an optional prefix. Used for converting objects to a query string */ | |
| var qs = function(obj, prefix){ | |
| var str = []; | |
| for (var p in obj) { | |
| var k = prefix ? prefix + "[" + p + "]" : p, | |
| v = obj[k]; | |
| str.push(angular.isObject(v) ? qs(v, k) : (k) + "=" + encodeURIComponent(v)); | |
| } | |
| return str.join("&"); | |
| } |