Ghoster
ghoster is a admin theme which includes markdown features for Django users.
Snapshot
regular template:
markdown template:
Requirements
python >= 2.7
django >= 1.9
Installation
Download it from PyPi with pip install django-ghoster
Add into the INSTALLED_APPS before django.contrib.admin:
INSTALLED_APPS = [
...
'ghoster',
'django.contrib.admin',
...
]
don’t forget to python manange.py collectstatic
Usage
In models.py, assume the model is defined as below:
from django.db import models
class MyModel(models.Model):
# the fields which are rendered into markdown
char_field = models.CharField(max_length=1024)
text_field = models.TextField()
# other stuff
foreign_field = ...
file_field = ...
url_field = ...
...
Then in admin.py, inherit GhosterAdmin and override markdown_field and title_field attributes with the field names.
from django.contrib import admin
from ghoster.admin import GhosterAdmin
from .models import MyModel
class MyModelAdmin(GhosterAdmin):
markdown_field = "text_field"
title_field = "char_field"
# other stuff
list_display = ...
list_filter = ...
admin.site.register(MyModel, MyModelAdmin)
Then ghoster will render the model-form into 3 parts:
title_field: this field will be placed in top-bar.
markdown_field: markdown editor with side-by-side preview.
meta_fieldsets: the rest of fields will be placed in right-sidebar.
Contributing
Every code, documentation and UX contribution is welcome. If you have any suggestions or bug reports please report them to the issue tracker
Metadata
Release files for django-ghoster 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_ghoster-0.1.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for django_ghoster-0.1.2-py2.py3-none-any.whl |
Release files / django_ghoster-0.1.2-py2.py3-none-any.whl
| Download URL | django_ghoster-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
735efb8384dfb6bcde18311c923d45566629ceec21a75f55d411c87b57becd53
|
|
BLAKE2b-256 checksum How to use checksums |
2c87d456e407d1abd6ff3ab4b9eae1ed3d76b4d763f250067df8260412490750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-ghoster 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.