Circumeo supports three methods for creating new Django projects.
This option is equivalent to using django-admin startproject
to create a new project.
You'll also be asked to define an app name. This app name will be used to create an app within the project, just like running manage.py startapp
on your own computer.
You should be presented with the online editor a few moments after submitting the new project form.
Below the editor you will see the project logs. Initial migrations will run automatically as soon as the project is created.
The Django app will boot as soon as migrations are completed. You'll see logs coming from the Gunicorn web server once the app has started. Visitors to your app will show up in the logging window as seen in the example below.
Circumeo will create a dedicated subdomain for your project. You can find this domain name in both the logs and in the bottom left corner of the online editor. New projects take a few moments to boot up. Visiting the URL before the project is ready will show a pending message.
Unknown host: Project may still be deploying. Please wait and try again in a moment.
Dedicated subdomains share circumeo-apps.net
as their common root domain.
An example project domain name might be something like:
za8-visionary-hubble.circumeo-apps.net
Once the app has started up, you should be presented with the normal Django getting started page.
You'll be asked to choose a directory from your local computer.
This directory should be the root directory of the Django project. In other words, the manage.py
file should be contained within this directory. Uploading a Django project that is nested deeper inside higher level directories may not work correctly.
Some directories are automatically filtered out during the upload process. Examples include virtual environments, such as .venv
folders, as well as the default staticfiles
directory. Not everything can be automatically filtered, however, so if you have large files that should not be included, please remove them prior to uploading.
Be sure to include a requirements.txt
file to describe the dependencies of your project.
Circumeo can import projects directly from GitHub.
Before importing, make sure to visit the https://github.com/apps/circumeo-importer link to install the Circumeo App for your GitHub account. Give the app Read permission on the repository you wish to import.
Checking Update settings module gives Circumeo permission to edit your project settings module. Certain settings such as ALLOWED_HOSTS
and CSRF_TRUSTED_ORIGINS
will be modified to include the hosted subdomain for your project. The DATABASES
block will also be updated to use the integrated PostgreSQL that Circumeo provides.
Remember that these changes are not automatically reflected on GitHub. You may want to make similar changes in your version controlled copy before triggering another GitHub update.
Circumeo provides an integrated PostgreSQL database for your project.
To connect to this database, update your settings.py
module to include the following.
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": os.environ["POSTGRES_DB"],
"USER": os.environ["POSTGRES_USER"],
"PASSWORD": os.environ["POSTGRES_PASSWORD"],
"HOST": os.environ["POSTGRES_HOST"],
"PORT": os.environ["POSTGRES_PORT"],
}
}
The connection environment variables are automatically included in all new projects.
SQLite databases will not persist across deployments. The disk storage provided to an instance is temporary and recycled between each deployment of the project.