Django news with CKEditor integrated.
Project description
Django Simple News
============================
Installing:
pip install django_simple_news
In settings:
INSTALLED_APPS = (
...
'ckeditor',
'new',
...
)
in urls.py
url(r'^seo_name_for_news/', include('new.urls')),
Configure CKeditor
https://github.com/shaunsephton/django-ckeditor#installation
settings.py
# ckeditor config
CKEDITOR_UPLOAD_PATH = MEDIA_ROOT + '/editor'
CKEDITOR_CONFIGS = {
'default': {
'toolbar': [
[ 'Source','-','Save','-', 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo', '-', 'Find','Replace','-','SelectAll'],
[ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] ,'/',
[ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ],
[ 'Link','Unlink' ],
[ 'Image','Table','HorizontalRule','SpecialChar' ],
[ 'Format'],
[ 'TextColor','BGColor', '-', 'Styles','Format','FontSize' ],
[ 'Maximize', 'ShowBlocks','-','About' ],
],
'format_tags': 'p;h1;h2;h3;h4;h5;h6;pre;address;div',
},
}
Configure easy-thumbnails for each template
# easy-thumbnails config
https://pypi.python.org/pypi/easy-thumbnails/1.2
THUMBNAIL_ALIASES = {
'': {
'new_detail': {'size': (50, 50), 'crop': True},
'new_list': {'size': (152, 152), 'crop': True},
'new_index': {'size': (960, 1760), 'crop': False, 'upscale': True},
},
}
You also can overwrite templates:
/templates/new/new_detail.html for new detail
/templates/new/news_index.html for a list of news
/templates/new/news_list.html to get a list of news without a context to get include in custom templates.
============================
Installing:
pip install django_simple_news
In settings:
INSTALLED_APPS = (
...
'ckeditor',
'new',
...
)
in urls.py
url(r'^seo_name_for_news/', include('new.urls')),
Configure CKeditor
https://github.com/shaunsephton/django-ckeditor#installation
settings.py
# ckeditor config
CKEDITOR_UPLOAD_PATH = MEDIA_ROOT + '/editor'
CKEDITOR_CONFIGS = {
'default': {
'toolbar': [
[ 'Source','-','Save','-', 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo', '-', 'Find','Replace','-','SelectAll'],
[ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] ,'/',
[ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ],
[ 'Link','Unlink' ],
[ 'Image','Table','HorizontalRule','SpecialChar' ],
[ 'Format'],
[ 'TextColor','BGColor', '-', 'Styles','Format','FontSize' ],
[ 'Maximize', 'ShowBlocks','-','About' ],
],
'format_tags': 'p;h1;h2;h3;h4;h5;h6;pre;address;div',
},
}
Configure easy-thumbnails for each template
# easy-thumbnails config
https://pypi.python.org/pypi/easy-thumbnails/1.2
THUMBNAIL_ALIASES = {
'': {
'new_detail': {'size': (50, 50), 'crop': True},
'new_list': {'size': (152, 152), 'crop': True},
'new_index': {'size': (960, 1760), 'crop': False, 'upscale': True},
},
}
You also can overwrite templates:
/templates/new/new_detail.html for new detail
/templates/new/news_index.html for a list of news
/templates/new/news_list.html to get a list of news without a context to get include in custom templates.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-zms-news-0.1.tar.gz
(4.7 kB
view details)
File details
Details for the file django-zms-news-0.1.tar.gz.
File metadata
- Download URL: django-zms-news-0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90c9f70222e25a922bb24691d5e3db42a347b916ffcc6fbe782584043d985db4
|
|
| MD5 |
a36bfe7ec8b8989bab3be90ce5d34123
|
|
| BLAKE2b-256 |
13ed365fb2d84383689a0e4b5c8d530181fcd80723d00ad08ad677065e416a4a
|