Skip to content

Instantly share code, notes, and snippets.

View labohkip81's full-sized avatar
😎
The wise are guided by reason

Laban labohkip81

😎
The wise are guided by reason
View GitHub Profile
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
import africastalking
username = "africa username" # use 'sandbox' for development in the test environment
# use your sandbox app API key for development in the test environment
api_key = "africa's talking api key"
africastalking.initialize(username, api_key)
# # Use the service synchronously
@labohkip81
labohkip81 / admin.py
Last active September 24, 2019 12:42 — forked from wsvincent/admin.py
Django Custom User Model for any new project
# users/admin.py
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm, CustomUserChangeForm
from .models import CustomUser
class CustomUserAdmin(UserAdmin):
add_form = CustomUserCreationForm