- Login to Namecheap Account
- Get JSON from https://ap.www.namecheap.com/Domains/dns/GetAdvancedDnsInfo?fillTransferInfo=false&domainName=YOURDOMAINNAME.com
- Save it to file
python main.py data.json
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
# 💡 NOTE: This only works if you are pretend to using `Django Console` feature in Pycharm | |
# Paste codes below into `Build, Execution, Deployment > Console > Django Console > Starting Script` | |
# requirements: `django_extensions`, `IPython` | |
import sys | |
import django | |
from IPython.core.getipython import get_ipython | |
from django_extensions.management.notebook_extension import load_ipython_extension |
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 requests | |
import json | |
class Flower: | |
DEFAULT_API_URL = 'https://api.crowdflower.com/v1/' | |
DEFAULT_API_HEADERS = {'content-type': 'application/json'} | |
def __init__(self, api_key, api_url = DEFAULT_API_URL, api_headers = DEFAULT_API_HEADERS): | |
self.api_key = api_key | |
self.api_url = api_url |
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
from django.core.exceptions import ImproperlyConfigured | |
from django.core.management import call_command | |
from django.db.models.signals import post_syncdb | |
from south.models import MigrationHistory | |
import pizzanuvola_teaser.settings as settings | |
def migration_exists(appname, migrationnumber): | |
appname = appname.split('.')[-1] | |
return MigrationHistory.objects.filter(app_name=appname, migration__icontains=migrationnumber).exists() |