Answer the question
In order to leave comments, you need to log in
When using wysiwyg editors in django, the text is not formatted properly. What to do?
Tried using cked and django-summernote - no text formatting and can't set up image uploads . All the time some bullshit. Summernote - uploads pictures, but does not insert into text !
And yet, none of those editors that I have tried - do not format the text, or rather, do not format it correctly .
When displaying the text, I see such nonsense :
pastebin.com/k30JqLnK
Who can - help, otherwise it doesn’t work (
Answer the question
In order to leave comments, you need to log in
The error says that random_id
Vk api is not provided
random_id Unique identifier to avoid resending the message.
int (number), accessible for versions from 5.45
vk.messages.send(
user_id=event.user_id,
message='No results'
)
vk.method('messages.send', {
'user_id': user_id,
'message': msg,
'random_id': random_id
})
Try to read the VK API documentation... The text of the error is written very clearly.
{{ var|safe|escape }}
https://docs.djangoproject.com/en/dev/ref/template...
But you need to be sure that no malicious code was embedded there.
Those. It is necessary to somehow clear the text entered by the user.
django escapes all special characters by default.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question