Skip to content

Instantly share code, notes, and snippets.

View MasterKale's full-sized avatar

Matthew Miller MasterKale

View GitHub Profile
@MasterKale
MasterKale / admin.py
Created January 26, 2018 16:55
Django - User Model w/Email Username
from django import forms
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from .models import ApiUser
class UserCreationForm(forms.ModelForm):
@MasterKale
MasterKale / __init__.py
Last active December 12, 2017 17:35
pkg_resources
"""
For some reason vendored third-party libraries don't have access to `pkg_resources`. Unfortunately,
this means these libraries will cause errors like this when they try to load:
ERROR 2017-12-12 06:13:05,691 wsgi.py:263]
Traceback (most recent call last):
File "/Users/mmiller/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
# ...snip...
File "/Users/mmiller/Repos/some_django_proj/lib/django_hosts/__init__.py", line 2, in <module>

Keybase proof

I hereby claim:

  • I am MasterKale on github.
  • I am iamkale (https://keybase.io/iamkale) on keybase.
  • I have a public key whose fingerprint is 8EE8 4462 8B92 F34C F797 DEC3 EB4F 083F 2D74 1EC1

To claim this, I am signing this object: