DjangoFloor¶
Introduction¶
DjangoFloor is an thin overlay of the Django Python web framework for quickly building websites that are ready to deploy. Its main features are:
- easy to develop: a single command line generates a fully-working base project (with complete templates), that you can modify step-by-step, with dedicated development settings,
- easy to deploy: ready to be packaged with separated simple config (.ini) files, without requiring to maintain duplicated config files (prod and dev),
- allowing offline computation (computation in separated processes or dedicated machines) and two-way communication between the server and the JavaScript world via websockets.
- with a complete deployment documentation.
Of course, any thing provided by DjangoFloor can be overriden (like the default templates that are based on the well-known Bootstrap 3).
Requirements¶
DjangoFloor has a bit more requirements than Django:
- Python 3.4+ (however Django 2.0 also requires Python 3.4+),
- Django 1.11+,
- Gunicorn as application server,
- Redis for caching, sessions, websocket management and celery broker,
- a reverse proxy like nginx or apache.
DjangoFloor in a nutshell¶
I assume that you already have a new virtual environment.
pip install djangofloor
djangofloor-createproject
| Your new project name [MyProject]
| Python package name [myproject]
| Initial version [0.1]
| Root project path [.] test
| Use background tasks or websockets [n]
cd test
python setup.py develop
myproject-ctl collectstatic --noinput
myproject-ctl migrate
myproject-ctl check
myproject-ctl runserver
And open your browser on http://localhost:9000/ :)
You can easily create an admin user (password: “admin”) and a standard user (password: “user”):
cat << EOF | myproject-ctl shell
from django.contrib.auth.models import User
if User.objects.filter(username='admin').count() == 0:
u = User(username='admin')
u.is_superuser = True
u.is_staff = True
u.set_password('admin')
u.save()
if User.objects.filter(username='user').count() == 0:
u = User(username='user')
u.set_password('user')
u.save()
EOF
Overview¶
- Installing
- Creating a new project
- Settings system
- Websockets and signals
- Remote functions
- Monitoring view
- Notification system
- Authentication
- Main features… and how to disable them
- Common errors
- Javascript API
- What’s next?
- API Documentation
djangofloor.admin
djangofloor.backends
djangofloor.celery
djangofloor.checks
djangofloor.conf.callables
djangofloor.conf.config_values
djangofloor.conf.defaults
djangofloor.conf.fields
djangofloor.conf.mapping
djangofloor.conf.merger
djangofloor.conf.providers
djangofloor.conf.settings
djangofloor.context_processors
djangofloor.decorators
djangofloor.forms
djangofloor.functions
djangofloor.log
djangofloor.middleware
djangofloor.models
djangofloor.root_urls
djangofloor.scripts
djangofloor.signals
djangofloor.signals.bootstrap3
djangofloor.signals.html
djangofloor.tasks
djangofloor.templatetags.djangofloor
djangofloor.templatetags.pipeline
djangofloor.tests
djangofloor.urls
djangofloor.utils
djangofloor.views
djangofloor.views.auth
djangofloor.views.monitoring
djangofloor.views.search
djangofloor.wsgi.aiohttp_runserver
djangofloor.wsgi.django_runserver
djangofloor.wsgi.exceptions
djangofloor.wsgi.gunicorn_runserver
djangofloor.wsgi.topics
djangofloor.wsgi.window_info
djangofloor.wsgi.wsgi_server