Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A painless way to add SEO information to your Django site.
This app provides two ways of adding SEO metadata to your django site:
It's fully integrated with the admin site including inline forms for models. It also includes support for multiple languages and localized URLs, and having several sites.
Django >= 1.5.0
The Git repository can be cloned with this command:
git clone https://github.com/Glamping-Hub/django-painless-seo.git
The painlessseo
package included in the distribution should be placed on the
PYTHONPATH
. Add painlessseo
to the INSTALLED_APPS
in your settings.py.
Run syncdb
command to create the needed tables.
PainlessSEO uses two configuration variables in order to define the default information that will be displayed if the URL has no SEO metadata related. You have to add them to your settings.py:
SEO_DEFAULT_TITLE = 'Lorem ipsum title'
SEO_DEFAULT_DESCRIPTION = 'Lorem ipsum description'
### Registering Models
To create synced SEO metadata for model instances you have to define the
SEO_MODELS
variable in your settings.py like this:
SEO_MODELS = (
('myapp', 'mymodel'),
('anotherapp', 'anothermodel'),
)
After registering the models, you can add the inline form to the admin instance for each model:
from painlessseo.admin import SeoMetadataInline
class MyModelAdmin(admin.ModelAdmin):
inlines = [SeoMetadataInline, ]
Now every time you save a model instance through the admin site, the SEO metadata will be updated automatically.
As simple as loading the seo
template library and using the get_seo
template tag like this:
{% load seo %}
<head>
{% get_seo %}
</head>
Why PainlessSEO does not include keywords meta tag.
This software is licensed under the terms of the BSD 3-clause license. You can find the whole text of the license in the LICENSE file.
FAQs
Painless SEO app for Django framework
We found that django-painless-seo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.