Making a beta code for a public django site
Do what StackOverflow did.
They had a simple email/password form. It had a single hard-coded password (falkensmaze). When the user gets the password right set a cookie. eg. auth=1
Don't worry about it being unsecure. Who care's if someone hacks into the beta?
Apache/htaccess is also a nice and simple solution.
Start with this Django snippet, but modify it to check request.session['has_beta_access']
. If they don't have it, then have it return a redirect to a "enter beta code" page that, when posted to with the right code, sets that session variable to True
.
Making it a public beta then just consists of removing that middleware from your MIDDLEWARE_CLASSES
setting.
You can probably restrict access to the entire site via apache with htaccess, taking the problem out of the django's project space entirely.