Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
|Build status|
Django template tags to add active class on navigation menus
From sources
.. code-block:: text
python setup.py install
From PyPi
.. code-block:: text
pip install django-navhelper==1.0
Add geelweb.django.navhelper
in your INSTALLED_APPS
.
navactive
Returns "active" if url name of the current request path is in the list
of view names
.. code-block:: html
{% load navactive %}
<li class="{% navactive request "view_name app_name:another_view_name namespace:" %}">
<a href="{% url "view_name" }">Menu Entry</a>
</li>
renavactive
Returns "active" if the pattern is found in the request path
.. code-block:: html
{% load navactive %}
<li class="{% renavactive request "^/start_with_foo" %}">
<a href="{% url "view_name" }">Menu Entry</a>
</li>
You can customize some options using settings
NAVHELPER_ACTIVE_CLASS
Default: 'active'
The class name for active entries
NAVHELPER_NOT_ACTIVE_CLASS
Default: '' (Empty string)
The class name for non-active entries
To run the test suite, first, create and activate a virtual environment. Then install some requirements and run the tests:
.. code-block:: text
pip install Django==4.2
python runtests.py
.. |Build status| image:: https://github.com/geelweb/django-navhelper/actions/workflows/testsuite.yml/badge.svg
FAQs
Django template tags designed to help the navigation rendering
We found that django-navhelper 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.