小编Yon*_* Jo的帖子

Django 无法加载模块“debug_toolbar”:没有名为“debug_toolbar”的模块

当我尝试运行该项目时,由于某种原因,Django 无法加载 django-debug-toolbar 插件。错误信息说:

web_1  | ModuleNotFoundError: No module named 'debug_toolbar'
Run Code Online (Sandbox Code Playgroud)

这是我的settings.py

INSTALLED_APPS = [
    # ...
    'django.contrib.staticfiles',
    # ...
    'debug_toolbar',
]

MIDDLEWARE = [
    # ...
    'debug_toolbar.middleware.DebugToolbarMiddleware',
    # ...
]

INTERNAL_IPS = ('127.0.0.1', '192.168.0.1',)
Run Code Online (Sandbox Code Playgroud)

python django django-debug-toolbar

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

retrofit2.响应体是null

    Retrofit retrofit = new Retrofit.Builder().baseUrl(Api.Q_BASE)
            .addConverterFactory(GsonConverterFactory.create()).client(client).build();
    Api.ApiInter inter = retrofit.create(Api.ApiInter.class);
    Call<JSONObject> call = inter.getMovieData(sortType[0], Api.P_KEY);
    call.enqueue(new Callback<JSONObject>() {
        @Override
        public void onResponse(Call<JSONObject> call, Response<JSONObject> response) {
            /* */
        }

        @Override
        public void onFailure(Call<JSONObject> call, Throwable t) {
            Log.d(LOG_TAG, "failed to get response.");
        }
    });
Run Code Online (Sandbox Code Playgroud)

/

public class Api {
    public static final String Q_BASE = "http://api.themoviedb.org/";
    public static final String Q_KEY = "api_key";
    public static final String Q_RESULT = "results";
    public static final String Q_POSTER_PATH = "poster_path";
    public static final …
Run Code Online (Sandbox Code Playgroud)

android json network-programming retrofit2

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