This guide assumes you are already familiar with Django and are comfortable working with projects and developing applications, and that you prefer working from the command line. If not, we recommend our tutorial instead.

For a complete introduction for developers, see our Divio Cloud developer handbook.

Set up your project on the Divio Cloud

  • Log in. Visit the Divio Cloud Control Panel to sign in. Create a new account (it's free) if you don't already have one.
  • Create a project. Each website is a project. Hit Add a new project. Select your new project type and configuration (we recommend a Django Base Project) and then Create project.
  • Deploy the Test server. In the Control Panel, hit Deploy to launch the Test server. This is your private staging server.

Set up your project locally

  • Download the Divio app (for Macintosh, Linux and Windows) and launch it. It will guide you through the set-up process and install components such as Docker.
  • Add your public SSH key to the Control Panel (refer to our guide to setting up SSH keys if necessary). 
  • Install the Divio CLI, with pip install divio-cli .
  • Set up your project locally, by running divio project setup <project-slug>  (the Local Development section of the Control Panel will show you the project slug to use). This will build the project locally.
  • Start the local server. cd  into the freshly-created project directory, and run divio project up . This will launch the local server and open it in your web browser.

Add a new application to the project

In this section we'll install a simple Django polls application in your project, and deploy it.

  • Open your project files. You will find that the project is fairly a standard (but opinionated) Django project.
  • Add an application to the project. Download our Django Polls application and place its polls directory inside your project. 
  • Configure INSTALLED_APPS. Add "polls" to the INSTALLED_APPS.extend([]) in the project's
  • Configure URLs. Add url(r'^polls/', include('polls.urls', namespace='polls')), to the urlpatterns  in
  • Migrate the database. Run docker-compose run web python web migrate polls .

Now you can check that your project's admin shows the new application and allows you to add Question  and Choice  objects.

Deploy your changes

  • Push your changes to the Cloud. Your project is a Git repository; use Git to add , commit  and push  your changes. 
  • Deploy your changes. Run divio project deploy test .  The Test Server will redeploy with your changes, and perform the migrations automatically.
  • Open your Cloud Site. Run divio project test .

Where to go next

You have now used the Divio Cloud to develop and deploy a demonstration Django project. These steps represent a very simplified version of the cycle of local development and cloud deployment. We now recommend that you take our complete tutorial for developers.

Did this answer your question?