Migrating existing auth.User data to new Django 1.5 custom user model?

South is more than able to do this migration for you, but you need to be smart and do it in stages. Here’s the step-by-step guide: (This guide presupposed you subclass AbstractUser, not AbstractBaseUser) Before making the switch, make sure that south support is enabled in the application that contains your custom user model (for … Read more

Django: Can class-based views accept two forms at a time?

Here’s a scaleable solution. My starting point was this gist, https://gist.github.com/michelts/1029336 i’ve enhanced that solution so that multiple forms can be displayed, but either all or an individual can be submitted https://gist.github.com/jamesbrobb/748c47f46b9bd224b07f and this is an example usage class SignupLoginView(MultiFormsView): template_name=”public/my_login_signup_template.html” form_classes = {‘login’: LoginForm, ‘signup’: SignupForm} success_url=”my/success/url” def get_login_initial(self): return {’email’:’[email protected]’} def get_signup_initial(self): return … Read more

Setting DEBUG = False causes 500 Error

Django 1.5 introduced the allowed hosts setting that is required for security reasons. A settings file created with Django 1.5 has this new section which you need to add: # Hosts/domain names that are valid for this site; required if DEBUG is False # See https://docs.djangoproject.com/en/1.9/ref/settings/#allowed-hosts ALLOWED_HOSTS = [] Add your host here like [‘www.beta800.net’] … Read more