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 Python packages | |
import requests | |
# Import VK API | |
import vk | |
# Import Django packages | |
from django.contrib.sites.models import Site | |
from django.contrib.humanize.templatetags import humanize | |
# Import Django Global settings | |
from django.conf import settings | |
# Import App models |
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 MyAdmin(admin.ModelAdmin): | |
def has_delete_permission(self, request, obj=None): | |
return False | |
def get_actions(self, request): | |
actions = super(MyAdmin, self).get_actions(request) | |
if 'delete_selected' in actions: | |
del actions['delete_selected'] | |
return actions |
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 Python packages | |
from datetime import datetime | |
# Import Django Test | |
from django.test import TestCase | |
# Import App models | |
from .models import Journal, Children | |
class JournalTestCase(TestCase): | |
def setUp(self): |
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
Show hidden characters
{ | |
"presets": ["@babel/preset-env"] | |
} |
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 json | |
import codecs | |
import os.path | |
try: | |
from instagram_private_api import ( | |
Client, ClientError, ClientLoginError, | |
ClientCookieExpiredError, ClientLoginRequiredError, | |
__version__ as client_version) | |
except ImportError: | |
import sys |
NewerOlder