This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source code for article: | |
# https://hakibenita.com/django-markdown | |
from typing import Optional | |
import re | |
import markdown | |
from markdown.inlinepatterns import LinkInlineProcessor, LINK_RE | |
from urllib.parse import urlparse | |
from django.core.exceptions import ValidationError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
picsa-os-web@0.0.1 /Users/mikej/Documents/glcode/picsa-os/web_internal | |
├─┬ @dump247/storybook-state@1.5.0 | |
│ └─┬ react-json-view@1.19.1 | |
│ ├─┬ flux@3.1.3 | |
│ │ ├─┬ fbemitter@2.1.1 | |
│ │ │ └── fbjs@0.8.16 deduped | |
│ │ └── fbjs@0.8.16 deduped | |
│ ├─┬ react-base16-styling@0.6.0 | |
│ │ ├── base16@1.0.0 deduped | |
│ │ ├── lodash.curry@4.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core_data/files/templates/footer_afr_za.html b/core_data/files/templates/footer_afr_za.html | |
index b4f385a..4edd772 100644 | |
--- a/core_data/files/templates/footer_afr_za.html | |
+++ b/core_data/files/templates/footer_afr_za.html | |
@@ -1,6 +1,10 @@ | |
<table class="bump-top form-call-to-action"> | |
<tr> | |
+ {% if request.GET.basic == "true" %} | |
+ <td>Gee asb. die voltooide vorm vir jou personeelbestuurder om vir ons te stuur. Vir enige vrae, kontak asb. jou personeel bestuurder.</td> | |
+ {% else %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amqp==2.3.2 | |
aniso8601==3.0.2 | |
apipkg==1.5 | |
appnope==0.1.0 | |
asn1crypto==0.24.0 | |
atomicwrites==1.2.0 | |
attrs==18.1.0 | |
aws-xray-sdk==0.95 | |
beautifulsoup4==4.6.0 | |
billiard==3.5.0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import random | |
def id_generator(size=4, chars=string.ascii_uppercase + string.ascii_lowercase + string.digits): | |
return ''.join(random.choice(chars) for _ in range(size)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amqp==2.3.2 | |
aniso8601==3.0.0 | |
appnope==0.1.0 | |
asn1crypto==0.24.0 | |
atomicwrites==1.1.5 | |
attrs==18.1.0 | |
aws-xray-sdk==0.95 | |
beautifulsoup4==4.6.0 | |
billiard==3.5.0.3 | |
bleach==2.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/web_internal/src/components_v2/impact-report-investments-section/index.js b/web_internal/src/components_v2/impact-report-investments-section/index.js | |
index fb84181..c9c23a4 100644 | |
--- a/web_internal/src/components_v2/impact-report-investments-section/index.js | |
+++ b/web_internal/src/components_v2/impact-report-investments-section/index.js | |
@@ -14,7 +14,6 @@ import React from 'react' | |
import PropTypes from 'prop-types' | |
import { graphql } from 'react-apollo' | |
import gql from 'graphql-tag' | |
-import moment from 'moment' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
products = ["savings", "loans", "insurance"] | |
agents = ["person1", "person2"] | |
i = 1 | |
for product in products: | |
k = 1 | |
for people in agents: | |
no_of_cases_to_create = k + i | |
print(product, people) | |
for c in range(no_of_cases_to_create): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Post CSV to a secret gist | |
# 2. Grab the link to the raw version | |
# 3. Run the following on the server | |
import csv | |
import io | |
import requests | |
url = "http://gist" # replace | |
file = io.StringIO(requests.get(url).text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DeliverHook(Task): | |
def run(self, target, payload, instance_id=None, hook_id=None, auth_token=None, **kwargs): | |
""" | |
target: the url to receive the payload. | |
payload: a python primitive data structure | |
instance_id: a possibly None "trigger" instance ID | |
hook_id: the ID of defining Hook object | |
""" | |
headers = { | |
'Content-Type': 'application/json' |
NewerOlder