django cms Documentation Release 3.6.1 Divio AG and contributors Nov 20, 2020 Contents 1 Overview 3 1.1 Tutorials - start here...........................................3 1.2 How-to guides..............................................3 1.3 Key topics................................................3 1.4 Reference.................................................3 2 Join us online 5 3 Why django CMS? 7 4 Software version requirements and release notes9 4.1 Django/Python compatibility table....................................9 Python Module Index 267 Index 269 i ii django cms Documentation, Release 3.6.1 Contents 1 django cms Documentation, Release 3.6.1 2 Contents CHAPTER 1 Overview django CMS is a modern web publishing platform built with Django, the web application framework “for perfectionists with deadlines”. django CMS offers out-of-the-box support for the common features you’d expect from a CMS, but can also be easily customised and extended by developers to create a site that is tailored to their precise needs. 1.1 Tutorials - start here For the new django CMS developer, from installation to creating your own addon applications. 1.2 How-to guides Practical step-by-step guides for the more experienced developer, covering several important topics. 1.3 Key topics Explanation and analysis of some key concepts in django CMS. 1.4 Reference Technical reference material, for classes, methods, APIs, commands. 3 django cms Documentation, Release 3.6.1 4 Chapter 1. Overview CHAPTER 2 Join us online django CMS is supported by a friendly and very knowledgeable community. Our IRC channel, #django-cms, is on irc.freenode.net. If you don’t have an IRC client, you can join our IRC channel using the KiwiIRC web client, which works pretty well. Our django CMS users email list is for general django CMS questions and discussion Our django CMS developers email list is for discussions about the development of django CMS 5 django cms Documentation, Release 3.6.1 6 Chapter 2. Join us online CHAPTER 3 Why django CMS? django CMS is a well-tested CMS platform that powers sites both large and small. Here are a few of the key features: • robust internationalisation (i18n) support for creating multilingual sites • front-end editing, providing rapid access to the content management interface • support for a variety of editors with advanced text editing features. • a flexible plugins system that lets developers put powerful tools at the fingertips of editors, without overwhelm- ing them with a difficult interface • . and much more There are other capable Django-based CMS platforms but here’s why you should consider django CMS: • thorough documentation • easy and comprehensive integration into existing projects - django CMS isn’t a monolithic application • a healthy, active and supportive developer community • a strong culture of good code, including an emphasis on automated testing 7 django cms Documentation, Release 3.6.1 8 Chapter 3. Why django CMS? CHAPTER 4 Software version requirements and release notes This document refers to version 3.6.1. 4.1 Django/Python compatibility table django Django Python CMS 1.4/1.5 1.6/1.7 1.8 1.9 1.10 1.11 2.0 2.1 2.6 2.7 3.3 3.4 3.5 3.6 3.0.18 X X X X X X 3.1.7 X X X X X X 3.2.0 X X X X X X 3.2.1-3.2.5 X X X X X X X X 3.3.0-3.4.1 X X X X X X 3.4.2-3.4.4 X X X X X X X 3.4.5-3.5.x X X X X X X X X X 3.6.x X X X X X X X X See the repository’s setup.py for more specific details of dependencies, or the Release notes & upgrade information for information about what is required or has changed in particular versions of the CMS. The installation how-to guide provides an overview of other packages required in a django CMS project. 4.1.1 Tutorials The pages in this section of the documentation are aimed at the newcomer to django CMS. They’re designed to help you get started quickly, and show how easy it is to work with django CMS as a developer who wants to customise it and get it working according to their own requirements. These tutorials take you step-by-step through some key aspects of this work. They’re not intended to explain the topics in depth, or provide reference material, but they will leave you with a good idea of what is possible to achieve in just a few steps, and how to go about it. 9 django cms Documentation, Release 3.6.1 Once you’re familiar with the basics presented in these tutorials, you’ll find the more in-depth coverage of the same topics in the How-to section. The tutorials follow a logical progression, starting from installation of django CMS and the creation of a brand new project, and build on each other, so it’s recommended to work through them in the order presented here. Installing django CMS We’ll get started by setting up our environment. Requirements django CMS requires Django 1.11 or newer, and Python 2.7 or 3.3 or newer. This tutorial assumes you are using Python 3. Your working environment We’re going to assume that you have a reasonably recent version of virtualenv installed and that you have some basic familiarity with it. Create and activate a virtual environment python3.6-m venv env # Python 2 usage: virtualenv env source env/bin/activate Note that if you’re using Windows, to activate the virtualenv you’ll need: env\Scripts\activate Update pip inside the virtual environment pip is the Python installer. Make sure yours is up-to-date, as earlier versions can be less reliable: pip install--upgrade pip Use the django CMS installer Note: The django CMS Installer is not yet available for django CMS 3.6 or Django 2 or later. This section will be updated or removed before the final release of django CMS 3.6. The django CMS installer is a helpful script that takes care of setting up a new project. Install it: pip install djangocms-installer 10 Chapter 4. Software version requirements and release notes django cms Documentation, Release 3.6.1 This provides you with a new command, djangocms. Create a new directory to work in, and cd into it: mkdir tutorial-project cd tutorial-project Run it to create a new Django project called mysite: djangocms-f-p. mysite This means: • run the django CMS installer • install Django Filer too (-f)- required for this tutorial • use the current directory as the parent of the new project directory (-p .) • call the new project directory mysite Note: About Django Filer Django Filer, a useful application for managing files and processing images. Although it’s not required for django CMS itself, a vast number of django CMS addons use it, and nearly all django CMS projects have it installed. If you know you won’t need it, omit the flag. See the django CMS installer documentation for more information. Warning: djangocms-installer expects directory . to be empty at this stage, and will check for this, and will warn if it’s not. You can get it to skip the check and go ahead anyway using the -s flag; note that this may overwrite existing files. Windows users may need to do a little extra to make sure Python files are associated correctly if that doesn’t work right away: assoc.py=Python.file ftype Python.File="C:\Users\Username\workspace\demo\env\Scripts\python.exe""%1"% * By default, the installer runs in Batch mode, and sets up your new project with some default values. Later, you may wish to manage some of these yourself, in which case you need to run it in Wizard mode. The default in Batch mode is to set up an English-only project, which will be sufficient for the purposes of this tutorial. You can of course simply edit the new project’s settings.py file at any time to change or add site languages or amend other settings. The installer creates an admin user for you, with username/password admin/admin. Start up the runserver python manage.py runserver Open http://localhost:8000/ in your browser, where you should be invited to login, and then create a new page. 4.1. Django/Python compatibility table 11 django cms Documentation, Release 3.6.1 Congratulations, you now have installed a fully functional CMS. If you need to log in at any time, append ?edit to the URL and hit Return. This will enable the toolbar, from where you can log in and manage your website. If you are not already familiar with django CMS, you can take a few minutes to run through the basics of the django CMS tutorial for users. Templates & Placeholders In this tutorial we’ll introduce Placeholders, and we’re also going to show how you can make your own HTML templates CMS-ready. Templates You can use HTML templates to customise the look of your website, define Placeholders to mark sections for managed content and use special tags to generate menus and more. You can define multiple templates, with different layouts or built-in components, and choose them for each page as required. A page’s template can be switched for another at any time. You’ll find the site’s templates in mysite/templates. By default, pages in your site will use the fullwidth.html template, the first one listed in the project’s settings.py CMS_TEMPLATES tuple: CMS_TEMPLATES=( ## Customize this ('fullwidth.html','Fullwidth'), ('sidebar_left.html','Sidebar Left'), ('sidebar_right.html','Sidebar Right') ) Placeholders Placeholders are an easy way to define sections in an HTML template that will be filled with content from the database when the page is rendered.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages278 Page
-
File Size-