wlan slovenija Website
For easier understanding some Django CMS terminology first:
- page is a webpage we want to publish on the wlan slovenija website
- entry is a blog entry we want to publish on the wlan slovenija blog
- pages and entries provide one or more placeholders (depending on the template) which are points in the HTML tree where you can enter some (rendered) content
- each placeholder can contain zero or more plugins
- their (rendered) content is appended together in the order you stack them
- plugins are added to the placeholder and provide some kind of content (images, files, video ..)
- plugins can be nested, an example of such plugin is Markup plugin which allows some plugins (like images and video) to be inserted in its (wiki) content
Content is authored through Django admin interface. This interface provides common interface for many different Django applications, mostly three of them are important to us:
- CMS (content management of the main wlan slovenija website)
- cmsplugin-blog (wlan slovenija blog)
- filer (management of files and images used on the website and blog)
Django supports different permissions so some things may not be visible to your user/account.
Important: Plugin content is saved separately from page/entry settings. So do not forget to save both plugins and page/entry when authoring.
Important: The website is multilingual (currently Slovene and English) so do not forget to author (and edit/update) the content in both languages.
wlan slovenija Website
wlan slovenija website is simply a collection of pages we can author in a similar way as other CMS content. For authoring a page open page admin section and you can edit or add pages there. Things are mostly intuitive, perhaps the option of choosing between multiple templates (they have to be defined by the admin, so if you need something special, tell) for the page should be mentioned, and based on the selected template, you are given placeholders in which you can add/edit/stack content.
We are using some special plugins for untypical pages, and more such plugins can be developed as needed.
Important: For every page configure meaningful (using the same value as for the slug is probably best) reverse ID (under Advanced Settings section). This allows us to create links to this page in markup using this reverse ID, which shows as very benefitial since all internal links will be valid even if we change URLs, slugs, move things around ...
Some content on wlan slovenija website is generated dynamically. Some of this dynamic content can be administrated through Django admin interface:
- list of donations is maintained in the database, so that it can be automatically processed, displayed, accounted for, and so on
- list of income and outcome transactions connected with wlan slovenija operations is also stored in the database, together with scans of associated papers (for example, receipts)
- list of all participants is hard to maintain, so we try to use some tools to help us keep it up to date, but also manual tweaking is necessary
- list of all mentions of wlan slovenija in media and elsewhere, with associated content, is maintained through admin interface, too
wlan slovenija Blog
For blog we are using blog plugin for Django CMS. The blog contains entries that can contain almost any content supported by Django CMS. Authoring the blog entries is performed the same way as authoring other content in Django CMS, only instead of CMS pages you are adding blog entries.
Blog entries are split into two placeholders, On_Index_Page and The_Rest. Content in On_Index_Page is displayed on entries lists, and the whole blog entry content is made by appending The_Rest to it.
It is recommended to use Markup plugin for content into which you can add other plugins (like pictures and files). If you want to add a gallery of pictures use Folder plugin (and enable Slideshow) which you add bellow the Markup plugin where you describe the gallery which follows.
To add a new blog entry:
- open blog admin section
- in upper right corner click Add entry:
- select the language of the entry (currently Slovene or English)
- enter the title, tags and choose the author
- click on Save and continue editing
- to On_Index_Page and The_Rest placeholders add relevant content/plugins (probably Markup plugin with some content)
If content is short, use only On_Index_Page placeholder, otherwise use both, having some introduction/motivation content in On_Index_Page placeholder and then the rest in The_Rest placeholder. If unsure, check how other similar blog entries are made.
Important: Do not publish the blog entry until it is finished. As people are using RSS feed to read the blog, they will get the unfinished version immediately and it will not get updated with the finished version later on.
If you want to see how a blog entry looks like on the blog before it is published, use View on site option in the upper right corner of the admin where you are editing the blog entry:
Important: The blog is multilingual. If it is possible publish entries in both languages (currently Slovene and English).
Once you have an entry in one language, open the admin for editing the blog entry, select another language and enter the content in this language.
Markup plugin provides support for Trac Wiki syntax so you can enter the content in familiar way. The content is rendered to HTML and shown in a given placeholder.
You can make links with following namespaces:
- to access Django CMS pages (using optional reverse ID to identify them) or anything else in Django namespace, accessible by reverse
- to access django-filer files (using original filename, current name, SHA-1 hash or stored file path)
- to access cmsplugin-blog entries (using slug, and optionally language code)
[cms:page-with-name Page with reverse ID name] [cms:admin:index Admin main page] [filer:original-filename.png File] [blog:my-first-entry First blog entry] [blog:en:my-first-entry First blog entry in English]
wiki namespace known in Trac is not available here as we do not have really a wiki here. Instead, intertrac namespaces to wlan slovenija Trac installations are provided:
- to wlan slovenija growing Trac, this Trac
- to wlan slovenija development Trac, our development Trac
- to Open Networks Interoperability Trac
So you can do something like:
[grow:ticket:42 #42] ''[dev:wiki:Nodewatcher nodewatcher]''
- for links to our live nodewatcher installation
- for links to posts on mailing lists
- for links to English Wikipedia
- for links to Slovenian Wikipedia
- url macro which wrapps Django's url template tag
- now macro which wrapps Django's now template tag (an example of a dynamic macro)
There is a special CMSPlugin macro which renders a Django CMS plugin which was inserted into the wiki markup. Probably you should not use it manually but through the web interface. It is used only to tell Macro plugin where in the wiki markup to render a subplugin. The following (sub)plugins are common:
- file plugin: it inserts the text link to the file into content
- image plugin: it inserts an image into the content
- it is common to select Blog thumbnails preset option to generate common type of a thumbnail
- you can also select to create a link to the inserted image
Important: If inserting photos, do not forget to resize them to the web size first (instructions for that bellow).
We use filer Django application for management of files and images used on the website and blog. The idea is to have all files and photos stored/archived in one web location/storage accessible to all, from where we can then take content to fill pages and blog entries. So there are two types of files, images, and videos stored in filer:
- private/archive files, images, and videos stored only to have everything in one place
- this means for example high-resolution (original) photos, not-edited raw videos
- we do not really want them to be public, mostly because they are too large for web gallery, but also could give away some privacy or security sensitive details
- we also want to make public also best of best of photos, not simply everything we photograph, but it is useful to have an archive of everything
- public files and images to use for pages and blog entries
- they are often a selection of all stored/archived files and with some post-processing (like resizing images to be more suitable for web use)
You can access the filer through its entry in Django admin:
It provides the following folders:
- Accounting (private)
- here we store files used for accounting (receipts, for example); they are internal and private and not published anywhere, just for an archive
- Blog images (misc, public)
- miscellaneous images to use in blog, like some clipart, screenshots and similar are kept here
- Files (public)
- we store files like PDFs and other files we want to provide on the website or blog here
- Photos (originals, private)
- all (successful) photos (originals) we take are stored here, mostly uploaded directly from the camera
- Photos (resized from the originals, public)
- here we store a selection of photos we choose to publish, resize them with filer action to website size
- Site images (misc, public)
- to be used as images for the website, like logos and such
- Videos (originals, private)
- not-edited and raw video material; we are collecting all video material here so that we can produce videos later on by combining them together
- Videos (public)
- edited and produced video files we publish on the website or blog
Important: It may be that you do not have necessary permissions to see all of above folders. If you believe your files should be in a folder you do not have access to, ask somebody else to put files there for you. Or ask for more permissions.
Important: Never publish images larger than 1000x1000 pixels on the website. If you have such images, store them in private images folder (for archive) and resize them into public folder. If you do not have permissions to do that, ask for help.
filer provides bulk actions to (post-)process files, images/photos and/or folders. We use that to create images suitable for publishing for the web from originals:
- we select wanted images (we could choose the whole folder, but we probably do not want all taken photos on the web – make a selection of good and interesting photos!) from private archive (they should have a meaningful filename already)
- we choose Copy selected files and/or folders filer action, selecting some folder under Photos (resized from the originals, public) as destination
- after we have copied the images, we select copies and resize them with Resize selected images filer action
- under Thumbnail option we select Blog images which is a good preset for resizing all images for the web, we leave all other options empty/unchanged as they will not be used
- we can also remove images we do not want to make public (if we copied the whole folder in previous step), for example, if there are multiple similar images, we choose only one version – again, we do not want to publish everything we managed to photo, but a selection of good and interesting photos
- we can also enter/override metadata like alt and caption text, but we can also specify this in the plugin when adding an image (just not when displaying multiple images in a gallery)
- if we are lazy and do not want to enter all metadata manually, we can also bulk rename images and then this filename will be used when displaying the image on the website, we are mostly using simply a %(counter)03d renaming template
Currently the filer does not provide permissions on folders, just files. So it is necessary to run bulk actions on private and public folders from time to time to ensure that all files below it has enabled or disabled permissions, respectively. This can be done through two actions: Enable permissions for selected files and Disable permissions for selected files. Both of those actions operate recursively, so it is necessary to run the on top-level folders.
Django CMS provides a very simple way of adding additional custom plugins which can provide interesting new content. For example, some dynamic forms which could ask the user for some input and display the output, showcasing some new nodewatcher feature. So if you require something like that, do not be afraid to envision it and ask.
Custom Trac Macros
The same goes for Trac macros to be included in the wiki markup. Trac also provides a very simple way of creating new macros, so if you just need some special output inside of the Trac markup: it is more than doable.
Custom Filer Actions
Filer actions to process files and/or files can be defined, too. So if there is some batch processing necessary regularly, it can be added.
There are some known issues (particularities and non-intuitive behavior) of our CMS which can sometimes lead to loss of data (and your precious work).
- To be sure, always first save all open plugins manually and just after that save the page or blog entry in Django admin. Plugins, pages and blog entries all are independent objects and while they are displayed together in the Django admin, they are internally independent. So first save plugins and then save the containing object (page or blog entry).
- When copying plugins from one language to another, the order of plugins might not be what is shown. Save everything and reload the Django admin page to see what is really stored in the database.
- In general always verify the order of plugins after you save everything, it tends to get mixed up.
- When creating a second language of the page or blog entry, first enter its metadata (title and other things), save it, and then continue adding plugins. Django admin allows you to add plugins to not yet created language but they are in fact not saved anywhere.
- cmsplugin-viewonsite.png (4.3 KB) - added by mitar 6 years ago.
- cmsplugin-addentry.png (4.0 KB) - added by mitar 6 years ago.
- cmsplugin-placeholders.png (28.4 KB) - added by mitar 6 years ago.
- cmsplugin-blog.png (7.5 KB) - added by mitar 6 years ago.
- filer.png (5.9 KB) - added by mitar 6 years ago.
- filer-actions.png (72.5 KB) - added by mitar 5 years ago.
- filer-listing.png (92.9 KB) - added by mitar 5 years ago.