django.db.utils.OperationalError:严重:数据库系统处于恢复模式

时间:2019-07-01 13:22:25

标签: django python-3.x macos docker

我正在尝试在Mac上使用以下命令启动数据库:

 <div class="card-body table-responsive p-0">
            <table class="table table-hover" id="table_id">
              <tbody><tr>
                <th>File_ID</th>
                <th>Battery</th>

  <th>No_of_questions_attempted</th>
                <th>SAS</th>
                <th>NPR</th>
                <th>ST</th>
                <th>GR</th>
              </tr>
              @foreach ($files as $filedata)
              <tr>
                <td>{{ $filedata->file_id }}</td>
                <td>{{ $filedata->Battery }}</td>
                <td>{{ $filedata->No_of_questions_attempted  }}</td>
                <td>{{ $filedata->SAS  }}</td>
                <td>{{ $filedata->NPR  }}</td>
                <td>{{ $filedata->ST  }}</td>
                <td>{{ $filedata->GR  }}</td>
              </tr>
              @endforeach
            </tbody></table> 
          </div>


            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
  <!-- include partials.chartjs -->
  @include('partials.chartjs')
   <script type="text/javascript">
  window.svgPDF = () => {
  var svg  = 
  document.querySelector('#pie_chart svg'),
   xml  = new 
  XMLSerializer().serializeToString(svg),
      data = "data:image/svg+xml;base64," + btoa(xml),
      img  = new Image()

      img.onload = function () {
        var canvas = 
    document.createElement('canvas');
        var context = canvas.getContext('2d');
        canvas.width = this.width;
        canvas.height = this.height;
        context.drawImage(this, 0, 0 );
        window.chartPDF(canvas)
      }

        img.setAttribute('src', data)
      }
      </script>

我遇到错误:

init_db:
    docker-compose run web python manage.py migrate
    docker-compose run web python manage.py creatersakey

该如何解决?我对此很陌生(Django和docker),所以我不确定我要去哪里。

我查看了该线程https://dba.stackexchange.com/questions/61650/postgres-is-stuck-in-recovery-mode,但没有发现它有帮助。

0 个答案:

没有答案