Skip to content

Instantly share code, notes, and snippets.

@philippeowagner
Created July 29, 2015 20:06
Show Gist options
  • Save philippeowagner/8151b6bf74f30dfdc7a2 to your computer and use it in GitHub Desktop.
Save philippeowagner/8151b6bf74f30dfdc7a2 to your computer and use it in GitHub Desktop.
Creating a first organisation user and the organisation.
from compat import get_user_model
from organizations.utils import create_organization
User = get_user_model()
phi = User.objects.get(username="phi")
create_organization(phi, "arteria", "arteria")
<Organization: arteria>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment