code: def get_form(self, request, obj=None, **kwargs):
          
          #form = super(PageAdmin, self).get_form(request, obj, **kwargs)
          template = get_template_from_request(request, obj)
          form = make_form(self.model, get_placeholders(template))
  
          language = get_language_from_request(request)
          form.base_fields['language'].initial = language
          if obj:
              initial_slug = obj.slug(language=language, fallback=False)
              initial_title = obj.title(language=language, fallback=False)
              form.base_fields['slug'].initial = initial_slug
              form.base_fields['title'].initial = initial_title
              form.base_fields['slug'].label = _('Slug')
  
          template = get_template_from_request(request, obj)
          page_templates = settings.get_page_templates()
          if len(page_templates) > 0:
              template_choices = list(page_templates)
              template_choices.insert(0, (settings.PAGE_DEFAULT_TEMPLATE,
                      _('Default template')))
              form.base_fields['template'].choices = template_choices
              form.base_fields['template'].initial = force_text(template)
  
          for placeholder in get_placeholders(template):
              name = placeholder.name
              if obj:
                  initial = placeholder.get_content(obj, language, name)
              else:
                  initial = None
              form.base_fields[name] = placeholder.get_field(obj,
                  language, initial=initial)
  
          for placeholder in self.metadata_fields:
              name = placeholder['name']
              initial = None
              if obj:
                  try:
                      initial = Content.objects.get(page=obj, language=language, type=name).body
                  except Content.DoesNotExist:
                      pass
              form.base_fields[name] = placeholder['field']
              form.base_fields[name].initial = initial
  
          return form
docs: Get a :class:`Page <pages.admin.forms.PageForm>` for the
          :class:`Page <pages.models.Page>` and modify its fields depending on
          the request.