Skip to main content

DJ Banner

🌟 Slick Banner Ads for Django

How to Get Started

  • in first step you need to install dj_banner

      pip install dj_banner
    
  • add dj_banner app to INSTALLED_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)

Source distribution for dj-banner 1.0.0
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)

Table of built distributions (wheels) for dj-banner 1.0.0
File Interpreter ABI Platform Actions
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

Release files / dj_banner-1.0.0.tar.gz

Download URL dj_banner-1.0.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0a1ae5ad3f006318ada12883d65cafc899915746b5dca0b82c903ba939ac6430
BLAKE2b-256 checksum
How to use checksums
cb014de86793e6acf7e39983a3457195aad876ae65be0e3fe8fcd285d9aa1097
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release files / dj_banner-1.0.0-py3-none-any.whl

Download URL dj_banner-1.0.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc1b506c4b2f1f7fcc9183cbd9a09043540aca6815490456dfc1966ad7696fff
BLAKE2b-256 checksum
How to use checksums
29e4b62a9523f1a389c2f58e4c6737062cb11f270be6726ee079316c9c2acc89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page