Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
jsl-django-sitemap
JSL Django Sitemap is a Django utility which iterates over all the url patterns in your main Django project and creates a ready to use sitemap. The sitemap.xml is useful in crawlers such as Google, Bing, Yahoo. We hope you like our app! Leave a star on our GitHub repository. Thanks!
Readme
A sitemap is an XML file on your website that tells search-engine crawlers or indexers how frequently your pages change and how “important” certain pages are in relation to other pages on your site. This information helps search engines index your site.
This Django sitemap framework library automates the creation of this XML file by letting you express this information in Python code. You have the ability to chnge and mention settings in your Django project's settings.py file. It is very convinent and easy to use library which detects the changes in your Django url configuration and reloads the new configuration making absolutely no manual interventions for your sitemap.
JSL Django Sitemap is a sitemap.xml creator for Django projects which iterates over all the url patterns in your main Django project and creates a ready to use sitemap. The sitemap.xml is useful in crawlers such as Google, Bing, Yahoo. We hope you like our app! Leave a star on our GitHub repository. Thanks!
You can install the JSL Django Sitemap from PyPI:
pip install jsl-django-sitemap
from jsl_django_sitemap.views import sitemaps
from django.contrib.sitemaps.views import sitemap
from django.urls import path
path('sitemap.xml', sitemap, {'sitemaps': sitemaps},
name='django.contrib.sitemaps.views.sitemap'),
JSL_DJANGO_SITEMAP_SETTINGS = {
"ENABLE": True,
"FETCH_URL_FROM": "pattern",
"INCLUDE_APPS": ("ALL",),
"IGNORE_URL_PATTERNS": (".*/api/v1.*", )
}
INSTALLED_APPS = [
# ...
'django.contrib.sitemaps',
]
NOTE:
- "ALL" means to include all the urls
- If you want specific apps to be included in sitemap use below. Provide comma separated tuple containing your app name
- "INCLUDE_APPS": ("myapp1","myapp2")
- FETCH_URL_FROM: should be one value from the list ["name", "pattern"]
- default for FETCH_URL_FROM is "pattern"
- By default, if pattern is provided then "^" prefix and "$" suffix in urlpattern is removed.
- "IGNORE_URL_PATTERNS": ("./api/v1.", ) This flag is used to ignore certain urls matching the provided tuple of patterns which are regex compatible NOTE: The sitemap application doesn't install any database tables. The only reason it needs to go into INSTALLED_APPS is so that the Loader() template loader can find the default templates.
Start the development server and visit http://127.0.0.1:8000/sitemap.xml
python3 -m pip install --upgrade twine
python setup.py sdist
twine upload dist/*
FAQs
JSL Django Sitemap is a Django utility which iterates over all the url patterns in your main Django project and creates a ready to use sitemap. The sitemap.xml is useful in crawlers such as Google, Bing, Yahoo. We hope you like our app! Leave a star on our GitHub repository. Thanks!
We found that jsl-django-sitemap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.