title: Django channels - unable to subscribe to groups
body: <p>I'm attempting to send consumers.py information to display on the client end outside of consumers.py.</p>
  <p>I've referenced <a href="https://stackoverflow.com/questions/53461830/send-message-using-django-channels-from-outside-consumer-class">Send message using Django Channels from outside Consumer class</a> this previous question, but the sub process <code>.group_send</code> or <code>.group_add</code> don't seem to exist, so I feel it's possible I'm missing something very easy.</p>
  <p><strong>Consumers.py</strong></p>
  <pre><code>from channels.generic.websocket import WebsocketConsumer
  from asgiref.sync import async_to_sync
  
  class WSConsumer(WebsocketConsumer):
      def connect(self):
          async_to_sync(self.channel_layer.group_add)(&quot;appDel&quot;, self.channel_name)
          self.accept()
  
          self.render()
  </code></pre>
  <p><strong>appAlarm.py</strong></p>
  <pre><code>def appFunc(csvUpload):
      #csvUpload=pd.read_csv(request.FILES['filename'])
      csvFile = pd.DataFrame(csvUpload)
      colUsernames = csvFile.usernames
      print(colUsernames)
  
      channel_layer = get_channel_layer()
  
      for user in colUsernames:
          req = r.get('https://reqres.in/api/users/2')
          print(req)
          t = req.json()
          data = t['data']['email']
          print(user + &quot; &quot; + data)
          
          message = user + &quot; &quot; + data
          async_to_sync(channel_layer.group_send)(
          'appDel',
          {'type': 'render', 'message': message}
      )
  </code></pre>
  <p>It's throwing this error:</p>
  <pre><code>    async_to_sync(channel_layer.group_send)(
  AttributeError: 'NoneType' object has no attribute 'group_send'
  </code></pre>
  <p>and will throw the same error for <code>group_add</code> when stripping it back more to figure out what's going on, but per the documentation <a href="https://channels.readthedocs.io/en/latest/topics/channel_layers.html#configuration" rel="nofollow noreferrer">HERE</a> I feel like this should be working.</p>