django-tinymce-attachment
django-tinymce-attachment.
Installation:
Put attachment as LAST item to your INSTALLED_APPS in your settings.py within your Django project.
Sync your database
./manage.py syncdb
Usage:
In settings.py:
Specify Models for which you`d like to add images and files
ATTACHMENT_FOR_MODELS = [
'<app>.models.<Model>',
]
Specify Model to be listed in link-list
ATTACHMENT_LINK_MODELS = [
'<app>.models.<Model>',
]
Disable image grouping (enabled by default)
GROUP_IMAGES = False
For objects listed in link-list these attributes will be used:
get_absolute_url() to retrieve url.
__unicode()__ to retrieve verbose name.
In urls.py:
Add attachment to urls.py BEFORE admin/
(r'^', include('attachment.urls')), # Must be placed before admin/
Example:
settings.py
INSTALLED_APPS = (
...
'attachment',
)
ATTACHMENT_FOR_MODELS = [
'item.models.Item',
]
ATTACHMENT_LINK_MODELS = [
'news.models.News',
]
TINYMCE_DEFAULT_CONFIG = {
'external_image_list_url': 'images/',
'external_link_list_url': 'links/',
}
urls.py
urlpatterns += patterns('',
(r'^', include('attachment.urls')), # Must be placed before admin/
(r'^admin/', include(admin.site.urls)),
)
Now you can attach images and files to Item object. After you will save Item-object in TinyMCE editor for this page will be available:
attached images in list of images.
attached files in list of links.
all News objects in list of links.
Here are screenshots that demonstrates attachment work:
- link lists
- image lists
- attached files
Changelog:
0.5.0 - Image and file title of any size
0.4.1 - get_image_groups tag returns a sorted dict
0.4.0 - Grouping images by new “group” field enabled.
0.3.0 - Ordering by new “position” field enabled.
0.2.0 - Add field “title” for models AttachmentFile, AttachmentImage
Classifiers:
Metadata
Release files for redsolutioncms.django-tinymce-attachment 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| redsolutioncms.django-tinymce-attachment-0.5.0.tar.gz | 10.7 kB | Without provenance | Details |
Release files / redsolutioncms.django-tinymce-attachment-0.5.0.tar.gz
| Download URL | redsolutioncms.django-tinymce-attachment-0.5.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9c818955c15e355a3d0471ba38f8a572ef3a48d0f8b82120a030e7cf5b95963
|
|
BLAKE2b-256 checksum How to use checksums |
84a41d8b3ae48bdee3082e65a5be768f6a15c18bfd9f55e3bc6852e92fbc1ae6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for redsolutioncms.django-tinymce-attachment 0.5.0
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.