django-semantic-admin


Namedjango-semantic-admin JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/globophobe/django-semantic-admin
SummaryDjango Semantic UI Admin theme
upload_time2024-03-24 10:58:07
maintainerNone
docs_urlNone
authorAlex
requires_python>=3.8
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.8",
    "maintainer_email": null,
    "keywords": "django, admin, theme",
    "author": "Alex",
    "author_email": "globophobe@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/82/f1/c2febe47aa885571e9d139c6b482e011fe9218a9a7bc0e6a9f1f75c308d9/django_semantic_admin-0.5.0.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.5.0",
    "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": "7e3f7c68945d361b461bd1d50eca543779f972eec1d91e404189046a0b236bfe",
                "md5": "55c15cd1743fa21472cfc906715598ac",
                "sha256": "35e9f04be4a402489953f8815837103246ddbdccac2656be8464ef3ddcd80124"
            },
            "downloads": -1,
            "filename": "django_semantic_admin-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55c15cd1743fa21472cfc906715598ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 78714,
            "upload_time": "2024-03-24T10:58:05",
            "upload_time_iso_8601": "2024-03-24T10:58:05.319916Z",
            "url": "https://files.pythonhosted.org/packages/7e/3f/7c68945d361b461bd1d50eca543779f972eec1d91e404189046a0b236bfe/django_semantic_admin-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "82f1c2febe47aa885571e9d139c6b482e011fe9218a9a7bc0e6a9f1f75c308d9",
                "md5": "3d7957bd528f4ff174335a1bade4662b",
                "sha256": "17dcc34e57b8b855071f30ff3ce6a3ee3d388b18c73e1b1662787763da4062f7"
            },
            "downloads": -1,
            "filename": "django_semantic_admin-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3d7957bd528f4ff174335a1bade4662b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 53624,
            "upload_time": "2024-03-24T10:58:07",
            "upload_time_iso_8601": "2024-03-24T10:58:07.164044Z",
            "url": "https://files.pythonhosted.org/packages/82/f1/c2febe47aa885571e9d139c6b482e011fe9218a9a7bc0e6a9f1f75c308d9/django_semantic_admin-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-24 10:58:07",
    "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.21096s