Skip to main content

An AI-powered assistant for Django Admin, allowing data import using OpenAI.

Project description

Django Admin AI

An AI-powered enhancement for Django Admin that integrates artificial intelligence directly into the Django admin panel. This package provides utilities for AI-assisted data processing, automatic form population, intelligent suggestions, and more.

🚀 Key Features

AI-driven form population: Automatically fill forms by extracting data from various document types (PDF, images, text files).
Seamless Django Admin integration: Enable AI-enhanced forms with a single line of code.
Easy setup: Minimal configuration required to get started.

🔮 Future Enhancements (Planned Features)

🚀 Voice input support: Record audio directly in Django Admin and let AI extract and fill form data.
🚀 Foreign Key handling: AI-driven form population for ForeignKey fields.
🚀 Embedded AI chatbot: A chatbot trained with your database schema to assist users and execute database queries on demand.


🛠 Installation

Prerequisites

  • Python 3.8+
  • Django 3.0+

Install via pip

pip install django-admin-ai

⚙️ Setup

1️⃣ Add django_admin_ai to your Django settings

In your project's settings.py, update the following:

import django_admin_ai
import os

INSTALLED_APPS = [
    ...,
    'django_admin_ai',  # Add this line
]

TEMPLATES = [
    {
        'DIRS': [
            os.path.join(BASE_DIR, 'templates/'),
            os.path.join(os.path.dirname(django_admin_ai.__file__), 'templates'),
        ],
    },
]

Define your OpenAI API key in settings.py:

DJANGO_ADMIN_AI_CONFIG = {
    "openai_api_key": "<YOUR_OPENAI_API_KEY>"
}

2️⃣ Configure URL routing

In your project's urls.py, include Django Admin AI:

from django.urls import path, include

urlpatterns = [
    path('admin-ai/', include('django_admin_ai.urls')),
]

3️⃣ Enable AI-powered forms in your models

In your Django app’s admin.py, simply add the ai_import flag to your admin models:

from django.contrib import admin
from .models import YourModel

class YourModelAdmin(admin.ModelAdmin):
    ai_import = True  # Enable AI-driven form filling

admin.site.register(YourModel, YourModelAdmin)

Now, when you upload a PDF, text file, or image, the AI will extract relevant information and populate the fields automatically! 🎉


📜 License

This project is licensed under the MIT License. Feel free to contribute and improve the project!


💡 Contributing

We welcome contributions! If you’d like to add a feature or fix a bug, feel free to fork the repository and submit a pull request.

📬 Stay Updated

Follow the repository and stay tuned for updates!


🔥 Start enhancing your Django Admin with AI today! 🔥

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

django_admin_ai-0.1.6.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

django_admin_ai-0.1.6-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file django_admin_ai-0.1.6.tar.gz.

File metadata

  • Download URL: django_admin_ai-0.1.6.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for django_admin_ai-0.1.6.tar.gz
Algorithm Hash digest
SHA256 631bff7352545718f9fc9ca55c5bd1e4412fd1fc3e9ddf98b84fb053146625e7
MD5 5e766cf5e8bcdd4aa46e7240a8142eb6
BLAKE2b-256 e670352605f4b2bcb4f3a8a768f81e9884a2e6251228712fd1f3d5eb05232de4

See more details on using hashes here.

File details

Details for the file django_admin_ai-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_ai-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 26e4c6bcf2888a494acc01ee92312d65a6feae3a52319fbf8784a19098ee0b83
MD5 0548bfd962eba729db016ba6ce6b6ed7
BLAKE2b-256 6cd65a73e38f952a6f8208692b88aa847d9ed5046662a430eb01e9d036e0a4e0

See more details on using hashes here.

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