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/97/d0/6c74383a969d98f4becd9f56ef1f37877c4ca2bba6de90bb81c52d40bc69/django_semantic_admin-0.6.2.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.2",
"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": "3bd5ca60d32b0134e20e7a328fe08ed547257df504750b1292cebbed7da5aba5",
"md5": "1c206a8a8a59d1d5cd926d7ec48a3dbb",
"sha256": "5868a6d355003346b398d0ad0f26adecfd3c591a940db6fce416bc263ea3351f"
},
"downloads": -1,
"filename": "django_semantic_admin-0.6.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1c206a8a8a59d1d5cd926d7ec48a3dbb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 81131,
"upload_time": "2024-09-10T06:00:56",
"upload_time_iso_8601": "2024-09-10T06:00:56.827932Z",
"url": "https://files.pythonhosted.org/packages/3b/d5/ca60d32b0134e20e7a328fe08ed547257df504750b1292cebbed7da5aba5/django_semantic_admin-0.6.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "97d06c74383a969d98f4becd9f56ef1f37877c4ca2bba6de90bb81c52d40bc69",
"md5": "b90554391bf48e4c7bc7d8079707cc4e",
"sha256": "e23c77cd92281c7fc11ee17bb8f4766ae723900cbbd096fff9bf70e81a14f18e"
},
"downloads": -1,
"filename": "django_semantic_admin-0.6.2.tar.gz",
"has_sig": false,
"md5_digest": "b90554391bf48e4c7bc7d8079707cc4e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 72036,
"upload_time": "2024-09-10T06:00:58",
"upload_time_iso_8601": "2024-09-10T06:00:58.906834Z",
"url": "https://files.pythonhosted.org/packages/97/d0/6c74383a969d98f4becd9f56ef1f37877c4ca2bba6de90bb81c52d40bc69/django_semantic_admin-0.6.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-10 06:00:58",
"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"
}