Skip to main content

A reusable Django app for QR Code generation

Project description

TagGenerator - Django QR Code Generator ๐Ÿ’ซ๐Ÿ“ฑ

PyPI version Python Version Django Version License: MIT Latest Release django status python-publish status publish-docker status

TagGenerator is a sleek, reusable Django app for generating stylish, customizable QR codes on the fly. Easily integrate it into your web applications and give your project that extra visual flair!


๐Ÿ“– Table of Contents


๐Ÿ” Overview

In todayโ€™s fast-paced digital world, QR codes serve as an essential bridge between offline and online experiences. TagGenerator delivers a dynamic, stylish QR code generation solution for Django projects. With advanced styling options like rounded modules and radial gradients, you can create QR codes that are both functional and visually appealing.


โœจ Key Features

  • โšก Dynamic Generation: Create QR codes in real time for any URL or text.
  • ๐ŸŽจ Advanced Styling: Customize QR codes with rounded modules, gradient colors, and more.
  • ๐Ÿ”Œ Reusable Django App: Seamlessly plug into any Django project with minimal setup.
  • ๐Ÿ“ Custom Template Tag: Easily render QR codes in templates using {% qrcode_url %}.
  • ๐Ÿณ Docker Ready: Simplify deployments with a pre-built Docker image.
  • ๐Ÿ› ๏ธ CI/CD Integration: Automated testing and releases with GitHub Actions.

๐Ÿ”„ Flow Diagram

flowchart TD
    A[๐Ÿ“ฅ Input: Text or URL] --> B[๐Ÿ”ง QR Code Generation]
    B --> C[๐ŸŽจ Apply Styling Options]
    C --> D[๐Ÿ“ค Output: Styled QR Code Image]
    D --> E[๐Ÿ–ฅ๏ธ Embed in Django Templates]

๐Ÿ—‚๏ธ Project Structure

TagGenerator/
โ”œโ”€โ”€ .github/                  # GitHub Actions workflows for CI/CD ๐Ÿš€
โ”œโ”€โ”€ Dockerfile                # Docker configuration for containerized deployment ๐Ÿณ
โ”œโ”€โ”€ QrCode/                   # Reusable Django app for QR code generation
โ”‚   โ”œโ”€โ”€ migrations/           # Database migrations
โ”‚   โ”œโ”€โ”€ templates/            # Django templates (includes custom tag usage)
โ”‚   โ”œโ”€โ”€ templatetags/         # Custom template tags (e.g., qrcode_tags.py) ๐Ÿท๏ธ
โ”‚   โ”œโ”€โ”€ urls.py               # URL configuration for the QRCode app
โ”‚   โ””โ”€โ”€ views.py              # Views to render QR codes
โ”œโ”€โ”€ TagGenerator/             # Main Django project directory
โ”‚   โ”œโ”€โ”€ settings.py           # Project settings (including app configurations)
โ”‚   โ”œโ”€โ”€ urls.py               # Root URL configurations
โ”‚   โ””โ”€โ”€ wsgi.py               # WSGI configuration for deployment
โ”œโ”€โ”€ manage.py                 # Django project management script
โ”œโ”€โ”€ requirements.txt          # Python dependencies ๐Ÿ“ฆ
โ”œโ”€โ”€ setup.py                  # Setup script for packaging and PyPI publishing
โ”œโ”€โ”€ LICENSE                   # MIT License
โ””โ”€โ”€ README.md                 # Project documentation (this file) ๐Ÿ“–

๐Ÿ’ป Installation

From PyPI

Install the package directly via pip:

pip install TagGenerator

Manual Setup

  1. Clone the Repository:

    git clone https://github.com/DadaNanjesha/tag-generator.git
    cd tag-generator
    
  2. Set Up a Virtual Environment:

    python -m venv venv
    source venv/bin/activate  # Windows: venv\Scripts\activate
    
  3. Install Dependencies:

    pip install -r requirements.txt
    
  4. Install in Editable Mode (for development):

    pip install -e .
    

๐Ÿš€ Usage

Integrate into Your Django Project

  1. Add to Installed Apps:
    In your settings.py:

    INSTALLED_APPS = [
        # ... other apps
        "QrCode",
    ]
    
  2. Include URL Configuration:
    Update your project's urls.py:

    from django.urls import include, path
    
    urlpatterns = [
        # ... other URL patterns
        path("qrcode/", include("QrCode.urls", namespace="qrcode")),
    ]
    
  3. Embed QR Code in Templates:
    Load the custom template tag and render a QR code:

    {% load qrcode_tags %}
    <img src="{% qrcode_url 'https://example.com' %}" alt="QR Code">
    
  4. Demo:
    Access the demo at http://<your-domain>/qrcode/ to see your QR code in action.


๐Ÿณ Deployments

Docker Deployment

Use Docker for a consistent environment:

  1. Build the Docker Image:

    docker build -t dadananjesha/tag-generator .
    
  2. Run the Docker Container:

    docker run -d -p 8000:8000 dadananjesha/tag-generator
    

Visit http://localhost:8000/qrcode/ to view your app.

CI/CD

TagGenerator leverages GitHub Actions for continuous integration. Check out the workflows in the .github/workflows directory for more details.


๐Ÿท๏ธ Releases & Packages

  • Releases:
    The latest release is v1.0.2 (Mar 8, 2025). Each release includes detailed notes on fixes and new features.

  • Packages:
    TagGenerator is available on PyPI. We follow Semantic Versioning to ensure stability.

  • Publishing Workflow:
    To release a new version:

    1. Tag the Release:
      git tag vX.Y.Z
      git push --tags
      
    2. Build the Distribution:
      python setup.py sdist bdist_wheel
      
    3. Upload with Twine:
      twine upload dist/*
      

๐Ÿค Contributing

Contributions are welcome! Hereโ€™s how you can help:

  1. Fork the Repository
  2. Create a Feature Branch:
    git checkout -b feature/your-feature-name
    
  3. Commit Your Changes:
    Write clear, descriptive commit messages.
  4. Push and Submit a Pull Request:
    Please open an issue first for major changes.

โญ๏ธ Support & Call-to-Action

If you find this project useful, please consider:

  • Starring the repository โญ๏ธ
  • Forking the project to contribute enhancements
  • Following for updates on future improvements

Your engagement helps increase visibility and encourages further collaboration!


๐Ÿ“œ License

This project is licensed under the MIT License.


๐Ÿ™ Acknowledgements

  • Built With: Django, Python, and the qrcode library.
  • Inspiration: Designed to provide an elegant and customizable QR code solution.
  • CI/CD: Thanks to GitHub Actions for seamless integration and deployment.

Happy coding and may your QR codes always be stylish! ๐Ÿš€โœจ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taggenerator-1.0.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taggenerator-1.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file taggenerator-1.0.2.tar.gz.

File metadata

  • Download URL: taggenerator-1.0.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for taggenerator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 19526e796f4fde52845a1e939a01a5434c9ec23a86bfabc03e5bcdf913847f94
MD5 151ed78dd79a32e4be019538ec2ce204
BLAKE2b-256 24039d693e8bdb3a2cc3221989823a767bc920d22e5741afe178b29962eef851

See more details on using hashes here.

Provenance

The following attestation bundles were made for taggenerator-1.0.2.tar.gz:

Publisher: python-publish.yml on DadaNanjesha/TagGenerator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taggenerator-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: taggenerator-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for taggenerator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d579b9f5b56f1ee454a30a3c8e15ac59ba48c72d95a0c004ff39076e1ae3093a
MD5 ecb1d072bf8b06dd335ccdb8c4d7ce5e
BLAKE2b-256 7447e0f95e015a18a2cce5a817e580f065c0cd221a297be481ba22359bcd735d

See more details on using hashes here.

Provenance

The following attestation bundles were made for taggenerator-1.0.2-py3-none-any.whl:

Publisher: python-publish.yml on DadaNanjesha/TagGenerator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page