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.5.tar.gz (11.3 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.5-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_admin_ai-0.1.5.tar.gz
  • Upload date:
  • Size: 11.3 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.5.tar.gz
Algorithm Hash digest
SHA256 dac86031893dcff474b1fcd673f85ad6aa7881a31293627d0826f1537906fc73
MD5 8de41efae719c7ae1b718d2ee1696163
BLAKE2b-256 34eae271ef9951027240629aad263a00665f1094d5c81faf41a0443e7f1d61d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_ai-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 05a39809601b24041aa53202093b0972abc31f0d3d09a352c280be07ea2e6f49
MD5 8c8c51c1c9bac8a780e4c8d2645aa1ae
BLAKE2b-256 61b6ba092e4a8c47210c71fa0db1766f21a3280da152ef9519635b3b33e619c3

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