This file contains hidden or 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 csv | |
class CSVBuffer: | |
"""Handles CSV output.""" | |
def write(self, value): | |
"""Handles file-like write, just returning the value""" | |
return value | |
def download_csv(request): |
This file contains hidden or 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
- name: Install dependencies | |
ansible.builtin.apt: | |
name: "{{ item }}" | |
state: present | |
update_cache: true | |
loop: | |
- apt-transport-https | |
- ca-certificates | |
- curl | |
- gnupg-agent |
This file contains hidden or 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
- name: Install K3s | |
hosts: kubernetes | |
remote_user: root | |
become: false | |
vars: | |
ansible_user: root | |
vars_files: | |
- vars/config.yml | |
- vars/secrets.yml | |
tasks: |
This file contains hidden or 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 DeferredHTMLMiddleware): | |
"""Adds `deferred_html` to request. | |
Use with the defer and render_deferred template tags. | |
""" | |
def __init__(self, get_response: Callable): | |
self.get_response = get_resposne | |
def __call__(self, request: HttpRequest) -> HttpResponse: |
This file contains hidden or 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
@register.simple_block_tag(takes_context=True) | |
def blockinclude( | |
context: Context, | |
content: str, | |
template_name: str, | |
*, | |
only: bool = False, | |
**extra_context, | |
) -> str: |
OlderNewer