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
# with this trick it is possible to install django on schema access restricted databases | |
# within project root create folders like | |
# -app | |
# -pg | |
# | | |
# - __init__.py | |
# - base.py | |
from django.db.backends.postgresql_psycopg2.base import DatabaseWrapper |
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 mylist(SingleTableMixin, FilterView): | |
... | |
def get_context_data(self, **kwargs): | |
queryset = kwargs.pop('object_list', None) | |
if queryset is None: | |
self.object_list = self.model.objects.all() | |
... | |
return super().get_context_data(**kwargs) | |
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
deploy to staging: | |
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/alpine:3.17.2 | |
stage: deploy | |
before_script: | |
- "apk add openssh-client" | |
- eval $(ssh-agent -s) | |
- mkdir -p ~/.ssh | |
- chmod 700 ~/.ssh | |
- echo '#!/bin/sh' > ~/.ssh/tmp | |
- echo 'echo $SSH_PRIV_KEY_PASS' >> ~/.ssh/tmp && chmod 700 ~/.ssh/tmp |
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 CustomTagTestCase(BaseTestCase): | |
"""_summary_: includes tests of custom templatetags from templatetags/custom_tags.py | |
Args: | |
BaseTestCase (_type_): _description_ | |
""" | |
def test_count_session_time(self): | |
"""_summary_: test clean_text |
OlderNewer