django-admin-recent-inlines


Namedjango-admin-recent-inlines JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/AugendLimited/django-admin-recent-inlines
SummaryRecent inlines with view-all functionality
upload_time2025-08-29 10:56:47
maintainerNone
docs_urlNone
authorKonrad Beck
requires_python<4.0,>=3.11
licenseMIT
keywords django admin inlines recent
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django Admin Recent Inlines

A Django package that provides a `RecentTabularInline` class for displaying recent related objects in Django admin with a "View All" link.

## Features

- **Recent Inlines**: Display only the most recent related objects in Django admin
- **View All Link**: Automatically adds a "View All" link when there are more objects than the display limit
- **Configurable Limit**: Set the maximum number of related objects to display
- **Django Admin Integration**: Seamlessly integrates with Django's admin interface

## Installation

```bash
pip install django-admin-recent-inlines
```

### Development Installation

If you're installing from source for development:

```bash
git clone https://github.com/AugendLimited/django-admin-recent-inlines.git
cd django-admin-recent-inlines
pip install -e .
```

Then add to your Django settings:

```python
INSTALLED_APPS = [
    # ... your other apps
    'django_admin_recent_inlines',
]
```

## Usage

### Basic Usage

```python
from django.contrib import admin
from django_admin_recent_inlines.admin import RecentTabularInline
from .models import ParentModel, ChildModel

class ChildInline(RecentTabularInline):
    model = ChildModel
    maximum_number_of_related_rows_to_display = 5  # Show only 5 most recent

@admin.register(ParentModel)
class ParentAdmin(admin.ModelAdmin):
    inlines = [ChildInline]
```

### Configuration Options

- `maximum_number_of_related_rows_to_display`: Number of recent objects to display (default: 5)
- `template`: Custom template for the inline (default: uses the provided template)
- All standard `TabularInline` options are supported

### How It Works

1. The `RecentTabularInline` limits the queryset to show only the most recent related objects
2. When there are more objects than the display limit, a "View All" link is automatically added
3. The "View All" link takes you to the filtered changelist view showing all related objects
4. The link includes the count of total related objects

## Requirements

- Python 3.11+
- Django 4.0+

## Development

### Setup

```bash
git clone https://github.com/AugendLimited/django-admin-recent-inlines.git
cd django-admin-recent-inlines
poetry install
```

### Running Tests

```bash
poetry run pytest
```

## License

MIT License - see LICENSE file for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AugendLimited/django-admin-recent-inlines",
    "name": "django-admin-recent-inlines",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "django, admin, inlines, recent",
    "author": "Konrad Beck",
    "author_email": "konrad.beck@merchantcapital.co.za",
    "download_url": "https://files.pythonhosted.org/packages/0d/a1/f4cf5622c634f3780a01c518b5901c21432296a73be039e6408d2866b7d5/django_admin_recent_inlines-0.1.3.tar.gz",
    "platform": null,
    "description": "# Django Admin Recent Inlines\n\nA Django package that provides a `RecentTabularInline` class for displaying recent related objects in Django admin with a \"View All\" link.\n\n## Features\n\n- **Recent Inlines**: Display only the most recent related objects in Django admin\n- **View All Link**: Automatically adds a \"View All\" link when there are more objects than the display limit\n- **Configurable Limit**: Set the maximum number of related objects to display\n- **Django Admin Integration**: Seamlessly integrates with Django's admin interface\n\n## Installation\n\n```bash\npip install django-admin-recent-inlines\n```\n\n### Development Installation\n\nIf you're installing from source for development:\n\n```bash\ngit clone https://github.com/AugendLimited/django-admin-recent-inlines.git\ncd django-admin-recent-inlines\npip install -e .\n```\n\nThen add to your Django settings:\n\n```python\nINSTALLED_APPS = [\n    # ... your other apps\n    'django_admin_recent_inlines',\n]\n```\n\n## Usage\n\n### Basic Usage\n\n```python\nfrom django.contrib import admin\nfrom django_admin_recent_inlines.admin import RecentTabularInline\nfrom .models import ParentModel, ChildModel\n\nclass ChildInline(RecentTabularInline):\n    model = ChildModel\n    maximum_number_of_related_rows_to_display = 5  # Show only 5 most recent\n\n@admin.register(ParentModel)\nclass ParentAdmin(admin.ModelAdmin):\n    inlines = [ChildInline]\n```\n\n### Configuration Options\n\n- `maximum_number_of_related_rows_to_display`: Number of recent objects to display (default: 5)\n- `template`: Custom template for the inline (default: uses the provided template)\n- All standard `TabularInline` options are supported\n\n### How It Works\n\n1. The `RecentTabularInline` limits the queryset to show only the most recent related objects\n2. When there are more objects than the display limit, a \"View All\" link is automatically added\n3. The \"View All\" link takes you to the filtered changelist view showing all related objects\n4. The link includes the count of total related objects\n\n## Requirements\n\n- Python 3.11+\n- Django 4.0+\n\n## Development\n\n### Setup\n\n```bash\ngit clone https://github.com/AugendLimited/django-admin-recent-inlines.git\ncd django-admin-recent-inlines\npoetry install\n```\n\n### Running Tests\n\n```bash\npoetry run pytest\n```\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Recent inlines with view-all functionality",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/AugendLimited/django-admin-recent-inlines",
        "Repository": "https://github.com/AugendLimited/django-admin-recent-inlines"
    },
    "split_keywords": [
        "django",
        " admin",
        " inlines",
        " recent"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c868ef5609ef08a503214354f498b4b73ef02d91314ccd97cb2008f29b0752a1",
                "md5": "db874938469bc8841c6ce08b8d22cdda",
                "sha256": "5aa58c6905cfece7d98708b80282c0fc277a86d20cf0feba1e1a7c6bc87a1f31"
            },
            "downloads": -1,
            "filename": "django_admin_recent_inlines-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db874938469bc8841c6ce08b8d22cdda",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 7854,
            "upload_time": "2025-08-29T10:56:45",
            "upload_time_iso_8601": "2025-08-29T10:56:45.949769Z",
            "url": "https://files.pythonhosted.org/packages/c8/68/ef5609ef08a503214354f498b4b73ef02d91314ccd97cb2008f29b0752a1/django_admin_recent_inlines-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0da1f4cf5622c634f3780a01c518b5901c21432296a73be039e6408d2866b7d5",
                "md5": "0a1ad26dcada4997bfe3f9f32d67033f",
                "sha256": "5a2012474a60941d84efe8cdee476553b9d5f6b1dab3702b5fff892a226a6335"
            },
            "downloads": -1,
            "filename": "django_admin_recent_inlines-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0a1ad26dcada4997bfe3f9f32d67033f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 6036,
            "upload_time": "2025-08-29T10:56:47",
            "upload_time_iso_8601": "2025-08-29T10:56:47.231188Z",
            "url": "https://files.pythonhosted.org/packages/0d/a1/f4cf5622c634f3780a01c518b5901c21432296a73be039e6408d2866b7d5/django_admin_recent_inlines-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-29 10:56:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AugendLimited",
    "github_project": "django-admin-recent-inlines",
    "github_not_found": true,
    "lcname": "django-admin-recent-inlines"
}
        
Elapsed time: 2.54851s