DJ Banner
🌟 Slick Banner Ads for Django
How to Get Started
-
in first step you need to install
dj_bannerpip install dj_banner
-
add
dj_bannerapp toINSTALLED_APPS# config.settings.py INSTALLED_APPS = [ ... 'dj_banner', ... ]
-
add urls to
setting urls# config.urls.py urlpatterns = [ ... path('', include('dj_banner.urls')), ... ]
-
add static directory in settings static
# config.settings.py STATICFILES_DIRS = [ ... 'dj_banner/static', ... ]
-
run migrate command
python manage.py migrate
-
setup and load static files in base template
-
add styles
<link rel="stylesheet" href="{% static 'dj_banner/css/index.css' %}"> <!-- Or just hardcode the file path --> <link rel="stylesheet" href="Path/to/your/index.css">
-
add scripts
<script src="{% static 'dj_banner/js/index.js' %}"></script> <!-- Or point directly to the JS file --> <script src="Path/to/your/index.js"></script>
-
set backend address: Add the domain URL to your template like this
<script> const DJ_BANNER_BACKEND_URL = 'YOUR_BACKEND_ADDRESS' // local(default): http://127.0.0.1:8000 </script>
-
-
Create Your Objects by DJANGO ADMIN: Build and customize your banner setup:
- Page: Define the page where your banner will pop up.
- Banner Style: Pick different styles and sizes for your banner.
- Banner: The main object where you set all your banner details.
Tip 📝
The default small size for Banner Style is set to 768px, but you can tweak it in the index.js file to whatever vibe you’re going for :)
Metadata
Release files for dj-banner 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dj_banner-1.0.0.tar.gz | 8.1 kB | Without provenance | Details for dj_banner-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dj_banner-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for dj_banner-1.0.0-py3-none-any.whl |
Total release size: 17.5 kB
Security for dj-banner 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.