Browse Source

update: compilemessages and makemessages

master
Lucas 1 month ago
parent
commit
684d347f3e
  1. 13
      lua/django/mappings.lua
  2. 11
      lua/django/utils.lua

13
lua/django/mappings.lua

@ -64,6 +64,19 @@ local mappings = {
end,
desc = "run celery",
},
["<leader>jl"] = { desc = "Language" },
["<leader>jlc"] = {
function()
django.compile_messages()
end,
desc = "Compile messages",
},
["<leader>jlm"] = {
function()
django.make_messages()
end,
desc = "Make messages",
},
},
}

11
lua/django/utils.lua

@ -273,4 +273,15 @@ function M.run_celery()
end
end
function M.make_messages()
local term_num = 11
toggleterm.exec("./manage.py makemessages -a", term_num, 100, ".", "float", "make_messages", false)
end
function M.compile_messages()
local term_num = 12
toggleterm.exec("./manage.py compilemessages", term_num, 100, ".", "float", "compile_messages", false)
end
return M

Loading…
Cancel
Save