//actions
USERLEVELS_PATCH: ({commit}, payload) => {
axios.patch('/ef/userlevel/' + payload.id + '/', payload.data)
.then(response => {
commit('USERLEVELS_PATCH', response.data)
})
}
//mutations
USERLEVELS_PATCH: (state, data) => {
let item = state.userlevels.find(x => x.id == data.id);
item.favorite = data.favorite
}
computed: {
...mapGetters('ef', ["levels", "userlevels"]),
newlevels: function () {
this.levels.forEach(x => {
if(x.level.length > 30) {
let level = x.level
let bar = level.split(' ').slice(0, 3)
x.level = bar.join(' ') + ' ...'
}else{
x.level = x.level
}
})
this.levels.forEach(a => {
this.userlevels.forEach(b => {
if (a.id === b.level) {
a['favorite'] = b.favorite
a['complete'] = b.complete
a['progress'] = b.progress
a['userlevel_id'] = b.id
}
})
})
return this.levels
}
rsync -r --exclude 'env' target backup_folder
set_password() {
axios.post('/app/reset-password/confirm/', {'password': this.password, 'token': this.token})
.then(response => {
console.log(response.request.response) // response.request.response
this.result = response.request.response
let obj = JSON.parse(this.result)
if (obj.password) {
console.log(obj.password, '< obj.passowrd')
}else if (obj.status == 'OK') {
console.log(obj.status, '< obj.status')
}else if (obj.status == 'notfound') {
console.log(obj.status, '< obj.notfound')
}
})
}
},
POST http://localhost:8000/app/reset-password/confirm/ 400 (Bad Request)
Error: Request failed with status code 400
at createError (build.js:15685)
at settle (build.js:27186)
at XMLHttpRequest.handleLoad (build.js:15559)
На мой взгляд лучше взять Kivy чем Tkinter.