parameters: (self, branding=None, topup_size=None, sample_flows=True)
docstring: Initializes an organization, creating all the dependent objects we need for it to work properly.
docstring_summary: Initializes an organization, creating all the dependent objects we need for it to work properly.
docstring_tokens: Initializes an organization creating all the dependent objects we need for it to work properly .
function: def initialize(self, branding=None, topup_size=None, sample_flows=True):
          """
          Initializes an organization, creating all the dependent objects we need for it to work properly.
          """
          from temba.middleware import BrandingMiddleware
          from temba.contacts.models import ContactField, ContactGroup
          from temba.tickets.models import Ticketer, Topic
  
          with transaction.atomic():
              if not branding:
                  branding = BrandingMiddleware.get_branding_for_host("")
  
              ContactGroup.create_system_groups(self)
              ContactField.create_system_fields(self)
              Ticketer.create_internal_ticketer(self, branding)
              Topic.create_default_topic(self)
  
              self.init_topups(topup_size)
              self.update_capabilities()
  
          # outside of the transaction as it's going to call out to mailroom for flow validation
          if sample_flows:
              self.create_sample_flows(branding.get("api_link", ""))
function_tokens: def initialize ( self , branding = None , topup_size = None , sample_flows = True ) : from temba . middleware import BrandingMiddleware from temba . contacts . models import ContactField , ContactGroup from temba . tickets . models import Ticketer , Topic with transaction . atomic ( ) : if not branding : branding = BrandingMiddleware . get_branding_for_host ( "" ) ContactGroup . create_system_groups ( self ) ContactField . create_system_fields ( self ) Ticketer . create_internal_ticketer ( self , branding ) Topic . create_default_topic ( self ) self . init_topups ( topup_size ) self . update_capabilities ( ) # outside of the transaction as it's going to call out to mailroom for flow validation if sample_flows : self . create_sample_flows ( branding . get ( "api_link" , "" ) )