Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Django project and site deployment using virtualenv, uWSGI, nginx, etc.

Project Description

Django Backstage

In the early days of Django, running apps were very much tied to specific websites.

In order to make apps and pages reusable between websites, the Sites framework was integrated into Django.

This historically makes sense in the context of an Apache-modwsgi environment, which hardwired individual running Django apps to individual web domain names.

Jump ahead to today where the emerging recommended standard is uwsgi + nginx. This is an era where your Django apps may be providing RESTful services, WebSockets, and any of a variety of other services, in additional to ‘traditional’ html/css/js content.

And thanks to uWsgi, you may have as many of these various services running on as many different ports (or sockets) as you wish, blissfully running along without the need for any additional webserver (goodby apache) whatsoever.

It is not until later (if at all) when we bind one of our happy little uWsgi services to a webserver (hello nginx - but more about that later) that we are in the logical realm of talking about ‘sites’ in the context of web domain names and the Sites framework.

Some may just be building blocks to larger services and not exposed in a public namespace so referring to them as Sites is clearly meaningless in this context.

We need a new way to talk about and manage these services.

So, we introduce here the Django Backstage project and use (and probably over-abuse) a Jazz metaphor to represent its structural and functional components:

class Venue:
In Backstage, a Venue is analogous to a plain vanilla Django project. Just as a project may have a number of Apps, a Venue may have a number of Acts. The Venue is also the top-level of a virtual environment. Think: VENue = Virtual ENvironment to help remember.
class Act:
An Act is essentially a runnable Django application. (Runnable, not necessarily Running.) The analogy is a musical Act (performer, ensemble, group, etc.) Miles Davis sometimes had the reputation of being reclusive. Davis may have gone periods between performances, but remained a musical Act all the while. It’s the existence, not their performance (in the case of musicians) that define them as Acts; likewise it is the existence of your app, not the fact that it is running, that defines it as an Act.”“”

So, what does backstage do?

  • Backstage allows you to create and launch Django projects and apps extremely quickly.
  • It handles building and deploying the python virtual environment.
  • Backstage integrates with uWSGI and allows you to stop and restart Acts on the fly without restarting the web server.

Getting Started:

pip install django_backstage
from backstage.shortcuts import new_venue, new_act\n
venue = new_venue('MyVenue', '/tmp') # create a new venue named 'MyVenue' and place it in the /tmp folder.
# this will build the Virtual Environment for the Venue
act = new_act(venue,'MyAct') # creates a new Act at MyVenue/acts/MyAct and immediately launches it as a uWSGI application, using the Venue's virtual environment.
act.get_uwsgi_port() # return the port the Act is bound to.
# you can now point your browser to http://localhost:PORT to view your running Act (no need to ever run manage.py runserver ever again!)
act.stop() # stop a running Act
act.start() # start an Act``

Those are the basics for now.

Release History

Release History

This version
History Node

0.0.427

History Node

0.0.425

History Node

0.0.423

History Node

0.0.422

History Node

0.0.421

History Node

0.0.420

History Node

0.0.419

History Node

0.0.418

History Node

0.0.417

History Node

0.0.416

History Node

0.0.415

History Node

0.0.414

History Node

0.0.413

History Node

0.0.411

History Node

0.0.410

History Node

0.0.409

History Node

0.0.408

History Node

0.0.407

History Node

0.0.406

History Node

0.0.405

History Node

0.0.404

History Node

0.0.403

History Node

0.0.402

History Node

0.0.401

History Node

0.0.400

History Node

0.0.212

History Node

0.0.211

History Node

0.0.210

History Node

0.0.209

History Node

0.0.208

History Node

0.0.207

History Node

0.0.206

History Node

0.0.205

History Node

0.0.204

History Node

0.0.203

History Node

0.0.202

History Node

0.0.201

History Node

0.0.200

History Node

0.0.199

History Node

0.0.198

History Node

0.0.197

History Node

0.0.196

History Node

0.0.195

History Node

0.0.194

History Node

0.0.193

History Node

0.0.192

History Node

0.0.191

History Node

0.0.190

History Node

0.0.189

History Node

0.0.188

History Node

0.0.187

History Node

0.0.186

History Node

0.0.185

History Node

0.0.184

History Node

0.0.182

History Node

0.0.181

History Node

0.0.180

History Node

0.0.178

History Node

0.0.177

History Node

0.0.175

History Node

0.0.174

History Node

0.0.173

History Node

0.0.172

History Node

0.0.171

History Node

0.0.170

History Node

0.0.169

History Node

0.0.167

History Node

0.0.166

History Node

0.0.165

History Node

0.0.164

History Node

0.0.163

History Node

0.0.162

History Node

0.0.161

History Node

0.0.160

History Node

0.0.159

History Node

0.0.158

History Node

0.0.157

History Node

0.0.156

History Node

0.0.155

History Node

0.0.154

History Node

0.0.153

History Node

0.0.151

History Node

0.0.150

History Node

0.0.149

History Node

0.0.148

History Node

0.0.147

History Node

0.0.146

History Node

0.0.145

History Node

0.0.144

History Node

0.0.143

History Node

0.0.142

History Node

0.0.141

History Node

0.0.140

History Node

0.0.139

History Node

0.0.138

History Node

0.0.137

History Node

0.0.136

History Node

0.0.135

History Node

0.0.134

History Node

0.0.133

History Node

0.0.132

History Node

0.0.131

History Node

0.0.130

History Node

0.0.129

History Node

0.0.128

History Node

0.0.126

History Node

0.0.125

History Node

0.0.123

History Node

0.0.122

History Node

0.0.121

History Node

0.0.120

History Node

0.0.119

History Node

0.0.118

History Node

0.0.117

History Node

0.0.115

History Node

0.0.114

History Node

0.0.113

History Node

0.0.112

History Node

0.0.111

History Node

0.0.110

History Node

0.0.109

History Node

0.0.108

History Node

0.0.107

History Node

0.0.106

History Node

0.0.105

History Node

0.0.104

History Node

0.0.103

History Node

0.0.102

History Node

0.0.101

History Node

0.0.100

History Node

0.0.99

History Node

0.0.98-

History Node

0.0.97-

History Node

0.0.96-

History Node

0.0.95-

History Node

0.0.94

History Node

0.0.93

History Node

0.0.92

History Node

0.0.91

History Node

0.0.90

History Node

0.0.89

History Node

0.0.88

History Node

0.0.87

History Node

0.0.86

History Node

0.0.85

History Node

0.0.84

History Node

0.0.83

History Node

0.0.82

History Node

0.0.81

History Node

0.0.80

History Node

0.0.79

History Node

0.0.78

History Node

0.0.77

History Node

0.0.76

History Node

0.0.75

History Node

0.0.74

History Node

0.0.73

History Node

0.0.72

History Node

0.0.71

History Node

0.0.70

History Node

0.0.69

History Node

0.0.68

History Node

0.0.67

History Node

0.0.66

History Node

0.0.65

History Node

0.0.64

History Node

0.0.63

History Node

0.0.62

History Node

0.0.61

History Node

0.0.60

History Node

0.0.59

History Node

0.0.58

History Node

0.0.57

History Node

0.0.56

History Node

0.0.55

History Node

0.0.54

History Node

0.0.53

History Node

0.0.52

History Node

0.0.51

History Node

0.0.50

History Node

0.0.22

History Node

0.0.21

History Node

0.0.20

History Node

0.0.19

History Node

0.0.18

History Node

0.0.17

History Node

0.0.16

History Node

0.0.15

History Node

0.0.14

History Node

0.0.13

History Node

0.0.12

History Node

0.0.11

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5.2

History Node

0.0.5.1

History Node

0.0.5

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_backstage-0.0.427.tar.gz (81.0 kB) Copy SHA256 Checksum SHA256 Source Aug 30, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting