django-semantic-admin


Namedjango-semantic-admin JSON
Version 0.6.4 PyPI version JSON
download
home_pagehttps://github.com/globophobe/django-semantic-admin
SummaryDjango Semantic UI Admin theme
upload_time2024-12-11 14:13:34
maintainerNone
docs_urlNone
authorAlex
requires_python>=3.10
licenseMIT
keywords django admin theme
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Django Semantic UI admin theme
------------------------------
<img src="https://raw.githubusercontent.com/globophobe/django-semantic-admin/master/docs/screenshots/change-list.png" alt="django-semantic-admin"/>

A completely free (MIT) [Semantic UI](https://semantic-ui.com/) admin theme for Django. Actually, this is my 3rd admin theme for Django. The first was forgettable, and the second was with [Pure CSS](https://purecss.io/). Pure CSS was great, but lacked JavaScript components.

Semantic UI looks professional, and has great JavaScript components.

Log in to the demo with username `admin` and password `semantic`: https://semantic-admin.com

Documentation is on [GitHub Pages](https://globophobe.github.io/django-semantic-admin/).


Django Semantic Forms
---------------------
🎉 As of v0.5.0, forms were moved to [django-semantic-forms](https://github.com/globophobe/django-semantic-forms). `semantic_forms` must be added to INSTALLED_APPS.

```python
INSTALLED_APPS = [
    "semantic_admin",
    "semantic_forms",
    ...
]
```

You may use `semantic_forms` outside of the admin. 


Why?
----
* Looks professional, with a nice sidebar.
* Responsive design, even [tables can stack](https://semantic-ui.com/collections/table.html#stacking) responsively on mobile.
* JavaScript datepicker and timepicker components.
* JavaScript selects, including multiple selections, which integrate well with Django autocomplete fields.
* Semantic UI has libraries for [React](https://react.semantic-ui.com/) and [Vue](https://semantic-ui-vue.github.io/#/), in addition to jQuery. This means this package can be used to style the admin, and custom views can be added with React or Vue components with the same style.


Install
-------

Install from PyPI:

```
pip install django-semantic-admin
```

Add to `settings.py` before `django.contrib.admin`:

```python
INSTALLED_APPS = [
    "semantic_admin",
    "semantic_forms",
    "django.contrib.admin",
    ...
]
```

Please remember to run `python manage.py collectstatic` for production deployments.

Usage
-----

Instead of `admin.ModelAdmin`, `admin.StackedInline`, or `admin.TabularInline`:

```python
class ExampleStackedInline(admin.StackedInline):
    pass

class ExampleTabularInline(admin.TabularInline):
    pass

class ExampleAdmin(admin.ModelAdmin):
    inlines = (ExampleStackedInline, ExampleTabularInline)
```

Inherit from their `Semantic` equivalents:

```python
from semantic_admin import SemanticModelAdmin, SemanticStackedInline, SemanticTabularInline

class ExampleStackedInline(SemanticStackedInline):
    pass

class ExampleTabularInline(SemanticTabularInline):
    pass

class ExampleAdmin(SemanticModelAdmin):
    inlines = (ExampleStackedInline, ExampleTabularInline)
```

Awesome optional features
-------------------------

1. Optional integration with [django-filter](https://github.com/carltongibson/django-filter):

<img src="https://raw.githubusercontent.com/globophobe/django-semantic-admin/master/docs/screenshots/django-filter.png" width="335" alt="django-filter" />

To enable this awesome feature, add `filterset_class` to your Django admin:

```python
from semantic_forms.filters import SemanticFilterSet

class DemoFilter(SemanticFilterSet):
    class Meta:
        model = Demo
        fields = ("demo_field",)

class DemoAdmin(SemanticModelAdmin):
    filterset_class = DemoFilter
```

2. HTML preview in Django `autocomplete_fields`:

<img src="https://raw.githubusercontent.com/globophobe/django-semantic-admin/master/docs/screenshots/html5-autocomplete.png" width="670" alt="html5-autocomplete" />

To enable this awesome feature, add the `semantic_autocomplete` property to your Django model:

```python
class DemoModel(models.Model):
    @property
    def semantic_autocomplete(self):
        html = self.get_img()
        return format_html(html)
```

3. Optional integration with [django-import-export](https://github.com/django-import-export/django-import-export):

<img src="https://raw.githubusercontent.com/globophobe/django-semantic-admin/master/docs/screenshots/django-import-export.png" width="670" alt="django-import-export" />

To enable this awesome feature, instead of `ImportExportModelAdmin`, etc:

```python
from import_export.admin import ImportExportModelAdmin 

class ExampleImportExportAdmin(ImportExportModelAdmin):
    pass
```

Inherit from their `Semantic` equivalents:

```python
from semantic_admin.contrib.import_export.admin import SemanticImportExportModelAdmin

class ExampleImportExportAdmin(SemanticImportExportModelAdmin):
    pass
```

Contributing
------------

Install dependencies with `poetry install`. The demo is built with [invoke tasks](https://github.com/globophobe/django-semantic-admin/blob/master/demo/tasks.py). For example, `cd demo; invoke build`.


Notes
-----
Please note, this package uses [Fomantic UI](https://fomantic-ui.com/) the official community fork of Semantic UI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/globophobe/django-semantic-admin",
    "name": "django-semantic-admin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "django, admin, theme",
    "author": "Alex",
    "author_email": "globophobe@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cf/bc/5357a8610b81067e004a1a68855ea52dec8ceff4c4a345bab8790bb7d2ab/django_semantic_admin-0.6.4.tar.gz",
    "platform": null,
    "description": "Django Semantic UI admin theme\n------------------------------\n<img src=\"https://raw.githubusercontent.com/globophobe/django-semantic-admin/master/docs/screenshots/change-list.png\" alt=\"django-semantic-admin\"/>\n\nA completely free (MIT) [Semantic UI](https://semantic-ui.com/) admin theme for Django. Actually, this is my 3rd admin theme for Django. The first was forgettable, and the second was with [Pure CSS](https://purecss.io/). Pure CSS was great, but lacked JavaScript components.\n\nSemantic UI looks professional, and has great JavaScript components.\n\nLog in to the demo with username `admin` and password `semantic`: https://semantic-admin.com\n\nDocumentation is on [GitHub Pages](https://globophobe.github.io/django-semantic-admin/).\n\n\nDjango Semantic Forms\n---------------------\n\ud83c\udf89 As of v0.5.0, forms were moved to [django-semantic-forms](https://github.com/globophobe/django-semantic-forms). `semantic_forms` must be added to INSTALLED_APPS.\n\n```python\nINSTALLED_APPS = [\n    \"semantic_admin\",\n    \"semantic_forms\",\n    ...\n]\n```\n\nYou may use `semantic_forms` outside of the admin. \n\n\nWhy?\n----\n* Looks professional, with a nice sidebar.\n* Responsive design, even [tables can stack](https://semantic-ui.com/collections/table.html#stacking) responsively on mobile.\n* JavaScript datepicker and timepicker components.\n* JavaScript selects, including multiple selections, which integrate well with Django autocomplete fields.\n* Semantic UI has libraries for [React](https://react.semantic-ui.com/) and [Vue](https://semantic-ui-vue.github.io/#/), in addition to jQuery. This means this package can be used to style the admin, and custom views can be added with React or Vue components with the same style.\n\n\nInstall\n-------\n\nInstall from PyPI:\n\n```\npip install django-semantic-admin\n```\n\nAdd to `settings.py` before `django.contrib.admin`:\n\n```python\nINSTALLED_APPS = [\n    \"semantic_admin\",\n    \"semantic_forms\",\n    \"django.contrib.admin\",\n    ...\n]\n```\n\nPlease remember to run `python manage.py collectstatic` for production deployments.\n\nUsage\n-----\n\nInstead of `admin.ModelAdmin`, `admin.StackedInline`, or `admin.TabularInline`:\n\n```python\nclass ExampleStackedInline(admin.StackedInline):\n    pass\n\nclass ExampleTabularInline(admin.TabularInline):\n    pass\n\nclass ExampleAdmin(admin.ModelAdmin):\n    inlines = (ExampleStackedInline, ExampleTabularInline)\n```\n\nInherit from their `Semantic` equivalents:\n\n```python\nfrom semantic_admin import SemanticModelAdmin, SemanticStackedInline, SemanticTabularInline\n\nclass ExampleStackedInline(SemanticStackedInline):\n    pass\n\nclass ExampleTabularInline(SemanticTabularInline):\n    pass\n\nclass ExampleAdmin(SemanticModelAdmin):\n    inlines = (ExampleStackedInline, ExampleTabularInline)\n```\n\nAwesome optional features\n-------------------------\n\n1. Optional integration with [django-filter](https://github.com/carltongibson/django-filter):\n\n<img src=\"https://raw.githubusercontent.com/globophobe/django-semantic-admin/master/docs/screenshots/django-filter.png\" width=\"335\" alt=\"django-filter\" />\n\nTo enable this awesome feature, add `filterset_class` to your Django admin:\n\n```python\nfrom semantic_forms.filters import SemanticFilterSet\n\nclass DemoFilter(SemanticFilterSet):\n    class Meta:\n        model = Demo\n        fields = (\"demo_field\",)\n\nclass DemoAdmin(SemanticModelAdmin):\n    filterset_class = DemoFilter\n```\n\n2. HTML preview in Django `autocomplete_fields`:\n\n<img src=\"https://raw.githubusercontent.com/globophobe/django-semantic-admin/master/docs/screenshots/html5-autocomplete.png\" width=\"670\" alt=\"html5-autocomplete\" />\n\nTo enable this awesome feature, add the `semantic_autocomplete` property to your Django model:\n\n```python\nclass DemoModel(models.Model):\n    @property\n    def semantic_autocomplete(self):\n        html = self.get_img()\n        return format_html(html)\n```\n\n3. Optional integration with [django-import-export](https://github.com/django-import-export/django-import-export):\n\n<img src=\"https://raw.githubusercontent.com/globophobe/django-semantic-admin/master/docs/screenshots/django-import-export.png\" width=\"670\" alt=\"django-import-export\" />\n\nTo enable this awesome feature, instead of `ImportExportModelAdmin`, etc:\n\n```python\nfrom import_export.admin import ImportExportModelAdmin \n\nclass ExampleImportExportAdmin(ImportExportModelAdmin):\n    pass\n```\n\nInherit from their `Semantic` equivalents:\n\n```python\nfrom semantic_admin.contrib.import_export.admin import SemanticImportExportModelAdmin\n\nclass ExampleImportExportAdmin(SemanticImportExportModelAdmin):\n    pass\n```\n\nContributing\n------------\n\nInstall dependencies with `poetry install`. The demo is built with [invoke tasks](https://github.com/globophobe/django-semantic-admin/blob/master/demo/tasks.py). For example, `cd demo; invoke build`.\n\n\nNotes\n-----\nPlease note, this package uses [Fomantic UI](https://fomantic-ui.com/) the official community fork of Semantic UI.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Django Semantic UI Admin theme",
    "version": "0.6.4",
    "project_urls": {
        "Homepage": "https://github.com/globophobe/django-semantic-admin",
        "Repository": "https://github.com/globophobe/django-semantic-admin"
    },
    "split_keywords": [
        "django",
        " admin",
        " theme"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0bca159822e82323ec73273a862e82d4294914201b5f5f02cdc0716b890e3d58",
                "md5": "c0b1a31f397fc4f35303bf48f6aa3a1e",
                "sha256": "fcaf725307e6935eff21145a30aeef760e79c2bb56149f19d0e9da17974d92f3"
            },
            "downloads": -1,
            "filename": "django_semantic_admin-0.6.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0b1a31f397fc4f35303bf48f6aa3a1e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 79576,
            "upload_time": "2024-12-11T14:13:32",
            "upload_time_iso_8601": "2024-12-11T14:13:32.852307Z",
            "url": "https://files.pythonhosted.org/packages/0b/ca/159822e82323ec73273a862e82d4294914201b5f5f02cdc0716b890e3d58/django_semantic_admin-0.6.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cfbc5357a8610b81067e004a1a68855ea52dec8ceff4c4a345bab8790bb7d2ab",
                "md5": "7e732d326e03a6678ab4bdb4f711f5da",
                "sha256": "908b328c6897b9a68fd2a830352a1c24b67e0636477a5eff09d56e9383211faf"
            },
            "downloads": -1,
            "filename": "django_semantic_admin-0.6.4.tar.gz",
            "has_sig": false,
            "md5_digest": "7e732d326e03a6678ab4bdb4f711f5da",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 76410,
            "upload_time": "2024-12-11T14:13:34",
            "upload_time_iso_8601": "2024-12-11T14:13:34.562267Z",
            "url": "https://files.pythonhosted.org/packages/cf/bc/5357a8610b81067e004a1a68855ea52dec8ceff4c4a345bab8790bb7d2ab/django_semantic_admin-0.6.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-11 14:13:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "globophobe",
    "github_project": "django-semantic-admin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "django-semantic-admin"
}
        
Elapsed time: 0.41522s