DEV Community

Cover image for Django check SEO - A cool django/django-cms plugin
Corentin Bettiol
Corentin Bettiol

Posted on • Edited on

Django check SEO - A cool django/django-cms plugin

Hello dev.to, today I will present you a Django/django-cms application!

Screenshot of django check seo

Django has a very cool and complete ecosystem, but when we wanted to allow our clients (the users of the websites we create) to check the SEO of their pages, we used to rely on a third party service.

It's in the perspective of solving this little flaw that I've been asked to create Django Check SEO!

separator

What does this tool do?

Django Check SEO will check the SEO aspects of your website for you, and then will make a cool report of the different problems and warnings.

COOL A NICE LITTLE GIF

(webm video is available here)

separator

How does it do that?

It's a simple webpage with a Python backend that fetches the code of the current page (using requests), parses the HTML (using beautifulsoup4), and then performs some custom tests to make sure the page is SEO friendly.

Each test will populate a list (problems, warnings or success) based on the content of the html "soup".

schema

separator

[Insert some concluding comment here]

To finish my first post, I will write some notes:

  • This is my first "big" Python project/package.
  • You can install it using pip (python3 -m pip install django-check-seo).
  • It's compatible with python2 & python3 (but please use Python 3).
  • We have made this tool for our personal use, but decided to make it open source so that everyone who needs it can use it.
  • The project have a wiki (english is not my first language, so sorry for the mistakes).
  • We heavily use django-cms to build websites, so Django Check SEO is available in one click from the top bar of django-cms.
  • I wrote unit tests (video) !
  • We choose to extract non-essential content with css selectors, here's a cool example.

separator

I have hundreds of questions for you, but I'm only going to ask these:

Do you have any comments about this project? Have you ever created a Python project? If so, what was it like?

Feel free to comment this post :)

Top comments (6)

Collapse
 
oluwakayodea profile image
Oladipo Kayode

Would this work for regular, non django-cms applications? If so, how would one go about implementing it?

Great job, by the way!!!

Collapse
 
corentinbettiol profile image
Corentin Bettiol

Sure! The django-cms integration is just to make our life easier :)

You can install the app, add it to your INSTALLED_APPS, add the url in urls.py, and then visit /django-check-seo/?page=/ to see if the app works :)

I need to test it through, it's been a few versions since I didn't installed it on a django-only app.

Collapse
 
oluwakayodea profile image
Oladipo Kayode

Just tried it out. It worked. Thanks a lot

Thread Thread
 
corentinbettiol profile image
Corentin Bettiol

You're welcome :)

Collapse
 
amartyadev profile image
Amartya Gaur

I will definitely try this out.

Collapse
 
corentinbettiol profile image
Corentin Bettiol

Don't hesitate to tell me if anything's wrong (or if all's good) !