First Steps in Django Web Development: Applied Examples from Behavioural Research
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
This article provides an overview for behavioural scientists on how web applications work, framed within the perspective of the popular Python web framework Django. Along the way, we will discuss several applied examples of web applications we have successfully developed as part of our research. Our goal is to help researchers with some coding experience get started building research-oriented web applications. We begin with a simple overview of how a user accesses an application through the internet and then build on this by guiding the reader through some of the steps that take place in a Django application during user interaction. Using a minimal example application, we introduce key components of a typical Django project, including URL routing, views, templates, and database models. Beyond these fundamentals, we connect technical concepts to research-driven applications developed by the author. These include TestXR, a platform for immersive AR/VR research; LiveQual, a system for qualitative data collection via WhatsApp integration; and InclusivityXR, an automated accessibility auditing tool using computer vision pipelines. We also work through a selection of commonly used tools and packages from the Django ecosystem, outline several common pitfalls that new developers may encounter, and highlight practical considerations when structuring, extending, and deploying applications. After reading this article, we hope readers will feel comfortable beginning their own path toward writing web applications.