A jazzy skin for the Django Admin-Interface (official repository).

Overview

Django Grappelli

https://readthedocs.org/projects/django-grappelli/badge/?version=latest

A jazzy skin for the Django admin interface.

Grappelli is a grid-based alternative/extension to the Django administration interface.

Code

https://github.com/sehmaschine/django-grappelli

Website

http://www.grappelliproject.com

Documentation

http://readthedocs.org/docs/django-grappelli/

Releases

Grappelli is always developed against the latest stable Django release and is NOT tested with Django's master branch.

  • Grappelli 2.14.3 (November 24th, 2020): Compatible with Django 3.1
  • Grappelli 2.13.4 (February 10th, 2020): Compatible with Django 2.2 (LTS)
  • Grappelli 2.10.4 (November 1st, 2018): Compatible with Django 1.11 (LTS)

Current development branches:

  • Grappelli 2.14.4 (Development version for Django 3.1, see branch Stable/2.14.x)
  • Grappelli 2.13.5 (Development version for Django 2.2, see branch Stable/2.13.x)
  • Grappelli 2.10.5 (Development version for Django 1.11, see branch Stable/2.10.x)

Older versions are available at GitHub, but are not supported anymore.

Comments
  • Filter functionality on admin pages don't work unless actions = None on ModelAdmins

    Filter functionality on admin pages don't work unless actions = None on ModelAdmins

    Hi all,

    Unless actions = None in my ModelAdmin class definitions, grappelli raises and javascript exception and the filter functionality (with fields defined in list_filter) breaks. The dropdown button shows up but nothing drops down when you click on it.

    The error is "Uncaught TypeError: Object [object Object] has no method 'actions' " on the line $("tr input.action-select").actions(); (line 66 in the grappelli template).

    The relevant code snippet from the grappelli code

    Also, I think this might be similar to Issue #206.

    I'm using Django 1.4.1 and Grappelli 2.4.2

    discussion 
    opened by karansag 56
  • Autocomplete does not work with Django 3.2

    Autocomplete does not work with Django 3.2

    VERSIONS: Grappelli 2.15.1, Django 3.2 STATICFILES: WARNINGS, Details: I see a lot of errors with text like this

    Found another file with the destination path 'admin/js/autocomplete.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
    

    JAVASCRIPTS: ERROR Failed to load resource: the server responded with a status of 403 (Forbidden) CUSTOMIZATIONS: NONE

    I upgraded django from 2.2 to 3.2 and it broke the autocomplete on related fields it just always says 403 and gives the following error:

    Forbidden (Permission denied): /admin/autocomplete/
    Traceback (most recent call last):
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/utils/datastructures.py", line 76, in __getitem__
        list_ = super().__getitem__(key)
    KeyError: 'app_label'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/contrib/admin/views/autocomplete.py", line 61, in process_request
        app_label = request.GET['app_label']
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/utils/datastructures.py", line 78, in __getitem__
        raise MultiValueDictKeyError(key)
    django.utils.datastructures.MultiValueDictKeyError: 'app_label'
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
        response = get_response(request)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
        response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 250, in wrapper
        return self.admin_view(view, cacheable)(*args, **kwargs)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
        response = view_func(request, *args, **kwargs)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
        response = view_func(request, *args, **kwargs)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 232, in inner
        return view(request, *args, **kwargs)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 417, in autocomplete_view
        return AutocompleteJsonView.as_view(admin_site=self)(request)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
        return self.dispatch(request, *args, **kwargs)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/views/generic/base.py", line 98, in dispatch
        return handler(request, *args, **kwargs)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/contrib/admin/views/autocomplete.py", line 20, in get
        self.term, self.model_admin, self.source_field, to_field_name = self.process_request(request)
      File "/home/alex/Project/env/lib/python3.8/site-packages/django/contrib/admin/views/autocomplete.py", line 65, in process_request
        raise PermissionDenied from e
    django.core.exceptions.PermissionDenied
    [02/May/2021 20:11:33] "GET /admin/autocomplete/ HTTP/1.1" 403 135
    

    This ticket seems to be related to the issue https://code.djangoproject.com/ticket/32659?cversion=2&cnum_hist=2

    Downgrade to 3.1 fixes the issue.

    opened by FrozenAlex 36
  • get_filtered_queryset  or

    get_filtered_queryset or "'query_string'" should support ModelAdmin.queryset

    Similar to this user: http://stackoverflow.com/questions/17852308/how-to-filter-autocompletion-results-in-django-grapelli/17981530#17981530

    I need to restrict all FK/M2M lookups. In my case, I restrict them to the company division that entered the data. Similar to SAS.

    The existing "ForeignKey.limit_choices_to" (https://docs.djangoproject.com/en/1.5/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to) does not seem able to access anything in the "request" object or session storage.

    The ModelAdmin.queryset feature: https://docs.djangoproject.com/en/1.5/ref/contrib/admin/#django.contrib.admin.ModelAdmin.queryset

    Is passed the request object, which lets me easily restrict records using: qs.filter(site__id=request.session['site'].id)

    What I need is a non-hack way to either instruct Grappelli to use the admin specific model manager (or any custom manger the user cares to define), or a way to include request/session values in the filter.

    I have a pull request pending for "django_extensions" to fix this with their autocomplete function.

    Thanks in advance!

    discussion 
    opened by rcooke 34
  • Filter drop-down doesn't function due to Javascript error in Chrome, FF

    Filter drop-down doesn't function due to Javascript error in Chrome, FF

    I just installed django-grappelli 2.3.4 in combination with Django 1.4.0 alpha. All's fine, except for the filter drop-down box on the change list page. Chrome and Firefox report a Javascript error:

    Uncaught TypeError: Object #<Object> has no method 'actions'
    (anonymous function):8000/admin/msdb/incident/:59
    c.extend.readyjquery-1.4.2.min.js:26
    L
    

    The relevant bit of code is in templates/admin/change_list.html. A fix seems to be moving the block

    {% if action_form %}
      ...
    {% endif %}
    

    from line 19 down to line 65, right after {{ media.js }}. I believe this is because the actions.js script is loaded in the block contained by media.js, which comes after relevant Javascript code.

    Not sure if this is a result of Django code still being in alpha, but figured I'd report it.

    Another error occurrs at the same time by grp_collapsible in templates/admin/includes_grappelli/header.html:

    Uncaught TypeError: Object #<Object> has no method 'grp_collapsible'
    

    Don't know how to fix this one, though.

    opened by ndrsn 31
  • Use Twitter bootstrap instead of blueprint

    Use Twitter bootstrap instead of blueprint

    For the grids and styles, would be great to use twitter bootstrap instead of blueprint as it will come out with more themes in near future and is more actively updated.

    opened by bevenky 30
  • Grapelli 2.7.1's backoffice fails selecting records with checkboxes

    Grapelli 2.7.1's backoffice fails selecting records with checkboxes

    VERSIONS: Grappelli 2.7.1(stable from pip), Django 1.8.3, Python 2.7.9 STATICFILES: OK JAVASCRIPTS: OK? I'm not sure due to this failure (Tested in Firefox 40) CUSTOMIZATIONS: NONE *

    • ...unless adding tinymce.js through myapp/admin.py counts as a customization...

    The failure itself looks simple: if I try to select a model's record in admin panel clicking the checkboxes, it keeps saying "selected 0 of n" and doesn't let me perform DELETE operation through the admin's GUI. This issue happens with any kind of model; even the basic ones, like the users for example.

    Maybe I can try to figure out why this happens - (I mean, I feel comfortable with Python, HTML, CSS -not so comfortable with CSS, but I understand it xD-, JavaScript, jQuery -technically, it is a JavaScript's library :P- and SQL languages; and I have been dealing with Django framework for six months or more)... The problem is that I have no idea where are the functions that control the checkbox's state to start debugging (I mean, I know where to find the package and the source in my machine, but not which order should I follow to analyze the implied functions/classes, because I just don't know them yet)... however, I would try it out.

    PD: How do things work in case I want to self-assign this issue? I guess I would probably need permission or something...

    opened by SebasSBM 27
  • Use localized datepickers for date input fields in Grappelli

    Use localized datepickers for date input fields in Grappelli

    Hi,

    thank you for sharing & maintaining this great, hiqh-quality, useful Django package.

    I found some support for localized (i18n) datepickers in Grappelli, but they did not seem to work for me. So, I created this small patch. I'd be more than happy if you merged it.

    I used {% if LANGUAGE_CODE %} to test for i18n support, but I don't know if this is the best way.

    opened by mpasternak 26
  • ValueError: The file 'grappelli/jquery/i18n/ui.datepicker-en-us.js' could not be found

    ValueError: The file 'grappelli/jquery/i18n/ui.datepicker-en-us.js' could not be found

    VERSIONS: Grappelli 2.5.6, Django 1.6.10
    STATICFILES: ERROR
    CUSTOMIZATIONS: NONE
    

    Running ./manage.py collectstatic && ./manage.py.compress throws this:

    ValueError: The file 'grappelli/jquery/i18n/ui.datepicker-en-us.js' could not be found with <django.contrib.staticfiles.storage.CachedStaticFilesStorage object at 0x2d61550>.
    
    opened by msamoylov 23
  • [problem] Filter in 2.7.3

    [problem] Filter in 2.7.3

    I just upgraded to 2.7.3 from 2.7.1 and my filter stopped working. I get a javascript error: (index):63 Uncaught TypeError: $(...).actions is not a function

    image

    opened by mykljohn 21
  • Autocomplete question

    Autocomplete question

    First time to use Grappelli, so please bear with my very native question. I am intrigued by the autocomplete feature and added GRAPPELLI_AUTOCOMPLETE_SEARCH_FIELDS = { "dry_powder": { "PositionLevelData": ("Position__icontains",) } } into my settings. My understanding is now when I enter partial names of Position in the search field of the changelist page, my typein will be autocompleted. Yet I see nothing like that. Am I misunderstanding something or missing something? Thanks for the great work.

    opened by ghost 20
  • autocompletes for fk, m2m & generic relations

    autocompletes for fk, m2m & generic relations

    autocomplete-field which needs to work with

    • foreign keys
    • many-to-many relationships
    • generic relationships

    on both the change-form and the change-list. moreover, the search-icon is necessary as well (since with an autocomplete, one might not receive all possible items in rare cases).

    proposal 
    opened by sehmaschine 20
  • Rearrange Inlines weird behavior with django-nested-inlines

    Rearrange Inlines weird behavior with django-nested-inlines

    Thanks for maintaining that great project! I'm running into some weird behavior when trying to run/integrate a multiple layer nested admin with grappelli.

    here's the dummy models I have. Nothing too fancy, pretty straightforward nested models. Note that the Article has two foreign key referencing it. One from the image and one from the paragraph models.

    class TableOfContents(models.Model):
        title_tableofcontents = models.TextField()
    
    
    class TocSection(models.Model):
        title_tocsection = models.TextField()
        table_of_content = models.ForeignKey(TableOfContents, on_delete=models.CASCADE)
    
    
    class TocArticle(models.Model):
        title_tocarticle = models.TextField()
        section = models.ForeignKey(TocSection, on_delete=models.CASCADE)
    
    
    class TocParagraph(models.Model):
        title_tocparagraph = models.TextField()
        article = models.ForeignKey(TocArticle, on_delete=models.CASCADE)
    
    
    class TocImage(models.Model):
        title_tocimage = models.TextField()
        article = models.ForeignKey(TocArticle, on_delete=models.CASCADE)
    

    Here's how my admin looks without trying to rearrange the nested inlines. Also nothing too fancy here pretty straightforward, just note that article is already an inline of sections (which is an inline of table of content)

    class TocParagraphInline(NestedStackedInline):
        model = models.TocParagraph
    
    
    class TocImageInline(NestedStackedInline):
        model = models.TocImage
    
    
    class TocArticleInline(NestedStackedInline):
        model = models.TocArticle
        inlines = [TocParagraphInline, TocImageInline]
        fieldsets = [
            (
                "Image Data",
                {
                    "fields": [],
                    # "classes": [
                    #     "placeholder tocsection_set-1-tocarticle_set-0-tocimage_set-group"
                    # ],
                },
            ),
            (
                "Paragraph Data",
                {
                    "fields": [],
                    # "classes": [
                    #     "placeholder tocsection_set-1-tocarticle_set-0-tocparagraph_set-group"
                    # ],
                },
            ),
            (
                "Article Data",
                {"fields": ["title_tocarticle"]},
            ),
        ]
    
    
    class TocSectionInline(NestedStackedInline):
        model = models.TocSection
        inlines = [TocArticleInline]
    
    
    class TableOfContentsAdmin(NestedModelAdmin):
        inlines = [TocSectionInline]
    
    
    admin.site.register(models.TableOfContents, TableOfContentsAdmin)
    

    Here's how things look on the admin UI image

    Now as you might have guessed, my goal is to rearrange the inlines image and paragraph under the designated fieldsets for each category. When uncommentting the classes to try to rearrange them some weird behavior happen. here's a screenshot image

    As you can see the sections have been rearranged correctly but as a consequence:

    1. The title of the fieldset, here Image Data and Paragraph Data have disappeared.
    2. The blue tabs to un-collapse the inlines does not work on preloaded inlines 2.1 If I add a new article the un-collapsing works but the title of the fieldset mentioned in 1) is not present either.
    3. The add Image and Paragraph buttons also stop working when the inlines are moved.

    Would appreciate any help or directions, happy to contribute if I can help!

    opened by HaddadJoe 0
  • (GitHub Dependabot) Racing Conditions and path traversal in Grunt < 1.5.3

    (GitHub Dependabot) Racing Conditions and path traversal in Grunt < 1.5.3

    GitHub pinned it as a high-severity and moderate threat, full description:

    • Race Condition in Grunt: file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in GitHub repository gruntjs/grunt prior to 1.5.3. This vulnerability is capable of arbitrary file writes which can lead to local privilege escalation to the GruntJS user if a lower-privileged user has to write access to both source and destination directories as the lower-privileged user can create a symlink to the GruntJS user's .bashrc file or replace /etc/shadow file if the GruntJS user is root.

    Solution: Update "grunt": ">=1.5.3"

    • Path Traversal in Grunt: Grunt prior to version 1.5.2 is vulnerable to path traversal.
    opened by kszumko 0
  • change_list_filter_confirm peoduces wrong url parameters

    change_list_filter_confirm peoduces wrong url parameters

    class TariffAdmin(admin.ModelAdmin):
        change_list_template = "admin/change_list_filter_confirm.html"
        list_filter = (
            'merchant',
            'contract__legal'
        )
    

    Selecting merchant and contract__legal in this example multiple times (and after that pressing Apply) produces an url like: http://127.0.0.1:8000/admin/backend/tariff/?contract__legal__legal_id__exact=1&contract__legal__legal_id__exact=1&merchant__merchant_id__exact=2&contract__legal__legal_id__exact=1&merchant__merchant_id__exact=3

    While select inputs allow only single choise.

    opened by danaki 10
  • Make the Changelog an actual change log

    Make the Changelog an actual change log

    It seems that you keep overwriting the ChangeLog file/deleting the old content and only keep the latest changes so the only way to actually look at the change log is to dig its commit history. However the very purpose of a change log file would be to show the history of changes.

    E.g. the current Changelog file only shows what's new for 3.0.x, but that only works with Django 4.0 so whoever still using Grappelli 2.x won't see anything informative there. And this includes those who plan to upgrade to 3.x (not even 3.0 is included in the Changelog file), which I guess is a larger changeset.

    The idea behind a change log file is to be able to find the version I use and then be able to look at all the improvements over time. Please consider merging the individual versions from the git history and keeping a continuous log from this point on.

    opened by atleta 1
  • Multiple date hierarchies

    Multiple date hierarchies

    It is currently only possible to define exactly one date_hierarchy with Django. But it is sometimes useful to define more than one of these filters. Check if we can easily implement this.

    opened by sehmaschine 0
Owner
Patrick Kranzlmueller
Patrick Kranzlmueller
fastapi-admin is a fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin.

fastapi-admin is a fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin.

fastapi-admin 1.6k Dec 30, 2022
Jazzy theme for Django

Django jazzmin (Jazzy Admin) Drop-in theme for django admin, that utilises AdminLTE 3 & Bootstrap 4 to make yo' admin look jazzy Installation pip inst

David Farrington 1.2k Jan 8, 2023
aiohttp admin is generator for admin interface based on aiohttp

aiohttp admin is generator for admin interface based on aiohttp

Mykhailo Havelia 17 Nov 16, 2022
📱 An extension for Django admin that makes interface mobile-friendly. Merged into Django 2.0

Django Flat Responsive django-flat-responsive is included as part of Django from version 2.0! ?? Use this app if your project is powered by an older D

elky 248 Sep 2, 2022
Disable dark mode in Django admin user interface in Django 3.2.x.

Django Non Dark Admin Disable or enable dark mode user interface in Django admin panel (Django==3.2). Installation For install this app run in termina

Artem Galichkin 6 Nov 23, 2022
Jet Bridge (Universal) for Jet Admin – API-based Admin Panel Framework for your application

Jet Bridge for Jet Admin – Admin panel framework for your application Description About Jet Admin: https://about.jetadmin.io Live Demo: https://app.je

Jet Admin 1.3k Dec 27, 2022
Modern responsive template for the Django admin interface with improved functionality. We are proud to announce completely new Jet. Please check out Live Demo

Django JET Modern template for Django admin interface with improved functionality Attention! NEW JET We are proud to announce completely new Jet. Plea

Geex Arts 3.4k Dec 29, 2022
django's default admin interface made customizable. popup windows replaced by modals. :mage: :zap:

django-admin-interface django-admin-interface is a modern responsive flat admin interface customizable by the admin itself. Features Beautiful default

Fabio Caccamo 1.3k Dec 31, 2022
Modern theme for Django admin interface

Django Suit Modern theme for Django admin interface. Django Suit is alternative theme/skin/extension for Django administration interface. Project home

Kaspars Sprogis 2.2k Dec 29, 2022
A flat theme for Django admin interface. Modern, fresh, simple.

Django Flat Theme django-flat-theme is included as part of Django from version 1.9! ?? Please use this app if your project is powered by an older Djan

elky 416 Sep 22, 2022
Modern theme for Django admin interface

Django Suit Modern theme for Django admin interface. Django Suit is alternative theme/skin/extension for Django administration interface. Project home

Kaspars Sprogis 2.2k Dec 29, 2022
An improved django-admin-tools dashboard for Django projects

django-fluent-dashboard The fluent_dashboard module offers a custom admin dashboard, built on top of django-admin-tools (docs). The django-admin-tools

django-fluent 326 Nov 9, 2022
A Django app for easily adding object tools in the Django admin

Django Object Actions If you've ever tried making admin object tools you may have thought, "why can't this be as easy as making Django Admin Actions?"

Chris Chang 524 Dec 26, 2022
Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.

Xadmin Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap. Liv

差沙 4.7k Dec 31, 2022
A Django admin theme using Twitter Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed apps.

django-admin-bootstrapped A Django admin theme using Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed ap

null 1.6k Dec 28, 2022
Extendable, adaptable rewrite of django.contrib.admin

django-admin2 One of the most useful parts of django.contrib.admin is the ability to configure various views that touch and alter data. django-admin2

Jazzband 1.2k Dec 29, 2022
Django application and library for importing and exporting data with admin integration.

django-import-export django-import-export is a Django application and library for importing and exporting data with included admin integration. Featur

null 2.6k Jan 7, 2023
:honey_pot: A fake Django admin login screen page.

django-admin-honeypot django-admin-honeypot is a fake Django admin login screen to log and notify admins of attempted unauthorized access. This app wa

Derek Payton 907 Dec 31, 2022
"Log in as user" for the Django admin.

django-loginas About "Login as user" for the Django admin. loginas supports Python 3 only, as of version 0.4. If you're on 2, use 0.3.6. Installing dj

Stavros Korokithakis 326 Dec 3, 2022