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.3.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.3-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_admin_ai-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 e9dfb31fa13697db1b71bd540d4d33a6c2dfd11dac0a3f0a46a5174dafaf4dce
MD5 d82bfcf9ccf805145038ca3b019f777b
BLAKE2b-256 1d9abc09d5651d99f6e8a8c4e2818100edc86cf4afc2178d56b9ea08fb0c8399

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_ai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0e32bc26e84dcaf4b8a58ca44a378e2ee14d1641437d7a9ccfb9caf29c83fe68
MD5 6a8a87ce2c3196183917fe286214f0b6
BLAKE2b-256 43440e522bf3e05cb7dd592cc8ebc4be800946867acebb63c05e974c65a9ba7e

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