当我尝试运行该项目时,由于某种原因,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) 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)