Это видео недоступно.
Сожалеем об этом.
Add A Rich Text Editor To A Django Blog - Django Blog #21
HTML-код
- Опубликовано: 14 авг 2024
- In this video I'll show you how to add a Rich Text Editor to your django blog.
We'll be using django-ckeditor (an easy to use rich text editor) which will allow as to stylize our blog posts and add images and links easily.
Once we pip install django-ckeditor, all we have to do is make a quick tweak to our models.py file, then make a migration and push that migration, and we can start using the text editor in our blog!
#Django #PythonDjango #DjangoBlog
▶️ Watch Entire Django Blog Playlist ✅ Subscribe To My RUclips Channel:
bit.ly/3bWN6wj bit.ly/2IGzvOR
▶️ See More At: ✅ Join My Facebook Group:
Codemy.com bit.ly/2GFmOBz
▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
Of all the tutorials I’ve watched about python django- I never thought I could get this far in this amazing playlist. I’ve learned a lot and yes! I’m gratefuuuuul
Glad it helped!
For anybody else who was wondering - I've been doing a bit of research on how safe it is render the generated rich text on a page. Obviously, you wouldn't want people to be injecting tags into your page. Thankfully django-ckeditor sanitizes the code before it gets saved in your database. tags don't work either. Neither do inline styles or script attributes like 'onclick'.
Yeah but the risk remains because you can see and modify the source code!
@@danieldiaz855 If I remember correctly, I tested this with by modifying the POST data before it was sent. The validation and sanitation happens server-side.
wow, great video, I must say. 5:33 Line 24 has saved me from the frustration I have been going through for a week now. Thank You so much💗💗💗💗💗💗
Happy to hear it!
OMG ! did you know that you just saved my life?? big thank you and big like and big subscribe and big notification on! you deserve it man.
Glad you liked it!
Great vid! Straight to the point and just the right amount of detail. 5 minutes of this video had me finish what I tried to do for half an hour myself
Awesome!
It was quite informative, thank you!
Welcome
Always great and surprisingly quick and easy what you do for us.
I will never stop thanking you.
Excuse me for my barely enough English.
Riccardo
Thanks, I appreciate it!
Another super excellent video where it just straight up answered a question with no bs in the way. You sir are a king amongst men.
Glad you enjoyed it!
this is the 4th editor I'm trying to use with django and the first time it actually works. Many thanks!!
Welcome!
I love that I tried it myself with def __init__ just to watch the video after and see a different and better way to do it. This is a really, really good RUclips tutorial series!
Your youtube channel is the best in the game. I'm a legit fan of yours now
when I add post, the field title tag appear "Select a valid choice. That choice is not one of the available choices.
", anyone get same error with?
This video is great!
Thanks!
Your teaching is so cool to understand, Thank you
Thanks! Glad you're enjoying it!
(Hidden field author) Select a valid choice. That choice is not one of the available choices.
Why does it shows this when i try to post a new blog ? Please Answer
I was trying to figure this out for a long time. Thank You.
Welcome!
ladies and gentleman, this guy is a legend
Thanks!
ckeditor - is responsive! WooHoo!
nice
The way you teach is Awesome 💓
Thank you!
Excellent video and excellent explaining, Thank you very much.
Thanks!
May allah bless you ..🤲❤❤you just saved me
Happy to hear it!
Hey I am not finding a well verged explanation on how to style this even in the documentation, could you please explain?
you are exceptional, thanks for giving me a hand on developing a blog
thanks for watching!
awesome content bro ...
love it ..
Best Django Tuts on youtube..
u make it look so easy ..
Glad you like it!
Very amazing, master. Congratulations, you are the man.
thanks
Man! You saved my life with this video! Thanks :D
Happy to hear it!
Does adding 'safe' tag makes the default escaping for that field disabled. If yes does it means that the data entered in that field is not sanitized?
Great!!! It worked... Responsive problem in design though
There shouldn't be
awesome as always. Clear explanation
Thanks! Glad you liked it
How can i upload images from my pc with ckeditor
Wow, closest thing to magic, thanks so much!
Take love and respect mate!
Thanks!
When I try to export my query to a word file, I cannot use the safe feature, so I cannot read the data. I cannot view the value because the tag is recorded in the database. Is there a solution for this?
How can I add additional fonts to ckeditor? I would really love if somebody got a straight forward solution for it
Thanks for such an amazing tutorial
Thanks for watching!
hola! sigo todos los pasos del video, y el editor me aparece en el admin, pero no en la página. Que será?
Gracias por tus videos!!
rewatch the video and try again
this is amazing man... THANK YOU!
Welcome! Glad you found it useful!
Can we add a signature from this editor like if I create some letter or application and at the end I want to add my signature how can I do that ?
Hi, I want to use {{ form.body }} instead of {{ form.as_p }} in order to customize my add page but it doesnt work. Not showing editor.
Hey manh, first I wanted to say I love your teaching style and how easy you make things. I was able to easily integrate this with my existing app. However, I found out after getting it installed and running that the company no longer supports it, and they want you to pay to upgrade etc(not afraid of paying, but no budget at the moment). Is there another one that you would recommend to use, that is maybe just as easy to implement? I've looked at Quill but I can't seem to get it working. Thanks for your video and your time.
sorry no
CKEditor Not Working to My Post Page .Because
I am Styling My Website Using CSS Only.
What Can I Do For This ?
|safe tag is not recognized in react. The html tags are appearing as they are. How can we solve this ?
This is not a react course
Hello is it a must to have a form file in order for ckeditor to work?
Thank you, brow!
welcome
what about responsiveness of your website once you add ck-editor
Thank you Sir! Amazing!
Welcome!
Thank you for the video Mr.White
lol
NoReverseMatch at /addpost/
Reverse for 'Blog' with arguments '('4', '8')' not found. 1 pattern(s) tried: ['blog/(?P[0-9]+)$'] how to solve this error
this thing i am geting both places while creating and updating article
actully i tried using success_url = reverse_lazy("home") but after updating image or url in rich text editor thowrs me this error
Ckeditor is not working when I used the AWS S3 bucket. Somebody plz help !!!
hiiii
i have a question about the ckeditor.
the django ckeditor has no class name each element, so how i can set default class name on each element?
example : when i add an image, the image element tag will be like this
What if I'm using a crispy form with ckeditor?
Thank You So Much for your videos
I am implemented with you 😀
Thanks!
Awesome man! Thanks!
Welcome!
OMG YOU HELPED ME SO MUCH THANKS
Glad I could help!
I got it...what iam searching for...tnq
Great video...Is there a more robust editor available for Django? Select the font type, size, page breaks etc?
Hello, John Elder, you are a true Legend.
well i am having problems when Adding post with Ckeditor. I have added Safe to avoid the html tags but it only disappeared on home page. when i click on one blog post to read i find tags in there and no line breaks...
if you added safe to the home page...yeah, it will only effect things on the homepage...you have to add it to the blog post pages if you want it there too.
@@Codemycom Thanks for your response. It worked well. Be blessed
@@elegantdigitalskills3073 Awesome
Thank You.
Welcome
Hello,
I also use Editorjs in my project.
But I have a problem, I can save images and files in the editor in my local, but when I deeploy the project, I get an error. It says it can't find the file. I searched a lot but couldn't find a solution.
Do you have any idea about this topic?
Sorry, never heard of that
you are awesome sir plz make a video on inventory management system
Are the fields (bold, italic, etc) editable? For instance can I remove the image icon from it?
if check comment for you have like version issue:
proper work but some version issues in the low python version
else:
keep smiling and continue the video to Improve knowledge
yes it is
ok sir let me explain my project is old like 2 year
there is a version issue and I am stuck can you have any temporary solution
sorry for what I said not working..
@@darshitvekariya1936 You can use any version you want
Great job :)
Thank you!
Best tutorial 👌
Thanks!
cool.. can you explain how to make this work on AWS and S3? keep getting files forbidden. It's trying to load from my app, not sure why..
No
Hello , thank for video
I have a question this rich text work correctly on django admin panel but in my admin panel it doesn't work
how can I fix it ?
if You solve it tell me please
@@rajpanchal2169 Hello friend , according to the ckeditor (RichText) documentation we should add some custom setting in SETTING.py file in django project
Thanks for this video
Thanks for Watching!
i did not use the form.as_p, i made an html form and linked it to the model, the ckeditor is not showing, how do i solve it please?
use form.as_p
I used to think these things are hard, but now you have show to me that they are actually not.
How do you guys remember all of these stuff!!
I need the trick.
I love the Tutorial. I can see where am going.
Glad you're enjoying the videos!
Excellent.
Many thanks!
please give us github repo as well, it will help a lot, thanks
sir how to enable mobile view of ckeditor
In settings.py file
CKEDITOR_CONFIGS = {
'default': {
'width': 'auto',
}
}
Great man thank you
You're welcome!
I like the way he tells smash the like button and subscribe
:-)
How to interact with this using js events?
Can we still do this without forms.py on a text input field?
Hi, great content here! Please, I'm looking to use CKeditor with Django rest framework browsable API, how do I go about serializing the body field in my post serializer? thank you :)
Same
what if upload img, it works?
but how to edit the size of the ckeditror image in HTML so that on the pre-display page the image fits into the card?Thank you!
put it inside a div with the height and weight you want. it should adapt to that div
Thank You so much
You're most welcome
how can I protect that ckeditor input of malicius script tag?
Hi great video! Works like a charm! One question though, how do you remove certain buttons from the toolbar?
I'm not sure you do...check the documentation
Hi, is there any way to put the max size of an image. For example when I upload an image and it is over 500 width and 500 height then the post is not created and there will be an alert.
Probably, but I don't have videos on that
@@Codemycom so do you know any way to do it?
Thank you for this great video ! Do you know if it's possible to pick a picture in our project database. Or if we can dev a custom button ?
Sorry, not sure what you mean
Can you add one more thing? I want to know "how to add comments in a blog post"?
Yeah will probably get to that
@@Codemycom Thanks!! Online chat and or chatbot would be very interesting as well.
how can implement this without django forms
Hi Mr John Elder, you are doing great job , plz can you make video bout creating chatbot using django
I don't really know anything about chatbots, sorry
Anybody know why linebreaks aren't showing up/working for me when using this?
nice video
Thanks!
hello thank for this video
I have two questions how to change the language in ckeditor and
is django-ckeditor-5 same as this pakage?
thank you
Sorry, not sure
thanks
Welcome
Nice
Thanks!
Thanks!!
No problem!
How jt handles cross site request attack. Meaning how it handles tag injected how it is going to clean the harmful tags?? Thank you 🌹 your videos are always awesome. Waiting for your reply
django uses csrf tokens
@@Codemycom I am asking cross site scripting sorry.
Can I get help with how to insert a local image in TinyMCE?
Works Fine at my localhost but doesn't at server....Please Help
I have videos on pushing sites to heroku for hosting. It's a whole thing
Smaaaash button
ha!
Please make a video on how to add ads on our website
Just paste the ad code anywhere you want on your site
When I post content using the CKEditor, also the HTML tags are displayed on the page am rendering. For example, when I type HELLO WORLD in the editor, on my page it looks like this HELLO WORLD. Kindly it will be of great help to me if assisted.
I had that issue and it was the "safe" word needed to be added to home.html, categories.html and article_details.html both for it to work correctly.
@@rossideas thanks, i did this way {{post.body|safe}} and worked. And have you checked ...Add Blog Post Page - Django Blog #4... on these tutorial series, when i press the post button nothing happens, just being redirected on the same add post page.