title: how to create Groups programatically in Django
body: <p>I am setting up a member site using django, in which members belong to groups that they create and then invite other users to join.</p>
  
  <p>It seems that what I am looking for is to use the django groups functionality, but the documentation on how to go about this is minimal at best - at least I haven't found any. It basically talks about creating groups in the Admin console, which is not what I am trying to do. I would like to do it programatically/dynamically.</p>
  
  <p>Another way to go about this would be to at a foreignkey to the User model up to a group model, however I can't add a foreignkey to the generic User model.</p>
  
  <p>I have read lots of stuff that google threw up at me from my searches. none helpful.</p>
  
  <p>How would I go about this?</p>
  
  <p>Thanks</p>