Package: django-check-seo
Replacing some features of Yoast or SEMrush for Django & Django-CMS users.In other words, django-check-seo will tell you if you have problems concerning a broad range of SEO aspects of your pages.Install(compatible with django >= 1.8.15 & python >= 2.7)Install the module fromPyPI:python3 -m pip install django-check-seoAdd it in yourINSTALLED_APPS:"django_check_seo",Add this in yoururls.py(if you're using django-cms, put it before thecms.urlsline or it will not work):path("django-check-seo/", include("django_check_seo.urls")),Or add this if you're still usingurl(you shouldn't):url(r"^django-check-seo/", include("django_check_seo.urls")),Update your DjangoSiteobject parameters with a working url (here's anexamplefor dev environment).Addtestserver(and maybewww.testserver) to yourALLOWED_HOSTSlist in your settings.py (django-check-seo uses the Test Framework in order to get content, instead of doing an HTTP request).Add the permission (use_django_check_seo) to the users/groups you want to give access to.(optional) Configure the settings (seeconfig).MiscThis application needsbeautifulsoup4(>=4.7.0) anddjangocms_page_meta(==0.8.5 if using django < 1.11). It may be used with or withoutdjango-cms(a django-check-seo button will appear in the topbar if you're using django-cms).If you're not using Django CMS (only Django), here's the link format to access your pages reports:https://example.com/django-check-seo/?page=/example-page/
  -> will check https://example.com/example-page/

https://example.com/fr/django-check-seo/?page=/example-page/
  -> will check https://example.com/example-page/
     (using localized url (if you add django-check-seo in i18n_patterns))ConfigBasic settingsThe basic config (used by default) is located indjango-check-seo/conf/settings.pyand looks like this:DJANGO_CHECK_SEO_SETTINGS={"content_words_number":[300,600],"internal_links":1,"external_links":1,"meta_title_length":[30,60],"meta_description_length":[50,160],"keywords_in_first_words":50,"max_link_depth":3,"max_url_length":70,}If you need to change something, just define a dict namedDJANGO_CHECK_SEO_SETTINGSin your settings.py.Custom settings example:If you put this in yoursettings.pyfile:DJANGO_CHECK_SEO_SETTINGS={"internal_links":25,"meta_title_length":[15,30],}Then this will be the settings used by the application:DJANGO_CHECK_SEO_SETTINGS={"content_words_number":[300,600],"internal_links":25,# 1 if using default settings"external_links":1,"meta_title_length":[15,30],# [30, 60] if using default settings"meta_description_length":[50,160],"keywords_in_first_words":50,"max_link_depth":3,"max_url_length":70,}Want to know more ? See the wiki pageSettings explained.TemplatesThedjango_check_seo/default.htmltemplate have an<aside>block namedseo_asidethat you can replace if you want, using theextends&{% block seo_aside %}instructions, like this:{% extends "django_check_seo/default.html" %}

{% block seo_aside %}
    Hi!
{% endblock seo_aside %}This template will remplace all theAbout/Documentation&Raw data(content on the<aside>block) by "Hi!".Select main content (exclude header/footer/...)Since django-check-seo will count things like number of words on the main content and the number of internal links, it is important to only select themaincontent of the page (an address in the footer is not the main content of your page).Django-check-seo use a string (namedDJANGO_CHECK_SEO_EXCLUDE_CONTENT) ofcss selectorsto exclude unwanted html nodes from the html content:DJANGO_CHECK_SEO_EXCLUDE_CONTENT = "tag, .class, #id, tag > .child_class"You can find a reference table of css selectors explainedhere(on mdn docs).Example: Seethis issue's commentfor an example.Want a screenshot?Other (older) screenshots and videos are available on thewiki.Unit testsThey are located intestsfolder.The filelaunch_tests.shis here to manage tests launching for you. You only needpython3-venv(for python3 venv) andvirtualenv(forpython2venv) in order to make it work.ContributingSeeCONTRIBUTING.md.Interested in finding out more?Take a look at thewiki:List & explanations of all checksHow to add a check?...