Git Product home page Git Product logo

georgi-petkov / django-cms-quickstart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from django-cms/django-cms-quickstart

0.0 0.0 0.0 63 KB

A Dockerised django CMS project, ready to deploy on Divio or another Docker-based cloud platform, and run locally in Docker on your own machine. A Divio account is not required.

Home Page: https://docs.django-cms.org/en/latest/introduction/01-install.html

License: MIT License

Dockerfile 1.30% Python 63.87% HTML 34.84%

django-cms-quickstart's Introduction

Python application

django CMS quickstart

A Dockerised django CMS project, ready to deploy on Divio or another Docker-based cloud platform, and run locally in Docker on your own machine.

This version uses Python 3.8 running and the most up-to-date versions of Django 3.1 and django CMS 3.8.

This project is endorsed by the django CMS Association. That means that it is officially accepted by the dCA as being in line with our roadmap vision and development/plugin policy. Join us on Slack for more information or questions.

Installation

You need to have docker installed on your system to run this project.

Try it

git clone [email protected]:django-cms/django-cms-quickstart.git
cd django-cms-quickstart
docker compose build web
docker compose up -d database_default
docker compose run web python manage.py migrate
docker compose run web python manage.py createsuperuser
docker compose up -d

Then open http://django-cms-quickstart.127.0.0.1.nip.io:8000 (or just http://127.0.0.1:8000) in your browser.

Customising the project

This project is ready-to-go without making any changes at all, but also gives you some options.

As-is, it will include a number of useful django CMS plugins and Bootstrap 4 for the frontend. You don't have to use these; they're optional. If you don't want to use them, read through the settings.py and requirements.txt files to see sections that can be removed - in each case, the section is noted with a comment containing the word 'optional'.

Options are also available for using Postgres/MySQL, uWSGI/Gunicorn/Guvicorn, etc.

Updating requirements

The project uses a 2 step approach, freezing all dependencies with pip-tools. Read more about how to handle it here: https://blog.typodrive.com/2020/02/04/always-freeze-requirements-with-pip-compile-to-avoid-unpleasant-surprises/

Features

Static Files with Whitenoise

This quickstart demo has a cloud-ready static files setup via django-whitenoise.

In the containerized cloud the application is not served by a web server like nginx but directly through uwsgi. django-whitenoise is the glue that's needed to serve static files in your application directly through uwsgi.

See the django-whitenoise settings in settings.py and the quickstart/templates/whitenoise-static-files-demo.html demo page template that serves a static file.

Contribution

Here is the official django CMS repository: https://github.com/django-cms/django-cms-quickstart/.

Deployment

Note that this is just a demo project to get you started. If you want a full production ready site with all the bells and whistles we recommend you have a look at https://github.com/django-cms/djangocms-template instead.

Env variables

  • to deploy this project in testing mode (recommended) set the environment variable DEBUG to True in your hosting environment.
  • For production environment (if DEBUG is false) django requires you to whitelist the domain. Set the env var DOMAIN to the host, i.e. www.domain.com or *.domain.com.
  • If you want the media hosted on S3 set the DEFAULT_FILE_STORAGE variable accordingly.

Deployment Commands

Configure your hosting environment to run the following commands on every deployment:

  • ./manage.py migrate

Divio Deployment

divio.com is a cloud hosting platform optimized for django web applications. It's the quickest way to deploy this project. Here is a video tutorial and a description of the deployment steps that are mostly applicable for this quickstart project.

django-cms-quickstart's People

Contributors

crydotsnake avatar evildmp avatar jpvm5jyyre1vikl avatar macolo avatar marksweb avatar nicolairidani avatar vinitkumar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.