App Profile Design Patterns - Lookaway CMS

Documented by kbruder tech✞ᵀᵀᴹ on Apr 05, 2021
Last updated on Jun 05, 2021


logo

Introduction

Lookaway CMS comes with mixins, models, forms, and views that can be used when writing new Django apps. These powerful customization features can extend your models and views. For example, you can change the landing page title or background image without having to touch any code. These mixins were created and implemented so that Lookaway CMS can be used out of the box to create simple but distinct and branded websites by people that have no development experience. If you look at the code repository you will notice that the core Lookaway apps Objects, Members, etc. and the example apps Posts, Art, Music, etc. all not only use the mixins, but implement them in slightly different ways.

This document was created as a reference for people who are using Lookaway CMS and wish to either customize the existing code or create new custom apps that more or less adhere to Lookaway app design patterns. One of the great things about Django is the documentation. This guide assumes you are familiar with the Django framework. Please take a look at the relevant topics while following this document.


Code Updates

The code samples on this page and pages linked from it will be updated with a close approximation of the "release_candidate_v1" branch soon.

Caution: Lookaway is still in development


Mixins

Lookaway App Profile Mixins

Information about the custom Django class mixins built for and used by Lookaway CMS App Profiles.


Models

Lookaway App Profile Models

Learn how to use the AppProfile mixin to add profile settings to your Lookaway CMS apps.

🌐 https://docs.djangoproject.com/en/3.1/topics/db/models/#multipl…


Forms

Lookaway App Profile Forms

Learn how to add the form classes used in the Create and Update views for the Lookaway CMS AppProfile and AppPageSection models.


Views

Lookaway App Profile Views

Learn how to use the AppProfiles to add contextual content to your Lookaway CMS landing pages.


URLs

Lookaway App Profile URLs

This document will explain how to configure URLs for Lookaway App Profiles.


HTML Templates

Lookaway CMS HTML Templates

Information about Lookaway CMS templates and Lookaway App Profile code integration with examples.


CSS Classes

static/css/foo.css
.foo-alert {
  display: inline-block;
  border-style: solid;
  border-width: 3px;
  border-color: #111111;
}

.foo-bg {
  background-color: #222222;
  color: #eeeeee;
  border-radius: 0px 0px 25px 25px;
  padding-top: 15px;
  margin-bottom: 40px;
}

.foo-brand-name {
  font-family: 'Baloo Paaji 2', sans-serif;
}

.foo-header {
  padding: 15px;
  border-radius: 5px;
}

.foo-list-card {
  color: #ffffff;
  background-color: #222222;
  max-width: 550px;
  display: block;
  padding: 10px;
  margin: 15px;
  border-style: solid;
  border-width: 5px 5px 5px 5px;
  border-color: #111111;
  border-radius: 5px;
}

.foo-list-image {
  display: block;
  width: 100px;
  height: 100px;
  margin-left: 15px;
  margin-bottom: 10px;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #222222;
}

.foo-list-li {
  background-color: #222222;
  color: #ffffff;
  border-style: solid;
  border-width: 0px 5px 5px 5px;
  border-color: #111111;
}

.foo-logo {
  max-height: 150px;
  max-width: auto;
  margin-right: 10px;
  margin-bottom: 10px;
}

.foo-meta {
  font-size: 0.8em;
}

.foo-page-header {
  margin: auto;
  display: block;
}

.foo-page-section {
  padding: 5px;
  margin: 5px;
}

.foo-page-span {
  color: #ffffff;
  background-color: #222222;
  padding: 10px;
  line-height: 1.75;
  border-radius: 5px;
}

.foo-section {
  color: #eeeeee;
  background-color: #222222;
  max-width: 100%;
  padding: 15px;
  margin-bottom: 10px;
  position: relative;
  border-color: #111111;
  border-style: solid;
  border-width: 3px;
  border-radius: 5px;
}

.foo-title {
  font-family: 'Averia Serif Libre', serif;
}

.foo-video-md {
  max-width: 100%;
  max-height: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

Source: kbruder Tech


Conclusion

With Lookaway, there is a lot of novel design and code beyond the existing Django framework. Hopefully Lookaway CMS App Profiles provide the features and flexibility you need to create a modern, secure and simple website and make available the information you need to disseminate with little or no coding.


Referenced by

Lookaway CMS HTML Templates

Information about Lookaway CMS templates and Lookaway App Profile code integration with examples.

Lookaway CMS - Open Source Content Management System

Lookaway CMS is an open source content management system for independent publishing. Built with Python and Django.

bitcoin:3MnhNRKgrpTFQWstYicjF6GebY7u7dap4u
Bitcoin Accepted Here

3MnhNRKgrpTFQWstYicjF6GebY7u7dap4u

Please donate some Bitcoin to our site. We can use it to keep improving the site and open up to more members. Any amount will help. Thank you.


litecoin:MT61gm6pdp9rJoLyMWW5A1hnUpxAERnxqg
Litecoin Accepted Here

MT61gm6pdp9rJoLyMWW5A1hnUpxAERnxqg

Please donate some Lite to our site. We can use it to keep improving the site and open it up to more members. Any amount will help. Thank you.