OneCompiler
Django

Django

Full Stack

Django is a batteries-included Python web framework for getting real applications shipped fast. This workspace has a full Django project laid out and SQLite ready, so you can start the dev server and see it in the built-in browser preview on port 8000.

What's included

Django project, ready

A standard project with manage.py and a mysite settings package is already scaffolded. Run the dev server and the preview opens on port 8000.

Real VS Code

The full cloud editor with an integrated terminal, extensions and a debug config in the .vscode folder, so F5 starts the runserver in debug mode.

SQLite included

A db.sqlite3 file ships with the project, so migrations and the ORM work out of the box without setting up a separate database.

manage.py and pip

Run migrations, create apps and open a shell through manage.py, and install anything else you need with pip.

Tech stack

DjangoPythonSQLitepipVS Code

What is Django?

Django is a high-level Python web framework that comes with most of what a web app needs out of the box: an ORM, an admin site, routing, forms and a templating engine. It leans toward convention over configuration, which is why teams reach for it when they want to build something substantial without assembling the pieces themselves.

This workspace gives you a standard Django project rather than an empty directory. The project layout, settings module and SQLite database are already in place, so you can run migrations, start the server and begin adding apps right away.

What's inside this workspace

It's a conventional Django project: manage.py at the root and a mysite package holding settings.py, urls.py, and the WSGI and ASGI entry points. Django is installed from requirements.txt, and db.sqlite3 is there for the default database. A debug config in .vscode means F5 launches runserver under the debugger.

Add your own apps with python manage.py startapp, wire them into INSTALLED_APPS and urls.py, and run migrations as your models change. It's the same workflow you'd have locally, minus the setup.

Running your app

Open the terminal and run python manage.py runserver 0.0.0.0:8000. The server starts on port 8000 and Studio opens it in the built-in browser preview. To let the app load inside the Studio browser, set ALLOWED_HOSTS = ['*'] in settings.py and remove the XFrameOptions middleware from the MIDDLEWARE list, as noted in the template README.

What you can build with it

Full web applications with an admin backend, content sites, REST APIs with Django REST Framework, and data-driven apps that lean on the ORM. It's a good fit when you want structure and built-in tooling from day one.

Frequently asked questions

How do I run the Django app?

Open the terminal and run python manage.py runserver 0.0.0.0:8000, or press F5 to start it in debug mode. The server runs on port 8000 and Studio opens it in the built-in preview.

The app won't load in the Studio browser. What do I change?

In settings.py, set ALLOWED_HOSTS = ['*'] and remove django.middleware.clickjacking.XFrameOptionsMiddleware from the MIDDLEWARE list. Those two changes let the app render inside the Studio browser tab.

Does it come with a database?

Yes. SQLite ships with the project as db.sqlite3, so the ORM and migrations work immediately. You can point Django at PostgreSQL or another database later by editing the DATABASES setting.

How do I add an app or run migrations?

Use manage.py from the terminal: python manage.py startapp <name> to create an app, then python manage.py makemigrations and python manage.py migrate to apply schema changes.

Can I build a REST API with this?

Yes. Install Django REST Framework with pip, add it to INSTALLED_APPS, and build serializers and viewsets. The project is a normal Django setup, so the usual packages work as expected.

Is it free?

Django needs a paid plan. The free templates are marked as such in Studio, and you can upgrade from the pricing page any time to launch this workspace.

Related templates

Django online Studio — cloud Python web workspace | OneCompiler