Learn how to configure Django for use with Filebase

What is Django?

Django is a Python web framework designed for rapid, highly-scalable development and deployment of web applications. Django offers a clean, pragmatic and secure design that enables developers to create web apps quickly and efficiently. Django is free and open source.

Read below to learn how to create a basic Django web app that communicates with your Filebase account and Filebase buckets.


This guide was written using Ubuntu 20.04. Commands may vary depending on your operating system.

This guide shows a sample configuration and how to connect a Django application to Filebase. Filebase is unable to provide debugging for custom applications due to their individualized nature.

1. Install Django with the following command:

pip install django

2. Confirm the Django installation with the following command:


This command will return a list of django core commands.

3. Create a new Django project with the following command:

django-admin startproject projectname

This command will create a Django project with the base level framework.

4. Navigate to the location of the file inside your project.

Your project’s directory will be a sub directory of where you ran the startproject command. In this example, the project is located at /home/filebase/testproject.

5. Run the following command to start the Django server:

python3 runserver

6. In a web browser, navigate to your Django server running at

You should see the following webpage:

7. Now you need to connect the Django project to Filebase.

Start by installing django-storages with the following command:

pip install django-storages

8. Next, install the boto3 library with the following command:

pip install boto3

9. Edit the file to include “storages” under the INSTALLED_APPS:

10. Configure the file to reflect your Filebase credentials and bucket information.

Add the following lines to the file, replacing values as necessary to match your configuration:

STATIC_ROOT = ‘static’

AWS_ACCESS_KEY_ID = 'Filebase-Access-Key'
AWS_SECRET_ACCESS_KEY = 'Filebase-Secret-Key'
AWS_STORAGE_BUCKET_NAME = 'Filebase-Bucket-Name'


AWS_LOCATION = ‘static’

	os.path.join(BASE_DIR, ‘randomsite/static’),

STATICFILES_STORAGE = ‘storages.backends.s3boto3.S3Boto3Storage’

11. Run the following command to pull the static objects from your Filebase bucket:

python3 collectstatic

When prompted, enter ‘yes’. The output should resemble the following:

12. In your Filebase bucket there will be a new folder titled ‘Static’ that contains your Django project files.

From here, you can interact with the Filebase bucket from within your Django project.

If you have any questions, please join our Discord server, or send us an email at

Last updated