.. _processes: ********* Processes ********* Site contents are stored in the database in both Markdown and HTML formats. Any changes must be saved to the database before they can be published as .html files. .. index:: Index (Process), Home (Process) .. _home_index: Index ===== Homepage of DMCM. Lists all of the :ref:`page_structure`, :ref:`list_structure` and :ref:`blog_page_structure` in the database in HTML tables. :Implemented by: View: `home `_. Models: `Page `_; `List `_; `Blog Page `_. Pages ----- :Table structure: Title Name of the :ref:`Page `. Filename Name of the .html and .txt files page contents are written to when Published. Also a link to Update the :ref:`Page `. Parent Parent :ref:`Page ` in the site hierarchy. Updated When the :ref:`Page ` was last saved to the database. Lists ----- :Table structure: Title Name of the :ref:`List `. Update Link to Update the :ref:`List `. Parent The :ref:`Page ` whose content is this List. Updated When the :ref:`List ` was last saved to the database. Blog Entries ------------ :Table structure: Date Publication date of this :ref:`Blog Page `. Title Name of the :ref:`Blog Page `. Update Link to Update the :ref:`Blog Page `. Updated When the :ref:`Blog Page ` was last saved to the database. Example ------- .. image:: _static/index.png :alt: DMCM Index .. index:: Add Blog Page (Process) .. _add_blog_page: Add Blog Page ============= Creates a new :ref:`Blog Page ` entry on the database. :Fields: Date Date that this :ref:`Blog Page `. was published. Title Name of the :ref:`Blog Page `. Filename Added to Date to give name of the .html and .txt files written when this :ref:`Blog Page ` is published. Body Enter :ref:`Blog Page ` contents in Markdown format. :Implemented by: View: `blog_add `_. Model: `BlogPage `_. Form: `BlogPageForm `_. Example ------- .. image:: _static/add_blog_page.png :alt: DMCM Add Blog Page .. index:: Add Blog Page (Process) .. _add_page: Add Page ======== Creates a new :ref:`Page ` entry on the database. :Fields: Title Name of the :ref:`Page `. Parent Parent :ref:`Page ` in the site hierarchy. Chosen from existing pages on the database. Directory Name Name of the directory to which the .html, file representing this page, is written when the :ref:`Page ` is published. Filename Name of the .html file, representing this page, which is written when the :ref:`Page ` is published. Body Enter :ref:`Page ` contents in Markdown format. :Implemented by: View: `page_add `_. Model: `Page `_. Form: `PageForm `_. Example ------- .. image:: _static/add_page.png :alt: DMCM Add Page .. index:: Add List (Process) .. _add_list: Add List ======== Creates a new :ref:`List ` entry on the database. :Fields: Title Name of the :ref:`List `. Parent Parent :ref:`Page ` in the site hierarchy. Chosen from existing pages on the database. Prefix Text which comes before the list items. Template Structure of single list item. Delimiter Separator character for each field in a list item. Data List item fields separated by delimiters. One list item per line. Suffix Text which comes after the list items. :Implemented by: View: `list_add `_. Model: `List `_. Form: `ListForm `_. Example ------- .. image:: _static/add_list.png :alt: DMCM Add List .. index:: Options (Process) .. _amend_options: Amend Options ============= Site-level settings. :Fields: Deployment Directory Directory on hosting server where *.html* files are to be written. Source Directory Sub-directory of Deployment Directory where Markdown version of pages are written. Navigation Menu Site Navigation Menu which appears on each page. Written in HTML. Page Template Django template which is used to provide the structure of all :ref:`pages ` in the site. Written in HTML and using the Django template language. :Implemented by: View: `options `_. Model: `Option `_. Form: `OptionForm `_. .. index:: Publish All Pages (Process) Publish All Pages ----------------- Option to write out all :ref:`pages ` as *.html* to Deployment Directory and Markdown source to Source Directory. Useful after making a change which affects all of the site such as a change to the Navigation Menu which appears on each page. :Implemented by: View: `publish_all `_. .. index:: Generate Site Map (Process) Generate Site Map ----------------- Option to generate a site map. Sites have a tree structure where every page has one parent. Except for the topmost, root, page. A :ref:`List ` is created by traversing the tree and adding each page found to the list. :Implemented by: View: `generate_site_map `_. .. index:: Blog Options (Process) Blog Options ------------ Options used to manage the Blog Entry Pages. :Fields: Root page of blog :ref:`Page ` which contains most recent blog entries and a table containing a row for each :ref:`Blog Page `. Blog summary size Number of most recent blog entries duplicated on the root :ref:`Page ` of the blog. Deployment Directory Directory on hosting server where *.html* files for blog entries are to be written. Source Directory Sub-directory of Deployment Directory where Markdown version of :ref:`Blog Pages ` are written. Example ------- .. image:: _static/options.png :alt: DMCM Options .. index:: Update Page (Process) .. _update_page: Update Page =========== Amend contents of a :ref:`Page ` entry on the database. :Fields: Save Save the :ref:`Page ` on the database. Publish Write the :ref:`Page ` data to .html and .txt files. Body :ref:`Page ` contents in Markdown format. Title Name of the :ref:`Page `. Parent Parent :ref:`Page ` in the site hierarchy. Chosen from existing pages on the database. Directory Name Name of the directory to which the .html, file representing this page, is written when the :ref:`Page ` is published. Filename Name of the .html file, representing this page, which is written when the :ref:`Page ` is published. :Implemented by: View: `page_update `_. Model: `Page `_. Form: `PageForm `_. .. index:: List Replacement (Process) List Replace ------------ Replace contents of this :ref:`Page ` with a :ref:`List `. Option only appears if the current page is the parent of a List. Replaces contents of the Body field with the List. :Implemented by: View: `list_update `_. Models: `Page `_; `List `_. .. index:: Publish Page (Process) Publish ------- Write the HTML data saved on the database for this :ref:`Page ` as a *.html* file to the Deployment Directory. :Implemented by: View: `publish_page `_. Model: `Page `_. Example ------- .. image:: _static/update_page.png :alt: DMCM Update Page .. index:: Update List (Process) .. _update_list: Update List =========== Amend the contents of a :ref:`List ` entry on the database. :Fields: Title Name of the :ref:`List `. Parent Parent :ref:`Page ` in the site hierarchy. Chosen from existing pages on the database. Prefix Text which comes before the list items. Template Structure of single list item. Delimiter Separator character for each field in the Data. Data Field data separated by delimiters. One list item per line. Suffix Text which comes after the list items. :Implemented by: View: `list_update `_. Model: `List `_. Form: `ListForm `_. Edit Parent ----------- Link to the :ref:`Edit Page ` process for the Parent :ref:`Page ` of this :ref:`List `. Example ------- .. image:: _static/update_list.png :alt: DMCM Update List .. _admin_process: Admin ===== Access to the automatic Django Admin interface. Django keeps a history of the contents of the `BlogPage `_, `List `_, `Option `_ & `Page `_ models. The Admin interface can be used to revert to a previous version.