title: How to register a device on FCMDevice of fcm-django?
body: <p>I'm a beginner at Django.</p>
  <p>Referring to this link, I installed fcm-django and finished setting.
  <a href="https://fcm-django.readthedocs.io/en/latest/" rel="nofollow noreferrer">fcm-django doc</a></p>
  <ul>
  <li>Install <code>fcm-djagno</code>.</li>
  </ul>
  <pre><code>pip install fcm-django
  </code></pre>
  <ul>
  <li>Setting <code>fcm-django</code> on <strong><code>settings.py</code></strong>.</li>
  </ul>
  <pre class="lang-py prettyprint-override"><code>import firebase_admin
  from firebase_admin import credentials
  
  cred_path = os.path.join(BASE_DIR, &quot;serviceAccountKey.json&quot;)
  cred = credentials.Certificate(cred_path)
  firebase_admin.initialize_app(cred)
  
  ...
  
  INSTALLED_APPS = [
      ...
      'fcm_django',
  ]
  
  ...
  
  FCM_DJANGO_SETTINGS = {
      # default: _('FCM Django')
      &quot;APP_VERBOSE_NAME&quot;: &quot;django_fcm&quot;,
      # Your firebase API KEY
      &quot;FCM_SERVER_KEY&quot;: &quot;AAAAsM1f8bU:APA91bELsdJ8WaSy...&quot;,
      # true if you want to have only one active device per registered user at a time
      # default: False
      &quot;ONE_DEVICE_PER_USER&quot;: False,
      # devices to which notifications cannot be sent,
      # are deleted upon receiving error response from FCM
      # default: False
      &quot;DELETE_INACTIVE_DEVICES&quot;: True,
  }
  </code></pre>
  <p>And, when I post notice, if push is active, I try to send push notifications to all devices.</p>
  <pre class="lang-py prettyprint-override"><code>from firebase_admin.messaging import Message, Notification
  from fcm_django.models import FCMDevice
  
  class noticeCreateView(View):
      def post(self, request, *args, **kwargs):
          title = request.POST.get('title')
          content = request.POST.get('content')
          push = request.POST.get('push')
  
          if push:
              message = Message(
                  notification=Notification(
                      title=title,
                      body=sentence,
                  ),
              )
  
              try:
                  devices = FCMDevice.objects.all()
                  devices.send_message(message)
              except Exception as e:
                  print('Push notification failed.', e)
  
          return HttpResponseRedirect(reverse('notice_list'))
  
  </code></pre>
  <p>What I am curious about is whether data is automatically added in the FCMDevice model when the user installs this app.</p>
  <p>If I have to generate data manually, I wonder how to get an FCM registration token and how to implement adding data to the FCMDevice model.</p>