Package: django-fluent-faq
django-fluent-faqThis Django application adds a FAQ engine to sites built withdjango-fluentCMS.Features:MultilingualMultisiteCategories and questionsSEO fields (meta keywords, description)Used applications:Multilingual support based ondjango-parler.Optionalintegration withdjango-taggitanddjango-taggit-autocomplete-modifiedfor tag supportOptionalintegration withdjango-fluent-pagesOptionalintegration withdjango.contrib.sitemapsInstallationFirst install the module, preferably in a virtual environment:gitclonehttps://github.com/edoburu/django-fluent-faq.gitcddjango-fluent-faqpipinstall.# Install the plugins of fluent-contents that you use:pipinstalldjango-fluent-contents[text]# Optional: to add tagging support + autocomplete use:pipinstalldjango-taggitdjango-taggit-autocomplete-modifiedConfigurationAdd the applications tosettings.py:INSTALLED_APPS+=(# FAQ engine'fluent_faq',# The content plugins'fluent_contents','fluent_contents.plugins.text',# Support libs'categories','categories.editor','django_wysiwyg',# Optional tagging'taggit','taggit_autocomplete_modified',)DJANGO_WYSIWYG_FLAVOR="yui_advanced"Note that not all applications are required;
tagging is optional, and so are the variousfluent_contents.plugin.*packages.Include the apps inurls.py:urlpatterns+=patterns('',url(r'^admin/util/taggit_autocomplete_modified/',include('taggit_autocomplete_modified.urls')),url(r'^faq/',include('fluent_faq.urls')),)The database can be created afterwards:./manage.pysyncdbIn case additional plugins ofdjango-fluent-contentsare used, follow theirinstallation instructionsas well.
Typically this includes:adding the package name toINSTALLED_APPS.runningpip installdjango-fluent-contents[pluginname]running./manage.py syncdbConfiguring allowed pluginsTo limit which plugins fordjango-fluent-contentscan be used in the FAQ answer, use:FLUENT_CONTENTS_PLACEHOLDER_CONFIG={'faq_answer':{'plugins':('TextPlugin','PicturePlugin','OEmbedPlugin','SharedContentPlugin','RawHtmlPlugin',),},}Configuring the templatesTo display the blog contents, afluent_faq/base.htmlfile needs to be created.
This will be used to map the output of the module to your site templates.The base template needs to have the blocks:content- displays the main contentsidebar_content- displays the sidebar contenttitle- the title fragment to insert to the<title>tag.meta-title- the full contents of the<title>tag.meta-description- thevalueof the meta-description tag.meta-keywords- thevaluefor the meta-keywords tag.og-type- the OpenGraph type for Facebook (optional)og-descriptionthe OpenGraph description for Facebook (optional)Thefluent_faq/base.htmltemplate could simply remap the block names to the site’sbase.htmltemplate.
For example:{%extends"base.html"%}{%blockheadtitle%}{%blocktitle%}{%endblock%}{%endblock%}{%blockmain%}{# This area is filled with the question details:
    {% block content %}{% endblock %}

    {# Add any common layout, e.g. a sidebar here #}{%blocksidebar_content%}{%endblock%}{%endblock%}When all other block names are already available in the site’sbase.htmltemplate,
this example should be sufficient.Adding pages to the sitemapOptionally, the blog pages can be included in the sitemap.
Add the following inurls.py:fromfluent_faq.sitemapsimportFaqQuestionSitemap,FaqCategorySitemapsitemaps={'faq_questions':FaqQuestionSitemap,'faq_categories':FaqCategorySitemap,}urlpatterns+=patterns('',url(r'^sitemap.xml$','django.contrib.sitemaps.views.sitemap',{'sitemaps':sitemaps}),)Integration with django-fluent-pages:To integrate with the page types ofdjango-fluent-pages, don’t includefluent_blogs.urlsin the URLconf:urlpatterns+=patterns('',url(r'^admin/util/taggit_autocomplete_modified/',include('taggit_autocomplete_modified.urls')),)Instead, add a page type instead:INSTALLED_APPS+=('fluent_pages','fluent_faq.pagetypes.faqpage',)A “FAQ Module” page can now be created in the page tree ofdjango-fluent-pagesat the desired URL path.ContributingThis module is designed to be generic, and easy to plug into your site.
In case there is anything you didn’t like about it, or think it’s not
flexible enough, please let us know. We’d love to improve it!If you have any other valuable contribution, suggestion or idea,
please let us know as well because we will look into it.
Pull requests are welcome too. :-)