小编Yog*_*mar的帖子

Base64 编码字符串无效:数据字符数 (217) 不能多于 1 4 的倍数

我正在学习 Django 并使用该框架创建一个待办事项应用程序。在设置 Django Rest 框架 API 时,我遇到了一个不寻常的错误。我已经使用 Django 有一段时间了,但以前从未遇到过这个错误。我不知道为什么会抛出这个错误。

当我第一次执行命令manage.py runserver并导航到users.

错误如下:

Invalid base64-encoded string: number of data characters (217) cannot be 1 more than a multiple of 4
Request Method: GET
Request URL:    http://127.0.0.1:8001/users/
Django Version: 3.1
Exception Type: Error
Exception Value:    
Invalid base64-encoded string: number of data characters (217) cannot be 1 more than a multiple of 4
Exception Location: /usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/base64.py, line 87, in b64decode
Python Executable:  /Users/yogendrakumar/PycharmProjects/todo_app/bin/python
Python Version: 3.8.5
Python Path: …
Run Code Online (Sandbox Code Playgroud)

django pycharm python-3.x django-rest-framework

8
推荐指数
2
解决办法
2万
查看次数

Nested sidebar menu with material ui and Reactjs

I am trying to develop a sidebar menu using material ui. I am able to make it for simple list. In my project I have a requirement of nested sidebar menu which I am not able to achieve. If I am trying to use recursive function it is providing only main title menu and not rendering child elements. Please help me develop it.

The code for nested sidebar menu is as below,

import React, {useState} from 'react';
import { makeStyles …
Run Code Online (Sandbox Code Playgroud)

reactjs material-ui

1
推荐指数
1
解决办法
4658
查看次数