自从更新我的依赖项以来,我的 django 应用程序遇到了一些问题。这是我安装的应用程序:
INSTALLED_APPS = [
'graphene_django',
'rest_framework',
'corsheaders',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'dojo_manager.dojo',
]
Run Code Online (Sandbox Code Playgroud)
和我的要求.txt:
aniso8601==8.0.0
asgiref==3.2.3
Django==3.0.2
django-cors-headers==3.2.0
django-filter==2.2.0
django-graphql-jwt==0.3.0
djangorestframework==3.11.0
djangorestframework-jwt==1.11.0
graphene==2.1.8
graphene-django==2.8.0
graphene-django-extras==0.4.8
graphql-core==3.0.1
graphql-relay==3.0.0
pip-upgrade-outdated==1.5
pipupgrade==1.5.2
promise==2.3
PyJWT==1.7.1
python-dateutil==2.8.1
pytz==2019.3
Rx==3.0.1
singledispatch==3.4.0.3
six==1.13.0
sqlparse==0.3.0
Run Code Online (Sandbox Code Playgroud)
我正进入(状态
ImportError: cannot import name 'ResolveInfo' from 'graphql' (E:\Ben\GitHub-Repos\dojo-manager\env\lib\site-packages\graphql\__init__.py)
Run Code Online (Sandbox Code Playgroud)
我知道https://github.com/graphql-python/graphene-django/issues/737和https://github.com/graphql-python/graphene/issues/546,其中没有一个似乎可以解决这个问题我的情况。
非常感谢任何帮助。
我目前正在使用Angular.JS进行小型应用程序在我看来我有以下按钮
<md-button class="md-primary" ng-click="editUser(user, $event)">Edit</md-button>
Run Code Online (Sandbox Code Playgroud)
editUser方法看起来像这样:
$scope.editUser = function (user, $event) {
$scope.userToEdit = user;
$mdDialog.show({
controller: DialogController,
targetEvent: $event,
templateUrl: '/js/modules/user/views/edit.tmpl.html',
parent: angular.element(document.body),
clickOutsideToClose: true,
scope: $scope
})
.
then(function (answer) {
if (answer == "save") {
for (right in $scope.allSystemRightsStatements) {
if ($scope.allSystemRightsStatements[right].selected) {
if( $scope.userToEdit.rights==null){
$scope.userToEdit.rights = [];
}
$scope.userToEdit.rights.push($scope.allSystemRightsStatements[right]);
}
}
$scope.updateUser($scope.userToEdit);
}
$scope.userToEdit = {};
}, function () {
$scope.userToEdit = {};
});
};
$scope.updateUser = function (user) {
//userService.updateUser makes a $http PUT request …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Spring(+ JPA)和使用anotations的Hibernate实现应用程序.
我重新加入了JPA部分.从那以后我得到:
javax.enterprise.inject.UnsatisfiedResolutionException: Unable to resolve a bean for 'javax.persistence.EntityManager' with qualifiers [@javax.enterprise.inject.Default(), @javax.enterprise.inject.Any()].
Run Code Online (Sandbox Code Playgroud)
错误.我也收到以下警告:
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] protected org.springframework.data.repository.cdi.CdiRepositoryExtensionSupport.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. …Run Code Online (Sandbox Code Playgroud)